Skip to main content

src/utils/monitorUiHelpers

Dynamic UI utilities that use monitor registry for extensible UI behavior.

Remarksโ€‹

These utilities eliminate hardcoded monitor type checks throughout the frontend by providing dynamic configuration-based helpers for UI behavior.

All utilities support caching for optimal performance and include error handling.

Exampleโ€‹

// Check if a monitor type supports response time
const hasResponseTime = await supportsResponseTime("http");

// Get the default monitor ID from a list
const defaultId = getDefaultMonitorId(["monitor-1", "monitor-2"]);

Interfacesโ€‹

Functionsโ€‹