dashboard: serve the dashboard at /, fold kept state in as a tab, add a pages menu
Drop the H0M3 tile hub and the core page. The dashboard is now the index; kept state is its fifth tab. A pages menu in the chrome links flow, stats, API docs and the swarm UI. The swarm apex URL comes from services.hyperhive.swarm.domain via HIVE_SWARM_PUBLIC_URL and the new swarm_public_url field of the state snapshot.
This commit is contained in:
parent
265f8a47cc
commit
0622736b30
35 changed files with 661 additions and 986 deletions
|
|
@ -31,7 +31,7 @@ export interface MetaNavProps {
|
|||
links: AgentLink[];
|
||||
forgePublicUrl: string | null;
|
||||
/** Absolute base URL of the host dashboard (`resolveDashboardBase`)
|
||||
* — the `🧭 dashboard` item links to `${dashboardBase}dashboard.html`. */
|
||||
* — the `🧭 dashboard` item links to `${dashboardBase}`. */
|
||||
dashboardBase: string;
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ export function MetaNav({
|
|||
<div class="meta-nav-popover" role="menu" aria-label="agent links">
|
||||
<a
|
||||
class="meta-nav-item"
|
||||
href={`${dashboardBase}dashboard.html`}
|
||||
href={dashboardBase}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
role="menuitem"
|
||||
|
|
|
|||
|
|
@ -507,15 +507,10 @@ window.Chart = Chart;
|
|||
// When accessed via hive-gateway the page lives at `/agent/<name>/`
|
||||
// on the same origin as the dashboard. Detect via path prefix
|
||||
// rather than the direct port (which is unreachable or wrong scheme
|
||||
// behind HTTPS TLS termination). The dashboard SPA lives at
|
||||
// `dashboard.html` — the `/` root now serves the H0M3 menu hub.
|
||||
// behind HTTPS TLS termination). The dashboard SPA is the `/` root.
|
||||
dl.href = window.location.pathname.startsWith("/agent/")
|
||||
? window.location.origin + "/dashboard.html"
|
||||
: "http://" +
|
||||
window.location.hostname +
|
||||
":" +
|
||||
s.dashboard_port +
|
||||
"/dashboard.html";
|
||||
? window.location.origin + "/"
|
||||
: "http://" + window.location.hostname + ":" + s.dashboard_port + "/";
|
||||
} catch (_) {
|
||||
/* non-fatal */
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue