Skip to main content

UseAlerts

useAlerts

Returns information about all registered Alerts, including how many are active and at what severity.

Signature
function useAlerts(): { alerts: AlertEntry[]; activeCount: number; highestSeverity: AlertSeverity }

AlertEntry

An individual Alert item.

Signature
interface AlertEntry {
definition: DashboardAlertDefinition;
active: boolean;
currentSeverity?: AlertSeverity;
lastData: any;
dismiss: () => void;
}

definition

active

property
boolean

currentSeverity

property
AlertSeverity

lastData

property
any

dismiss

property
() => void