Function: getMonitorTypeDisplayLabel()
getMonitorTypeDisplayLabel(
monitorType
:string
):string
Defined in: src/utils/fallbacks.ts:347
Generate display label for monitor type dynamically. Replaces hardcoded backward compatibility patterns.
Parametersโ
monitorTypeโ
string
Type of monitor
Returnsโ
string
Display label for the monitor type
Remarksโ
This function uses a configuration-driven approach to support new monitor types without requiring code changes. To add support for a new monitor type:
- Add an entry to MONITOR_TYPE_LABELS
- The function will automatically use the new label
Exampleโ
getMonitorTypeDisplayLabel("http"); // "Website URL"
getMonitorTypeDisplayLabel("port"); // "Host & Port"
getMonitorTypeDisplayLabel("unknown"); // "Unknown Monitor"