component/alarm.js
/* 
    Clear all alarms for the given hostname
*/
Clear all alarms for the given hostname
Clear all alarms for the given hostname
async function clear(hostname) {
    if (hostname === undefined) {
        throw new Error("Hostname is undefined.");
    }
    ClearNotificationWithUID(UID_PREFIX_EXPIRED + hostname);
    ClearNotificationWithUID(UID_PREFIX_REMINDER + hostname);
    var filteredAlarms = alarms.filter(alarm => alarm.hostname === hostname);
    for (let i = 0; i < filteredAlarms.length; i++) {
        const a = filteredAlarms[i];
        clearTimeout(a.alarm);
        alarms.splice(alarms.indexOf(a), 1);
    }
}
async function clear ( hostname ) { if ( hostname === undefined ) { throw new Error ( "Hostname is undefined." ) ; } ClearNotificationWithUID ( UID_PREFIX_EXPIRED + hostname ) ; ClearNotificationWithUID ( UID_PREFIX_REMINDER + hostname ) ; var filteredAlarms = alarms . filter ( alarm => alarm . hostname === hostname ) ; for ( let i = 0 ; i < filteredAlarms . length ; i ++ ) { const a = filteredAlarms [ i ] ; clearTimeout ( a . alarm ) ; alarms . splice ( alarms . indexOf ( a ) , 1 ) ; } }
Clear all alarms for the given hostname
Clear all alarms for the given hostname
//print();