Skip to main content

Function: formatMonitorDetail()

formatMonitorDetail(monitorType: "http" | "http-keyword" | "http-status" | "http-header" | "http-json" | "http-latency" | "port" | "ping" | "dns" | "ssl" | "websocket-keepalive" | "server-heartbeat" | "replication" | "cdn-edge-consistency", details: string): Promise<string>

Defined in: src/utils/monitorUiHelpers.ts:257

Format detail label dynamically based on monitor type configuration.

Parametersโ€‹

monitorTypeโ€‹

Type of monitor.

"http" | "http-keyword" | "http-status" | "http-header" | "http-json" | "http-latency" | "port" | "ping" | "dns" | "ssl" | "websocket-keepalive" | "server-heartbeat" | "replication" | "cdn-edge-consistency"

detailsโ€‹

string

Detail value to format.

Returnsโ€‹

Promise<string>

Formatted detail string supplied by the monitor registry.

Exampleโ€‹

const label = await formatMonitorDetail("http", "200"); // "Response Code: 200"
const label = await formatMonitorDetail("port", "80"); // "Port: 80"