{% import "site_shell/_macros.html" as ui %} {# Fragment-style base for /resources/* pages (UI remediation, Phase 2, audit finding R-1). Pages that extend this template render as a content fragment injected into the main slot by _wrap_resources_handler_in_shell. The shell owns the header, sidebar, theme, and layout; this fragment contributes the resources sub-navigation, the flash list, and the page body. The previous version of this file was a complete standalone document with its own header, fixed sidebar, a 340-line inline stylesheet, three tags to stylesheets that no longer ship (bootstrap.css / bootstrap-vue.css / ccai.css) and ~2.4 MB of Vue + bootstrap-vue scripts nothing used. All of that is gone; shared classes (.btn, .card, .data-table, .badge, ...) now come from /static/styles/pyc-fragment.css, which the shell document links in . {% block title %} is kept for backwards compatibility; the shell document resolves the tab title from the request path. #}
{#- The child template's title block feeds the shell document's ; the shell wrapper reads and removes this element. #} <meta name="pyc-page-title" content="{% block title %}{% endblock %}"> {% block extra_css %}{% endblock %} {% if flashes %} <div class="pyc-flashes" role="status" aria-live="polite"> {% for category, message in flashes %} <div class="alert alert-{{ category }}">{{ message }}</div> {% endfor %} </div> {% endif %} <div class="pyc-subnav-layout pyc-subnav-layout--top"> <nav class="pyc-subnav" aria-label="Resource management"> <ul> <li class="pyc-subnav__section">Older resource records</li> <li><a href="{{ url_for('resources.dashboard') }}" {% if request_endpoint in ('resources.dashboard', 'resources.dashboard_root') %}class="active" aria-current="page"{% endif %}> {{ ui.icon("dashboard") }} Overview </a></li> <li><a href="{{ url_for('resources.resource_list') }}" {% if request_endpoint.startswith('resources.resource_') %}class="active" aria-current="page"{% endif %}> {{ ui.icon("devices") }} Resources </a></li> <li><a href="{{ url_for('resources.pool_list') }}" {% if request_endpoint.startswith('resources.pool_') %}class="active" aria-current="page"{% endif %}> {{ ui.icon("folder") }} Resource Pools </a></li> <li><a href="{{ url_for('resources.tag_list') }}" {% if request_endpoint == 'resources.tag_list' %}class="active" aria-current="page"{% endif %}> {{ ui.icon("label") }} Tags </a></li> <li class="pyc-subnav__section">IP Management</li> <li><a href="{{ url_for('resources.ip_pool_list') }}" {% if request_endpoint.startswith('resources.ip_pool_') %}class="active" aria-current="page"{% endif %}> {{ ui.icon("lan") }} IP Pools </a></li> <li class="pyc-subnav__section">Allocations</li> <li><a href="{{ url_for('resources.allocation_list') }}" {% if request_endpoint in ('resources.allocation_list', 'resources.allocation_detail') %}class="active" aria-current="page"{% endif %}> {{ ui.icon("assignment") }} Active Allocations </a></li> <li><a href="{{ url_for('resources.allocation_history') }}" {% if request_endpoint == 'resources.allocation_history' %}class="active" aria-current="page"{% endif %}> {{ ui.icon("history") }} Allocation History </a></li> <li><a href="{{ url_for('resources.allocation_utilization') }}" {% if request_endpoint == 'resources.allocation_utilization' %}class="active" aria-current="page"{% endif %}> {{ ui.icon("monitoring") }} Utilization </a></li> <li><a href="{{ url_for('resources.reservation_list') }}" {% if request_endpoint.startswith('resources.reservation_') %}class="active" aria-current="page"{% endif %}> {{ ui.icon("event") }} Reservations </a></li> <li><a href="{{ url_for('resources.availability_calendar') }}" {% if request_endpoint == 'resources.availability_calendar' %}class="active" aria-current="page"{% endif %}> {{ ui.icon("calendar_today") }} Availability </a></li> <li class="pyc-subnav__section">Monitoring</li> <li><a href="{{ url_for('resources.health_dashboard') }}" {% if request_endpoint.startswith('resources.health_') %}class="active" aria-current="page"{% endif %}> {{ ui.icon("monitor_heart") }} Resource Health </a></li> </ul> </nav> <div class="pyc-subnav-layout__content"> {#- Two sets of resource records exist (RES-05): these pages hold the older set, the newer one is under Fleet -> Resources and Pools. #} {% if request_endpoint.startswith('resources.resource_') or request_endpoint.startswith('resources.pool_') or request_endpoint.startswith('resources.tag_') or request_endpoint in ('resources.dashboard', 'resources.dashboard_root') %} {% call ui.preview_notice() %} These pages hold the older set of resource records, which jobs do not use. The newer set, which the REST API serves and which is being built out to replace this one, is under <a href="/resource-pools">Resources and Pools</a>. A device registered on one does not appear on the other. {% endcall %} {% endif %} {% block content %}{% endblock %} </div> </div> {% block extra_js %}{% endblock %} </section>