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
|
|
@ -87,6 +87,11 @@ pub(super) struct StateSnapshot {
|
|||
/// which is only right by accident on deployments that aren't
|
||||
/// plain localhost.
|
||||
forge_public_url: Option<String>,
|
||||
/// Browser URL of the swarm UI (the swarm apex domain). Sourced from
|
||||
/// `HIVE_SWARM_PUBLIC_URL`, which the c0re NixOS module sets from
|
||||
/// `services.hyperhive.swarm.domain`. `None` when the domain is unset —
|
||||
/// the dashboard's pages menu then omits the swarm entry.
|
||||
swarm_public_url: Option<String>,
|
||||
/// Human name of this single-host hive instance (e.g. `"pr1ma"`).
|
||||
/// Sourced from `HYPERHIVE_HIVE_NAME` env var, set by the c0re
|
||||
/// NixOS module from `services.hyperhive.hiveName`. `None` when
|
||||
|
|
@ -219,6 +224,9 @@ pub(super) async fn api_state(
|
|||
forge_public_url: std::env::var("HIVE_FORGE_PUBLIC_URL")
|
||||
.ok()
|
||||
.filter(|s| !s.is_empty()),
|
||||
swarm_public_url: std::env::var("HIVE_SWARM_PUBLIC_URL")
|
||||
.ok()
|
||||
.filter(|s| !s.is_empty()),
|
||||
hive_name: std::env::var("HYPERHIVE_HIVE_NAME")
|
||||
.ok()
|
||||
.filter(|s| !s.is_empty()),
|
||||
|
|
|
|||
Loading…
Reference in a new issue