Move state definitions into skin.js.php because they are used in several different views. Add STATE_UNKNOWN to match of with c++ side actual values.
This commit is contained in:
parent
090c803b98
commit
31a1ef6cb4
|
@ -90,3 +90,18 @@ unset($user_without_password['Password']);
|
|||
echo json_encode($user_without_password);
|
||||
?>;
|
||||
var running = <?php echo daemonCheck()?'true':'false' ?>;
|
||||
|
||||
var STATE_UNKNOWN = <?php echo STATE_UNKNOWN ?>;
|
||||
var STATE_IDLE = <?php echo STATE_IDLE ?>;
|
||||
var STATE_PREALARM = <?php echo STATE_PREALARM ?>;
|
||||
var STATE_ALARM = <?php echo STATE_ALARM ?>;
|
||||
var STATE_ALERT = <?php echo STATE_ALERT ?>;
|
||||
var STATE_TAPE = <?php echo STATE_TAPE ?>;
|
||||
|
||||
var stateStrings = new Array();
|
||||
stateStrings[STATE_UNKNOWN] = "<?php echo translate('Unknown') ?>";
|
||||
stateStrings[STATE_IDLE] = "<?php echo translate('Idle') ?>";
|
||||
stateStrings[STATE_PREALARM] = "<?php echo translate('Prealarm') ?>";
|
||||
stateStrings[STATE_ALARM] = "<?php echo translate('Alarm') ?>";
|
||||
stateStrings[STATE_ALERT] = "<?php echo translate('Alert') ?>";
|
||||
stateStrings[STATE_TAPE] = "<?php echo translate('Record') ?>";
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
//
|
||||
// Import constants
|
||||
//
|
||||
var STATE_IDLE = <?php echo STATE_IDLE ?>;
|
||||
var STATE_PREALARM = <?php echo STATE_PREALARM ?>;
|
||||
var STATE_ALARM = <?php echo STATE_ALARM ?>;
|
||||
var STATE_ALERT = <?php echo STATE_ALERT ?>;
|
||||
var STATE_TAPE = <?php echo STATE_TAPE ?>;
|
||||
|
||||
var stateStrings = new Array();
|
||||
stateStrings[STATE_IDLE] = "<?php echo translate('Idle') ?>";
|
||||
stateStrings[STATE_PREALARM] = "<?php echo translate('Idle') ?>";
|
||||
stateStrings[STATE_ALARM] = "<?php echo translate('Alarm') ?>";
|
||||
stateStrings[STATE_ALERT] = "<?php echo translate('Alert') ?>";
|
||||
stateStrings[STATE_TAPE] = "<?php echo translate('Record') ?>";
|
||||
|
||||
var CMD_QUERY = <?php echo CMD_QUERY ?>;
|
||||
|
||||
|
|
|
@ -9,18 +9,6 @@
|
|||
//
|
||||
// Import constants
|
||||
//
|
||||
var STATE_IDLE = <?php echo STATE_IDLE ?>;
|
||||
var STATE_PREALARM = <?php echo STATE_PREALARM ?>;
|
||||
var STATE_ALARM = <?php echo STATE_ALARM ?>;
|
||||
var STATE_ALERT = <?php echo STATE_ALERT ?>;
|
||||
var STATE_TAPE = <?php echo STATE_TAPE ?>;
|
||||
|
||||
var stateStrings = new Array();
|
||||
stateStrings[STATE_IDLE] = "<?php echo translate('Idle') ?>";
|
||||
stateStrings[STATE_PREALARM] = "<?php echo translate('Idle') ?>";
|
||||
stateStrings[STATE_ALARM] = "<?php echo translate('Alarm') ?>";
|
||||
stateStrings[STATE_ALERT] = "<?php echo translate('Alert') ?>";
|
||||
stateStrings[STATE_TAPE] = "<?php echo translate('Record') ?>";
|
||||
|
||||
var deleteString = "<?php echo translate('Delete') ?>";
|
||||
|
||||
|
|
|
@ -94,20 +94,6 @@ var deleteString = "<?php echo translate('Delete') ?>";
|
|||
// Imported from watch.js.php and modified for new zone edit view
|
||||
//
|
||||
|
||||
var STATE_IDLE = <?php echo STATE_IDLE ?>;
|
||||
var STATE_PREALARM = <?php echo STATE_PREALARM ?>;
|
||||
var STATE_ALARM = <?php echo STATE_ALARM ?>;
|
||||
var STATE_ALERT = <?php echo STATE_ALERT ?>;
|
||||
var STATE_TAPE = <?php echo STATE_TAPE ?>;
|
||||
|
||||
var stateStrings = new Array();
|
||||
stateStrings[STATE_IDLE] = "<?php echo translate('Idle') ?>";
|
||||
stateStrings[STATE_PREALARM] = "<?php echo translate('Idle') ?>";
|
||||
stateStrings[STATE_ALARM] = "<?php echo translate('Alarm') ?>";
|
||||
stateStrings[STATE_ALERT] = "<?php echo translate('Alert') ?>";
|
||||
stateStrings[STATE_TAPE] = "<?php echo translate('Record') ?>";
|
||||
|
||||
|
||||
var CMD_PAUSE = <?php echo CMD_PAUSE ?>;
|
||||
var CMD_PLAY = <?php echo CMD_PLAY ?>;
|
||||
var CMD_STOP = <?php echo CMD_STOP ?>;
|
||||
|
|
|
@ -17,25 +17,10 @@ monitorData[monitorData.length] = {
|
|||
}
|
||||
?>
|
||||
|
||||
var STATE_IDLE = <?php echo STATE_IDLE ?>;
|
||||
var STATE_PREALARM = <?php echo STATE_PREALARM ?>;
|
||||
var STATE_ALARM = <?php echo STATE_ALARM ?>;
|
||||
var STATE_ALERT = <?php echo STATE_ALERT ?>;
|
||||
var STATE_TAPE = <?php echo STATE_TAPE ?>;
|
||||
|
||||
var stateStrings = new Array();
|
||||
stateStrings[STATE_IDLE] = "<?php echo translate('Idle') ?>";
|
||||
stateStrings[STATE_PREALARM] = "<?php echo translate('PreAlarm') ?>";
|
||||
stateStrings[STATE_ALARM] = "<?php echo translate('Alarm') ?>";
|
||||
stateStrings[STATE_ALERT] = "<?php echo translate('Alert') ?>";
|
||||
stateStrings[STATE_TAPE] = "<?php echo translate('Record') ?>";
|
||||
|
||||
|
||||
var CMD_PAUSE = <?php echo CMD_PAUSE ?>;
|
||||
var CMD_PLAY = <?php echo CMD_PLAY ?>;
|
||||
var CMD_STOP = <?php echo CMD_STOP ?>;
|
||||
var CMD_QUERY = <?php echo CMD_QUERY ?>;
|
||||
var CMD_QUIT = <?php echo CMD_QUIT ?>;
|
||||
|
||||
|
||||
var statusRefreshTimeout = <?php echo 1000*ZM_WEB_REFRESH_STATUS ?>;
|
||||
|
|
Loading…
Reference in New Issue