swarm-ui: alerts and the issue report are folded cards on a reports tab
The alerts and issues tabs are one reports tab in the nav. Each page, unchanged inside, is a card that starts shut and reads nothing until opened; the alerts header's link, button and refresh picker move into the card's body. /alerts and /issues redirect to /reports. Docs follow.
This commit is contained in:
parent
11914e3e9a
commit
599747bacb
2 changed files with 96 additions and 43 deletions
16
frontend/packages/swarm-ui/src/pages/reports/ReportsPage.css
Normal file
16
frontend/packages/swarm-ui/src/pages/reports/ReportsPage.css
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/* The reports tab: the folded cards, one gap apart. */
|
||||
.ui-reports-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1em;
|
||||
}
|
||||
/* The bar at the top of the alerts card: the Grafana link, the show-more
|
||||
button and the refresh picker, to the right. */
|
||||
.ui-alerts-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 0.5em 0.75em;
|
||||
margin-block-end: 0.5em;
|
||||
}
|
||||
15
frontend/packages/swarm-ui/src/pages/reports/ReportsPage.tsx
Normal file
15
frontend/packages/swarm-ui/src/pages/reports/ReportsPage.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// <ReportsPage> — `/reports`: what the swarm reports about itself, as two
|
||||
// folded cards: the alerts Grafana holds now, and mara's issue report. Neither
|
||||
// reads anything until it is opened.
|
||||
import { AlertsCard } from "../AlertsPage.js";
|
||||
import { IssueReportCard } from "../IssueReportPage.js";
|
||||
import "./ReportsPage.css";
|
||||
|
||||
export function ReportsPage() {
|
||||
return (
|
||||
<div class="ui-reports-page">
|
||||
<AlertsCard />
|
||||
<IssueReportCard />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue