Skip to main content

Function: updateMonitorInSite()

updateMonitorInSite(site: Site, monitorId: string, updates: Partial<Monitor>): Site

Defined in: src/stores/sites/utils/monitorOperations.ts:1004

Updates a monitor in a site.

Parametersโ€‹

siteโ€‹

Site

The site containing the monitor.

monitorIdโ€‹

string

The ID of the monitor to update.

updatesโ€‹

Partial<Monitor>

Partial monitor updates to apply.

Returnsโ€‹

Site

Updated site with modified monitor.

Exampleโ€‹

const updatedSite = updateMonitorInSite(site, "monitor-123", {
timeout: 10000,
});

Throwsโ€‹

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Error if monitor is not found.