Skip to content

Commit 13454c0

Browse files
committed
fix: feedback
1 parent 259931c commit 13454c0

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

TODO.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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

packages/tinybird/datasources/external_status_component__v0.datasource

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
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+
15
SCHEMA >
26
`component_id` String `json:$.component_id`,
37
`external_service_id` Int64 `json:$.external_service_id`,

packages/ui/src/components/blocks/external-service-components.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff 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+
6167
function 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">

0 commit comments

Comments
 (0)