You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2031 lines
54 KiB
2031 lines
54 KiB
//<?php require_once('../../js_asm.php'); ?>
|
|
|
|
var helpContentTopicID = -1;
|
|
|
|
function loadHelpContent( topicID ){
|
|
if( helpContentTopicID == topicID ) return;
|
|
helpContentTopicID = topicID;
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getHelpTopic.php',
|
|
params: {
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>',
|
|
TID: topicID
|
|
},
|
|
success: function( response, opts ){
|
|
var tData = Ext.decode(response.responseText);
|
|
var tPanel = Ext.getCmp('help_content');
|
|
tPanel.removeAll( true );
|
|
tPanel.add( tData );
|
|
tPanel.doLayout();
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
};
|
|
|
|
function clearHelpContent(){
|
|
helpContentTopicID = -1;
|
|
};
|
|
|
|
function loadRessources(){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getResources.php',
|
|
params: {
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>',
|
|
},
|
|
success: function( response, opts ){
|
|
var tData = Ext.decode(response.responseText);
|
|
var tPanel = Ext.getCmp('resources_container');
|
|
if( tData.status == 'ok' ){
|
|
var res = Ext.decode( tData.resources );
|
|
tPanel.removeAll( true );
|
|
tPanel.add( res );
|
|
tPanel.doLayout();
|
|
} else {
|
|
};
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
};
|
|
|
|
function loadModules(){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getModules.php',
|
|
params: {
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>',
|
|
},
|
|
success: function( response, opts ){
|
|
var tData = Ext.decode(response.responseText);
|
|
var tPanel = Ext.getCmp('modules_container');
|
|
if( tData.status == 'ok' ){
|
|
var res = Ext.decode( tData.modules );
|
|
tPanel.removeAll( true );
|
|
tPanel.add( res );
|
|
tPanel.doLayout();
|
|
} else {
|
|
tPanel.removeAll( true );
|
|
tPanel.doLayout();
|
|
var tPanel = Ext.getCmp('mod_ed_small');
|
|
tPanel.removeAll( true );
|
|
tPanel.add( { html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>' } );
|
|
tPanel.doLayout();
|
|
};
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
};
|
|
|
|
function loadDetectedCameras(){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getCameras.php',
|
|
params: {
|
|
UID: <?=$UserID;?>,
|
|
TYP: 0,
|
|
SID: '<?=$Session;?>',
|
|
},
|
|
success: function( response, opts ){
|
|
var tData = Ext.decode(response.responseText);
|
|
var tPanel = Ext.getCmp('dcam_container');
|
|
if( tData.status == 'ok' ){
|
|
var res = Ext.decode( tData.cameras );
|
|
tPanel.removeAll( true );
|
|
tPanel.add( res );
|
|
tPanel.doLayout();
|
|
var zPanel = Ext.getCmp('dcam_op_small');
|
|
zPanel.removeAll( true );
|
|
zPanel.add( { html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>' } );
|
|
zPanel.doLayout();
|
|
} else {
|
|
tPanel.removeAll( true );
|
|
tPanel.doLayout();
|
|
var zPanel = Ext.getCmp('dcam_op_small');
|
|
zPanel.removeAll( true );
|
|
zPanel.add( { html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>' } );
|
|
zPanel.doLayout();
|
|
};
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
};
|
|
|
|
function loadAssignedCameras(){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getCameras.php',
|
|
params: {
|
|
UID: <?=$UserID;?>,
|
|
TYP: 1,
|
|
SID: '<?=$Session;?>',
|
|
},
|
|
success: function( response, opts ){
|
|
var tData = Ext.decode(response.responseText);
|
|
var tPanel = Ext.getCmp('acam_container');
|
|
if( tData.status == 'ok' ){
|
|
var res = Ext.decode( tData.cameras );
|
|
tPanel.removeAll( true );
|
|
tPanel.add( res );
|
|
tPanel.doLayout();
|
|
var zPanel = Ext.getCmp('acam_op_small');
|
|
zPanel.removeAll( true );
|
|
zPanel.add( { html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>' } );
|
|
zPanel.doLayout();
|
|
} else {
|
|
tPanel.removeAll( true );
|
|
tPanel.doLayout();
|
|
var zPanel = Ext.getCmp('acam_op_small');
|
|
zPanel.removeAll( true );
|
|
zPanel.add( { html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>' } );
|
|
zPanel.doLayout();
|
|
};
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
};
|
|
function loadAttachedSensors(){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getSensors.php',
|
|
params: {
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>',
|
|
},
|
|
success: function( response, opts ){
|
|
var tData = Ext.decode(response.responseText);
|
|
var tPanel = Ext.getCmp('sens_container');
|
|
if( tData.status == 'ok' ){
|
|
var res = Ext.decode( tData.sensors );
|
|
tPanel.removeAll( true );
|
|
tPanel.add( res );
|
|
tPanel.doLayout();
|
|
var zPanel = Ext.getCmp('sens_op_small');
|
|
zPanel.removeAll( true );
|
|
zPanel.add( { html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>' } );
|
|
zPanel.doLayout();
|
|
} else {
|
|
tPanel.removeAll( true );
|
|
tPanel.doLayout();
|
|
var zPanel = Ext.getCmp('sens_op_small');
|
|
zPanel.removeAll( true );
|
|
zPanel.add( { html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>' } );
|
|
zPanel.doLayout();
|
|
};
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
};
|
|
function editResource( rid ){
|
|
var loadEditor = true;
|
|
if( settingsAreChanged ){
|
|
Ext.Msg.show({
|
|
title:'<?=$Labels->GetLabel('_SETTINGS_CHANGED_');?>',
|
|
msg: '<?=$Labels->GetLabel('_SET_CHANGED_WOULD_SAVE_');?>',
|
|
buttons: Ext.Msg.YESNO,
|
|
icon: Ext.MessageBox.WARNING,
|
|
fn: function(btn, text){
|
|
if( btn == 'yes' ){
|
|
cleanupChangeNotifier();
|
|
} else {
|
|
loadEditor = false;
|
|
};
|
|
}
|
|
});
|
|
};
|
|
if( loadEditor ){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getResourceEditor.php',
|
|
params: {
|
|
RID: rid,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>',
|
|
},
|
|
success: function( response, opts ){
|
|
var data = Ext.decode(response.responseText);
|
|
var resourceEdPanel = Ext.getCmp('res_ed_small');
|
|
if( resourceEdPanel ){
|
|
resourceEdPanel.removeAll( true );
|
|
resourceEdPanel.add( data );
|
|
resourceEdPanel.doLayout();
|
|
};
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
};
|
|
};
|
|
|
|
function editModule( mid ){
|
|
var loadEditor = true;
|
|
if( settingsAreChanged ){
|
|
Ext.Msg.show({
|
|
title:'<?=$Labels->GetLabel('_SETTINGS_CHANGED_');?>',
|
|
msg: '<?=$Labels->GetLabel('_SET_CHANGED_WOULD_SAVE_');?>',
|
|
buttons: Ext.Msg.YESNO,
|
|
icon: Ext.MessageBox.WARNING,
|
|
fn: function(btn, text){
|
|
if( btn == 'yes' ){
|
|
cleanupChangeNotifier();
|
|
} else {
|
|
loadEditor = false;
|
|
};
|
|
}
|
|
});
|
|
};
|
|
if( loadEditor ){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getModuleEditor.php',
|
|
params: {
|
|
MID: mid,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>',
|
|
},
|
|
success: function( response, opts ){
|
|
var data = Ext.decode(response.responseText);
|
|
var moduleEdPanel = Ext.getCmp('mod_ed_small');
|
|
if( moduleEdPanel ){
|
|
moduleEdPanel.removeAll( true );
|
|
moduleEdPanel.add( data );
|
|
moduleEdPanel.doLayout();
|
|
};
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
};
|
|
};
|
|
|
|
function enableModule( ID ){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/doModuleOperation.php',
|
|
params: {
|
|
OPID: 2,
|
|
OPCODE: 1,
|
|
MID: ID,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function(){
|
|
//showSettings( SelectedNodeID, 2 );
|
|
loadModules();
|
|
}
|
|
});
|
|
};
|
|
|
|
function disableModule( ID ){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/doModuleOperation.php',
|
|
params: {
|
|
OPID: 2,
|
|
OPCODE: 0,
|
|
MID: ID,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function(){
|
|
//showSettings( SelectedNodeID, 2 );
|
|
loadModules();
|
|
}
|
|
});
|
|
};
|
|
//cursor: url('data:image/svg+xml;utf8,<svg fill="%23FF0000" height="48" viewBox="0 0 24 24" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>') 24 24, auto;
|
|
|
|
function doCamOperation( cid, op, param, reload = false ){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/doCameraOperation.php',
|
|
params: {
|
|
CID: cid,
|
|
CMD: 10,
|
|
OPID: op,
|
|
OPCODE: param,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function(){
|
|
if( reload ) loadDetectedCameras();
|
|
if( reload ) loadAssignedCameras();
|
|
}
|
|
});
|
|
};
|
|
function doApplicationOperation( op, param, reload = false ){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/doApplicationOperation.php',
|
|
params: {
|
|
OPID: op,
|
|
OPCODE: param,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function(){
|
|
//if( reload ) loadDetectedCameras();
|
|
//if( reload ) loadAssignedCameras();
|
|
}
|
|
});
|
|
};
|
|
function doSensorOperation( sensorid, op, param, reload = false ){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/doSensorOperation.php',
|
|
params: {
|
|
SNID: sensorid,
|
|
CMD: op,
|
|
OPID: op,
|
|
OPCODE: param,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function(){
|
|
if( reload ) loadAttachedSensors();
|
|
}
|
|
});
|
|
};
|
|
|
|
function doResourceOperation( resourceid, op, param, value, reload = false ){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/doResourceOperation.php',
|
|
params: {
|
|
RID: resourceid,
|
|
OPID: op,
|
|
OPCODE: param,
|
|
OPVAL: value,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function(){
|
|
if( reload ) loadAttachedSensors();
|
|
}
|
|
});
|
|
};
|
|
|
|
function removeModule( ID ){
|
|
Ext.Msg.show({
|
|
title:'<?=$Labels->GetLabel('_PLS_CONFIRM_');?>',
|
|
msg: '<?=$Labels->GetLabel('_RUS_DELETE_MODULE_');?>',
|
|
buttons: Ext.Msg.YESNOCANCEL,
|
|
fn: function( btn, text ){
|
|
if( btn == 'yes' ){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/doModuleOperation.php',
|
|
params: {
|
|
OPID: 1,
|
|
MID: ID,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function(){
|
|
//showSettings( SelectedNodeID, 2 );
|
|
loadModules();
|
|
}
|
|
});
|
|
};
|
|
},
|
|
icon: Ext.MessageBox.QUESTION
|
|
});
|
|
};
|
|
|
|
function disableServOps(){
|
|
var tC = Ext.getCmp('servopPanel01');
|
|
tC.removeClass('servopInfo_item01');
|
|
tC.addClass('servopInfo_item00');
|
|
tC.disable();
|
|
Ext.getCmp('tbtn_sop01').disable();
|
|
//tC.doLayout();
|
|
tC = Ext.getCmp('servopPanel02');
|
|
tC.removeClass('servopInfo_item11');
|
|
tC.addClass('servopInfo_item10');
|
|
tC.disable();
|
|
Ext.getCmp('tbtn_sop02').disable();
|
|
//tC.doLayout();
|
|
tC = Ext.getCmp('servopPanel03');
|
|
tC.removeClass('servopInfo_item21');
|
|
tC.addClass('servopInfo_item20');
|
|
tC.disable();
|
|
Ext.getCmp('tbtn_sop03').disable();
|
|
//tC.doLayout();
|
|
tC = Ext.getCmp('servopPanel04');
|
|
tC.removeClass('servopInfo_item31');
|
|
tC.addClass('servopInfo_item30');
|
|
tC.disable();
|
|
Ext.getCmp('tbtn_sop04').disable();
|
|
//tC.doLayout();
|
|
};
|
|
|
|
function enableServOps(){
|
|
var tC = Ext.getCmp('servopPanel01');
|
|
if( tC != undefined ){
|
|
tC.removeClass('servopInfo_item00');
|
|
tC.addClass('servopInfo_item01');
|
|
Ext.getCmp('tbtn_sop01').enable();
|
|
tC.enable();
|
|
};
|
|
//tC.doLayout();
|
|
tC = Ext.getCmp('servopPanel02');
|
|
if( tC != undefined ){
|
|
tC.removeClass('servopInfo_item10');
|
|
tC.addClass('servopInfo_item11');
|
|
tC.enable();
|
|
Ext.getCmp('tbtn_sop02').enable();
|
|
};
|
|
//tC.doLayout();
|
|
tC = Ext.getCmp('servopPanel03');
|
|
if( tC != undefined ){
|
|
tC.removeClass('servopInfo_item20');
|
|
tC.addClass('servopInfo_item21');
|
|
tC.enable();
|
|
Ext.getCmp('tbtn_sop03').enable();
|
|
};
|
|
//tC.doLayout();
|
|
tC = Ext.getCmp('servopPanel04');
|
|
if( tC != undefined ){
|
|
tC.removeClass('servopInfo_item30');
|
|
tC.addClass('servopInfo_item31');
|
|
tC.enable();
|
|
Ext.getCmp('tbtn_sop04').enable();
|
|
};
|
|
//tC.doLayout();
|
|
};
|
|
|
|
function updateServerStatus(){
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getServerStatus.php',
|
|
params: {
|
|
SERVID: 1,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function( response, opts ){
|
|
// If the response is JSON, you have to decode it
|
|
var sps = document.getElementById("INFO_SPS");
|
|
if( sps == undefined ) return;
|
|
var data = Ext.decode(response.responseText);
|
|
if( data.status == 'ok' ){
|
|
serverIsOnLine = true;
|
|
enableServOps();
|
|
//document.getElementById('HW_NFO').innerHTML = data.stats.hw_info;
|
|
//document.getElementById('OS_NFO').innerHTML = data.stats.os_info;
|
|
//document.getElementById('BLD_NFO').innerHTML = data.stats.build;
|
|
setDonatStatus( 1, 0, data.stats.stat_cpu15 );
|
|
setDonatStatus( 1, 1, data.stats.stat_mem );
|
|
setDonatStatus( 1, 2, data.stats.stat_disk );
|
|
setDonatStatus( 1, 3, data.stats.temp0 );
|
|
|
|
sps.classList.remove('setEd_infoPanel');
|
|
sps.classList.add('setEl_infoPanel');
|
|
} else {
|
|
serverIsOnLine = false;
|
|
disableServOps();
|
|
if( data.status == 'na' ){
|
|
setDonatStatus( 1, 0, -1 );
|
|
setDonatStatus( 1, 1, -1 );
|
|
setDonatStatus( 1, 2, -1 );
|
|
setDonatStatus( 1, 3, -1 );
|
|
sps.classList.remove('setEl_infoPanel');
|
|
sps.classList.add('setEd_infoPanel');
|
|
} else {
|
|
Ext.Msg.show({
|
|
title:'<?=$Labels->GetLabel("_INFO_MSG_");?>',
|
|
msg: data.messages,
|
|
buttons: Ext.Msg.OK,//YESNOCANCEL,
|
|
fn: function(){
|
|
},
|
|
icon: Ext.MessageBox.INFO //QUESTION
|
|
});
|
|
};
|
|
};
|
|
if( tlInterval == null ){
|
|
tlInterval = window.setInterval( updateServerStatus, 1200, selectedSite );
|
|
};
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
};
|
|
|
|
var addE2UDialog = null;
|
|
function addEthernet2Uart(){
|
|
if( addE2UDialog == null ){
|
|
addE2UDialog = new Ext.Window({
|
|
modal: true,
|
|
title: '<?=$Labels->GetLabel('_ADD_E2U_DIAL_TTL_');?>',
|
|
width: 400,
|
|
height: 560,
|
|
layout: 'fit',
|
|
closeAction: 'hide',
|
|
items:[{
|
|
xtype: 'form',
|
|
labelWidth: 120, // label settings here cascade unless overridden
|
|
frame: false,
|
|
width: 400,
|
|
labelAlign: 'right',
|
|
//bodyStyle:'padding:5px 5px 0',
|
|
defaultType: 'textfield',
|
|
items:[{
|
|
xtype: 'panel',
|
|
height: 200,
|
|
frame: false,
|
|
border: false,
|
|
html: '<center><img width="200px" src="/style/assets/eth2uart.png"></center>'
|
|
},/*{
|
|
fieldLabel: 'Name',
|
|
id: 'ued_name'
|
|
},{
|
|
xtype: 'combo',
|
|
fieldLabel: '<?=$Labels->GetLabel('_CONNECT_2_');?>',
|
|
id: 'ued_servid',
|
|
editable: false,
|
|
typeAhead: true,
|
|
triggerAction: 'all',
|
|
width: '100%',
|
|
lazyRender:true,
|
|
mode: 'local',
|
|
store: new Ext.data.ArrayStore({
|
|
<?php
|
|
$QS = "SELECT `id`, `name` FROM `nodes` WHERE `type`=0";
|
|
$Servers = $DATABASE->Query( $QS );
|
|
$SLIST = array();
|
|
$SSID = 0;
|
|
if( count( $Servers ) ){
|
|
foreach( $Servers as $A ) $SLIST[] = '['.$A['id'].',\''.$A['name'].'\']';
|
|
$SSID = intval( $Servers[0]['id'] );
|
|
};
|
|
//[1,'Server Node'], [2,'Aux Server']
|
|
?>
|
|
fields: ['sid', 'snam'],
|
|
data: [<?=implode(',',$SLIST);?>]
|
|
}),
|
|
value: <?=$SSID;?>,
|
|
valueField: 'sid',
|
|
displayField: 'snam'
|
|
},*/{
|
|
xtype: 'combo',
|
|
fieldLabel: '<?=$Labels->GetLabel('UART_COM_SPEED');?>',
|
|
id: 'ued_speed',
|
|
editable: false,
|
|
typeAhead: true,
|
|
triggerAction: 'all',
|
|
width: '100%',
|
|
lazyRender:true,
|
|
mode: 'local',
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['speed'],
|
|
data: [[19200], [115200]]
|
|
}),
|
|
value: 19200,
|
|
valueField: 'speed',
|
|
displayField: 'speed'
|
|
},{
|
|
xtype: 'combo',
|
|
fieldLabel: '<?=$Labels->GetLabel('UART_COM_BITS');?>',
|
|
id: 'ued_bit',
|
|
editable: false,
|
|
typeAhead: true,
|
|
triggerAction: 'all',
|
|
width: '100%',
|
|
lazyRender:true,
|
|
mode: 'local',
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['bits'],
|
|
data: [[5],[6],[7],[8],[9]]
|
|
}),
|
|
value: 8,
|
|
valueField: 'bits',
|
|
displayField: 'bits'
|
|
},{
|
|
xtype: 'combo',
|
|
fieldLabel: '<?=$Labels->GetLabel('UART_COM_SBITS');?>',
|
|
id: 'ued_stops',
|
|
editable: false,
|
|
typeAhead: true,
|
|
triggerAction: 'all',
|
|
width: '100%',
|
|
lazyRender:true,
|
|
mode: 'local',
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['stops'],
|
|
data: [[1],[1.5],[2]]
|
|
}),
|
|
value: 1,
|
|
valueField: 'stops',
|
|
displayField: 'stops'
|
|
},{
|
|
xtype: 'combo',
|
|
fieldLabel: '<?=$Labels->GetLabel('UART_COM_PARITY');?>',
|
|
id: 'ued_parity',
|
|
editable: false,
|
|
typeAhead: true,
|
|
triggerAction: 'all',
|
|
width: '100%',
|
|
lazyRender:true,
|
|
mode: 'local',
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['parity'],
|
|
data: [['Odd'], ['Even'],['None']]
|
|
}),
|
|
value: 'None',
|
|
valueField: 'parity',
|
|
displayField: 'parity'
|
|
},{
|
|
xtype: 'combo',
|
|
fieldLabel: '<?=$Labels->GetLabel('_WORKING_MODE_');?>',
|
|
id: 'ued_mode',
|
|
editable: false,
|
|
typeAhead: true,
|
|
triggerAction: 'all',
|
|
width: '100%',
|
|
lazyRender:true,
|
|
mode: 'local',
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['mode','mode_txt'],
|
|
data: [[0,'<?=$Labels->GetLabel('_UDP_CLIENT_');?>'], [1,'<?=$Labels->GetLabel('_TCP_CLIENT_');?>'], [2,'<?=$Labels->GetLabel('_UDP_SERVER_');?>'], [3,'<?=$Labels->GetLabel('_TCP_SERVER_');?>']]
|
|
}),
|
|
value: 3,
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt'
|
|
},{
|
|
fieldLabel: '<?=$Labels->GetLabel('_DEVICE_IP_');?>',
|
|
id: 'ued_ip'
|
|
},{
|
|
fieldLabel: '<?=$Labels->GetLabel('_DEVICE_PORT_');?>',
|
|
value: 8234,
|
|
id: 'ued_port'
|
|
}],
|
|
bbar: [{
|
|
text: 'Cancel',
|
|
handler: function(){//discoverOnvifSources
|
|
addE2UDialog.hide();
|
|
}
|
|
},'->',{
|
|
id: 'con_to_src',
|
|
text: 'Add Adapter to Site',
|
|
disabled: false,
|
|
handler: function(){
|
|
var SPD = Ext.getCmp('ued_speed').getValue();
|
|
var BIT = Ext.getCmp('ued_bit').getValue();
|
|
var STP = Ext.getCmp('ued_stops').getValue();
|
|
var PAR = Ext.getCmp('ued_parity').getValue();
|
|
var MOD = Ext.getCmp('ued_mode').getValue();
|
|
var IP = Ext.getCmp('ued_ip').getValue();
|
|
var PORT= Ext.getCmp('ued_port').getValue();
|
|
var MAC = '';//Ext.getCmp('ued_mac').getValue();
|
|
//var NAME= Ext.getCmp('ued_name').getValue();
|
|
//var SRV = Ext.getCmp('ued_servid').getValue();
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/addNode.php',
|
|
params: {
|
|
TYPE: 20,
|
|
UART_SPEED: SPD,
|
|
UART_BITS: BIT,
|
|
UART_STOP: STP,
|
|
UART_PAR: PAR,
|
|
UART_MODE: MOD,
|
|
UART_IP: IP,
|
|
UART_PORT: PORT,
|
|
UART_MAC: MAC,
|
|
//UART_NAME: NAME,
|
|
UID: <?=$UserID;?>,
|
|
//SRVID: SRV,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function( response, opts ){
|
|
var data = Ext.decode(response.responseText);
|
|
if( data.sucess == false ){
|
|
Ext.Msg.show({
|
|
title:'Request Failure!',
|
|
msg: data.error,
|
|
buttons: Ext.Msg.OK,
|
|
icon: Ext.MessageBox.INFO
|
|
});
|
|
} else {
|
|
loadRessources();
|
|
};
|
|
addE2UDialog.hide();
|
|
},
|
|
failure: function( response, opts ) {
|
|
failureAJAXFunction( response, opts );
|
|
addE2UDialog.hide();
|
|
}
|
|
});
|
|
}
|
|
}]
|
|
}]
|
|
});
|
|
};
|
|
addE2UDialog.show();
|
|
};
|
|
|
|
var addSensorDialog = null;
|
|
var addSensWM = null;
|
|
function addSensor(){
|
|
if( addSensorDialog == null ){
|
|
addSensorDialog = new Ext.Window({
|
|
modal: true,
|
|
title: '<?=$Labels->GetLabel('_SMM_ADD_LSEN_');?>',
|
|
width: 500,
|
|
height: 438,
|
|
layout: 'form',
|
|
closeAction: 'hide',
|
|
labelWidth: 160,
|
|
labelAlign: 'right',
|
|
items:[{
|
|
xtype: 'panel',
|
|
frame: false,
|
|
border: false,
|
|
html: '<table width="100%" border=0><tr><td align="center" valign="middle"><div class="node_1_img_set"></div></td></tr></table>'
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 8
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sens_type',
|
|
fieldLabel: "<?=$Labels->GetLabel('SENS_TYPE');?>",
|
|
lazyRender: true,
|
|
mode: 'local',
|
|
forceSelection: true,
|
|
triggerAction: 'all',
|
|
editable: false,
|
|
disableKeyFilter: true,
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['mode','mode_txt'],
|
|
data: [
|
|
[1,'ALS Sensor'],
|
|
[2,'LFS Sensor'],
|
|
[3,'PLS 200 Sensor'],
|
|
[4,'PLS 360 Sensor']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: 1,
|
|
width: 200
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sens_range',
|
|
fieldLabel: "<?=$Labels->GetLabel('SENS_RANGE');?>",
|
|
lazyRender: true,
|
|
mode: 'local',
|
|
forceSelection: true,
|
|
triggerAction: 'all',
|
|
editable: false,
|
|
disableKeyFilter: true,
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['range','range_txt'],
|
|
data: [
|
|
[15,'15 Meters'],
|
|
[35,'35 Meters'],
|
|
[65,'65 Meters'],
|
|
[75,'75 Meters'],
|
|
[150,'150 Meters'],
|
|
[200,'200 Meters'],
|
|
[300,'300 Meters']
|
|
]
|
|
}),
|
|
valueField: 'range',
|
|
displayField: 'range_txt',
|
|
value: 15,
|
|
width: 200
|
|
},{
|
|
xtype: 'numberfield',
|
|
id: 'sens_id',
|
|
fieldLabel: '<?=$Labels->GetLabel('_PROTO_DEVICE_ID_');?>',
|
|
width: 200,
|
|
value: 0
|
|
},{
|
|
xtype: 'combo',
|
|
fieldLabel: '<?=$Labels->GetLabel('_UART_PORT_');?>',
|
|
lazyRender: true,
|
|
id: 'uart_id',
|
|
mode: 'local',
|
|
disabled: false,
|
|
forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true,
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['uart','uart_txt'],
|
|
data: [<?php
|
|
$QS="SELECT aux_id, device FROM resources WHERE ( type=1 OR type=129 )";
|
|
$RR=$DATABASE->Query( $QS );
|
|
if( count( $RR ) ){
|
|
$RE=array();
|
|
foreach( $RR as $R ){
|
|
$RE[] = "[ {$R['aux_id']}, '{$R['device']}']";
|
|
};
|
|
echo implode( ',', $RE );
|
|
} else {
|
|
echo "[0, \"".$Labels->GetLabel('_NO_UARTS_DEF_')."\"]";
|
|
};
|
|
?>]
|
|
}),
|
|
valueField: 'uart',
|
|
displayField: 'uart_txt',
|
|
width: 200
|
|
},{
|
|
xtype:'button',
|
|
width: '100%',
|
|
text: '<?=$Labels->GetLabel('_ADD_');?>',
|
|
handler: function(){
|
|
var TYP = parseInt( Ext.getCmp('sens_type').getValue() );
|
|
var RAN = parseInt( Ext.getCmp('sens_range').getValue() );
|
|
var PID = parseInt( Ext.getCmp('sens_id').getValue() );
|
|
var RTI = parseInt( Ext.getCmp('uart_id').getValue() );
|
|
if( RTI > 0 ){
|
|
addSensWM = new Ext.LoadMask( addSensorDialog.getEl(), {msg:"<?=$Labels->GetLabel('_Please_Wait_');?>..."});
|
|
addSensWM.show();
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/doNodeOperation.php',
|
|
params: {
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>',
|
|
TYPE: TYP,
|
|
DEVID: PID,
|
|
UART: RTI,
|
|
RANGE: RAN,
|
|
CCMD: 1
|
|
},
|
|
success: function( response, opts ){
|
|
addSensWM.hide();
|
|
var data = Ext.decode(response.responseText);
|
|
if( data.status == 'ok' ){
|
|
loadAttachedSensors();
|
|
} else {
|
|
Ext.Msg.show({
|
|
title:'Error!',
|
|
msg: data.msg,
|
|
buttons: Ext.Msg.OK,
|
|
icon: Ext.MessageBox.WARNING
|
|
});
|
|
};
|
|
addSensorDialog.hide();
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
} else {
|
|
Ext.Msg.show({
|
|
title:'Error!',
|
|
msg: 'Please Choose UART Port',
|
|
buttons: Ext.Msg.OK,
|
|
icon: Ext.MessageBox.WARNING
|
|
});
|
|
};
|
|
}
|
|
}]
|
|
});
|
|
};
|
|
addSensorDialog.show();
|
|
};
|
|
|
|
var addDetCamDialog = null;
|
|
var addDetCamWM = null;
|
|
function addDetectedIPCam(){
|
|
if( addDetCamDialog == null ){
|
|
addDetCamDialog = new Ext.Window({
|
|
modal: true,
|
|
title: '<?=$Labels->GetLabel('_ADD_CAM_DIAL_TTL_');?>',
|
|
width: 400,
|
|
height: 187,
|
|
layout: 'form',
|
|
closeAction: 'hide',
|
|
labelWidth: 160,
|
|
labelAlign: 'right',
|
|
items:[{
|
|
xtype: 'spacer',
|
|
height: 8
|
|
},{
|
|
xtype: 'textfield',
|
|
id: 'ncam_ip',
|
|
fieldLabel: 'Camera IP Address',
|
|
value: ''
|
|
},{
|
|
xtype: 'textfield',
|
|
id: 'ncam_user',
|
|
fieldLabel: 'Access Login',
|
|
value: ''
|
|
},{
|
|
xtype: 'textfield',
|
|
id: 'ncam_pwd',
|
|
inputType: 'password',
|
|
fieldLabel: 'Access Password',
|
|
value: ''
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'ncam_auth_mode',
|
|
fieldLabel: '<?=$Labels->GetLabel('_AUTH_MODE_0_');?>',
|
|
lazyRender: true,
|
|
mode: 'local',
|
|
forceSelection: true,
|
|
triggerAction: 'all',
|
|
editable: false,
|
|
disableKeyFilter: true,
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['mode','mode_txt'],
|
|
data: [
|
|
[0,'BASIC'],
|
|
[1,'DIGEST'],
|
|
[2,'DIGEST_IE'],
|
|
[3,'BEARER'],
|
|
[4,'NEGOTIATE'],
|
|
[5,'NTLM'],
|
|
[6,'NTLM_WB'],
|
|
[7,'ANY'],
|
|
[8,'ANYSAFE'],
|
|
[9,'ONLY'],
|
|
[10,'AWS_SIGV4']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: 0,
|
|
width: 200
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 8
|
|
},{
|
|
xtype:'button',
|
|
width: '100%',
|
|
text: 'Add Camera to List',
|
|
handler: function(){
|
|
addDetCamWM = new Ext.LoadMask( addDetCamDialog.getEl(), {msg:"<?=$Labels->GetLabel('_Please_Wait_');?>..."});
|
|
addDetCamWM.show();
|
|
var NIP = Ext.getCmp('ncam_ip').getValue();
|
|
var NUU = Ext.getCmp('ncam_user').getValue();
|
|
var NPP = Ext.getCmp('ncam_pwd').getValue();
|
|
var NAM = Ext.getCmp('ncam_auth_mode').getValue();
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/doCameraOperation.php',
|
|
params: {
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>',
|
|
IP: NIP,
|
|
UU: NUU,
|
|
PP: NPP,
|
|
AU: NAM,
|
|
CMD: 2
|
|
},
|
|
success: function( response, opts ){
|
|
addDetCamWM.hide();
|
|
var data = Ext.decode(response.responseText);
|
|
if( data.status == 'ok' ){
|
|
loadDetectedCameras();
|
|
} else {
|
|
Ext.Msg.show({
|
|
title:'Error!',
|
|
msg: data.msg,
|
|
buttons: Ext.Msg.OK,
|
|
icon: Ext.MessageBox.WARNING
|
|
});
|
|
};
|
|
addDetCamDialog.hide();
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
}
|
|
}]
|
|
});
|
|
};
|
|
addDetCamDialog.show();
|
|
};
|
|
|
|
function showSettingsGeneral(){
|
|
stopStatusUpdater();
|
|
|
|
content_lvl1 = 1;
|
|
content_lvl2 = 0;
|
|
var tPanel = Ext.getCmp('main_content');
|
|
tPanel.removeAll( true );
|
|
<?php
|
|
//$QS="SELECT * FROM `servers` WHERE `id`=1";
|
|
//$SDD = $DATABASE->Query( $QS );
|
|
//$NData = $SDD[0];
|
|
$QS="SELECT * FROM `resources` WHERE `node_id`=1 AND ( `type`=101 OR `type`=102 )";
|
|
$CN = $DATABASE->Query( $QS );
|
|
$IL=array();
|
|
foreach( $CN as $N ){
|
|
$QS="SELECT * FROM `networks` WHERE `nif_id`={$N['aux_id']} AND `type`=0";
|
|
$NWD = $DATABASE->Query( $QS );
|
|
$NW = $NWD[0];
|
|
$IL[]="<td width=\"50px\"><img width=\"32\" src=\"/style/assets/".(($N['type']==101)?'NICs.png':'wifi-icon.png')."\"></td><td align=\"right\"><b>{$N['device']}:</b></td><td><b>{$NW['address']}</b></td>";
|
|
};
|
|
$NIFO = '<table><tr>' . implode( '</tr><tr>', $IL ) . '</tr></table>';
|
|
?>
|
|
tPanel.add({
|
|
xtype: 'tabpanel',
|
|
frame: false,
|
|
id: 'node_settings_content',
|
|
border: false,
|
|
activeTab: content_lvl3,
|
|
items: [{
|
|
xtype: 'panel',
|
|
id: 'gi_tab',
|
|
title: 'General Info',
|
|
layout: 'hbox',
|
|
items:[{
|
|
xtype: 'panel',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
autoScroll: false,
|
|
html: '<table width="100%" height="100%" border=0><tr><td height="290px" align="center" valign="middle"><div class="server_img_set"></div></td></tr>\
|
|
<tr><td height="100px"><table width="100%" border=0><tr>\
|
|
<td align="center"><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_1_donut0_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut0_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut0_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_1_totalValue0">0</text><text x="50%" y="50%" class="chart-label">CPU</text></g></svg></td>\
|
|
<td align="center"><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_1_donut1_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut1_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut1_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_1_totalValue1">0</text><text x="50%" y="50%" class="chart-label">MEM</text></g></svg></td>\
|
|
<td align="center"><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_1_donut2_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut2_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut2_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_1_totalValue2">0</text><text x="50%" y="50%" class="chart-label">DISK</text></g></svg></td>\
|
|
<td align="center"><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_1_donut3_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut3_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut3_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_1_totalValue3">0</text><text x="50%" y="50%" class="chart-label">TEMP</text></g></svg></td>\
|
|
</tr></table></td></tr>\
|
|
<tr><td valign="top"><div class="setEd_infoPanel" id="INFO_SPS">\
|
|
<div class="sideInfo_item" id="SW_INFO"><?=$AP_DATA['build'];?></div>\
|
|
<div class="sideInfo_item" id="OS_INFO"><?=$AP_DATA['os_info'];?></div>\
|
|
<div class="sideInfo_item" id="HW_INFO"><?=$AP_DATA['hw_info'];?></div>\
|
|
</div></td></tr>\
|
|
<tr><td height="60%"> </td></tr></table>'
|
|
},{
|
|
xtype: 'panel',
|
|
id: '_ed_small',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
autoScroll: false,
|
|
items:[{
|
|
xtype: 'panel',
|
|
baseCls:'servopInfo_item00',
|
|
id: 'servopPanel01',
|
|
items:[{
|
|
xtype: 'panel',
|
|
frame: false,
|
|
border: false,
|
|
unstyled: true,
|
|
html: '<p><?=$Labels->GetLabel('_SERV_RESTART_DESC_');?></p><br/>'
|
|
},{
|
|
xtype: 'button',
|
|
lazyRender: true,
|
|
iconCls: 'srv_op_restart',
|
|
text: '<?=$Labels->GetLabel('_SERV_RESTART_OP_');?>',
|
|
id: 'tbtn_sop01',
|
|
scale: 'large',
|
|
width: '95%',
|
|
disabled: true,
|
|
handler: function( bt ){
|
|
Ext.Msg.show({
|
|
title:'<?=$Labels->GetLabel('_SERV_RESTART_QT_');?>',
|
|
msg: '<?=$Labels->GetLabel('_SERV_RESTART_QM_');?>',
|
|
buttons: Ext.Msg.YESNO,
|
|
width: 400,
|
|
icon: Ext.MessageBox.INFO,
|
|
fn: function(btn, text){
|
|
if( btn == 'yes' ){
|
|
disableServOps();
|
|
doDeviceOperation( 1, 250,'', true );
|
|
};
|
|
}
|
|
});
|
|
}
|
|
}]
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 8
|
|
},{
|
|
xtype: 'panel',
|
|
baseCls:'servopInfo_item10',
|
|
id: 'servopPanel02',
|
|
items:[{
|
|
xtype: 'panel',
|
|
frame: false,
|
|
border: false,
|
|
unstyled: true,
|
|
html: '<p><?=$Labels->GetLabel('_SERV_HW_DET_DESC_');?></p><br/>'
|
|
},{
|
|
xtype: 'button',
|
|
iconCls: 'srv_op_hw_init',
|
|
text: '<?=$Labels->GetLabel('_SERV_HW_DET_OP_');?>',
|
|
id: 'tbtn_sop02',
|
|
scale: 'large',
|
|
width: '95%',
|
|
disabled: true,
|
|
handler: function( bt ){
|
|
Ext.Msg.show({
|
|
title:'<?=$Labels->GetLabel('_SERV_HW_DET_QT_');?>',
|
|
msg: '<?=$Labels->GetLabel('_SERV_HW_DET_QM_');?>',
|
|
buttons: Ext.Msg.YESNO,
|
|
width: 400,
|
|
icon: Ext.MessageBox.INFO,
|
|
fn: function(btn, text){
|
|
if( btn == 'yes' ){
|
|
disableServOps();
|
|
doDeviceOperation( 1, 251,'', true );
|
|
};
|
|
}
|
|
});
|
|
}
|
|
}]
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 8
|
|
},{
|
|
xtype: 'panel',
|
|
baseCls:'servopInfo_item20',
|
|
id: 'servopPanel03',
|
|
items:[{
|
|
xtype: 'panel',
|
|
frame: false,
|
|
border: false,
|
|
unstyled: true,
|
|
html: '<p><?=$Labels->GetLabel('_SERV_OSRESET_DESC_');?></p><br/>'
|
|
},{
|
|
xtype: 'button',
|
|
iconCls: 'srv_op_power_cycle',
|
|
text: '<?=$Labels->GetLabel('_SERV_OSRESET_OP_');?>',
|
|
id: 'tbtn_sop03',
|
|
scale: 'large',
|
|
width: '95%',
|
|
disabled: true,
|
|
handler: function( bt ){
|
|
Ext.Msg.show({
|
|
title:'<?=$Labels->GetLabel('_SERV_OSRESET_QT_');?>',
|
|
msg: '<?=$Labels->GetLabel('_SERV_OSRESET_QM_');?>',
|
|
buttons: Ext.Msg.YESNO,
|
|
width: 400,
|
|
icon: Ext.MessageBox.WARNING,
|
|
fn: function(btn, text){
|
|
if( btn == 'yes' ){
|
|
cleanupChangeNotifier();
|
|
} else {
|
|
loadEditor = false;
|
|
};
|
|
}
|
|
});
|
|
}
|
|
}]
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 8
|
|
},{
|
|
xtype: 'panel',
|
|
baseCls:'servopInfo_item30',
|
|
id: 'servopPanel04',
|
|
items:[{
|
|
xtype: 'panel',
|
|
frame: false,
|
|
border: false,
|
|
unstyled: true,
|
|
html: '<p><?=$Labels->GetLabel('_SERV_FACTORY_DESC_');?></p><br/>'
|
|
},{
|
|
xtype: 'button',
|
|
iconCls: 'srv_op_factory_reset',
|
|
text: '<?=$Labels->GetLabel('_SERV_FACTORY_OP_');?>',
|
|
id: 'tbtn_sop04',
|
|
scale: 'large',
|
|
width: '95%',
|
|
disabled: true,
|
|
handler: function( bt ){
|
|
Ext.Msg.show({
|
|
title:'<?=$Labels->GetLabel('_SERV_FACTORY_QT_');?>',
|
|
msg: '<?=$Labels->GetLabel('_SERV_FACTORY_QM_');?>',
|
|
buttons: Ext.Msg.YESNO,
|
|
width: 400,
|
|
icon: Ext.MessageBox.ERROR,
|
|
fn: function(btn, text){
|
|
if( btn == 'yes' ){
|
|
disableServOps();
|
|
doDeviceOperation( 1, 254,'', true );
|
|
};
|
|
}
|
|
});
|
|
}
|
|
}]
|
|
}]
|
|
}]
|
|
},{
|
|
xtype: 'panel',
|
|
title: 'Resources',
|
|
id: 'res_tab',
|
|
layout: 'hbox',
|
|
items:[{
|
|
xtype: 'panel',
|
|
id: 'resources_container',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
autoScroll: 'auto',
|
|
tbar:[{
|
|
text: '<?=$Labels->GetLabel( '_ADD_REMOTE_UART_' );?>',
|
|
handler: function(){
|
|
addEthernet2Uart();
|
|
}
|
|
}],
|
|
items:[]
|
|
},{
|
|
xtype: 'panel',
|
|
id: 'res_ed_small',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
layout: 'fit',
|
|
items:[{
|
|
html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>'
|
|
}]
|
|
}]
|
|
},{
|
|
xtype: 'panel',
|
|
title: 'Modules',
|
|
id: 'mod_tab',
|
|
layout: 'hbox',
|
|
items:[{
|
|
xtype: 'panel',
|
|
id: 'modules_container',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
autoScroll: 'auto',
|
|
tbar:[{
|
|
text: 'Add Module',
|
|
handler: function(){
|
|
var addModuleWindow = new Ext.Window({
|
|
id: 'huha_boa',
|
|
title: 'Add Server Module',
|
|
modal: true,
|
|
width: 400,
|
|
height: 300,
|
|
items:[{
|
|
xtype: 'form',
|
|
items: [{
|
|
xtype: 'combo',
|
|
fieldLabel: "<?=$Labels->GetLabel( 'MOD_TYPE' );?>",
|
|
id: 'mod_type',
|
|
lazyRender: true,
|
|
mode: 'local',
|
|
forceSelection: true,
|
|
triggerAction: 'all',
|
|
editable: false,
|
|
disableKeyFilter: true,
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['az_t','az_txt'],
|
|
data: [<?php
|
|
$QS = "SELECT * FROM `module_types`";
|
|
$MM = $DATABASE->Query( $QS );
|
|
$MIMO = array();
|
|
foreach( $MM as $M ) $MIMO[]="[{$M['id']},'".$Labels->GetLabel($M['name'])."']";
|
|
echo implode( ',', $MIMO );
|
|
?>]
|
|
}),
|
|
valueField: 'az_t',
|
|
displayField: 'az_txt',
|
|
value: 1,
|
|
listeners:{
|
|
select: function( t, r, i ){
|
|
var n = r.data.az_t;
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getModuleInfo.php',
|
|
params: {
|
|
MID: n,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function( response, opts ){
|
|
Ext.getCmp('infopan').update( response.responseText );
|
|
}
|
|
});
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'panel',
|
|
id: 'infopan',
|
|
html: ''
|
|
}]
|
|
}],
|
|
bbar:[{
|
|
text: 'Cancel',
|
|
handler: function(){
|
|
addModuleWindow.close();
|
|
}
|
|
},{
|
|
text: 'Add Module',
|
|
handler: function(){
|
|
var mtyp = Ext.getCmp('mod_type').getValue();
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/addModule.php',
|
|
params: {
|
|
SERVID: 1,
|
|
TYPE: mtyp,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function( response, opts ){
|
|
// If the response is JSON, you have to decode it
|
|
var data = Ext.decode(response.responseText);
|
|
if( data.status == 'ok' ){
|
|
addModuleWindow.close();
|
|
loadModules();
|
|
} else {
|
|
Ext.Msg.show({
|
|
title:'<?=$Labels->GetLabel("_INFO_MSG_");?>',
|
|
msg: data.message,
|
|
buttons: Ext.Msg.OK,//YESNOCANCEL,
|
|
fn: function(){
|
|
//SettingsLidar3D.hide();
|
|
},
|
|
icon: Ext.MessageBox.INFO //QUESTION
|
|
});
|
|
}
|
|
},
|
|
failure: failureAJAXFunction
|
|
});
|
|
}
|
|
}]
|
|
});
|
|
addModuleWindow.show();
|
|
}
|
|
}],
|
|
items:[]
|
|
},{
|
|
xtype: 'panel',
|
|
id: 'mod_ed_small',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
layout: 'fit',
|
|
items:[{
|
|
html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>'
|
|
}]
|
|
}]
|
|
},{
|
|
xtype: 'panel',
|
|
id: 'net_tab',
|
|
title: 'Filters',
|
|
items:[]
|
|
}],
|
|
listeners:{
|
|
tabchange: function( tp, t ){
|
|
switch( t.getId() ){
|
|
case 'gi_tab': {
|
|
content_lvl3=0;
|
|
updateServerStatus();
|
|
break;
|
|
};
|
|
case 'res_tab': {
|
|
content_lvl3=1;
|
|
stopStatusUpdater();
|
|
loadRessources();
|
|
break;
|
|
};
|
|
case 'mod_tab':{
|
|
content_lvl3=2;
|
|
stopStatusUpdater();
|
|
loadModules();
|
|
break;
|
|
};
|
|
case 'net_tab':{
|
|
content_lvl3=3;
|
|
stopStatusUpdater();
|
|
break;
|
|
};
|
|
};
|
|
updateUserContent();
|
|
},
|
|
afterrender: function(){
|
|
settingsAreChanged = false;
|
|
}
|
|
},
|
|
updateSettings: function(){
|
|
alert('Update Settings');
|
|
}
|
|
});
|
|
tPanel.doLayout();
|
|
updateServerStatus();
|
|
};
|
|
|
|
function showSettingsSensors(){
|
|
stopStatusUpdater();
|
|
|
|
content_lvl1 = 1;
|
|
content_lvl2 = 4;
|
|
var tPanel = Ext.getCmp('main_content');
|
|
tPanel.removeAll( true );
|
|
tPanel.add({
|
|
xtype: 'panel',
|
|
id: 'sen_set',
|
|
layout: 'hbox',
|
|
tbar:[{
|
|
text: '<?=$Labels->GetLabel( '_SMM_ADD_LSEN_' );?>',
|
|
handler: function(){
|
|
addSensor();
|
|
}
|
|
}],
|
|
items:[{
|
|
xtype: 'panel',
|
|
id: 'sens_container',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
autoScroll: 'auto',
|
|
items:[]
|
|
},{
|
|
xtype: 'panel',
|
|
id: 'sens_op_small',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
layout: 'fit',
|
|
items:[{
|
|
html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>'
|
|
}]
|
|
}]
|
|
});
|
|
tPanel.doLayout();
|
|
loadAttachedSensors();
|
|
};
|
|
|
|
function editSensorHW( cid ){
|
|
SelectedSensor = cid;
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getSensorEditor.php',
|
|
params: {
|
|
CID: SelectedSensor,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function( response, opts ){
|
|
var data = Ext.decode( response.responseText );
|
|
var tComp = Ext.getCmp('sens_op_small');
|
|
if( data.status == 'ok' ){
|
|
if( tComp!= null ){
|
|
var content = Ext.decode( data.content );
|
|
tComp.removeAll( true );
|
|
tComp.add( content );
|
|
tComp.doLayout();
|
|
};
|
|
} else {
|
|
if( tComp!= null ){
|
|
tComp.removeAll( true );
|
|
tComp.add( data );
|
|
tComp.doLayout();
|
|
};
|
|
};
|
|
},
|
|
failure: function(){
|
|
}
|
|
});
|
|
|
|
};
|
|
|
|
var cameraEditorContent = null;
|
|
function editCamera( cid, etyp ){
|
|
SelectedCam = cid;
|
|
switch( etyp ){
|
|
case 0: cameraEditorContent = Ext.getCmp('dcam_op_small'); break;
|
|
case 1: cameraEditorContent = Ext.getCmp('acam_op_small'); break;
|
|
};
|
|
Ext.Ajax.request({
|
|
url: '/lib/controller/getCameraEditor.php',
|
|
params: {
|
|
CID: SelectedCam,
|
|
UID: <?=$UserID;?>,
|
|
SID: '<?=$Session;?>'
|
|
},
|
|
success: function( response, opts ){
|
|
var data = Ext.decode( response.responseText );
|
|
if( data.status == 'ok' ){
|
|
if( cameraEditorContent!= null ){
|
|
var content = Ext.decode( data.content );
|
|
cameraEditorContent.removeAll( true );
|
|
cameraEditorContent.add( content );
|
|
cameraEditorContent.doLayout();
|
|
};
|
|
} else {
|
|
if( cameraEditorContent!= null ){
|
|
cameraEditorContent.removeAll( true );
|
|
cameraEditorContent.add( data );
|
|
cameraEditorContent.doLayout();
|
|
};
|
|
};
|
|
},
|
|
failure: function(){
|
|
}
|
|
});
|
|
|
|
};
|
|
|
|
function showSettingsVideo(){
|
|
stopStatusUpdater();
|
|
|
|
content_lvl1 = 1;
|
|
content_lvl2 = 4;
|
|
var tPanel = Ext.getCmp('main_content');
|
|
tPanel.removeAll( true );
|
|
tPanel.add({
|
|
xtype: 'tabpanel',
|
|
frame: false,
|
|
id: 'node_settings_content',
|
|
border: false,
|
|
activeTab: content_lvl3,
|
|
items: [{
|
|
xtype: 'panel',
|
|
title: 'Detected Cameras',
|
|
id: 'cam_det_tab',
|
|
layout: 'hbox',
|
|
items:[{
|
|
xtype: 'panel',
|
|
id: 'dcam_container',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
autoScroll: 'auto',
|
|
tbar:[{
|
|
text: '<?=$Labels->GetLabel( '_MANUADD_CAMERA_' );?>',
|
|
handler: function(){
|
|
addDetectedIPCam();
|
|
}
|
|
}],
|
|
items:[]
|
|
},{
|
|
xtype: 'panel',
|
|
id: 'dcam_op_small',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
layout: 'fit',
|
|
items:[{
|
|
html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>'
|
|
}]
|
|
}]
|
|
},{
|
|
xtype: 'panel',
|
|
id: 'cam_ass_tab',
|
|
title: 'Assigned Cameras',
|
|
layout: 'hbox',
|
|
items:[{
|
|
xtype: 'panel',
|
|
id: 'acam_container',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
autoScroll: 'auto',
|
|
items:[]
|
|
},{
|
|
xtype: 'panel',
|
|
id: 'acam_op_small',
|
|
flex: 1,
|
|
height: PanelH-15,
|
|
layout: 'fit',
|
|
items:[{
|
|
html:'<div class="setEd_infoPanel" id="NUNU"><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>'
|
|
}]
|
|
}]
|
|
}],
|
|
listeners:{
|
|
tabchange: function( tp, t ){
|
|
switch( t.getId() ){
|
|
case 'cam_det_tab': {
|
|
content_lvl3=0;
|
|
stopStatusUpdater();
|
|
loadDetectedCameras();
|
|
break;
|
|
};
|
|
case 'cam_ass_tab': {
|
|
content_lvl3=1;
|
|
stopStatusUpdater();
|
|
loadAssignedCameras();
|
|
break;
|
|
};
|
|
case 'mod_tab':{
|
|
content_lvl3=2;
|
|
stopStatusUpdater();
|
|
loadModules();
|
|
break;
|
|
};
|
|
case 'net_tab':{
|
|
content_lvl3=3;
|
|
stopStatusUpdater();
|
|
break;
|
|
};
|
|
};
|
|
updateUserContent();
|
|
},
|
|
afterrender: function(){
|
|
settingsAreChanged = false;
|
|
}
|
|
}
|
|
});
|
|
tPanel.doLayout();
|
|
updateUserContent();
|
|
updateServerStatus();
|
|
};
|
|
|
|
function showSettingsApplication(){
|
|
stopStatusUpdater();
|
|
content_lvl1 = 1;
|
|
content_lvl2 = 3;
|
|
var tPanel = Ext.getCmp('main_content');
|
|
tPanel.removeAll( true );
|
|
tPanel.add({
|
|
xtype: 'tabpanel',
|
|
frame: false,
|
|
id: 'settings_a_content',
|
|
border: false,
|
|
activeTab: 0,
|
|
items:[{
|
|
title: '<?=$Labels->GetLabel('_WORKING_MODE_');?>',
|
|
xtype: 'form',
|
|
labelAlign: 'right',
|
|
labelWidth: 180,
|
|
items:[{
|
|
xtype: 'spacer',
|
|
height: 10
|
|
},{
|
|
xtype: 'panel',
|
|
frame: false,
|
|
border: true,
|
|
bodyStyle: 'background-color: white;',
|
|
<?php
|
|
echo "html: '<center><img height=\"120px\" src=\"/style/assets/{$AP_DATA['oem_logo']}.png\"></center>',";
|
|
?>
|
|
height: 130
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 10
|
|
},{
|
|
xtype: 'combo',
|
|
fieldLabel: '<?=$Labels->GetLabel('_DEBUGGING_MODE_');?>',
|
|
editable: false,
|
|
typeAhead: true,
|
|
triggerAction: 'all',
|
|
width: '100%',
|
|
lazyRender:true,
|
|
mode: 'local',
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['sid', 'snam'],
|
|
data: [[0,'<?=$Labels->GetLabel('__DISABLED__');?>'], [1,'<?=$Labels->GetLabel('___ENABLED__');?>']]
|
|
}),
|
|
value: <?=0;?>,
|
|
valueField: 'sid',
|
|
displayField: 'snam',
|
|
listeners:{
|
|
select: function(t,r,i){
|
|
doApplicationOperation( 1, i );
|
|
}
|
|
}
|
|
}]
|
|
},{
|
|
title: '<?=$Labels->GetLabel('_MONIT_LAYOUT_');?>',
|
|
layout:'table',
|
|
defaults: {
|
|
// applied to each contained panel
|
|
bodyStyle:'padding:5px'
|
|
},
|
|
layoutConfig: {
|
|
// The total column count must be specified here
|
|
columns: 3
|
|
},
|
|
frame: false,
|
|
border: false,
|
|
height: 800,
|
|
items:[{
|
|
xtype: 'spacer',
|
|
width: 100
|
|
},{
|
|
xtype: 'radio',
|
|
width: '100%',
|
|
name: 'layo_apa',
|
|
id: 'db_layout_0',
|
|
checked: ( <?=$AP_DATA['app_layout'];?> == 0 ),
|
|
listeners:{
|
|
check: function( t, state ){
|
|
if( state ) doApplicationOperation( 2, 0 );
|
|
}
|
|
}
|
|
},{
|
|
frame: false,
|
|
border: false,
|
|
html: '<img width="43px" src="/style/assets/ed-0.png" />'
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 100
|
|
},{
|
|
xtype: 'radio',
|
|
width: '100%',
|
|
name: 'layo_apa',
|
|
id: 'db_layout_1',
|
|
checked: ( <?=$AP_DATA['app_layout'];?> == 1 ),
|
|
listeners:{
|
|
check: function( t, state ){
|
|
if( state ) doApplicationOperation( 2, 1 );
|
|
}
|
|
}
|
|
},{
|
|
frame: false,
|
|
border: false,
|
|
html: '<img width="43px" src="/style/assets/ed-1.png" />'
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 100
|
|
},{
|
|
xtype: 'radio',
|
|
name: 'layo_apa',
|
|
id: 'db_layout_2',
|
|
checked: ( <?=$AP_DATA['app_layout'];?> == 2 ),
|
|
listeners:{
|
|
check: function( t, state ){
|
|
if( state ) doApplicationOperation( 2, 2 );
|
|
}
|
|
}
|
|
},{
|
|
frame: false,
|
|
border: false,
|
|
html: '<img width="43px" src="/style/assets/ed-2.png" />'
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 100
|
|
},{
|
|
xtype: 'radio',
|
|
width: '100%',
|
|
name: 'layo_apa',
|
|
id: 'db_layout_3',
|
|
checked: ( <?=$AP_DATA['app_layout'];?> == 3 ),
|
|
listeners:{
|
|
check: function( t, state ){
|
|
if( state ) doApplicationOperation( 2, 3 );
|
|
}
|
|
}
|
|
},{
|
|
frame: false,
|
|
border: false,
|
|
html: '<img width="43px" src="/style/assets/ed-3.png" />'
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 100
|
|
},{
|
|
xtype: 'radio',
|
|
width: '100%',
|
|
name: 'layo_apa',
|
|
id: 'db_layout_4',
|
|
checked: ( <?=$AP_DATA['app_layout'];?> == 4 ),
|
|
listeners:{
|
|
check: function( t, state ){
|
|
if( state ) doApplicationOperation( 2, 4 );
|
|
}
|
|
}
|
|
},{
|
|
frame: false,
|
|
border: false,
|
|
html: '<img width="43px" src="/style/assets/ed-4.png" />'
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 100
|
|
},{
|
|
xtype: 'radio',
|
|
width: '100%',
|
|
name: 'layo_apa',
|
|
id: 'db_layout_5',
|
|
checked: ( <?=$AP_DATA['app_layout'];?> == 5 ),
|
|
listeners:{
|
|
check: function( t, state ){
|
|
if( state ) doApplicationOperation( 2, 5 );
|
|
}
|
|
}
|
|
},{
|
|
frame: false,
|
|
border: false,
|
|
html: '<img width="43px" src="/style/assets/ed-5.png" />'
|
|
}]
|
|
}]
|
|
});
|
|
tPanel.doLayout();
|
|
updateUserContent();
|
|
};
|
|
function showSettingsUpgrade(){
|
|
stopStatusUpdater();
|
|
|
|
content_lvl1 = 1;
|
|
content_lvl2 = 4;
|
|
var tPanel = Ext.getCmp('main_content');
|
|
tPanel.removeAll( true );
|
|
tPanel.doLayout();
|
|
updateServerStatus();
|
|
};
|
|
|
|
function initSettingsView(){
|
|
if( tlInterval!= null ){
|
|
window.clearInterval( tlInterval );
|
|
tlInterval = null;
|
|
timelineObj = null;
|
|
};
|
|
var tP = Ext.getCmp('left_side_menu');
|
|
//tP.doLayout();
|
|
//tP.setVisible( false );
|
|
tP.removeAll( true );
|
|
tP.add({
|
|
id: 'sme_inner',
|
|
layout:'accordion',
|
|
//height: PanelH,
|
|
frame: false,
|
|
border: false,
|
|
layoutConfig:{
|
|
animate: true//,
|
|
//activeOnTop: true
|
|
},
|
|
items:[]
|
|
});
|
|
tP.doLayout();
|
|
tP = Ext.getCmp('sme_inner');
|
|
tP.add({
|
|
title: '<?=$Labels->GetLabel('_SYS_SETTINGS_');?>',
|
|
layout: 'vbox',
|
|
height: 120,
|
|
pack: 'center',
|
|
align : 'strech',
|
|
collapsed: ( content_lvl1 != 0 ),
|
|
items:[{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'sys_edit',
|
|
text: '<?=$Labels->GetLabel('_SYS_GENERAL_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 0 && content_lvl1 == 0 ),
|
|
allowDepress: false,
|
|
toggleGroup: 'sys_settings',
|
|
handler: showSettingsGeneral
|
|
},{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'map_edit',
|
|
text: '<?=$Labels->GetLabel('_SENSOR_CONNECTION_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 1 && content_lvl1 == 0 ),
|
|
allowDepress: false,
|
|
toggleGroup: 'sys_settings',
|
|
handler: showSettingsSensors
|
|
},{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'video_set',
|
|
text: '<?=$Labels->GetLabel('_CAMERA_MNGMNT_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 2 && content_lvl1 == 0 ),
|
|
allowDepress: false,
|
|
toggleGroup: 'sys_settings',
|
|
handler: showSettingsVideo
|
|
},{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'app_set',
|
|
text: '<?=$Labels->GetLabel('_APPLICA_MNGMNT_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 3 && content_lvl1 == 0 ),
|
|
allowDepress: false,
|
|
toggleGroup: 'sys_settings',
|
|
handler: showSettingsApplication
|
|
},{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'soft_update',
|
|
text: '<?=$Labels->GetLabel('_UPGRADE_MNGMNT_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 4 && content_lvl1 == 0 ),
|
|
allowDepress: false,
|
|
toggleGroup: 'sys_settings',
|
|
handler: showSettingsUpgrade
|
|
}]
|
|
});
|
|
tP.add({
|
|
title: '<?=$Labels->GetLabel('_DET_SETTINGS_');?>',
|
|
layout: 'vbox',
|
|
height: 120,
|
|
pack: 'center',
|
|
align : 'strech',
|
|
collapsed: ( content_lvl1 != 1 ),
|
|
items:[<?php
|
|
if( $AP_DATA['type'] == 1 ){
|
|
?>
|
|
{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'go_home',
|
|
text: '<?=$Labels->GetLabel('_UPPER_SENSOR_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 0 && content_lvl1 == 1 ),
|
|
allowDepress: false,
|
|
toggleGroup: 'det_settings',
|
|
handler: loadDashBoard
|
|
},{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'go_monitor',
|
|
text: '<?=$Labels->GetLabel('_BOTTOM_SENSOR_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 1 && content_lvl1 == 1 ),
|
|
allowDepress: false,
|
|
toggleGroup: 'det_settings',
|
|
handler: loadMonitoring
|
|
},{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'go_archive',
|
|
text: '<?=$Labels->GetLabel('_FUSION_ENGINE_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 2 && content_lvl1 == 1 ),
|
|
allowDepress: false,
|
|
toggleGroup: 'det_settings',
|
|
handler: loadArchive
|
|
}<?php
|
|
|
|
} else {
|
|
if( 1 || intval( $CUser->Data['sipi_enable'] ) ){
|
|
?>
|
|
{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'go_singleIpi',
|
|
text: '<?=$Labels->GetLabel('_EVT_MONITOR_IPI_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 0 && content_lvl1 == 1 ),
|
|
allowDepress: false,
|
|
toggleGroup: 'det_settings',
|
|
handler: loadSingleIPI
|
|
},
|
|
<?php
|
|
};
|
|
?>
|
|
{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'go_out',
|
|
text: '<?=$Labels->GetLabel('_LOGOUT_');?>',
|
|
handler: doLogout
|
|
}<?php
|
|
};
|
|
?>]
|
|
});
|
|
tP.add({
|
|
title: '<?=$Labels->GetLabel('_NET_SETTINGS_');?>',
|
|
collapsed: ( content_lvl1 != 2 ),
|
|
items:[{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
text: 'Ethernet',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 0 && content_lvl1 == 2 ),
|
|
allowDepress: false,
|
|
id:'ethernet',
|
|
},{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
text: 'WiFi',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 1 && content_lvl1 == 2 ),
|
|
allowDepress: false,
|
|
id:'wifi',
|
|
},{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
text: 'Integration',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 2 && content_lvl1 == 2 ),
|
|
allowDepress: false,
|
|
id:'api_serv',
|
|
}]
|
|
});
|
|
tP.add({
|
|
title: '<?=$Labels->GetLabel('_PROF_SETTINGS_');?>',
|
|
items:[]
|
|
});
|
|
<?php
|
|
if( $CUser->Data['access'] > 5 ){
|
|
?>tP.add({
|
|
title: '<?=$Labels->GetLabel('_ADM_SETTINGS_');?>',
|
|
collapsed: ( content_lvl1 != 3 ),
|
|
items:[{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'adm_acc',
|
|
text: '<?=$Labels->GetLabel('_USERS_MNGMT_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 0 && content_lvl1 == 3 ),
|
|
allowDepress: false,
|
|
handler: function( b, e ){
|
|
loadUserEditor();
|
|
}
|
|
},{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'adm_acclog',
|
|
text: '<?=$Labels->GetLabel('_ACC_LOG_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 1 && content_lvl1 == 3 ),
|
|
allowDepress: false,
|
|
handler: function( b, e ){
|
|
loadAccessLog();
|
|
}
|
|
},{
|
|
xtype: 'button',
|
|
width: '100%',
|
|
id:'adm_servlog',
|
|
text: '<?=$Labels->GetLabel('_SERV_LOG_');?>',
|
|
enableToggle: true,
|
|
pressed: ( content_lvl2 == 2 && content_lvl1 == 3 ),
|
|
allowDepress: false,
|
|
handler: function( b, e ){
|
|
loadServerLog();
|
|
}
|
|
}]
|
|
});
|
|
<?php
|
|
};
|
|
?>
|
|
tP.setVisible( true );
|
|
tP.doLayout();
|
|
switch( content_lvl1 ){
|
|
case 0:{
|
|
switch( content_lvl2 ){
|
|
case 0: showSettingsGeneral(); break;
|
|
case 1: showSettingsSensors(); break;
|
|
case 2: showSettingsVideo(); break;
|
|
case 3: showSettingsApplication(); break;
|
|
case 4: showSettingsUpgrade(); break;
|
|
};
|
|
};
|
|
case 1:{
|
|
switch( content_lvl2 ){
|
|
case 0: break;
|
|
};
|
|
break;
|
|
};
|
|
};
|
|
};
|