Browse Source

Jay Version

master
Evgeny Gagua 2 years ago
parent
commit
db8b823988
  1. 2
      lib/1.json
  2. 4
      lib/controller/dash/node_3.js
  3. 31
      lib/controller/doApplicationOperation.php
  4. 4
      lib/controller/doModuleOperation.php
  5. 60
      lib/controller/getDashBoardItems.php
  6. 2
      lib/controller/getModuleEditor.php
  7. 6
      lib/controller/getModuleSettings.php
  8. 80
      lib/javascript/jsapi_dynamic/mojo_settings.js
  9. BIN
      style/assets/3b4ad2078aa0b06e78fa417e2e47bf05.png
  10. BIN
      style/assets/cam_DS-2DE4A225IW-DE_512.png
  11. BIN
      style/assets/zz-3.png

2
lib/1.json
File diff suppressed because it is too large
View File

4
lib/controller/dash/node_3.js

@ -29,9 +29,13 @@
if( H > ( W * 0.5625 )+ 32 ){
H = ( W * 0.5625 ) + 32;
};
} else if( %%%APPTYPE%%% == 2 ){
//H = ( document.body.clientHeight - p.ownerCt.ownerCt.getHeight() ) / 2;
H = ( PanelH )/2+8;
} else {
H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
};
//alert( W + ' '+ H );
//var W = 16*(H/9);
//p.ownerCt.setWidth( W );
p.setHeight( H );

31
lib/controller/doApplicationOperation.php

@ -68,6 +68,37 @@
$Data['success'] = true;
break;
};
case 8:{//Remote IP
$PARAM = $DATABASE->escape( $_POST['OPCODE'] );
$QS = "UPDATE `system_props` SET `remote_ip`='{$PARAM}' WHERE `id`=1";
$DATABASE->Query( $QS );
break;
};
case 9:{//Remote Port
$PARAM = intval( $_POST['OPCODE'] );
if( $PARAM < 1000 ) $PARAM = 0;
if( $PARAM > 65535 ) $PARAM = 0;
$QS = "UPDATE `system_props` SET `remote_port`={$PARAM} WHERE `id`=1";
$DATABASE->Query( $QS );
if( $PARAM == 0 ){
//Disable connection
$QS = "UPDATE `system_props` SET `use_remote_server`=0 WHERE `id`=1";
$DATABASE->Query( $QS );
};
break;
};
case 10:{//Remote Connection Enable
$PARAM = intval( $_POST['OPCODE'] );
$QS = "UPDATE `system_props` SET `use_remote_server`={$PARAM} WHERE `id`=1";
$DATABASE->Query( $QS );
break;
};
case 11:{//Skip Local Reports
$PARAM = intval( $_POST['OPCODE'] );
$QS = "UPDATE `system_props` SET `skip_local_report`={$PARAM} WHERE `id`=1";
$DATABASE->Query( $QS );
break;
};
};
} else {
$Data['msg']='Wrong Parameters!';

4
lib/controller/doModuleOperation.php

@ -51,9 +51,9 @@
break;
};
case 10:{// Modem Manager
$QS = "DELETE FROM `module_mm_settings` WHERE `id`={$JJ['aux_id']}";
$QS = "DELETE FROM `module_modem` WHERE `id`={$JJ['aux_id']}";
$DATABASE->Query( $QS );
$QS = "DELETE FROM `module_mm_modems` WHERE `mmm_id`={$JJ['aux_id']}";
$QS = "DELETE FROM `module_modem_phonebook` WHERE `aux_id`={$JJ['aux_id']}";
$DATABASE->Query( $QS );
break;
};

60
lib/controller/getDashBoardItems.php

@ -23,6 +23,8 @@
$SP = $SPD[0];
$DUMMY = array();
if( $CUser->Data['access'] > 5 ){
//$CUser->Data['width']
//$CUser->Data['height']
$TABA =<<<_DATA_BOUNDARY
{
xtype: 'panel',
@ -107,7 +109,11 @@ _DATA_BOUNDARY;
afterrender : function( t ){
var papa = Ext.getCmp('main_portal');
var jj = papa.getComponent( 0 ).getHeight();
t.setHeight( PanelH - jj - 20 );
var zz = t.ownerCt.ownerCt.getHeight();
//alert( PanelW );
//alert( PanelH - zz );
//t.setHeight( PanelH - jj - 20 );
t.setHeight( PanelH - zz - 42 );
}
}
}
@ -128,13 +134,14 @@ $MAPIO=<<<_DATA_BOUNDARY
}
}
_DATA_BOUNDARY;
$DUMMY['map']="{xtype:'panel', title: '{$Labels->GetLabel('_MAP_')}', frame: true, border: true, draggable: false, collapsible: false, tools: [{ id:'toggle', handler: function( a, b, p ){ fullScreen( 'event_map' ); }}], items:[{$MAPIO}],listeners:{ afterrender: function(p){ var W=p.getWidth(); p.setHeight( 32+(W/16)*9); initMapMonitoring();}} }";
$MH = 9;
if( $SP['app_layout'] == 2 ) $MH = 6;
$DUMMY['map']="{xtype:'panel', title: '{$Labels->GetLabel('_MAP_')}', frame: true, border: true, draggable: false, collapsible: false, tools: [{ id:'toggle', handler: function( a, b, p ){ fullScreen( 'event_map' ); }}], items:[{$MAPIO}],listeners:{ afterrender: function(p){ var W=p.getWidth(); p.setHeight( 32+(W/16)*{$MH}); initMapMonitoring();}} }";
$DUMMY['log']="{xtype:'panel', id: 'lg_panel', title: '{$Labels->GetLabel('_EVENT_LOG_')}', frame: true, border: true, draggable: false, items:[{$LOGIO}] }";
$STA = array();
$END="]}";
$OUT = array();
if( $SP['type'] == 2 ) $SP['app_layout'] = 1;
switch( $SP['app_layout'] ){
case 0:{
$STA[0]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
@ -372,17 +379,19 @@ _DATA_BOUNDARY;
break;
};
case 2:{
$STA[0]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";
$STA[2]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: .5, stylse:'padding:10px 0 10px 10px', items:[";
$STA[4]="{ columnWidth: .5, stylde:'padding:10px 0 10px 10px', items:[";
$STA[0]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";//Sen1
$STA[1]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";//Cam1
$STA[2]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";//Cam2
$STA[3]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";//Sen2
$STA[4]="{ columnWidth: .66, stylde:'padding:10px 0 10px 10px', items:[";//Log/Map
$idx = 0;
$QS = "SELECT * FROM `nodes` WHERE `type`>0 AND `type`< 10 AND `enable`=1";
$R = $DATABASE->Query( $QS );
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 3 ){
$DEVS = $DATABASE->Query( $QS );
if( count( $DEVS ) ){
$WOU = array();
foreach( $DEVS as $DD ){
if( $idx < 2 ){
$TFN = 'dash/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
@ -392,25 +401,22 @@ _DATA_BOUNDARY;
$TPL = str_replace('%%%USERID%%%', $UserID, $TPL );
$TPL = str_replace('%%%SESSION%%%', $Session, $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[$idx] . $TPL . $END;
$WOU[]= $TPL;
} else break;
$idx++;
};
if( $idx < 3 ){
for( ;$idx<3;$idx++ ){
$OUT[]= $STA[$idx] . $DUMMY['sensor'] . $END;
};
};
if( $idx < 2 ) for( ;$idx<2;$idx++ ) $WOU[]= $DUMMY['sensor'];
$OUT[]= $STA[0] . implode(',', $WOU ) . $END;
} else {
for( ;$idx<3;$idx++ ){
$OUT[]= $STA[$idx] . $DUMMY['sensor'] . $END;
};
};
$QS = "SELECT * FROM `nodes` WHERE `type`>9 AND `type`< 14 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$CAMS = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( count( $CAMS ) ){
foreach( $CAMS as $DD ){
if( $idx < 2 ){
$TFN = 'dash/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
@ -458,24 +464,24 @@ _DATA_BOUNDARY;
$TPL = str_replace( '%%%WIDTH%%%', $W, $TPL );
$TPL = str_replace( '%%%HEIGHT%%%', $H, $TPL );
$OUT[]= $STA[3+$idx] . $TPL . $END;
$OUT[]= $STA[1+$idx] . $TPL . $END;
} else break;
$idx++;
};
if( $idx < 2 ){
for( ;$idx<2;$idx++ ){
$T = str_replace( '%%ID%%', 2+$idx , $DUMMY['camera'] );
$OUT[]= $STA[3+$idx] . $T . $END;
$OUT[]= $STA[1+$idx] . $T . $END;
};
};
} else {
for( ;$idx<2;$idx++ ){
$T = str_replace( '%%ID%%', 4+$idx , $DUMMY['camera'] );
$OUT[]= $STA[3+$idx] . $T . $END;
$OUT[]= $STA[1+$idx] . $T . $END;
};
};
$OUT[]= $STA[3] . $DUMMY['log'] . $END;
$OUT[]= $STA[4] . $DUMMY['map'] . $END;
$OUT[]= $STA[4] . $DUMMY['map'] .','. $DUMMY['log'] . $END;
//$OUT[]= $STA[4] . . $END;
break;
};
case 3:{

2
lib/controller/getModuleEditor.php

@ -466,7 +466,7 @@ $TPL =<<<EFUFU
}
EFUFU;
$TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_MODEM_DESC_SHO_') , $TPL );
$TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_MODEM_DESC_SHO_') . 'JAJA' , $TPL );
$TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_MODEM_DESC_LOO_'), $TPL );
$TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL );
$TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );

6
lib/controller/getModuleSettings.php

@ -970,9 +970,9 @@ $TPL =<<<EFUFU
disabled: true
}],
height: 225,
ds: archives_store,
cm: new Ext.grid.ColumnModel( archivesColModel_ops ),
sm: new Ext.grid.RowSelectionModel( archivesSelModel_ops ),
//ds: archives_store,
//cm: new Ext.grid.ColumnModel( archivesColModel_ops ),
//sm: new Ext.grid.RowSelectionModel( archivesSelModel_ops ),
viewConfig: {
// forceFit: true
},

80
lib/javascript/jsapi_dynamic/mojo_settings.js

@ -2363,7 +2363,7 @@ function showSettingsApplication(){
title: "<?=$Labels->GetLabel('_WORKING_MODE_');?>",
xtype: 'form',
labelAlign: 'right',
labelWidth: 180,
labelWidth: 250,
height: PanelH - 30,
items:[{
xtype: 'spacer',
@ -2399,7 +2399,7 @@ function showSettingsApplication(){
},{
xtype: 'button',
text: "<?=$Labels->GetLabel( '_GEN_INSTANCE_ID_' );?>",
width: 500,
width: 550,
handler: function(){
doApplicationOperation( 3, 0 );
}
@ -2411,8 +2411,8 @@ function showSettingsApplication(){
fieldLabel: "<?=$Labels->GetLabel('_DEBUGGING_MODE_');?>",
editable: false,
typeAhead: true,
width: 300,
triggerAction: 'all',
width: '100%',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
@ -2427,6 +2427,80 @@ function showSettingsApplication(){
doApplicationOperation( 1, i );
}
}
},{
xtype: 'spacer',
height: 10
},{
xtype: 'textfield',
fieldLabel: "<?=$Labels->GetLabel('_REMOTE_SERVER_ADDRESS_');?>",
width: 300,
value: '<?=$AP_DATA['remote_ip'];?>',
listeners:{
change: function( a, c, b ){
doApplicationOperation( 8, c );
}
}
},{
xtype: 'spacer',
height: 10
},{
xtype: 'numberfield',
fieldLabel: "<?=$Labels->GetLabel('_REMOTE_SERVER_PORT_');?>",
width: 300,
value: <?=intval($AP_DATA['remote_port']);?>,
listeners:{
change: function( a, c, b ){
doApplicationOperation( 9, c );
}
}
},{
xtype: 'spacer',
height: 10
},{
xtype: 'combo',
fieldLabel: "<?=$Labels->GetLabel('_USE_REMOTE_SERVER_');?>",
editable: false,
typeAhead: true,
width: 300,
triggerAction: 'all',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['sid', 'snam'],
data: [[0,"<?=$Labels->GetLabel('__DISABLED__');?>"], [1,"<?=$Labels->GetLabel('___ENABLED__');?>"]]
}),
value: <?=intval($AP_DATA['use_remote_server']);?>,
valueField: 'sid',
displayField: 'snam',
listeners:{
select: function( t, r, i ){
doApplicationOperation( 10, i );
}
}
},{
xtype: 'spacer',
height: 10
},{
xtype: 'combo',
fieldLabel: "<?=$Labels->GetLabel('_SKIP_LOCAL_REPORTS_');?>",
editable: false,
typeAhead: true,
width: 300,
triggerAction: 'all',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['sid', 'snam'],
data: [[0,"<?=$Labels->GetLabel('__DISABLED__');?>"], [1,"<?=$Labels->GetLabel('___ENABLED__');?>"]]
}),
value: <?=intval($AP_DATA['skip_local_report']);?>,
valueField: 'sid',
displayField: 'snam',
listeners:{
select: function( t, r, i ){
doApplicationOperation( 11, i );
}
}
}]
},
<?php if( $AP_DATA['type']!=1){ ?>

BIN
style/assets/3b4ad2078aa0b06e78fa417e2e47bf05.png

Binary file not shown.

After

Width: 681  |  Height: 107  |  Size: 13 KiB

BIN
style/assets/cam_DS-2DE4A225IW-DE_512.png

Binary file not shown.

After

Width: 512  |  Height: 512  |  Size: 115 KiB

BIN
style/assets/zz-3.png

Binary file not shown.

Before

Width: 685  |  Height: 216  |  Size: 17 KiB

Loading…
Cancel
Save