Function: formatMonitorTitleSuffix()
formatMonitorTitleSuffix(
monitorType:"cdn-edge-consistency"|"dns"|"http"|"http-header"|"http-json"|"http-keyword"|"http-latency"|"http-status"|"ping"|"port"|"replication"|"server-heartbeat"|"ssl"|"websocket-keepalive",monitor:Monitor):Promise<string>
Defined in: src/utils/monitorUiHelpers.ts:352
Format title suffix dynamically based on monitor type configuration.
Parametersโ
monitorTypeโ
Type of monitor.
"cdn-edge-consistency" | "dns" | "http" | "http-header" | "http-json" | "http-keyword" | "http-latency" | "http-status" | "ping" | "port" | "replication" | "server-heartbeat" | "ssl" | "websocket-keepalive"
monitorโ
Monitor data.
Returnsโ
Promise<string>
Title suffix string suitable for rendering in the UI.
Exampleโ
const suffix = await formatMonitorTitleSuffix("http", {
url: "https://example.com",
}); // " (https://example.com)"
const suffix = await formatMonitorTitleSuffix("port", {
host: "localhost",
port: 80,
}); // " (localhost:80)"