Nasaq
Components

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.

PreviewOpen ↗

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.json

Decide 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 services

API

StatusPageManager: every Card prop except children, plus:

PropTypeDefaultDescription
settingsStatusPageSettingsrequired{ title, slug, domain?, services: { id, name, visible }[] }, services in display order.
incidentsreadonly Incident[][]Shown under the form.
publicUrlstringShows a View public page link.
onSave(next) => Promise<void | { error? }>requiredSave the staged settings.
onPostIncident(input: IncidentInput) => Promise<void | { error? }>Shows Post incident. { title, body, impact, status, serviceIds }.
labelsPartial<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"); // false

Accessibility

  • 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, IncidentList and --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.

Lab

https://docs.nasaqui.com/?path=/docs/components-monitoring-status-page-manager--docs

On this page