Skip to main content

Function: getSiteDisplayStatus()

function getSiteDisplayStatus(site: SiteForStatus):
| "unknown"
| "degraded"
| "down"
| "paused"
| "pending"
| "up"
| "mixed";

Defined in: shared/utils/siteStatus.ts:185

Determines the display status for a site, considering both operational and monitoring states.

Parametersโ€‹

siteโ€‹

SiteForStatus

The SiteForStatus object representing the site to evaluate.

Returnsโ€‹

"unknown" | "degraded" | "down" | "paused" | "pending" | "up" | "mixed"

"unknown" if there are no monitors.

Remarksโ€‹

This is the primary function for determining the status to display in the UI.

Exampleโ€‹

const displayStatus = getSiteDisplayStatus(site);
// displayStatus: "up" | "down" | "pending" | "paused" | "mixed" | "unknown"