Commit 5434a3f2 authored by vertighel's avatar vertighel
Browse files

Synoptic

parent 3acbdc36
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
[/stage/connection]
resource = State
device = pdu_moxa
depends-on = /telescope/power

[/stage/power]
resource = State
+14 −0
Original line number Diff line number Diff line
@@ -155,6 +155,20 @@ async def status_monitor():
    return await render_template('status.html')


@web_blueprint.route('/synoptic')
async def synoptic_view():
    """
    Render the Synoptic SVG dashboard.

    Returns
    -------
    str
        The rendered HTML content.
    """
    
    return await render_template('synoptic.html')


@web_blueprint.route('/subsystem')
@web_blueprint.route('/subsystem/')
async def subsystems():
+6 −0
Original line number Diff line number Diff line
@@ -84,6 +84,12 @@
                            </a>
                        </li>
                    </ul>

                <li>
                  <a class="nav-link {% if request.endpoint == 'web.synoptic_view' %}active{% endif %}"
                     href="{{ url_for('web.synoptic_view') }}">
                    Synoptic
                  </a>                    
                </li>

            </ul>
+27 −0
Original line number Diff line number Diff line
{% extends "base.html" %}

{% block content %}
<div class="d-flex justify-content-between align-items-center mb-4 border-bottom pb-3">
    <div>
        <h2 class="mb-0">Observatory Synoptic</h2>
        <small id="ws-status" class="text-muted">connecting...</small>
    </div>
</div>

<div class="row">
    <div class="col-12 d-flex justify-content-center p-3 bg-dark rounded border border-secondary shadow-sm">
        <div id="svg-container" style="width: 100%; max-width: 800px; height: auto;">
            <!-- SVG here -->
        </div>
    </div>
</div>
{% endblock %}

{% block scripts %}
  <script>
    // Pass the SVG URL from Jinja to a global variable so the external JS can use it
    window.SYNOPTIC_SVG_URL = "{{ url_for('web.static', filename='img/synoptic.svg') }}";
  </script>
    <!-- ── Synoptic animation  ───────────────────────────────────────── -->
  <script src="{{ url_for('web.static', filename='js/synoptic.js') }}"></script>
{% endblock %}
+1 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading