Files
Ely-GPUI-Components/examples/gallery/pages/dashboard/mod.rs
T
ZacharyZhang-NY 09dd3fc2cb T44d Web · Gallery builds for wasm32: one story per section by URL, themed by the host
The gallery's entry runs natively or, on wasm32, from a wasm_bindgen start
through gpui_web, single-threaded with WebGL2 fallback. ?page, ?story and
?theme choose what shows; an unknown one fails in the page and the log.
set_theme switches the mode later. Pictures load from ELY_GALLERY_ASSETS.
scripts/stories.py writes examples/gallery/stories.json from the pages.
2026-09-29 19:16:41 -04:00

28 lines
679 B
Rust

use gpui::{AnyElement, App, Window, div, prelude::*};
mod board;
mod monitor;
use super::Page;
use crate::step::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()
}