TDS polish: lt-frame tables, links search toolbar, dead CSS cleanup
Lint / Python (flake8) (push) Successful in 56s
Lint / JS (eslint) (push) Successful in 8s
Security / Python Security (bandit) (push) Failing after 40s
Test / Python Tests (pytest) (push) Successful in 50s
Lint / Notify on failure (push) Has been skipped
Lint / Deploy (push) Successful in 3s
Lint / Python (flake8) (push) Successful in 56s
Lint / JS (eslint) (push) Successful in 8s
Security / Python Security (bandit) (push) Failing after 40s
Test / Python Tests (pytest) (push) Successful in 50s
Lint / Notify on failure (push) Has been skipped
Lint / Deploy (push) Successful in 3s
- index.html: wrap UniFi devices table in lt-frame with section header - links.html: add static lt-toolbar with lt-search filter and collapse controls above the dynamic container; remove collapse bar from renderLinks() since it's now static; add applyLinksSearch() to filter host/switch panels by name as user types - suppressions.html: wrap Available Targets section in lt-frame - style.css: remove unused .link-summary-panel and related rules (replaced by lt-stats-grid in previous commit) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+26
-4
@@ -13,6 +13,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="lt-toolbar" id="links-toolbar" style="display:none">
|
||||
<div class="lt-toolbar-left">
|
||||
<div class="lt-search">
|
||||
<input type="search" class="lt-input lt-search-input" id="links-search"
|
||||
placeholder="Filter by host or switch name…" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="lt-toolbar-right">
|
||||
<button class="lt-btn lt-btn-ghost lt-btn-sm" data-action="collapse-all">Collapse All</button>
|
||||
<button class="lt-btn lt-btn-ghost lt-btn-sm" data-action="expand-all">Expand All</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="links-container">
|
||||
<div class="link-loading">Loading link statistics</div>
|
||||
</div>
|
||||
@@ -439,10 +452,6 @@ function renderLinks(data) {
|
||||
const parts = [];
|
||||
|
||||
parts.push(buildLinkSummary(hosts, unifiSwitches));
|
||||
parts.push(`<div class="link-collapse-bar">
|
||||
<button class="lt-btn lt-btn-ghost lt-btn-sm" data-action="collapse-all">Collapse All</button>
|
||||
<button class="lt-btn lt-btn-ghost lt-btn-sm" data-action="expand-all">Expand All</button>
|
||||
</div>`);
|
||||
parts.push('<div class="link-host-list">');
|
||||
|
||||
for (const [hostname, ifaces] of Object.entries(hosts)) {
|
||||
@@ -471,6 +480,17 @@ function renderLinks(data) {
|
||||
parts.push('</div>');
|
||||
document.getElementById('links-container').innerHTML = parts.join('');
|
||||
restoreCollapseState();
|
||||
document.getElementById('links-toolbar').style.display = '';
|
||||
applyLinksSearch();
|
||||
}
|
||||
|
||||
// ── Host/switch search filter ─────────────────────────────────────
|
||||
function applyLinksSearch() {
|
||||
const q = (document.getElementById('links-search')?.value || '').trim().toLowerCase();
|
||||
document.querySelectorAll('.link-host-panel').forEach(panel => {
|
||||
const text = (panel.querySelector('.link-host-name')?.textContent || '').toLowerCase();
|
||||
panel.style.display = (!q || text.includes(q)) ? '' : 'none';
|
||||
});
|
||||
}
|
||||
|
||||
function collapseAll() {
|
||||
@@ -552,5 +572,7 @@ document.addEventListener('click', e => {
|
||||
if (e.target.closest('[data-action="collapse-all"]')) { collapseAll(); return; }
|
||||
if (e.target.closest('[data-action="expand-all"]')) { expandAll(); return; }
|
||||
});
|
||||
|
||||
document.getElementById('links-search')?.addEventListener('input', applyLinksSearch);
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user