cleanup(#1014): remove is_manager from ContainerView, add manager_name to StateSnapshot
This commit is contained in:
parent
3dda286d2b
commit
6feab54882
3 changed files with 18 additions and 14 deletions
|
|
@ -12,7 +12,7 @@ use rusqlite::Connection;
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::coordinator::Coordinator;
|
||||
use crate::lifecycle::{self, AGENT_PREFIX, MANAGER_NAME};
|
||||
use crate::lifecycle::{self, AGENT_PREFIX};
|
||||
|
||||
/// An agent-declared extra navigation link surfaced on the dashboard card.
|
||||
/// Written by the `hive-dashboard-links` NixOS oneshot into
|
||||
|
|
@ -34,10 +34,6 @@ pub struct ContainerView {
|
|||
/// not serialized to API responses since the dashboard no longer displays it.
|
||||
#[serde(skip)]
|
||||
pub container: String,
|
||||
/// True when this is the manager agent. Informational — not used
|
||||
/// to gate any server-side actions. Computed from `name ==
|
||||
/// MANAGER_NAME` so it doesn't add new state.
|
||||
pub is_manager: bool,
|
||||
pub port: u16,
|
||||
pub running: bool,
|
||||
pub needs_update: bool,
|
||||
|
|
@ -168,7 +164,6 @@ pub async fn build_all(coord: &Coordinator) -> Vec<ContainerView> {
|
|||
(false, None, None, false, None, None)
|
||||
};
|
||||
out.push(ContainerView {
|
||||
is_manager: logical == MANAGER_NAME,
|
||||
port: lifecycle::agent_web_port(&logical),
|
||||
running,
|
||||
container: c.clone(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue