Admins get a Restart modem button on the WAN / Fiber panel (needs modem.access_code). After a confirmation it: 1. switches an Uptime Kuma maintenance window on (new kuma.py: logs in over Kuma 2's Socket.IO API and resumes/pauses one pre-made manual window, uptime_kuma.maintenance_id); if Kuma fails it stops and asks whether to go on without it, 2. starts Gandalf maintenance (global suppression, 20 minutes at most), 3. posts the gateway's Restart Device form (ModemAdmin.restart), undoing 1 and 2 if that fails. The monitor waits for the modem to answer with its WAN up and an uptime showing it restarted, then switches Kuma off, ends the suppression and records how long it took; after 30 minutes it ends both regardless. The panel shows the restart in progress and the result for an hour. New dependency: python-socketio[client]. Co-Authored-By: Claude Opus 5.5 <[email protected]>
19 lines
846 B
HTML
19 lines
846 B
HTML
<section class="g-section" id="modem-section" hidden>
|
|
<div class="g-section-header">
|
|
<h2 class="g-section-title">WAN / Fiber</h2>
|
|
<span class="g-section-actions modem-actions">
|
|
{% if user.groups and 'admin' in user.groups %}
|
|
<button type="button" class="lt-btn lt-btn-ghost lt-btn-sm" id="modem-restart-btn" hidden
|
|
title="Silence alerts (Gandalf and Uptime Kuma), then restart the modem">⟳ Restart modem</button>
|
|
{% endif %}
|
|
<a class="lt-btn lt-btn-ghost lt-btn-sm" id="modem-device-link" hidden>↗ Details</a>
|
|
</span>
|
|
</div>
|
|
<div class="lt-frame">
|
|
<span class="lt-frame-bl">╚</span>
|
|
<span class="lt-frame-br">╝</span>
|
|
<div class="lt-section-header" id="modem-title">AT&T Gateway</div>
|
|
<div id="modem-body" aria-live="polite"></div>
|
|
</div>
|
|
</section>
|