StatusPageManager
Admin for the public status page - title, address and custom domain, which services show and in what order (staged until Save), and posting incidents that appear on the page.
Code
import { StatusPageManager, type StatusPageSettings } from "@fadymondy/nasaq/web";declare const settings: StatusPageSettings;declare const api: { save(s: StatusPageSettings): Promise<void> };export const Manager = () => <StatusPageManager settings={settings} onSave={(next) => api.save(next)} />;Monitoring · beta
Live examples and controls: StatusPageManager in the lab.
Install
npx shadcn@latest add https://docs.nasaqui.com/r/status-page-manager.jsonDecide what the public status page shows. Set the page title, the address (a slug) and an optional custom domain; switch a service off to hide it and use the arrows to reorder. Changes are staged: Save and Discard appear when something differs from the saved settings. Post incident opens a dialog with a title, a message, impact, status and the services affected, and lists the incidents below. It has no backend: onSave and onPostIncident talk to the server and you pass the new settings back.
When to use
- The settings side of a status page product.
When not to use
- Monitors and their checks: use
UptimeMonitors. - The public page itself: use
StatusPage.
Import
import { StatusPageManager } from "@fadymondy/nasaq/web";
// inside this monorepo: "@nasaq/web"Quick start
import { StatusPageManager, type StatusPageSettings } from "@fadymondy/nasaq/web";
declare const settings: StatusPageSettings;
declare const api: { save(s: StatusPageSettings): Promise<void> };
export const Manager = () => <StatusPageManager settings={settings} onSave={(next) => api.save(next)} />;Anatomy
StatusPageManager data-slot="status-page-manager"
├─ header title, View public page, Post incident
├─ settings title, slug, custom domain
├─ services list: Switch (show), name, Move up, Move down
├─ Save bar Discard, Save changes
├─ incidents IncidentList
└─ incident Dialog title, message, impact, status, affected servicesAPI
StatusPageManager: every Card prop except children, plus:
| Prop | Type | Default | Description |
|---|---|---|---|
settings | StatusPageSettings | required | { title, slug, domain?, services: { id, name, visible }[] }, services in display order. |
incidents | readonly Incident[] | [] | Shown under the form. |
publicUrl | string | Shows a View public page link. | |
onSave | (next) => Promise<void | { error? }> | required | Save the staged settings. |
onPostIncident | (input: IncidentInput) => Promise<void | { error? }> | Shows Post incident. { title, body, impact, status, serviceIds }. | |
labels | Partial<StatusPageManagerLabels> | Override any string. |
Helpers (pure, tested): isValidStatusSlug, moveItem(list, index, delta).
Examples
Validate a slug
import { isValidStatusSlug } from "@fadymondy/nasaq/web";
isValidStatusSlug("acme-status"); // true
isValidStatusSlug("Acme Status"); // falseAccessibility
- Each switch and arrow has a name that includes the service. Invalid fields are described by their message.
- The incident dialog traps focus and returns it. Saved and error messages are alerts.
RTL & i18n
- English and Arabic strings follow the Nasaq locale. The slug and domain fields stay left to right; the arrow icon mirrors.
Styling & tokens
- Built on
Card,Switch,Dialog,Select,IncidentListand--nq-*tokens. Target[data-slot="status-page-manager"].
Do / Don't
- Do make posting an incident one step: it is used in an emergency.
- Do keep hidden services out of the public page (hidden means hidden).
- Don't save an invalid slug: the form blocks it, so should the server.
- Don't reuse the admin names on the public page without a check.
Related
Lab
https://docs.nasaqui.com/?path=/docs/components-monitoring-status-page-manager--docs
StatusPage
The public status page - an overall banner, each service with a daily history bar and uptime, active and past incidents with their updates, and scheduled maintenance. No admin controls and no sign-in.
TimeSeriesPanel
A chart card for one metric at a time, with a previous-period comparison line, a metric switcher and threshold lines. Also exports PeriodToggle.