Skip to content

Commit 8daa4cf

Browse files
authored
feat(showcase): Add the Monitoring admin pages (#1343) (#1382)
An admin role (every engineer action, plus the admin pages in the console sidebar): - Alert rules and failure drills: rules are evaluated on every live tick and open an incident when a metric stays past its threshold (not while the service has an incident or maintenance); a rule can post on the status page at once. Drills inject a timed failure that bends a service's metrics, with a preview of which rules would fire and a confirmation before anything can go public. - Maintenance windows: schedule, edit, cancel, and end early, with subscriber emails; the status page announces them and shows "Under maintenance", and alerts are silenced while they run. - Services: add, edit, show or hide on the status page, and delete when nothing depends on them. Services, rules, drills, and maintenance are part of the tab snapshot (version 2), validated against the stored data on restore. Hidden services stay off every public page and email.
1 parent 93bd461 commit 8daa4cf

26 files changed

Lines changed: 5298 additions & 89 deletions

‎BlazorBootstrap.Demo.RCL/Components/Pages/Showcase/Monitoring/AdminAlerts.razor‎

Lines changed: 584 additions & 0 deletions
Large diffs are not rendered by default.

‎BlazorBootstrap.Demo.RCL/Components/Pages/Showcase/Monitoring/AdminAlerts.razor.cs‎

Lines changed: 729 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/* The admins' alert rules and drills. Card, CardBody, Badge, and Modal render their own elements, so styles inside them need ::deep. */
2+
3+
.mw-al-status:empty {
4+
margin: 0;
5+
}
6+
7+
.mw-al-status {
8+
margin-bottom: 1rem;
9+
overflow-wrap: anywhere;
10+
}
11+
12+
.mw-al-paused {
13+
padding: .5rem .75rem;
14+
border: 1px solid var(--mw-border);
15+
border-radius: .5rem;
16+
background: var(--bs-tertiary-bg);
17+
}
18+
19+
/* Rule names and status page messages are plain user text: keep line breaks and wrap long words. */
20+
::deep .mw-al-text {
21+
white-space: pre-wrap;
22+
overflow-wrap: anywhere;
23+
}
24+
25+
/* What a drill would do: the rules watching the service, and warnings that stop them firing. */
26+
::deep .mw-al-preview {
27+
padding: .75rem;
28+
border: 1px solid var(--mw-border);
29+
border-radius: .5rem;
30+
background: var(--bs-tertiary-bg);
31+
min-width: 0;
32+
overflow-wrap: anywhere;
33+
}
34+
35+
::deep .mw-al-warning {
36+
padding: .375rem .5rem;
37+
border-left: 3px solid var(--bs-warning);
38+
background: var(--bs-body-bg);
39+
border-radius: 0 .25rem .25rem 0;
40+
}
41+
42+
::deep .mw-al-outlook {
43+
margin: 0 0 .5rem;
44+
padding-left: 1.125rem;
45+
}
46+
47+
::deep .mw-al-outlook li + li {
48+
margin-top: .5rem;
49+
}
50+
51+
::deep .mw-al-drill-table {
52+
min-width: 40rem;
53+
}
54+
55+
::deep .mw-al-rules-table {
56+
min-width: 72rem;
57+
}
58+
59+
::deep .mw-al-name-cell {
60+
min-width: 14rem;
61+
font-weight: 600;
62+
}
63+
64+
::deep .mw-al-severities {
65+
display: grid;
66+
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
67+
gap: .5rem 1.5rem;
68+
}
69+
70+
::deep .mw-al-quote {
71+
padding: .5rem .75rem;
72+
border-left: 3px solid var(--sc-primary);
73+
background: var(--bs-tertiary-bg);
74+
border-radius: 0 .25rem .25rem 0;
75+
}

‎BlazorBootstrap.Demo.RCL/Components/Pages/Showcase/Monitoring/AdminMaintenance.razor‎

Lines changed: 308 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)