diff --git a/bin/core/src/api/read/repo.rs b/bin/core/src/api/read/repo.rs index 91e4cafca..e8819d829 100644 --- a/bin/core/src/api/read/repo.rs +++ b/bin/core/src/api/read/repo.rs @@ -107,11 +107,16 @@ impl Resolve for State { (_, action_states) if action_states.pulling => { res.pulling += 1; } + (_, action_states) if action_states.building => { + res.building += 1; + } (RepoState::Ok, _) => res.ok += 1, (RepoState::Failed, _) => res.failed += 1, (RepoState::Unknown, _) => res.unknown += 1, // will never come off the cache in the building state, since that comes from action states - (RepoState::Cloning, _) | (RepoState::Pulling, _) => { + (RepoState::Cloning, _) + | (RepoState::Pulling, _) + | (RepoState::Building, _) => { unreachable!() } } diff --git a/bin/core/src/resource/repo.rs b/bin/core/src/resource/repo.rs index c8e4989dd..01fcb7b0d 100644 --- a/bin/core/src/resource/repo.rs +++ b/bin/core/src/resource/repo.rs @@ -239,6 +239,8 @@ async fn get_repo_state(id: &String) -> RepoState { Some(RepoState::Cloning) } else if s.pulling { Some(RepoState::Pulling) + } else if s.building { + Some(RepoState::Building) } else { None } diff --git a/client/core/rs/src/api/read/repo.rs b/client/core/rs/src/api/read/repo.rs index 7cc3e10d9..ea1b16cd0 100644 --- a/client/core/rs/src/api/read/repo.rs +++ b/client/core/rs/src/api/read/repo.rs @@ -105,6 +105,8 @@ pub struct GetReposSummaryResponse { pub cloning: u32, /// The number of repos currently pulling. pub pulling: u32, + /// The number of repos currently building. + pub building: u32, /// The number of repos with failed state. pub failed: u32, /// The number of repos with unknown state. diff --git a/client/core/rs/src/entities/repo.rs b/client/core/rs/src/entities/repo.rs index af6515747..86a5a0efb 100644 --- a/client/core/rs/src/entities/repo.rs +++ b/client/core/rs/src/entities/repo.rs @@ -59,8 +59,10 @@ pub enum RepoState { Failed, /// Currently cloning Cloning, - /// Currently pullling + /// Currently pulling Pulling, + /// Currently building + Building, } #[typeshare] diff --git a/client/core/ts/src/types.ts b/client/core/ts/src/types.ts index b4841bd30..3513dad9f 100644 --- a/client/core/ts/src/types.ts +++ b/client/core/ts/src/types.ts @@ -1060,8 +1060,10 @@ export enum RepoState { Failed = "Failed", /** Currently cloning */ Cloning = "Cloning", - /** Currently pullling */ + /** Currently pulling */ Pulling = "Pulling", + /** Currently building */ + Building = "Building", } export interface RepoListItemInfo { @@ -1617,10 +1619,14 @@ export enum StackState { Paused = "paused", /** All contianers are stopped */ Stopped = "stopped", + /** All containers are created */ + Created = "created", /** All containers are restarting */ Restarting = "restarting", /** All containers are dead */ Dead = "dead", + /** All containers are removing */ + Removing = "removing", /** The containers are in a mix of states */ Unhealthy = "unhealthy", /** The stack is not deployed */ @@ -3231,6 +3237,8 @@ export interface GetReposSummaryResponse { cloning: number; /** The number of repos currently pulling. */ pulling: number; + /** The number of repos currently building. */ + building: number; /** The number of repos with failed state. */ failed: number; /** The number of repos with unknown state. */ @@ -3586,6 +3594,10 @@ export interface GetStacksSummaryResponse { restarting: number; /** The number of stacks with Dead state. */ dead: number; + /** The number of stacks with Created state. */ + created: number; + /** The number of stacks with Removing state. */ + removing: number; /** The number of stacks with Unhealthy state. */ unhealthy: number; /** The number of stacks with Down state. */ diff --git a/frontend/src/lib/color.ts b/frontend/src/lib/color.ts index 3d1adff70..50514cbba 100644 --- a/frontend/src/lib/color.ts +++ b/frontend/src/lib/color.ts @@ -156,6 +156,8 @@ export const repo_state_intention = (state?: Types.RepoState) => { return "Warning"; case Types.RepoState.Pulling: return "Warning"; + case Types.RepoState.Building: + return "Warning"; case Types.RepoState.Failed: return "Critical"; default: