dashboard: remove peer-hives headline block (hyperhive#3294)
Removes the SW4RM tab's "P33R H1V3S" headline section (#peers-block/#peers-section in dashboard.html, renderPeerHives in swarm.js, its call site + import in tabs.js). Superseded by swarm-ui's own hive roster page. Verified: npm run build clean (would have failed to resolve renderPeerHives if the import/export pair were left mismatched).
This commit is contained in:
parent
32a353a9c5
commit
016ab70e31
3 changed files with 3 additions and 52 deletions
|
|
@ -100,15 +100,6 @@
|
|||
<div id="containers-section">
|
||||
<p class="meta">loading…</p>
|
||||
</div>
|
||||
<!-- Peer hives (federated swarms). The headline block is hidden
|
||||
entirely when nothing is federated; renderPeerHives then drops
|
||||
a quiet "no peer hives configured" note into #peers-section. -->
|
||||
<div id="peers-block" hidden>
|
||||
<h2>◆ P33R H1V3S ◆</h2>
|
||||
<div class="divider">══════════════════════════════════════════════════════════════</div>
|
||||
<p class="meta">peer hives in this swarm. click a card to open that hive's dashboard.</p>
|
||||
</div>
|
||||
<div id="peers-section"></div>
|
||||
</section>
|
||||
|
||||
<!-- Y3R C4LL: things blocked on operator decision. Approvals +
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SW4RM (containers) domain — extracted from tabs.js.
|
||||
// Agent topology, container-row rendering, selection bar, peer-hives block,
|
||||
// and all live-update apply handlers for container-state, transient, and
|
||||
// Agent topology, container-row rendering, selection bar, and all
|
||||
// live-update apply handlers for container-state, transient, and
|
||||
// job-queue-rollup ops. See docs/web-ui.md::Container row for the
|
||||
// rendering contract.
|
||||
|
||||
|
|
@ -1049,43 +1049,6 @@ function addBulkButton(parent, btnClass, label, enabled, selected, opts) {
|
|||
parent.append(btn);
|
||||
}
|
||||
|
||||
// ─── peer hives ──────────────────────────────────────────────────────────────
|
||||
|
||||
// Peer hives: render link cards as a headline section under SW4RM
|
||||
// (state.peer_hives). Called on every state refresh. When nothing is
|
||||
// federated, the "P33R H1V3S" headline block is hidden entirely and a
|
||||
// quiet grey note replaces the cards.
|
||||
export function renderPeerHives(peers) {
|
||||
const block = $('peers-block');
|
||||
const root = $('peers-section');
|
||||
if (!root) return;
|
||||
root.replaceChildren();
|
||||
const hasPeers = Array.isArray(peers) && peers.length > 0;
|
||||
if (block) block.hidden = !hasPeers;
|
||||
if (!hasPeers) {
|
||||
root.append(el('p', { class: 'empty' }, 'no peer hives configured'));
|
||||
return;
|
||||
}
|
||||
const ul = el('ul', { class: 'containers' });
|
||||
for (const p of peers) {
|
||||
const li = el('li', { class: 'container-row' });
|
||||
const head = el('div', { class: 'head' });
|
||||
const icon = el('span', { class: 'container-icon' }, '⬡');
|
||||
const nameEl = el('span', { class: 'name' }, p.name || p.url);
|
||||
const linkEl = el('a', {
|
||||
href: p.url,
|
||||
target: '_blank',
|
||||
rel: 'noopener noreferrer',
|
||||
class: 'meta',
|
||||
title: 'open ' + p.name + ' dashboard',
|
||||
}, p.url);
|
||||
head.append(icon, nameEl);
|
||||
li.append(head, el('div', { class: 'meta' }, linkEl));
|
||||
ul.append(li);
|
||||
}
|
||||
root.append(ul);
|
||||
}
|
||||
|
||||
// ─── tickers ─────────────────────────────────────────────────────────────────
|
||||
|
||||
// 30s ticker for agent status-age chips. Renderers stamp `data-set-at`
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ import {
|
|||
applyRebuildQueueChanged, applyContainerStateChanged, applyContainerRemoved,
|
||||
applyTransientSet, applyTransientCleared,
|
||||
renderContainers, renderContainersFromState,
|
||||
renderSelectionBar, renderPeerHives,
|
||||
renderSelectionBar,
|
||||
} from './swarm.js';
|
||||
|
||||
// mdNode (in common.js) reads `window.marked` for the markdown side
|
||||
|
|
@ -201,9 +201,6 @@ window.marked = marked;
|
|||
// synchronous read (e.g. the compose autocomplete pulls agent
|
||||
// names from here instead of refetching on every keystroke).
|
||||
window.__hyperhive_state = s;
|
||||
// Peer hives render as a headline section under SW4RM (no longer
|
||||
// a tab); renderPeerHives shows/hides its own headline block.
|
||||
renderPeerHives(s.peer_hives || []);
|
||||
renderServerWarnings(s.server_warnings);
|
||||
// (The M4TR1X surface is reachable from the H0M3 hub now, not the
|
||||
// dashboard tab strip — home.js gates its tile on matrix_gui_enabled.)
|
||||
|
|
|
|||
Loading…
Reference in a new issue