add getMonitorStatuses function to return string values for status numbers

This commit is contained in:
Isaac Connor 2021-05-28 12:29:30 -04:00
parent 8511d814df
commit 096581b7f1
1 changed files with 16 additions and 1 deletions

View File

@ -23,6 +23,21 @@ function getMonitorFunctionTypes() {
return $FunctionTypes; return $FunctionTypes;
} }
$Statuses = null;
function getMonitorStatuses() {
if (!isset($Statuses)) {
$Statuses = array(
-1 => 'Unknown',
0 => 'Idle',
1 => 'PreAlarm',
2 => 'Alarm',
3 => 'Alert',
4 => 'Tape'
);
}
return $Statuses;
}
class Monitor extends ZM_Object { class Monitor extends ZM_Object {
protected static $table = 'Monitors'; protected static $table = 'Monitors';