DashboardGrid lays widgets on columns: a tile's strip drags it and its corner resizes it a cell at a time, others move down and rise to fill gaps, a focused tile steps with the arrows, and under the theme's stack_below width the tiles stand in one column. DashboardCard frames a widget. AlertList acknowledges a firing alert from its row and opens one on Enter; IncidentCard shows an incident's gravity, phase and updates. UptimeBar, ServiceStatus and HealthCheck show what is up, a check's detail wrapping under its name when narrow. EventStream keeps kinds and holds the list while new events count up. RefreshIntervalSelector and DashboardFilterBar set the window, the filters and the refresh. StatCard, MetricsChart, ResourceGauge, LogStream, TraceWaterfall, SystemMonitor, ProcessTable and NetworkGraph point to their homes; the maps wait for T41.
28 lines
681 B
Rust
28 lines
681 B
Rust
use gpui::{AnyElement, App, Window, div, prelude::*};
|
|
|
|
mod board;
|
|
mod monitor;
|
|
|
|
use super::Page;
|
|
use crate::script::Step;
|
|
|
|
pub const PAGE: Page = Page {
|
|
number: 34,
|
|
slug: "dashboard",
|
|
title: "Dashboard & Monitoring",
|
|
summary: "Widgets on a grid you arrange, what is firing and what is up, and the stream of what happens.",
|
|
render,
|
|
script: SCRIPT,
|
|
};
|
|
|
|
const SCRIPT: &[Step] = &[];
|
|
|
|
fn render(window: &mut Window, cx: &mut App) -> AnyElement {
|
|
div()
|
|
.child(board::grid(window, cx))
|
|
.child(monitor::health(window, cx))
|
|
.child(monitor::incidents(window, cx))
|
|
.child(monitor::stream(window, cx))
|
|
.into_any_element()
|
|
}
|