Commit c71e5761 authored by vertighel's avatar vertighel
Browse files

dev

parent 72234888
Loading
Loading
Loading
Loading
Loading
+58 −22
Original line number Diff line number Diff line
@@ -9,30 +9,66 @@
<div class="row g-3">

    <!-- LEFT: Telescope, Dome & Stage -->
    <section class="col-xl-4 col-lg-6">
    <article class="col-xl-4 col-lg-6">

      <section>      
        <h4 class="p-2">Telescope</h4>
        {{ ctrl.mount_pointing() }}
        {{ ctrl.stage_control() }}

        <div class="bg-dark p-3 rounded border border-secondary shadow-sm mb-3">
        {{ w.widget_input({
        "label": "Focus",
        "info" : "telescope-focuser-position",
        "transform":"round_1",
        "inputs": [{"value": 0}],
        "unit": "µm",
        "buttons": [{"label": "Set", "endpoint": "/telescope/focuser", "method": "PUT"}],
                "info_list": [
                    {"label": "moving", "status": "telescope-focuser-movement"},
                    {"label": "pos", "status": "telescope-focuser-position", "transform": "round_1"}
                ]
        }) }}
        </div>
                
        <div class="bg-dark p-3 rounded border border-secondary shadow-sm">
      </section>

      <section>      
        <h4 class="p-2">Mode selector</h4>

        {{ w.widget_toggle({
        "label": "Named pos.",
        "info": "stage-named",
        "buttons": [
          {"label": "Imaging",  "endpoint": "/stage/named", "val": "imaging",  "method": "PUT"},
          {"label": "Spectro",  "endpoint": "/stage/named", "val": "spectro",  "method": "PUT"},
          {"label": "Échelle",  "endpoint": "/stage/named", "val": "echelle",  "method": "PUT"},
        ],
        }) }}

        {{ w.widget_input({
        "label": "Absolute pos.",
        "info": "stage-position",
        "inputs": [{"value": 1}],
        "unit": "mm",
        "buttons": [{"label": "Go", "endpoint": "/stage/position", "method": "PUT"}],
        }) }}

        {{ w.widget_toggle({
        "label": "Is init?",
        "info": "stage-status",
        "buttons": [
          {"label": "Init",  "endpoint": "/stage/status",  "method": "POST"},
          {"label": "Abort",  "endpoint": "/stage/movement", "method": "DELETE"},
        ],
        }) }}
        
        {{ ctrl.stage_control() }}
      </section>
      
      <section>      
        <h4 class="p-2">Dome</h4>

        {{ w.widget_shutter("/dome/shutter", "/dome/shutter/movement", extra_flags=False) }}
        </div>
      </section>
      
    </article>

    <!-- CENTER: Mode selector + per-mode framing & observation forms -->
    <section class="col-xl-4 col-lg-6">
    <article class="col-xl-4 col-lg-6">

        {{ ctrl.observing_mode_selector() }}

@@ -40,10 +76,10 @@
        {{ mode.spectro_panel() }}
        {{ mode.echelle_panel() }}

    </section>
    </article>

    <!-- RIGHT: Monitors -->
    <section class="col-xl-4 col-12">
    <article class="col-xl-4 col-12">
      <div class="card bg-dark border-secondary shadow-sm">
        
        <div class="card-header p-0 border-secondary">
@@ -81,7 +117,7 @@
        </div>
        
      </div>
    </section>
    </article>

</div>
{% endblock %}
+58 −58
Original line number Diff line number Diff line
@@ -6,15 +6,14 @@
{% block content %}
<div class="row g-3">

    {# ── LEFT: Telescope + Dome ── #}
    <section class="col-xl-4 col-lg-6">
    <article class="col-xl-4 col-lg-6">

        <div class="bg-dark p-4 rounded shadow mb-4">
            <h5 class="pb-2 mb-4">Telescope Status</h5>
        <section>
            <h4 class="p-2">Telescope Status</h4>

            {{ w.widget_toggle({
                "label": "Is Cabinet On?",
                "info": "/telescope/power",
                "info": "telescope-power",
                "buttons": [
                    {"label": "On",  "endpoint": "/telescope/power", "val": true,  "method": "PUT"},
                    {"label": "Off", "endpoint": "/telescope/power", "val": false, "method": "PUT"}
@@ -23,7 +22,7 @@

            {{ w.widget_toggle({
                "label": "Is Tel Parked?",
                "info": "/telescope/coordinates/movement/atpark",
                "info": "telescope-coordinates-movement-atpark",
                "buttons": [
                    {"label": "Unpark", "endpoint": "/telescope/coordinates/movement/unpark", "method": "POST"},
                    {"label": "Park",   "endpoint": "/telescope/coordinates/movement/park",   "method": "POST"}
@@ -32,7 +31,7 @@

            {{ w.widget_toggle({
                "label": "Is Tel Tracking?",
                "info": "/telescope/coordinates/tracking",
                "info": "telescope-coordinates-tracking",
                "buttons": [
                    {"label": "Point webcam",  "endpoint": "/telescope/coordinates/movement/altaz",  "val": [25, 85],  "method": "POST"},
                    {"label": "Track Polaris", "endpoint": "/telescope/coordinates/movement/radec",  "val": "Polaris", "method": "POST"}
@@ -41,7 +40,7 @@

            {{ w.widget_toggle({
                "label": "Petals",
                "info": "/telescope/cover",
                "info": "telescope-cover",
                "buttons": [
                    {"label": "Open",  "endpoint": "/telescope/cover/movement", "val": true,  "method": "POST"},
                    {"label": "Close", "endpoint": "/telescope/cover/movement", "val": false, "method": "POST"}
@@ -50,16 +49,17 @@

            {{ w.widget_input({
                "label": "Global Status",
                "info": "/telescope/error",
                "info": "telescope-error",
                "inputs": [{"value": 2, "placeholder": "Error ID"}],
                "unit": "#",
                "buttons": [{"label": "Clear error", "endpoint": "/telescope/error", "method": "DELETE"}],
                "info_list": [{"label": "detail", "status": "telescope-error-details"}]
            }) }}

            <h5 class="pb-2 mb-4 mt-5">Telescope Offsets</h5>
            <h4 class="p-2">Telescope Offsets</h4>

            {{ w.widget_input({
                "label": "Offsets",
                "inputs": [
                    {"label": "Zd", "value": -300},
                    {"label": "Az", "value": -300}
@@ -67,7 +67,8 @@
                "unit": "″",
                "buttons": [{"label": "Set", "endpoint": "/telescope/coordinates/offset", "method": "PUT"}],
                "info_list": [
                    {"label": "alt", "status": "telescope-coordinates-offset-0"},
                    {"label": null},
                    {"label": "zd", "status": "telescope-coordinates-offset-0"},
                    {"label": "az",  "status": "telescope-coordinates-offset-1"}
                ]
            }) }}
@@ -78,15 +79,15 @@
                "unit": "°",
                "buttons": [{"label": "Set", "endpoint": "/telescope/rotator/movement", "method": "POST"}],
            "info_list": [
              {"label": ""},
              {"label": null},
              {"label": "moving", "status": "telescope-rotator-movement"},
              {"label": "rot", "status": "telescope-rotator", "transform": "round_1"},
              {"label": "rot", "status": "telescope-rotator-movement"},
            ]
            }) }}
        </div>
        </section>

        <div class="bg-dark p-4 rounded shadow mb-4">
            <h5 class="pb-2 mb-4">Dome</h5>
        <section>
            <h4 class="p-2">Dome</h4>

            {{ w.widget_input({
                "label": "Azimuth",
@@ -97,13 +98,15 @@
                    {"label": "Sync", "endpoint": "/dome/position/sync",             "method": "PUT"}
                ],
                "info_list": [
                    {"label": null},
                    {"label": "az",     "status": "dome-position-azimuth"},
                    {"label": "slaved", "status": "dome-position-slaved"},
                    {"label": "az",     "status": "dome-position-azimuth"}
                ]
            }) }}

            {{ w.widget_toggle({
                "label": "Dome Position",
                "label": "Is Dome Parked?",
                "info": "dome-position-movement-parked",
                "buttons": [
                    {"label": "Park", "endpoint": "/dome/position/movement/park", "method": "POST"},
                    {"label": "Stop", "endpoint": "/dome/position/movement",      "method": "DELETE"}
@@ -114,28 +117,29 @@
                get_url  = "/dome/shutter",
                move_url = "/dome/shutter/movement",
            ) }}
        </div>

        </section>

    {# ── CENTER: Stage + Cameras ── #}
    <section class="col-xl-4 col-lg-6">
    </article>

    <article class="col-xl-4 col-lg-6">

        <div class="bg-dark p-4 rounded shadow mb-4">
            <h5 class="pb-2 mb-4">Mirror Stage</h5>
        <section>
            <h4 class="p-2">Mirror Stage</h4>

            {#
            {{ w.widget_toggle({
                "label": "Connection",
                "info": "/stage/connection",
                "info": "stage-connection",
                "buttons": [
                    {"label": "On",  "endpoint": "/stage/connection", "val": true,  "method": "PUT"},
                    {"label": "Off", "endpoint": "/stage/connection", "val": false, "method": "PUT"}
                ],
            }) }}
            #}
            
            {{ w.widget_toggle({
                "label": "Power",
                "info": "/stage/power",
                "info": "stage-power",
                "buttons": [
                    {"label": "On",  "endpoint": "/stage/power", "val": true,  "method": "PUT"},
                    {"label": "Off", "endpoint": "/stage/power", "val": false, "method": "PUT"}
@@ -144,23 +148,24 @@

            {{ w.widget_toggle({
                "label": "Init",
                "info": "/stage/status",
                "info": "stage-status",
                "buttons": [
                    {"label": "Initialize", "endpoint": "/stage/status", "method": "POST"}
                ],
                "info_list": [
                    {"label": "init", "status": "stage-status"},
                    {"label": null},
                    {"label": "moving", "status": "stage-movement"},
                    {"label": "pos",  "status": "stage-position"}
                ],
            }) }}
        </div>
        </section>

        <div class="bg-dark p-4 rounded shadow mb-4">
            <h5 class="pb-2 mb-4">Camera</h5>
        <section>
            <h4 class="p-2">Camera - Imaging</h4>

            {{ w.widget_toggle({
                "label": "Is Cam On?",
                "info": "/camera/power",
                "info": "camera-power",
                "buttons": [
                    {"label": "On",  "endpoint": "/camera/power", "val": true,  "method": "PUT"},
                    {"label": "Off", "endpoint": "/camera/power", "val": false, "method": "PUT"}
@@ -169,7 +174,7 @@

            {{ w.widget_toggle({
                "label": "Cooling",
                "info": "/camera/cooler",
                "info": "camera-cooler",
                "buttons": [
                    {"label": "On",  "endpoint": "/camera/cooler", "val": true,  "method": "PUT"},
                    {"label": "Off", "endpoint": "/camera/cooler", "val": false, "method": "PUT"}
@@ -187,14 +192,14 @@
                    {"label": "T",   "status": "camera-settings-temperature"}
                ]
            }) }}
        </div>
        </section>

        <div class="bg-dark p-4 rounded shadow mb-4">
            <h5 class="pb-2 mb-4">Camera 2 (Atik)</h5>
        <section>
            <h4 class="p-2">Camera - Spectroscopy</h4>

            {{ w.widget_toggle({
                "label": "Is Cam2 On?",
                "info": "/camera2/power",
                "info": "camera2-power",
                "buttons": [
                    {"label": "On",  "endpoint": "/camera2/power", "val": true,  "method": "PUT"},
                    {"label": "Off", "endpoint": "/camera2/power", "val": false, "method": "PUT"}
@@ -203,7 +208,7 @@

            {{ w.widget_toggle({
                "label": "Cooling",
                "info": "/camera2/cooler",
                "info": "camera2-cooler",
                "buttons": [
                    {"label": "On",  "endpoint": "/camera2/cooler", "val": true,  "method": "PUT"},
                    {"label": "Off", "endpoint": "/camera2/cooler", "val": false, "method": "PUT"}
@@ -216,37 +221,32 @@
                "unit": "°C",
                "buttons": [{"label": "Set", "endpoint": "/camera2/cooler/temperature/setpoint", "method": "PUT"}],
                "info_list": [
                    {"label": null},
                    {"label": "set", "status": "camera2-settings-setpoint"},
                    {"label": "T",   "status": "camera2-settings-temperature"}
                ]
            }) }}
        </div>

        </section>

    <!-- RIGHT: Monitors -->
    <section class="col-xl-4 col-lg-12">
    </article>
    
      <div class="card bg-dark border-secondary shadow-sm">
    <article class="col-xl-4 col-lg-12">
      
        <div class="card-header p-0 border-secondary">
      <ul class="nav nav-tabs border-0" role="tablist">
        <li class="nav-item"><button class="nav-link active py-2" data-bs-toggle="tab" data-bs-target="#init-webcam">Webcam</button></li>
        <li class="nav-item"><button class="nav-link py-2" data-bs-toggle="tab" data-bs-target="#init-synoptic">Synoptic</button></li>
      </ul>
        </div>
        
        <div class="tab-content">
          <div class="tab-pane fade show active" id="init-webcam">
          <section class="tab-pane fade show active" id="init-webcam">
            {{ webcam.webcam_panel() }}
          </div>
          <div class="tab-pane fade" id="init-synoptic">
          </section>
          <section class="tab-pane fade" id="init-synoptic">
            {{ synoptic.synoptic_panel() }}
          </div>
          </section>
        </div>
        
      </div>
    </section>
   </article>
    
</div>
{% endblock %}
+160 −104

File changed.

Preview size limit exceeded, changes collapsed.

+151 −162

File changed.

Preview size limit exceeded, changes collapsed.