File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Add role based access (owner) -> only check for now
2+
3+ create workflow with cli and agent
4+ agents triggered by webhook and posts a message on statuspage
5+ -> agent uses the cli to update the status page
6+ -> fully separate
Original file line number Diff line number Diff line change 1+ # `external_service_id` is denormalised for raw-row traceability only: in raw
2+ # rows `component_id` is an opaque PK, so this lets ops trace a snapshot back to
3+ # its service without a Turso join. Pipes/MV key on `component_id`.
4+
15SCHEMA >
26 `component_id` String `json:$.component_id`,
37 `external_service_id` Int64 `json:$.external_service_id`,
Original file line number Diff line number Diff line change @@ -58,6 +58,12 @@ function isIssue(component: ExternalServiceComponentItem): boolean {
5858 return severityOf ( component . indicator ) > 0 ;
5959}
6060
61+ // Maintenance maps to indicator "none" (severity 0), so it is not an issue —
62+ // count it separately or a maintenance-only section reads "All operational".
63+ function isMaintenance ( component : ExternalServiceComponentItem ) : boolean {
64+ return component . status === "under_maintenance" ;
65+ }
66+
6167function indicatorToStatusType ( args : {
6268 worstIndicator : string ;
6369 hadMaintenance : number ;
@@ -194,6 +200,7 @@ function SectionBlock({
194200 days : number ;
195201} ) {
196202 const issues = section . components . filter ( isIssue ) . length ;
203+ const maintenance = section . components . filter ( isMaintenance ) . length ;
197204 const [ open , setOpen ] = useState (
198205 soleSection && section . components . length <= AUTO_EXPAND_MAX_COMPONENTS ,
199206 ) ;
@@ -220,12 +227,18 @@ function SectionBlock({
220227 < span
221228 className = { cn (
222229 "shrink-0 text-xs" ,
223- issues > 0 ? "text-destructive" : "text-muted-foreground" ,
230+ issues > 0
231+ ? "text-destructive"
232+ : maintenance > 0
233+ ? "text-info"
234+ : "text-muted-foreground" ,
224235 ) }
225236 >
226237 { issues > 0
227238 ? `${ issues } issue${ issues === 1 ? "" : "s" } `
228- : "All operational" }
239+ : maintenance > 0
240+ ? `${ maintenance } under maintenance`
241+ : "All operational" }
229242 </ span >
230243 </ CollapsibleTrigger >
231244 < CollapsibleContent className = "px-3 pb-2" >
You can’t perform that action at this time.
0 commit comments