First-party plugins (host_agent, http, snmp, traefik, unifi, docker) are now tracked under plugins/ and baked into the image, so they version atomically with core — ending the cross-repo import drift the roundtable->steward rename exposed. History for these files is preserved in the archived Roundtable-plugins repo. Plugin discovery becomes multi-root: PLUGIN_DIR (single) -> PLUGIN_DIRS (bundled first, then external) + PLUGIN_INSTALL_DIR. Bundled ships in the image; third-party plugins still mount at runtime into the external root (STEWARD_PLUGIN_DIR, default /data/plugins) and downloads/installs land there. Bundled shadows external on a name collision. - config.py: load_bootstrap returns plugin_dirs + plugin_install_dir - app.py: iterate PLUGIN_DIRS at the migration + load sites - migration_runner.py: discover_all_in() unions every plugin root - plugin_manager.py: resolve_plugin_path() (pure, first-root-wins); load / install / hot-reload span all roots; installs target the external root - settings/routes.py: _discover_plugins scans all roots, dedup bundled-first - Dockerfile: COPY plugins/ ; docker-compose: drop host bind, document external - tests/test_plugin_dirs.py: resolution, multi-root discovery, bootstrap split Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
57 lines
2.2 KiB
HTML
57 lines
2.2 KiB
HTML
{# plugins/unifi/templates/unifi/security.html #}
|
|
<div style="column-width:340px;column-count:2;column-gap:1rem;">
|
|
|
|
{# Active alarms #}
|
|
<div class="card" style="break-inside:avoid;margin-bottom:1rem;">
|
|
<div class="section-title" style="margin-bottom:0.75rem;">
|
|
Active Alarms
|
|
{% if active_alarms %}
|
|
<span style="float:right;background:var(--red);color:#fff;font-size:0.72rem;padding:0.1rem 0.45rem;border-radius:10px;font-weight:600;">{{ active_alarms|length }}</span>
|
|
{% endif %}
|
|
</div>
|
|
{% if not active_alarms %}
|
|
<p style="color:var(--green);font-size:0.88rem;">✓ No active alarms</p>
|
|
{% else %}
|
|
<table class="table" style="width:100%;font-size:0.82rem;">
|
|
{% for al in active_alarms %}
|
|
<tr>
|
|
<td style="padding:0.3rem 0.5rem 0.3rem 0;">
|
|
<div style="color:var(--red);font-size:0.78rem;margin-bottom:0.1rem;">
|
|
⚠ {{ al.alarm_key }}
|
|
</div>
|
|
<div>{{ al.message }}</div>
|
|
<div style="color:var(--text-dim);font-size:0.75rem;margin-top:0.1rem;">
|
|
{{ al.alarm_time.strftime("%Y-%m-%d %H:%M") }} UTC
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{# Recent archived alarms #}
|
|
{% if archived_alarms %}
|
|
<div class="card" style="break-inside:avoid;margin-bottom:1rem;">
|
|
<div class="section-title" style="margin-bottom:0.75rem;">
|
|
Recent Archived Alarms
|
|
<span style="float:right;font-weight:normal;font-size:0.78rem;color:var(--text-dim);">last {{ archived_alarms|length }}</span>
|
|
</div>
|
|
<table class="table" style="width:100%;font-size:0.82rem;">
|
|
{% for al in archived_alarms %}
|
|
<tr>
|
|
<td style="padding:0.25rem 0.5rem 0.25rem 0;">
|
|
<div style="color:var(--text-muted);font-size:0.78rem;">{{ al.alarm_key }}</div>
|
|
<div style="color:var(--text-dim);font-size:0.8rem;">{{ al.message }}</div>
|
|
</td>
|
|
<td style="padding:0.25rem 0;text-align:right;color:var(--text-dim);font-size:0.75rem;white-space:nowrap;">
|
|
{{ al.alarm_time.strftime("%m-%d %H:%M") }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|