add getMonitorStatuses function to return string values for status numbers
This commit is contained in:
parent
f319d02373
commit
4612f4ae75
|
@ -10,7 +10,7 @@ require_once('Group.php');
|
|||
$FunctionTypes = null;
|
||||
|
||||
function getMonitorFunctionTypes() {
|
||||
if ( !isset($FunctionTypes ) ) {
|
||||
if (!isset($FunctionTypes)) {
|
||||
$FunctionTypes = array(
|
||||
'None' => translate('FnNone'),
|
||||
'Monitor' => translate('FnMonitor'),
|
||||
|
@ -23,6 +23,21 @@ function getMonitorFunctionTypes() {
|
|||
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 {
|
||||
protected static $table = 'Monitors';
|
||||
|
||||
|
|
Loading…
Reference in New Issue