]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
DASH: page_hierarchy (in config & navigation)
authorOle Artz <ole.artz@t-online.de>
Thu, 31 Aug 2017 11:34:35 +0000 (13:34 +0200)
committerOle Artz <ole.artz@t-online.de>
Thu, 31 Aug 2017 11:34:35 +0000 (13:34 +0200)
python_suite/dashboard/example.config.json
python_suite/dashboard/views/base.jinja2

index 6bbe9736814e0ef7dc5a9271408f5602bfc8b2a5..d0146434d1a972cb3af1b71af83ecba826609e5c 100644 (file)
                {"name": "CBM:MVD:PT100:VAC:17"},
                {"name": "CBM:MVD:PT100:VAC:CONV_RATE"}
        ],
+       "page_hierarchy": {
+                       "top": ["general_overview"],
+                       "general_overview": ["cooling_system", "low_voltage_system"]
+               },
        "pages": {
                        "general_overview": {
                                "name": "General System Overview",
index 22141c6c1e0a2fde164cc779e77f0f046deeb2a9..5a279f7d3108eccf76054d0df9f6de534eae2efe 100644 (file)
                        <h1>PRESTO - Overview<br/> Prototype of the Second Station of the Micro Vertex Detector of the Compressed Baryonic Matter</h1>
                </div>
                <nav class="menu_bar">
-                       {% for page in config.pages %}
-                       <a class="{{ 'active' if page == req_page else '' }}" href="/list/{{ page }}">{{ config.pages[page].name }}</a>
+                       {% for page in config.page_hierarchy.top %}
+                       <a class="{{ 'active' if page == req_page else '' }}" href="/list/{{ page }}">{{ config.pages[page].name }}</a> <span style="color: white;">→</span>
+                               {% for page in config.page_hierarchy[page] %}
+                               <a class="{{ 'active' if page == req_page else '' }}" href="/list/{{ page }}">{{ config.pages[page].name }}</a>
+                               {% endfor %}
+                       <br />
                        {% endfor %}
                </nav>
                <div id="content">