Integrate test code improvements using web_template components
Lint / Python (flake8) (push) Successful in 45s
Lint / JS (eslint) (push) Successful in 8s
Security / Python Security (bandit) (push) Successful in 41s
Test / Python Tests (pytest) (push) Successful in 52s
Lint / Notify on failure (push) Has been skipped
Lint / Deploy (push) Successful in 3s
Lint / Python (flake8) (push) Successful in 45s
Lint / JS (eslint) (push) Successful in 8s
Security / Python Security (bandit) (push) Successful in 41s
Test / Python Tests (pytest) (push) Successful in 52s
Lint / Notify on failure (push) Has been skipped
Lint / Deploy (push) Successful in 3s
lt-alert: - Replace custom .stale-banner with lt-alert lt-alert--warning in app.js and links.html; remove stale-banner CSS, reuse lt-alert margin rule lt-progress: - Replace custom .traffic-bar-track/.traffic-bar-fill in links.html with lt-progress from base.css; TX uses default (orange), RX uses --cyan, both flip to --red when utilisation >85% (trafficBarClass helper) - Keep traffic layout classes (.traffic-section/.traffic-row etc.) for structure Suppression type badges: - Map target_type to distinct badge colors: host→badge-warning (orange), interface→badge-info (cyan), unifi_device→badge-purple (new alias using --accent-purple from base.css), all→badge-critical (red) - Applied in both server-rendered table (Jinja2 dict lookup) and renderActiveRows() JS Topology animated down-wire: - Add data-host attribute to .topo-v2-wire-10g/.topo-v2-wire-1g elements - updateTopology() toggles .wire-down class on the 10G drop-wire when host.status === 'down' - .wire-down CSS: animated repeating-linear-gradient dashed red line via wire-dash-anim @keyframes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+9
-2
@@ -86,11 +86,13 @@ function updateStatusBar(summary, lastCheck, daemonOk) {
|
||||
if (!staleBanner) {
|
||||
staleBanner = document.createElement('div');
|
||||
staleBanner.id = 'stale-banner';
|
||||
staleBanner.className = 'stale-banner';
|
||||
staleBanner.className = 'lt-alert lt-alert--warning';
|
||||
staleBanner.innerHTML = '<span class="lt-alert-icon">⚠</span><div class="lt-alert-body"><div class="lt-alert-msg"></div></div>';
|
||||
document.querySelector('.lt-main').prepend(staleBanner);
|
||||
}
|
||||
const mins = Math.floor(checkAge / 60);
|
||||
staleBanner.textContent = `⚠ Monitoring data is stale — last check was ${mins} minute${mins !== 1 ? 's' : ''} ago. The monitor daemon may be down.`;
|
||||
staleBanner.querySelector('.lt-alert-msg').textContent =
|
||||
`Monitoring data is stale — last check was ${mins} minute${mins !== 1 ? 's' : ''} ago. The monitor daemon may be down.`;
|
||||
staleBanner.style.display = '';
|
||||
} else if (staleBanner) {
|
||||
staleBanner.style.display = 'none';
|
||||
@@ -138,6 +140,11 @@ function updateTopology(hosts) {
|
||||
badge.className = `topo-badge topo-badge-${host.status}`;
|
||||
badge.textContent = host.status;
|
||||
}
|
||||
|
||||
// Animate the 10G drop-wire red+dashed when host is down
|
||||
document.querySelectorAll(`.topo-v2-wire-10g[data-host="${CSS.escape(name)}"]`).forEach(wire => {
|
||||
wire.classList.toggle('wire-down', host.status === 'down');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user