Browse Source

Transfer to AGP

master
Evgeny Gagua 5 months ago
parent
commit
70658ead3c
  1. 2
      lib/1.json
  2. 16
      lib/controller/getDashBoardItems.php
  3. 326
      lib/controller/getDeviceStatus.php
  4. 1
      lib/controller/getHistoryEvents.php
  5. 30
      lib/controller/getReportLayout.php
  6. 241
      lib/controller/getSensorDetectionEditor.php
  7. 62
      lib/controller/rest_gw.php
  8. 28
      lib/controller/settings/node_0.js
  9. 374
      lib/controller/settings/node_1.js
  10. 40
      lib/controller/settings/node_10.js
  11. 62
      lib/controller/settings/node_11.js
  12. 40
      lib/controller/settings/node_12.js
  13. 62
      lib/controller/settings/node_13.js
  14. 62
      lib/controller/settings/node_14.js
  15. 62
      lib/controller/settings/node_15.js
  16. 372
      lib/controller/settings/node_2.js
  17. 413
      lib/controller/settings/node_3.js
  18. 95
      lib/controller/settings/node_4.js
  19. 439
      lib/controller/settings/node_5.js
  20. 16
      lib/controller/settings/tpl.js
  21. 28
      lib/controller/updateLocation.php
  22. 2
      lib/javascript/jsapi_dynamic/mojo_map.js
  23. 103
      lib/javascript/jsapi_dynamic/mojo_settings.js
  24. 2
      lib/php/db/MySQL_class.php
  25. 2
      lib/php/db/MySQLi_class.php
  26. 2
      lib/php/db/VS_ObjectHelper_class.php
  27. 2
      lib/php/db/VS_Object_class.php
  28. 2
      lib/php/db/VS_Tree_class.php
  29. 2
      lib/php/db/gz_class.php
  30. 2
      lib/php/db/language_class.php
  31. 2
      lib/php/db/language_json_class.php
  32. 2
      lib/php/db/logio_class.php
  33. 2
      lib/php/db/user_class.php
  34. 2
      lib/php/utm/gPoint.php
  35. BIN
      style/assets/3b4ad2078aa0b06e78fa417e2e47bf32.png

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

16
lib/controller/getDashBoardItems.php

@ -683,9 +683,23 @@ _DATA_BOUNDARY;
$OUT[]= $STA[4] . $DUMMY['log'] . $END;
break;
};
case 5:
case 6:{
$STA[0]="{ columnWidth: 1.0, stydle:'padding:10px 0 10px 10px', items:[";
//$STA[1]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
//$STA[2]="{ columnWidth: .75, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: 1.0, stylse:'padding:10px 0 10px 10px', items:[";
$MH = 4;
$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}] }";
$OUT[]= $STA[0] . $DUMMY['map'] . $END;
//$OUT[]= $STA[1] . $DUMMY['sensor'] . $END;
$OUT[]= $STA[1] . $DUMMY['log'] . $END;
break;
};
default:
};
//$OUT[0]='{columnWidth: 1, items:{html:"Sys Layout:'.$SP['app_layout'].'"}}';
$Data = '[' . implode( ',' , $OUT ) . ']';
} else {
$Data = '[{columnWidth: 1, items:{html:"NO SYSTEM PROPS"}} ]';

326
lib/controller/getDeviceStatus.php

@ -0,0 +1,326 @@
<?php
require_once('../ajax_asm.php');
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$SiteID = intval( $_POST['SITE'] );
$LastNID = intval( $_POST['LNID'] );
$LastTS = intval( $_POST['SPID'] );
$LLID = intval( $_POST['LSID'] );
$DEV_ID = intval( $_POST['DEVID'] );
$Data = array();
$ServerWasHuped = false;
$ServerIsOnLine = true;
$Data['status'] = 'OK';
$Data['CTS'] = time();
$Data['nodes'] = array();
$QS = "SELECT * FROM nodes WHERE `id`={$DEV_ID}";
$result = $DATABASE->Query( $QS, false );
if( count( $result ) > 0 ){
foreach( $result as $R ){
$CN = array();
$CN['id'] = $R['id'];
$CN['type'] = intval($R['type']);
$CN['status'] = intval($R['online']);
if( $CN['status'] || 1 ){
switch( $R['type'] ){
case ARGUS_SERVER:{
/*
$QS="SELECT * FROM `servers` WHERE `id`={$R['aux_id']}";
$zult = $DATABASE->Query( $QS );
if( $zult[0]['online'] == 1 ){
$STS = intval( $zult[0]['ts'] );
$CN['CTS'] = $Data['CTS'];
$CN['STS'] = $STS;
if( ( $CN['CTS'] - $STS ) > 1 ){ //3 seconds offline
$ServerIsOnLine = false;
$CN['status'] = 0;
} else {
$CN['status'] = 1;
};
} else {
$ServerIsOnLine = false;
$CN['status'] = 0;
};
$CN['cpu1'] = intval( $zult[0]['stat_cpu1'] * 2.5 );
$CN['cpu5'] = intval( $zult[0]['stat_cpu5'] );
$CN['cpu15'] = intval( $zult[0]['stat_cpu15'] * 2.5 );
$CN['mem'] = intval( $zult[0]['stat_mem']*100 );
$CN['disk']= intval( $zult[0]['stat_disk']*100 );
*/
break;
};
case ARGUS_ALS_SENSOR:
case ARGUS_LFS_SENSOR:
case ARGUS_PLS_200_SENSOR:
case ARGUS_PLS_360_SENSOR:
case ARGUS_NET_PLS_200:{
$QS = "SELECT `data_status`,`max_range`,`x`,`y`,`z` FROM `lrf_sensors` WHERE `id`={$R['aux_id']}";
$JJ = $DATABASE->Query( $QS );
$CS = $JJ[0];
$CN['status'] = $CS['data_status'];
$CN['masks_status'] = 0;
$CN['masks_exist'] = 0;
$QS = "SELECT * FROM `lrf_masks` WHERE `sensor_id`={$R['aux_id']}";
$JJ = $DATABASE->Query( $QS );
if( count( $JJ ) ) foreach( $JJ as $J ) {
$CN['masks_exist'] |= (1<<intval($J['layer']));
if( $J['status'] == 'E' ) $CN['masks_status'] |= (1<<intval($J['layer']));
};
// check draw
if( $LastTS > 0 ){
$QS = "SELECT `id` FROM `lrf_draw` WHERE `node_id`={$R['id']} AND `ts` > {$LastTS}";
$R = $DATABASE->Query( $QS );
if( count( $R ) ){
$CN['reload_draw'] = true;
} else {
$CN['reload_draw'] = false;
};
} else {
$CN['reload_draw'] = true;
};
$SENSORRANGE = floatval( $CS['max_range'] );
//Check Frozen Bubbles in any state of sensor
$QS = "SELECT `CENTER_X`,`CENTER_Y`, `BLOCK_COUNS` FROM `target_bubbles`";
$UJ = $DATABASE->Query( $QS );
$CN['bubbles'] = array();
if( count( $UJ ) ){
$SX = floatval( $CS['x'] );
$SY = floatval( $CS['y'] );
foreach( $UJ as $FB ){
$BC = intval( $FB['BLOCK_COUNS'] );
$C_X = floatval( $FB['CENTER_X'] ) - $SX;
$C_Y = floatval( $FB['CENTER_Y'] ) - $SY;
$DFC = sqrt( pow( $C_X, 2 ) + pow( $C_Y, 2 ) );
if( $DFC < $SENSORRANGE || 1 ){
$azimuth = rad2deg( atan2( $C_Y , $C_X ) );
if( $azimuth < 0 ) $azimuth += 360.0;
$CT = array();
$CT['digital'] = intval( 2048.0 * $DFC / $SENSORRANGE );
$CT['az'] = $azimuth;
if( $BC < 3 ){
$CT['color'] = '0F0FFF';
$CT['stroke'] = '080880';
} else {
$CT['color'] = 'FFFFFF';
$CT['stroke'] = '808080';
};
$CN['bubbles'][] = $CT;
};
};
};
if( ( $CN['status'] == 5 ) || 1 ){
// check Targets
$CN['targets'] = array();
$QS="SELECT * FROM events WHERE ( node_id={$CN['id']} OR node_id=1 ) AND ( evt_type=10 OR evt_type=11 OR evt_type=12 OR evt_type=13 OR evt_type=14 OR evt_type=52 OR evt_type=53 OR evt_type=54 OR evt_type=39 OR evt_type=40 OR evt_type=41 OR evt_type=42 OR evt_type=43 OR evt_type=44 OR evt_type=45 OR evt_type=46 OR evt_type=47 OR evt_type=48 OR evt_type=49 OR evt_type=86 OR evt_type=87 ) ORDER BY ts DESC, ts_ms DESC LIMIT 32";
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) AND (UNIX_TIMESTAMP(NOW())-ts)<60 ORDER BY id DESC LIMIT 32";
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) ORDER BY ts, ts_ms DESC LIMIT 32";
//echo $QS . "\n\n";
$zult = $ZIZI->Query( $QS );
if( count( $zult ) ){
$CT = array();
foreach( $zult as $Z ){
$TT = intval( $Z['evt_type'] );
if( ( $TT == 52 ) || ( $TT == 53 ) || ( $TT == 54 ) ) break;
//if( !( $TT == 10 || $TT == 11 ||$TT == 12 ||$TT == 13 || $TT == 14 || $TT == 36 ) ) continue;
//$CT['type'] = $TT;
if( $TT == 85 ){
$CT['digital'] = intval( 2048.0 * floatval( $Z['range'] ) / $SENSORRANGE );
} else {
$CT['digital'] = intval( $Z['range_digital']);
};
if( $SYS['local_binding'] == 0 ){
$CT['lat'] = floatval( $Z['lat'] );
$CT['lon'] = floatval( $Z['lon'] );
} else {
$CT['lat'] = floatval( $SYS['anchor_lat'] ) + floatval( $Z['lat'] );
$CT['lon'] = floatval( $SYS['anchor_lon'] ) + floatval( $Z['lon'] );
};
$CT['az'] = floatval( $Z['azimuth'] );
if( $TT > 38 ){
if( $TT == 86 || $TT == 87 ){
if( $TT == 86 ){
$CT['color'] = '00FFFF';
$CT['stroke'] = '008080';
} else {
$CT['color'] = 'FFFF00';
$CT['stroke'] = '808000';
};
} else {
$CT['color'] = 'ff00ff';
$CT['stroke'] = '800080';
};
} else {
$CT['color'] = 'ff0000';
$CT['stroke'] = '800000';
};
$CN['targets'][] = $CT;
};
//if( count( $CN['targets'] ) ) $CN['status'] = 5;
};
/*
// check Filter
$CN['pops'] = array();
$QS="SELECT * FROM events WHERE ( node_id={$CN['id']} OR node_id=1 ) AND ( evt_type=85 ) ORDER BY ts DESC, ts_ms DESC LIMIT 32";
$zult = $ZIZI->Query( $QS );
if( count( $zult ) ){
$CT = array();
foreach( $zult as $Z ){
$TT = intval( $Z['evt_type'] );
if( ( $TT == 52 ) || ( $TT == 53 ) || ( $TT == 54 ) ) break;
//if( !( $TT == 10 || $TT == 11 ||$TT == 12 ||$TT == 13 || $TT == 14 || $TT == 36 ) ) continue;
//$CT['type'] = $TT;
$CT['digital'] = intval( $Z['range_digital']);
if( $SYS['local_binding'] == 0 ){
$CT['lat'] = floatval( $Z['lat'] );
$CT['lon'] = floatval( $Z['lon'] );
} else {
$CT['lat'] = floatval( $SYS['anchor_lat'] ) + floatval( $Z['lat'] );
$CT['lon'] = floatval( $SYS['anchor_lon'] ) + floatval( $Z['lon'] );
};
$CT['az'] = floatval( $Z['azimuth'] );
if( $TT > 38 ){
$CT['color'] = 'ff00ff';
$CT['stroke'] = '800080';
} else {
$CT['color'] = 'ff0000';
$CT['stroke'] = '800000';
};
$CN['pops'][] = $CT;
};
//if( count( $CN['targets'] ) ) $CN['status'] = 5;
};
*/
};
break;
};
case ARGUS_3D_SENSOR:{
$QS = "SELECT `data_status` FROM `lrf_sensors` WHERE `id`={$R['aux_id']}";
$JJ = $DATABASE->Query( $QS );
$CS = $JJ[0];
$CN['status'] = intval($CS['data_status']);
$CN['masks_status'] = 0;
$CN['masks_exist'] = 0;
// check draw
if( $LastTS > 0 ){
$QS = "SELECT `id` FROM `lrf_draw` WHERE `node_id`={$R['id']} AND `ts` > {$LastTS}";
$R = $DATABASE->Query( $QS );
if( count( $R ) ){
$CN['reload_draw'] = true;
} else {
$CN['reload_draw'] = false;
};
} else {
$CN['reload_draw'] = true;
}; //663552
$CN['master_present'] = false;
$CN['slave_present'] = false;
$CN['stat_present'] = false;
if( $CN['status'] ){
$CN['master_present'] = true;
//$QS = "SELECT * FROM `lrf_runtime_status` WHERE `lrf_id`={$R['aux_id']}";
//$Stat = $DATABASE->Query( $QS );
//if( count( $Stat ) ){
// $CS = $Stat[0];
// $MP = array();
// $GP = array();
// $WP = array();
// for( $idx = 0; $idx < 8; $idx++ ){
// $MP[] = round( floatval( $CS['master_mp_' . $idx ] ) / 663552.0, 2 );
// $GP[] = round( floatval( $CS['master_gp_' . $idx ] ) / 663552.0, 2 );
// $WP[] = round( floatval( $CS['master_wp_' . $idx ] ) / 663552.0, 2 );
// };
// for( $idx = 0; $idx < 8; $idx++ ){
// $MP[] = round( floatval( $CS['slave_mp_' . $idx ] ) / 663552.0, 2 );
// $GP[] = round( floatval( $CS['slave_gp_' . $idx ] ) / 663552.0, 2 );
// $WP[] = round( floatval( $CS['slave_wp_' . $idx ] ) / 663552.0, 2 );
// };
// $CN['runtime']['gp'] = $GP;
// $CN['runtime']['mp'] = $MP;
// $CN['runtime']['wp'] = $WP;
// $CN['stat_present'] = true;
// if( $CS['twinc']!= 0 ) $CN['slave_present'] = true;
//};
// check Targets
$CN['targets'] = array();
$QS="SELECT * FROM events WHERE ( node_id={$CN['id']} OR node_id=1 ) AND ( evt_type=11 OR evt_type=12 OR evt_type=8 OR evt_type=52 OR evt_type=53 OR evt_type=54 ) ORDER BY ts DESC, ts_ms DESC LIMIT 32";
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=11 OR evt_type=14) ORDER BY id DESC LIMIT 32";
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) AND (UNIX_TIMESTAMP(NOW())-ts)<60 ORDER BY id DESC LIMIT 32";
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) ORDER BY ts, ts_ms DESC LIMIT 32";
//echo $QS . "\n\n";
$zult = $ZIZI->Query( $QS );
$colors = array( 0x00f6ff, 0x6c00ff, 0xff5400, 0x00ff24, 0x00aeff, 0xbaff00, 0xff0000, 0x0024ff );
$CN['debug']=count( $zult );
if( count( $zult ) ){
$CT = array();
foreach( $zult as $Z ){
$TT = intval( $Z['evt_type'] );
if( ( $TT == 8 ) || ( $TT == 52 ) || ( $TT == 53 ) || ( $TT == 54 ) ){
//$CN['debug2']='break by evt!';
break;
}
$CN['status'] = 5; // Alarmed
$CT['range'] = floatval($Z['range']);
$CT['digital'] = intval( $Z['range_digital']);
if( $SYS['local_binding'] == 0 ){
$CT['lat'] = floatval( $Z['lat'] );
$CT['lon'] = floatval( $Z['lon'] );
} else {
$CT['lat'] = floatval( $SYS['anchor_lat'] ) + floatval( $Z['lat'] );
$CT['lon'] = floatval( $SYS['anchor_lon'] ) + floatval( $Z['lon'] );
};
$CT['az'] = floatval($Z['azimuth']);
$CT['el'] = floatval($Z['elevation']);
if( isset( $Z['lrf_id'] ) ){
$CT['color'] = $colors[intval($Z['lrf_id'])];
} else {
$CT['color'] = 0xff0000;
};
$CN['targets'][] = $CT;
};
};
};
break;
};
case ARGUS_ANALOG_STATIC_CAMERA:
case ARGUS_ANALOG_PTZ_CAMERA:
case ARGUS_IP_STATIC_CAMERA:
case ARGUS_IP_PTZ_CAMERA:
case 14:
case 15:{
if( $ServerIsOnLine ){
$QS="SELECT * FROM `media_streams` WHERE `id`={$R['aux_parameter']}";
$SR=$DATABASE->Query( $QS );
if( count( $SR ) ) {
$ST = $SR[0];
if( $ST['valid'] == 1 ){
$CN['valid'] = true;
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
$S=$DATABASE->Query( $QS );
//$CN['src'] = 'http://' . $_SERVER['SERVER_ADDR'].':' . $S[0]['web_port'] .'/stream?id='. $R['aux_parameter'];
if( $SSL_INSTALLLED ){
$CN['src'] = 'https://' . $_SERVER['SERVER_ADDR'].'/video_feed/stream?id='. $R['aux_parameter'];
} else {
$CN['src'] = 'http://' . $_SERVER['SERVER_ADDR'].'/video_feed/stream?id='. $R['aux_parameter'];
//$CN['src'] = 'http://' . $_SERVER['SERVER_ADDR'].'/video_feed/preview?id='. $R['aux_parameter'];
};
break;
};
};
};
$CN['valid'] = false;
$CN['src'] = "/style/assets/no-signal.png";
break;
};
};
};
$Data['nodes'][] = $CN;
};
};
} else {
$Data['status']='LOGOUT';
};
echo json_encode( $Data );
?>

1
lib/controller/getHistoryEvents.php

@ -20,6 +20,7 @@
//$LREC = array_reverse( $ZIZI->Query( $QS ) );
$LREC = $ZIZI->Query( $QS );
$Data['log'] = array();
//date_default_timezone_set('America/New_York');
foreach( $LREC as $REC ){
$CR['id'] = intval( $REC['id'] );
$CR['node_id'] = intval( $REC['node_id'] );

30
lib/controller/getReportLayout.php

@ -136,7 +136,23 @@ _DATA_BOUNDARY;
$STA = array();
$END="]}";
$OUT = array();
//$OUT[] = "{ columnWidth: 1.0, stylse:'padding:10px 0 10px 10px', items:[{html:'App Type:{$SP['type']}'}]}";
switch( $SP['type'] ){
case 0:{
$STA[0]="{ columnWidth: 1.0, stydle:'padding:10px 0 10px 10px', items:[";
//$STA[1]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
//$STA[2]="{ columnWidth: .75, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: 1.0, stylse:'padding:10px 0 10px 10px', items:[";
$MH = 4;
$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['map']="{xtype:'panel', title: '{$Labels->GetLabel('_MAP_')}', frame: true, border: true, draggable: false, collapsible: false, tools: [{ id:'toggle', handler: function( a, b, p ){ fullScreen( 'report_map' ); }}], items:[{$MAPIO}],listeners:{ afterrender: function(p){ var W=p.getWidth(); p.setHeight( 32+(W/16)*4);}} }";
$DUMMY['log']="{xtype:'panel', id: 'lg_panel', title: '{$Labels->GetLabel('_EVENT_LOG_')}', frame: true, border: true, draggable: false, items:[{$LOGIO}] }";
$OUT[]= $STA[0] . $DUMMY['map'] . $END;
//$OUT[]= $STA[1] . $DUMMY['sensor'] . $END;
$OUT[]= $STA[1] . $DUMMY['log'] . $END;
break;
};
case 1:{
//Metro
$STA[0]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
@ -362,6 +378,20 @@ _DATA_BOUNDARY;
$OUT[]= $STA[4] . $DUMMY['log'] . $END;
break;
};
case 6:{
$STA[0]="{ columnWidth: 1.0, stydle:'padding:10px 0 10px 10px', items:[";
//$STA[1]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
//$STA[2]="{ columnWidth: .75, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: 1.0, stylse:'padding:10px 0 10px 10px', items:[";
$MH = 4;
$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}] }";
$OUT[]= $STA[0] . $DUMMY['map'] . $END;
//$OUT[]= $STA[1] . $DUMMY['sensor'] . $END;
$OUT[]= $STA[1] . $DUMMY['log'] . $END;
break;
};
default:{
$STA[0]="{ columnWidth: .5, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .5, stylse:'padding:10px 0 10px 10px', items:[";

241
lib/controller/getSensorDetectionEditor.php

@ -1,6 +1,20 @@
<?php
require_once('../ajax_asm.php');
function inject_labels( $TPL ){
global $Labels;
$TPL = str_replace('%%%LABEL%%%TOOLBOX%%%', $Labels->GetLabel('_TOOLBOX_') , $TPL );
$TPL = str_replace('%%%LABEL%%%CLEALARM%%%', $Labels->GetLabel('_CLEAR_ALARM_') , $TPL );
$TPL = str_replace('%%%LABEL%%%DRABACKGROUND%%%', $Labels->GetLabel('_DRAW_BACKGROUND_') , $TPL );
$TPL = str_replace('%%%LABEL%%%STUBACKGROUND%%%', $Labels->GetLabel('_STUDY_BACKGROUND_') , $TPL );
$TPL = str_replace('%%%LABEL%%%MASKEDITOR%%%', $Labels->GetLabel('_MASK_EDITOR_') , $TPL );
$TPL = str_replace('%%%LABEL%%%MASKMNGR%%%', $Labels->GetLabel('_MASK_MANAGER_') , $TPL );
$TPL = str_replace('%%%LABEL%%%ACKNOLAGE%%%', $Labels->GetLabel('_DEV_ACK_BTN_') , $TPL );
$TPL = str_replace('%%%LABEL%%%FREZBUBLE%%%', $Labels->GetLabel('_DEV_FRZ_BBL_BTN_') , $TPL );
$TPL = str_replace('%%%LABEL%%%DELBUBLE%%%', $Labels->GetLabel('_DEV_DEL_BBL_BTN_') , $TPL );
return $TPL;
};
if( $CUser->Data['id'] > 1 ){
$SI = 0;
$SOK = false;
@ -8,7 +22,7 @@
if( isset( $_POST['SEN'] ) ) $SI = intval( $_POST['SEN'] );
if( $SI ){
$FOK = true;
$QS = "SELECT * FROM `lrf_sensors` WHERE `id`={$SI}";
$QS = "SELECT `ls`.*, `no`.`id` as `node_id`, `no`.`name` FROM `lrf_sensors` `ls` LEFT JOIN `nodes` `no` ON ( `no`.`type`=`ls`.`type` AND `no`.`aux_id` = `ls`.`id` ) WHERE `ls`.`id`={$SI}";
$JJR = $DATABASE->Query( $QS, false );
$DUDU = false;
if( count( $JJR ) ){
@ -59,7 +73,46 @@ _DATA_BOUNDARY;
labelWidth: 150,
labelAlign: 'right',
layout: 'form',
height: PanelH-42,
height: PanelH-10,
bbar:[{
text: 'Apply Settings',
handler: function(){
var moder = Ext.getCmp('m_order').getValue();
var moset = Ext.getCmp('m_offset').getValue();
var model = Ext.getCmp('m_delta').getValue();
var mofli = Ext.getCmp('m_flip').getValue();
var mowid = Ext.getCmp('m_width').getValue();
var mosst = Ext.getCmp('m_sst').getValue();
var mosun = Ext.getCmp('m_sun').getValue();
%%%SLAVE_VARS%%%
Ext.Ajax.request({
url: '/lib/controller/doSensorOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
SNID: '{$SI}',
OPID: 19,
MOFF: moset,
MORD: moder,
MDEL: model,
MFLI: mofli,
MWIZ: mowid,
MSST: mosst,
MSUN: mosun
%%%SLAVE_DEFS%%%
},
success: function( response, opts ){
Ext.Msg.show({
title: '{$Labels->GetLabel('_INFO_')}',
msg: '{$Labels->GetLabel('_SARE_SAVED_')}',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.INFO
});
},
failure: failureAJAXFunction
});
}
}],
items:[{
xtype: 'numberfield',
id: 's_order',
@ -117,52 +170,33 @@ _DATA_BOUNDARY;
SSST: sosst,
SSUN: sosun
_DATA_BOUNDARY;
$DEV_TAB='{ html: " DEV PL" }';
$TFN = 'settings/node_' . $DD['type'] . '.js';
if( file_exists( $TFN )){
$DEV_TAB = file_get_contents( $TFN );
$DEV_TAB = inject_labels( $DEV_TAB );
$DEV_TAB = str_replace('%%%NODEID%%%', ''.$DD['node_id'] , $DEV_TAB );
$DEV_TAB = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $DEV_TAB );
$DEV_TAB = str_replace('%%%USERID%%%', $UserID, $DEV_TAB );
$DEV_TAB = str_replace('%%%SESSION%%%', $Session, $DEV_TAB );
//$DEV_TAB = str_replace('%%%APPTYPE%%%', $SP['type'], $DEV_TAB );
$DEV_TAB = str_replace('%%%APPTYPE%%%', 0, $DEV_TAB );
};
$TPL=<<<_DATA_BOUNDARY
{
xtype: 'tabpanel',
activeTab: 0,
frame: true,
border: true,
bbar:[{
text: 'Apply Settings',
handler: function(){
var moder = Ext.getCmp('m_order').getValue();
var moset = Ext.getCmp('m_offset').getValue();
var model = Ext.getCmp('m_delta').getValue();
var mofli = Ext.getCmp('m_flip').getValue();
var mowid = Ext.getCmp('m_width').getValue();
var mosst = Ext.getCmp('m_sst').getValue();
var mosun = Ext.getCmp('m_sun').getValue();
%%%SLAVE_VARS%%%
Ext.Ajax.request({
url: '/lib/controller/doSensorOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
SNID: '{$SI}',
OPID: 19,
MOFF: moset,
MORD: moder,
MDEL: model,
MFLI: mofli,
MWIZ: mowid,
MSST: mosst,
MSUN: mosun
%%%SLAVE_DEFS%%%
},
success: function( response, opts ){
Ext.Msg.show({
title: '{$Labels->GetLabel('_INFO_')}',
msg: '{$Labels->GetLabel('_SARE_SAVED_')}',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.INFO
});
},
failure: failureAJAXFunction
});
}
}],
border: false,
items:[{
xtype: 'panel',
id: 'up_sse_panel',
border: false,
title: '{$Labels->GetLabel('_MAS_LRF_DEV_SET_')}',
height: PanelH-10,
items: [{$DEV_TAB}]
},{
xtype: 'panel',
id: 'up_se_popanel',
border: true,
@ -171,7 +205,7 @@ _DATA_BOUNDARY;
labelWidth: 150,
labelAlign: 'right',
layout: 'form',
height: PanelH-42,
height: PanelH-10,
items:[{
xtype: 'numberfield',
id: 'm_order',
@ -207,10 +241,49 @@ _DATA_BOUNDARY;
id: 'm_sun',
fieldLabel: 'Sun',
value: '{$SD['sun']}'
}],
bbar:[{
text: 'Apply Settings',
handler: function(){
var moder = Ext.getCmp('m_order').getValue();
var moset = Ext.getCmp('m_offset').getValue();
var model = Ext.getCmp('m_delta').getValue();
var mofli = Ext.getCmp('m_flip').getValue();
var mowid = Ext.getCmp('m_width').getValue();
var mosst = Ext.getCmp('m_sst').getValue();
var mosun = Ext.getCmp('m_sun').getValue();
%%%SLAVE_VARS%%%
Ext.Ajax.request({
url: '/lib/controller/doSensorOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
SNID: '{$SI}',
OPID: 19,
MOFF: moset,
MORD: moder,
MDEL: model,
MFLI: mofli,
MWIZ: mowid,
MSST: mosst,
MSUN: mosun
%%%SLAVE_DEFS%%%
},
success: function( response, opts ){
Ext.Msg.show({
title: '{$Labels->GetLabel('_INFO_')}',
msg: '{$Labels->GetLabel('_SARE_SAVED_')}',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.INFO
});
},
failure: failureAJAXFunction
});
}
}]
}%%%SLAVE_LRF_DET%%%,{
title: '{$Labels->GetLabel('_DET_SET_WIDTH_T_')}',
height: PanelH-42,
height: PanelH-10,
tbar:[{
text: '{$Labels->GetLabel('_EDIT_')}',
id: 'edit_btn_width_table',
@ -218,6 +291,45 @@ _DATA_BOUNDARY;
handler: editWidthTableRecord
}],
layout:'fit',
bbar:[{
text: 'Apply Settings',
handler: function(){
var moder = Ext.getCmp('m_order').getValue();
var moset = Ext.getCmp('m_offset').getValue();
var model = Ext.getCmp('m_delta').getValue();
var mofli = Ext.getCmp('m_flip').getValue();
var mowid = Ext.getCmp('m_width').getValue();
var mosst = Ext.getCmp('m_sst').getValue();
var mosun = Ext.getCmp('m_sun').getValue();
%%%SLAVE_VARS%%%
Ext.Ajax.request({
url: '/lib/controller/doSensorOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
SNID: '{$SI}',
OPID: 19,
MOFF: moset,
MORD: moder,
MDEL: model,
MFLI: mofli,
MWIZ: mowid,
MSST: mosst,
MSUN: mosun
%%%SLAVE_DEFS%%%
},
success: function( response, opts ){
Ext.Msg.show({
title: '{$Labels->GetLabel('_INFO_')}',
msg: '{$Labels->GetLabel('_SARE_SAVED_')}',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.INFO
});
},
failure: failureAJAXFunction
});
}
}],
items:{
xtype: 'grid',
border: false,
@ -241,10 +353,49 @@ _DATA_BOUNDARY;
},{
title: '{$Labels->GetLabel('_DC_CONTROL_SET_')}',
height: PanelH-42,
height: PanelH-10,
labelWidth: 200,
labelAlign: 'right',
layout: 'form',
bbar:[{
text: 'Apply Settings',
handler: function(){
var moder = Ext.getCmp('m_order').getValue();
var moset = Ext.getCmp('m_offset').getValue();
var model = Ext.getCmp('m_delta').getValue();
var mofli = Ext.getCmp('m_flip').getValue();
var mowid = Ext.getCmp('m_width').getValue();
var mosst = Ext.getCmp('m_sst').getValue();
var mosun = Ext.getCmp('m_sun').getValue();
%%%SLAVE_VARS%%%
Ext.Ajax.request({
url: '/lib/controller/doSensorOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
SNID: '{$SI}',
OPID: 19,
MOFF: moset,
MORD: moder,
MDEL: model,
MFLI: mofli,
MWIZ: mowid,
MSST: mosst,
MSUN: mosun
%%%SLAVE_DEFS%%%
},
success: function( response, opts ){
Ext.Msg.show({
title: '{$Labels->GetLabel('_INFO_')}',
msg: '{$Labels->GetLabel('_SARE_SAVED_')}',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.INFO
});
},
failure: failureAJAXFunction
});
}
}],
items:[{
xtype: 'checkbox',
id: 'dc_ena',

62
lib/controller/rest_gw.php

@ -0,0 +1,62 @@
<?php
// users.php
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
//require_once 'config.php';
$method = $_SERVER['REQUEST_METHOD'];
switch ($method) {
case 'GET':
// Check if an ID is passed in the query string: /users.php?id=1
if (isset($_GET['id'])) {
$stmt = $pdo->prepare("SELECT id, name, email FROM users WHERE id = ?");
$stmt->execute([$_GET['id']]);
$user = $stmt->fetch();
if ($user) {
echo json_encode($user);
} else {
http_response_code(404);
echo json_encode(["message" => "User not found."]);
}
} else {
// Retrieve all users
$stmt = $pdo->query("SELECT id, name, email FROM users");
$users = $stmt->fetchAll();
echo json_encode($users);
}
break;
case 'POST':
// Retrieve raw JSON data from the request body
$input = json_decode(file_get_contents("php://input"), true);
/*if (!empty($input['name']) && !empty($input['email'])) {
$stmt = $pdo->prepare("INSERT INTO users (name, email) VALUES (?, ?)");
$stmt->execute([$input['name'], $input['email']]);
http_response_code(201); // Created
echo json_encode([
"message" => "User created successfully.",
"id" => $pdo->lastInsertId()
]);
} else {
*/
http_response_code(400); // Bad Request
echo json_encode(["message" => "Incomplete data. Name and email are required.", "INPUT" => $input ]);
//}
break;
default:
http_response_code(405); // Method Not Allowed
echo json_encode(["message" => "HTTP method not supported."]);
break;
}
?>

28
lib/controller/settings/node_0.js

@ -0,0 +1,28 @@
{
id: 'db_node_%%%NODEID%%%',
tools: [{
id:'gear',
handler: function(){
showServerToolBox(%%%NODEID%%%);
}
}],
frame: true,
width: 258,
height: 240,
border: false,
title: '%%%SYSSERVERNAME%%%',
items: [{
xtype: 'panel',
html: '<table width="100%"><tr><td><p id="status_%%%NODEID%%%_txt">%%%SERVERSTATUS%%%</p></td><td width="16px"><img id="status_%%%NODEID%%%_img" src="/style/icons/icons/%%%SERVERSTATUSIMG%%%"></td></tr></table>'
},{
xtype: 'panel',
html: '<table width="100%" border=0><tr><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_totalValue0">0</text><text x="50%" y="50%" class="chart-label">CPU</text></g></svg></td><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_totalValue1">0</text><text x="50%" y="50%" class="chart-label">MEM</text></g></svg></td><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_totalValue2">0</text><text x="50%" y="50%" class="chart-label">DISK</text></g></svg></td></tr></table>'
},{
xtype: 'panel',
height: 80,
frame: true,
border: false,
autoScroll: true,
items: %%%MODULES%%%
}]
}

374
lib/controller/settings/node_1.js

@ -0,0 +1,374 @@
{
id: 'db_node_%%%NODEID%%%',
title: '%%%NODENAME%%%',
draggable: false,
collapsible: false,
tools: [{
id:'toggle',
handler: function( a, b, p ){
fsDrawID = %%%NODEID%%%;
fullScreen( 'div_radar_%%%NODEID%%%' );
var el = document.getElementById('draw_svg_'+fsDrawID );
var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 );
el.removeAttribute("width");
el.setAttribute( "width", nW+'%' );
}
}],
listeners:{
afterrender: function(p){
masks_statuses[%%%NODEID%%%] = 0;
masks_exist[%%%NODEID%%%] = 0;
//alert( PanelH - p.ownerCt.ownerCt.getHeight() + 64+32 );
//alert( document.body.clientHeight - p.ownerCt.ownerCt.getHeight() );
//var expH = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
var W = p.getWidth();
var H = 9*(W/16) - 28;
if( %%%APPTYPE%%% == 2 ){
H = PanelH - p.ownerCt.getHeight() + 64;
if( H > ( W * 0.5625 )+ 32 ){
H = ( W * 0.5625 ) + 32;
};
} else {
H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
};
//alert( H );
//var W = 16*(H/9);
//p.ownerCt.setWidth( W );
p.setHeight( H );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 70 );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H - 70 );
//alert( W+" "+H );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).setWidth( W - H + 50 );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).doLayout( false, true );
//if( H > W ){
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", "100%" );
//} else {
document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-80 );
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("height", H-80 );//"100%" );
if( W > ( H+130 ) ) Ext.getCmp( 'toolbox_%%%NODEID%%%' ).expand( false );
//};
//alert( W +' '+ ( H+130 ) );
set2DZoomLevel( %%%NODEID%%%, 100 );
var el = document.getElementById('div_radar_%%%NODEID%%%');
el.addEventListener( "fullscreenchange", ( evt )=>{
if( document.fullscreenElement ){
} else {
if( fsDrawID ){
var el = document.getElementById('draw_svg_'+fsDrawID );
el.removeAttribute("width");
el.setAttribute( "width", H-80 );//'86%' );
fsDrawID = 0;
};
};
});
window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%% );
}
},
//layout: 'hbox',
layout:'border',
items:[{
id: 'cp_radar_%%%NODEID%%%',
region: 'center',
html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"><center><svg id="draw_svg_%%%NODEID%%%" opacity="0.3" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="100%" version="1.1" onclick="select2DROI( %%%NODEID%%%, event );" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd; cursor: crosshair;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="svg_mask_%%%NODEID%%%"><circle cx="287" cy="287" r="284"/></clipPath></defs><text id="g_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(0,35,35)" x="35" y="35" fill="#FFF212" style="font: 30px sans-serif">100 m.</text><circle fill="#00A859" stroke="none" cx="287" cy="287" r="284"/><circle id="border_%%%NODEID%%%" fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><text id="50_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,140,140)" x="140" y="140" fill="#FFF212" style="font: 25px sans-serif">50</text><circle id="r25_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><text id="25_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,210,210)" x="210" y="210" fill="#FFF212" style="font: 15px sans-serif">25</text><circle id="r12_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/><text id="12_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,245,245)" x="245" y="245" fill="#FFF212" style="font: 10px sans-serif">12.5</text><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/></svg></center></div>',
width: '56%'
},{
region: 'east',
collapsible: true,
minSize: 75, // defaults to 50
maxSize: 220,
frame: false,
border: false,
collapsed: true,
collapseMode: 'mini',
title: '%%%LABEL%%%TOOLBOX%%%',
floatable: true,
animFloat: false,
autoHide: true,
id: 'toolbox_%%%NODEID%%%',
//unstyled: true,
margins: '5 0 0 5',
//cmargins: '5 0 5 5',
width: 200,
items:[{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_clear_btn_%%%NODEID%%%',
width: '100%',
disabled: true,
text: '%%%LABEL%%%CLEALARM%%%',
iconCls: 'ctrl_panel_clean_sm',
iconAlign: 'left',
handler: function(){
doDeviceOperation( 1, 125,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_draw_btn_%%%NODEID%%%',
width: '100%',
text: '%%%LABEL%%%DRABACKGROUND%%%',
iconCls: 'ctrl_panel_drawscan_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
doDeviceOperation( %%%NODEID%%%, 3,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_study_btn_%%%NODEID%%%',
width: '100%',
text: '%%%LABEL%%%STUBACKGROUND%%%',
iconCls: 'ctrl_panel_study_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
doDeviceOperation( %%%NODEID%%%, 2,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
text: '%%%LABEL%%%MASKEDITOR%%%',
id: 'DMED_%%%NODEID%%%',
width: '100%',
disabled: true,
iconCls: 'ctrl_panel_drawscan_sm',
handler: function(){
showMaskEditor( false, 0, %%%NODEID%%% );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'panel',
title: '%%%LABEL%%%MASKMNGR%%%',
height: 70,
frame: true,
flex: 1,
layout: 'hbox',
items:[{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'small',
id: 'mz_btn_%%%NODEID%%%_0',
iconCls: 'mask_zone1_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){
doMaskOperation( %%%NODEID%%%, 1, 0 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 0 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',
id: 'mz_btn_%%%NODEID%%%_1',
iconCls: 'mask_zone2_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){
doMaskOperation( %%%NODEID%%%, 1, 1 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 1 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '19%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_2',
iconCls: 'mask_zone3_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){
doMaskOperation( %%%NODEID%%%, 1, 2 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 2 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_3',
iconCls: 'mask_zone4_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){
doMaskOperation( %%%NODEID%%%, 1, 3 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 3 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_4',
iconCls: 'mask_zone5_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){
doMaskOperation( %%%NODEID%%%, 1, 4 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 4 );
};
}
}]
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
width: '100%',
enableToggle: true,
id: 'cp_ack_btn_%%%NODEID%%%',
text: '%%%LABEL%%%ACKNOLAGE%%%',
iconCls: 'ctrl_panel_clean_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){
//doMaskOperation( %%%NODEID%%%, 1, 4 );
doAckOperation( %%%NODEID%%%, 1 );
} else {
//doMaskOperation( %%%NODEID%%%, 0, 4 );
doAckOperation( %%%NODEID%%%, 0 );
};
}
}/*,{
xtype: 'panel',
title: 'Detection Sensitivity',
height: 95,
frame: true,
flex: 1,
layout: 'hbox',
items:[{
xtype: 'button',
text: 'Factory',
id: 'DDSPBTN0',
width: 80,
iconCls: 'detection_btn_factory',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'Low',
id: 'DDSPBTN1',
width: 80,
iconCls: 'detection_btn_low',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'Meduim',
id: 'DDSPBTN2',
width: 80,
iconCls: 'detection_btn_medium',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'High',
id: 'DDSPBTN3',
width: 80,
iconCls: 'detection_btn_high',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
}]
}*/]
}],
bbar:[{
xtype: 'button',
text: '12.5%',
enableToggle: true,
id: 'zoom_bt12_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 12 );
};
}
},{
xtype: 'button',
text: '25%',
enableToggle: true,
id: 'zoom_bt25_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 25 );
};
}
},{
xtype: 'button',
text: '50%',
enableToggle: true,
id: 'zoom_bt50_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 50 );
};
}
},{
xtype: 'button',
text: '100%',
pressed: true,
enableToggle: true,
id: 'zoom_bt100_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 100 );
};
}
},{
xtype: 'panel',
id: 'status_%%%NODEID%%%',
border: false,
frame: false,
width: 800,
height: 28,
html: ''
}]
}

40
lib/controller/settings/node_10.js

@ -0,0 +1,40 @@
{
id: 'db_node_%%%NODEID%%%',
layout:'vbox',
tools: [{
id:'gear',
handler: function(){
}
}],
frame: true,
draggable: false,
collapsible: false,
bodyStyle: 'padding: 0px;',
title: '%%%NODENAME%%%',
sukaMineWidth: -1,
items:[{
id: 'db_node_%%%NODEID%%%_pic',
border: true,
width: '100%',
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /></div>'
}],
listeners:{
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){
if( rawWidth!= undefined ){
if( p.sukaMineWidth != adjWidth ){
p.sukaMineWidth = adjWidth;
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( XX + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( XX );
};
};
},
afterrender: function( p ){
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( xx + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( xx );
}
}
}

62
lib/controller/settings/node_11.js

@ -0,0 +1,62 @@
{
id: 'db_node_%%%NODEID%%%',
layout:'vbox',
tools: [{
id:'gear',
handler: function(){
}
}],
frame: true,
draggable: false,
collapsible: false,
bodyStyle: 'padding: 0px;',
title: '%%%NODENAME%%%',
sukaMineWidth: -1,
items:[{
id: 'db_node_%%%NODEID%%%_pic',
border: true,
width: '100%',
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td>&nbsp;</td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td>&nbsp;</td></tr><tr><td>%%%HBTN%%%</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td>&nbsp;</td></tr></table></div></div>'
}],
listeners:{
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){
if( rawWidth!= undefined ){
if( p.sukaMineWidth != adjWidth ){
p.sukaMineWidth = adjWidth;
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( XX + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( XX );
};
};
},
afterrender: function( p ){
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( xx + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( xx );
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop );
%%%CAM_CTRL_HOME_BTN_BIND%%%
}
}
}

40
lib/controller/settings/node_12.js

@ -0,0 +1,40 @@
{
id: 'db_node_%%%NODEID%%%',
layout:'vbox',
tools: [{
id:'gear',
handler: function(){
}
}],
frame: true,
draggable: false,
collapsible: false,
bodyStyle: 'padding: 0px;',
title: '%%%NODENAME%%%',
sukaMineWidth: -1,
items:[{
id: 'db_node_%%%NODEID%%%_pic',
border: true,
width: '100%',
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /></div>'
}],
listeners:{
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){
if( rawWidth!= undefined ){
if( p.sukaMineWidth != adjWidth ){
p.sukaMineWidth = adjWidth;
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( XX + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( XX );
};
};
},
afterrender: function( p ){
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( xx + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( xx );
}
}
}

62
lib/controller/settings/node_13.js

@ -0,0 +1,62 @@
{
id: 'db_node_%%%NODEID%%%',
layout:'vbox',
tools: [{
id:'gear',
handler: function(){
}
}],
frame: true,
draggable: false,
collapsible: false,
bodyStyle: 'padding: 0px;',
title: '%%%NODENAME%%%',
sukaMineWidth: -1,
items:[{
id: 'db_node_%%%NODEID%%%_pic',
border: true,
width: '100%',
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td>&nbsp;</td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td>&nbsp;</td></tr><tr><td>%%%HBTN%%%</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td>&nbsp;</td></tr></table></div></div>'
}],
listeners:{
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){
if( rawWidth!= undefined ){
if( p.sukaMineWidth != adjWidth ){
p.sukaMineWidth = adjWidth;
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( XX + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( XX );
};
};
},
afterrender: function( p ){
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( xx + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( xx );
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop );
%%%CAM_CTRL_HOME_BTN_BIND%%%
}
}
}

62
lib/controller/settings/node_14.js

@ -0,0 +1,62 @@
{
id: 'db_node_%%%NODEID%%%',
layout:'vbox',
tools: [{
id:'gear',
handler: function(){
}
}],
frame: true,
draggable: false,
collapsible: false,
bodyStyle: 'padding: 0px;',
title: '%%%NODENAME%%%',
sukaMineWidth: -1,
items:[{
id: 'db_node_%%%NODEID%%%_pic',
border: true,
width: '100%',
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td>&nbsp;</td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td>&nbsp;</td></tr><tr><td>%%%HBTN%%%</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td>&nbsp;</td></tr></table></div></div>'
}],
listeners:{
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){
if( rawWidth!= undefined ){
if( p.sukaMineWidth != adjWidth ){
p.sukaMineWidth = adjWidth;
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( XX + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( XX );
};
};
},
afterrender: function( p ){
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( xx + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( xx );
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop );
%%%CAM_CTRL_HOME_BTN_BIND%%%
}
}
}

62
lib/controller/settings/node_15.js

@ -0,0 +1,62 @@
{
id: 'db_node_%%%NODEID%%%',
layout:'vbox',
tools: [{
id:'gear',
handler: function(){
}
}],
frame: true,
draggable: false,
collapsible: false,
bodyStyle: 'padding: 0px;',
title: '%%%NODENAME%%%',
sukaMineWidth: -1,
items:[{
id: 'db_node_%%%NODEID%%%_pic',
border: true,
width: '100%',
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td>&nbsp;</td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td>&nbsp;</td></tr><tr><td>%%%HBTN%%%</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td>&nbsp;</td></tr></table></div></div>'
}],
listeners:{
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){
if( rawWidth!= undefined ){
if( p.sukaMineWidth != adjWidth ){
p.sukaMineWidth = adjWidth;
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( XX + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( XX );
};
};
},
afterrender: function( p ){
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%;
p.setHeight( xx + 32 );
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
z.setHeight( xx );
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop );
%%%CAM_CTRL_HOME_BTN_BIND%%%
}
}
}

372
lib/controller/settings/node_2.js

@ -0,0 +1,372 @@
{
id: 'db_node_%%%NODEID%%%',
title: '%%%NODENAME%%%',
draggable: false,
collapsible: false,
tools: [{
id:'toggle',
handler: function( a, b, p ){
fsDrawID = %%%NODEID%%%;
fullScreen( 'div_radar_%%%NODEID%%%' );
var el = document.getElementById('draw_svg_'+fsDrawID );
var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 );
el.removeAttribute("width");
el.setAttribute( "width", nW+'%' );
}
}],
listeners:{
afterrender: function(p){
masks_statuses[%%%NODEID%%%] = 0;
masks_exist[%%%NODEID%%%] = 0;
//alert( PanelH - p.ownerCt.ownerCt.getHeight() + 64+32 );
//alert( document.body.clientHeight - p.ownerCt.ownerCt.getHeight() );
//var expH = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
var W = p.getWidth();
var H = 9*(W/16) - 28;
if( %%%APPTYPE%%% == 1 || %%%APPTYPE%%% == 4 ){
H = PanelH - p.ownerCt.getHeight() + 64;
if( H > ( W * 0.5625 )+ 32 ){
H = ( W * 0.5625 ) + 32;
};
} else {
H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
};
//var W = 16*(H/9);
//p.ownerCt.setWidth( W );
p.setHeight( H );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 70 );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H - 70 );
//alert( W+" "+H );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).setWidth( W - H + 50 );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).doLayout( false, true );
//if( H > W ){
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", "100%" );
//} else {
document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-80 );
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("height", H-80 );//"100%" );
if( W > ( H+130 ) ) Ext.getCmp( 'toolbox_%%%NODEID%%%' ).expand( false );
//};
//alert( W +' '+ ( H+130 ) );
set2DZoomLevel( %%%NODEID%%%, 100 );
var el = document.getElementById('div_radar_%%%NODEID%%%');
el.addEventListener( "fullscreenchange", ( evt )=>{
if( document.fullscreenElement ){
} else {
if( fsDrawID ){
var el = document.getElementById('draw_svg_'+fsDrawID );
el.removeAttribute("width");
el.setAttribute( "width", H-80 );//'86%' );
fsDrawID = 0;
};
};
});
window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%% );
}
},
//layout: 'hbox',
layout:'border',
items:[{
id: 'cp_radar_%%%NODEID%%%',
region: 'center',
html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"><center><svg id="draw_svg_%%%NODEID%%%" opacity="0.3" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="86%" version="1.1" onclick="select2DROI( %%%NODEID%%%, event );" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd; cursor: crosshair;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="svg_mask_%%%NODEID%%%"><circle cx="287" cy="287" r="284"/></clipPath></defs><text id="g_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(0,35,35)" x="35" y="35" fill="#FFF212" style="font: 30px sans-serif">100 m.</text><circle fill="#00A859" stroke="none" cx="287" cy="287" r="284"/><circle id="border_%%%NODEID%%%" fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><text id="50_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,140,140)" x="140" y="140" fill="#FFF212" style="font: 25px sans-serif">50</text><circle id="r25_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><text id="25_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,210,210)" x="210" y="210" fill="#FFF212" style="font: 15px sans-serif">25</text><circle id="r12_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/><text id="12_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,245,245)" x="245" y="245" fill="#FFF212" style="font: 10px sans-serif">12.5</text><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/></svg></center></div>',
width: '56%'
},{
region: 'east',
collapsible: true,
minSize: 75, // defaults to 50
maxSize: 220,
frame: false,
border: false,
collapsed: true,
collapseMode: 'mini',
title: '%%%LABEL%%%TOOLBOX%%%',
floatable: true,
animFloat: false,
autoHide: true,
id: 'toolbox_%%%NODEID%%%',
//unstyled: true,
margins: '5 0 0 5',
//cmargins: '5 0 5 5',
width: 200,
items:[{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_clear_btn_%%%NODEID%%%',
width: '100%',
disabled: true,
text: '%%%LABEL%%%CLEALARM%%%',
iconCls: 'ctrl_panel_clean_sm',
iconAlign: 'left',
handler: function(){
doDeviceOperation( 1, 125,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_draw_btn_%%%NODEID%%%',
width: '100%',
text: '%%%LABEL%%%DRABACKGROUND%%%',
iconCls: 'ctrl_panel_drawscan_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
doDeviceOperation( %%%NODEID%%%, 3,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_study_btn_%%%NODEID%%%',
width: '100%',
text: '%%%LABEL%%%STUBACKGROUND%%%',
iconCls: 'ctrl_panel_study_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
doDeviceOperation( %%%NODEID%%%, 2,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
text: '%%%LABEL%%%MASKEDITOR%%%',
id: 'DMED_%%%NODEID%%%',
width: '100%',
disabled: true,
iconCls: 'ctrl_panel_drawscan_sm',
handler: function(){
showMaskEditor( false, 0, %%%NODEID%%% );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'panel',
title: '%%%LABEL%%%MASKMNGR%%%',
height: 70,
frame: true,
flex: 1,
layout: 'hbox',
items:[{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'small',
id: 'mz_btn_%%%NODEID%%%_0',
iconCls: 'mask_zone1_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){
doMaskOperation( %%%NODEID%%%, 1, 0 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 0 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',
id: 'mz_btn_%%%NODEID%%%_1',
iconCls: 'mask_zone2_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){
doMaskOperation( %%%NODEID%%%, 1, 1 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 1 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '19%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_2',
iconCls: 'mask_zone3_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){
doMaskOperation( %%%NODEID%%%, 1, 2 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 2 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_3',
iconCls: 'mask_zone4_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){
doMaskOperation( %%%NODEID%%%, 1, 3 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 3 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_4',
iconCls: 'mask_zone5_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){
doMaskOperation( %%%NODEID%%%, 1, 4 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 4 );
};
}
}]
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
width: '100%',
enableToggle: true,
id: 'cp_ack_btn_%%%NODEID%%%',
text: '%%%LABEL%%%ACKNOLAGE%%%',
iconCls: 'ctrl_panel_clean_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){
//doMaskOperation( %%%NODEID%%%, 1, 4 );
doAckOperation( %%%NODEID%%%, 1 );
} else {
//doMaskOperation( %%%NODEID%%%, 0, 4 );
doAckOperation( %%%NODEID%%%, 0 );
};
}
}/*,{
xtype: 'panel',
title: 'Detection Sensitivity',
height: 95,
frame: true,
flex: 1,
layout: 'hbox',
items:[{
xtype: 'button',
text: 'Factory',
id: 'DDSPBTN0',
width: 80,
iconCls: 'detection_btn_factory',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'Low',
id: 'DDSPBTN1',
width: 80,
iconCls: 'detection_btn_low',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'Meduim',
id: 'DDSPBTN2',
width: 80,
iconCls: 'detection_btn_medium',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'High',
id: 'DDSPBTN3',
width: 80,
iconCls: 'detection_btn_high',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
}]
}*/]
}],
bbar:[{
xtype: 'button',
text: '12.5%',
enableToggle: true,
id: 'zoom_bt12_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 12 );
};
}
},{
xtype: 'button',
text: '25%',
enableToggle: true,
id: 'zoom_bt25_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 25 );
};
}
},{
xtype: 'button',
text: '50%',
enableToggle: true,
id: 'zoom_bt50_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 50 );
};
}
},{
xtype: 'button',
text: '100%',
pressed: true,
enableToggle: true,
id: 'zoom_bt100_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 100 );
};
}
},{
xtype: 'panel',
id: 'status_%%%NODEID%%%',
border: false,
frame: false,
width: 800,
height: 28,
html: ''
}]
}

413
lib/controller/settings/node_3.js

@ -0,0 +1,413 @@
{
id: 'db_node_%%%NODEID%%%',
title: '%%%NODENAME%%%',
draggable: false,
collapsible: false,
tools: [{
id:'toggle',
handler: function( a, b, p ){
fsDrawID = %%%NODEID%%%;
fullScreen( 'div_radar_%%%NODEID%%%' );
var el = document.getElementById('draw_svg_'+fsDrawID );
var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 );
el.removeAttribute("width");
el.setAttribute( "width", nW+'%' );
}
}],
listeners:{
afterrender: function(p){
masks_statuses[%%%NODEID%%%] = 0;
masks_exist[%%%NODEID%%%] = 0;
//alert( PanelH - p.ownerCt.ownerCt.getHeight() + 64+32 );
//alert( document.body.clientHeight - p.ownerCt.ownerCt.getHeight() );
//var expH = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
var W = p.getWidth();
var H = PanelH - 15;// 9*(W/16) - 28;
//alert( W + ' '+ H );
//var W = 16*(H/9);
//p.ownerCt.setWidth( W );
p.setHeight( H );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 70 );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H - 70 );
//alert( W+" "+H );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).setWidth( W - H + 50 );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).doLayout( false, true );
//if( H > W ){
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", "100%" );
//} else {
document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-80 );
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("height", H-80 );//"100%" );
if( W > ( H+130 ) ) Ext.getCmp( 'toolbox_%%%NODEID%%%' ).expand( false );
//};
//alert( W +' '+ ( H+130 ) );
set2DZoomLevel( %%%NODEID%%%, 100 );
var el = document.getElementById('div_radar_%%%NODEID%%%');
el.addEventListener( "fullscreenchange", ( evt )=>{
if( document.fullscreenElement ){
} else {
if( fsDrawID ){
var el = document.getElementById('draw_svg_'+fsDrawID );
el.removeAttribute("width");
el.setAttribute( "width", H-80 );//'86%' );
fsDrawID = 0;
};
};
});
settingsSelectedDevice = %%%NODEID%%%;
window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%% );
window.setTimeout( fetchDeviceStatus, 20*%%%NODEID%%%, %%%NODEID%%% );
}
},
//layout: 'hbox',
layout:'border',
items:[{
id: 'cp_radar_%%%NODEID%%%',
region: 'center',
html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"><center><svg id="draw_svg_%%%NODEID%%%" opacity="0.3" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="86%" version="1.1" onclick="select2DROI( %%%NODEID%%%, event );" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd; cursor: crosshair;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="svg_mask_%%%NODEID%%%"><circle cx="287" cy="287" r="284"/></clipPath></defs><text id="g_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(0,35,35)" x="35" y="35" fill="#FFF212" style="font: 30px sans-serif">100 m.</text><circle fill="#00A859" stroke="none" cx="287" cy="287" r="284"/><circle id="border_%%%NODEID%%%" fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><text id="50_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,140,140)" x="140" y="140" fill="#FFF212" style="font: 25px sans-serif">50</text><circle id="r25_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><text id="25_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,210,210)" x="210" y="210" fill="#FFF212" style="font: 15px sans-serif">25</text><circle id="r12_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/><text id="12_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,245,245)" x="245" y="245" fill="#FFF212" style="font: 10px sans-serif">12.5</text><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/></svg></center></div>',
width: '56%'
},{
region: 'east',
collapsible: true,
minSize: 75, // defaults to 50
maxSize: 220,
frame: false,
border: false,
collapsed: true,
collapseMode: 'mini',
title: '%%%LABEL%%%TOOLBOX%%%',
floatable: true,
animFloat: false,
autoHide: true,
id: 'toolbox_%%%NODEID%%%',
//unstyled: true,
margins: '5 0 0 5',
//cmargins: '5 0 5 5',
width: 200,
items:[{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_clear_btn_%%%NODEID%%%',
width: '100%',
disabled: true,
text: '%%%LABEL%%%CLEALARM%%%',
iconCls: 'ctrl_panel_clean_sm',
iconAlign: 'left',
handler: function(){
doDeviceOperation( 1, 125,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_draw_btn_%%%NODEID%%%',
width: '100%',
text: '%%%LABEL%%%DRABACKGROUND%%%',
iconCls: 'ctrl_panel_drawscan_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
doDeviceOperation( %%%NODEID%%%, 3,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_study_btn_%%%NODEID%%%',
width: '100%',
text: '%%%LABEL%%%STUBACKGROUND%%%',
iconCls: 'ctrl_panel_study_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
doDeviceOperation( %%%NODEID%%%, 2,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
text: '%%%LABEL%%%MASKEDITOR%%%',
id: 'DMED_%%%NODEID%%%',
width: '100%',
disabled: false,
iconCls: 'ctrl_panel_drawscan_sm',
handler: function(){
showMaskEditor( false, 0, %%%NODEID%%% );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'panel',
title: '%%%LABEL%%%MASKMNGR%%%',
height: 70,
frame: true,
flex: 1,
layout: 'hbox',
items:[{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'small',
id: 'mz_btn_%%%NODEID%%%_0',
iconCls: 'mask_zone1_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){
doMaskOperation( %%%NODEID%%%, 1, 0 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 0 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',
id: 'mz_btn_%%%NODEID%%%_1',
iconCls: 'mask_zone2_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){
doMaskOperation( %%%NODEID%%%, 1, 1 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 1 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '19%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_2',
iconCls: 'mask_zone3_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){
doMaskOperation( %%%NODEID%%%, 1, 2 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 2 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_3',
iconCls: 'mask_zone4_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){
doMaskOperation( %%%NODEID%%%, 1, 3 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 3 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_4',
iconCls: 'mask_zone5_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){
doMaskOperation( %%%NODEID%%%, 1, 4 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 4 );
};
}
}]
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
width: '100%',
enableToggle: true,
id: 'cp_ack_btn_%%%NODEID%%%',
text: '%%%LABEL%%%ACKNOLAGE%%%',
iconCls: 'ctrl_panel_clean_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){
//doMaskOperation( %%%NODEID%%%, 1, 4 );
doAckOperation( %%%NODEID%%%, 1 );
} else {
//doMaskOperation( %%%NODEID%%%, 0, 4 );
doAckOperation( %%%NODEID%%%, 0 );
};
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'panel',
height: 95,
frame: false,
border: true,
flex: 1,
layout: 'hbox',
items:[{
xtype: 'button',
width: 80,// 201 202
enableToggle: false,
id: 'cp_dbf_btn_%%%NODEID%%%',
text: '%%%LABEL%%%FREZBUBLE%%%',
iconCls: 'ctrl_panel_freeze_bf_sm',
iconAlign: 'left',
disabled: false,
handler: function(){
doNodeNCQ( 1, 210, '' );
//if( Ext.getCmp('cp_dbf_btn_%%%NODEID%%%').pressed){
//doMaskOperation( %%%NODEID%%%, 1, 4 );
// doAckOperation( %%%NODEID%%%, 1 );
//} else {
//doMaskOperation( %%%NODEID%%%, 0, 4 );
// doAckOperation( %%%NODEID%%%, 0 );
//};
}
},{
xtype: 'button',
width: 80,// 201 202
enableToggle: true,
id: 'cp_daf_btn_%%%NODEID%%%',
text: '%%%LABEL%%%DELBUBLE%%%',
iconCls: 'ctrl_panel_delete_bf_sm',
iconAlign: 'left',
disabled: false,
handler: function(){
if( Ext.getCmp('cp_daf_btn_%%%NODEID%%%').pressed){
selectROI_mode = 2;
} else {
selectROI_mode = 0;
};
}
}],
}/*,{
xtype: 'panel',
title: 'Detection Sensitivity',
height: 95,
frame: true,
flex: 1,
layout: 'hbox',
items:[{
xtype: 'button',
text: 'Factory',
id: 'DDSPBTN0',
width: 80,
iconCls: 'detection_btn_factory',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'Low',
id: 'DDSPBTN1',
width: 80,
iconCls: 'detection_btn_low',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'Meduim',
id: 'DDSPBTN2',
width: 80,
iconCls: 'detection_btn_medium',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'High',
id: 'DDSPBTN3',
width: 80,
iconCls: 'detection_btn_high',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
}]
}*/]
}],
bbar:[{
xtype: 'button',
text: '12.5%',
enableToggle: true,
id: 'zoom_bt12_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 12 );
};
}
},{
xtype: 'button',
text: '25%',
enableToggle: true,
id: 'zoom_bt25_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 25 );
};
}
},{
xtype: 'button',
text: '50%',
enableToggle: true,
id: 'zoom_bt50_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 50 );
};
}
},{
xtype: 'button',
text: '100%',
pressed: true,
enableToggle: true,
id: 'zoom_bt100_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
set2DZoomLevel( %%%NODEID%%%, 100 );
};
}
},{
xtype: 'panel',
id: 'status_%%%NODEID%%%',
border: false,
frame: false,
width: 800,
height: 28,
html: ''
}]
}

95
lib/controller/settings/node_4.js

@ -0,0 +1,95 @@
{
id: 'db_node_%%%NODEID%%%',
width: 258,
height: 320,
title: '%%%NODENAME%%%',
tools: [{
id:'gear',
handler: function(){
//Ext.Msg.alert('Message', 'The Settings tool was clicked.');
showSensorToolBox( %%%NODEID%%% );
}
}],
listeners:{
afterrender: function(){
cleanup2DDraw( %%%NODEID%%% );
drawZoomLevels[%%%NODEID%%%]=100;
}
},
items:[{
html: '<center><img id="draw_img_%%%NODEID%%%" src="/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%"><canvas id="targ_canvas_%%%NODEID%%%" style="display: none;" width="200" height="210"></canvas></center>',
height: '260px'
},{
id: 'status_%%%NODEID%%%',
border: true,
frame: true,
height: 36,
html: ''
}],
bbar:[{
xtype: 'button',
text: '12.5%',
enableToggle: true,
id: 'zoom_bt12_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
drawZoomLevels[%%%NODEID%%%]=12;
var img = document.getElementById('draw_img_%%%NODEID%%%');
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=12";
img.onload = function(){
cleanup2DDraw( %%%NODEID%%% );
};
};
}
},{
xtype: 'button',
text: '25%',
enableToggle: true,
id: 'zoom_bt25_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
drawZoomLevels[%%%NODEID%%%]=25;
var img = document.getElementById('draw_img_%%%NODEID%%%');
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=25";
img.onload = function(){
cleanup2DDraw( %%%NODEID%%% );
};
};
}
},{
xtype: 'button',
text: '50%',
enableToggle: true,
id: 'zoom_bt50_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
drawZoomLevels[%%%NODEID%%%]=50;
var img = document.getElementById('draw_img_%%%NODEID%%%');
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=50";
img.onload = function(){
cleanup2DDraw( %%%NODEID%%% );
};
};
}
},{
xtype: 'button',
text: '100%',
pressed: true,
enableToggle: true,
id: 'zoom_bt100_%%%NODEID%%%',
toggleGroup: 'zoom_tg_%%%NODEID%%%',
toggleHandler: function( bt, st ){
if( st ){
drawZoomLevels[%%%NODEID%%%]=100;
var img = document.getElementById('draw_img_%%%NODEID%%%');
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100";
img.onload = function(){
cleanup2DDraw( %%%NODEID%%% );
};
};
}
}]
}

439
lib/controller/settings/node_5.js

@ -0,0 +1,439 @@
{
id: 'db_node_%%%NODEID%%%',
//width: 258,
//height: 336,
title: '%%%NODENAME%%%',
draggable: false,
collapsible: false,
tools: [{
id:'toggle',
handler: function( a, b, p ){
fsDrawID = %%%NODEID%%%;
exitFromFF = function(){
nodeTHREEviewers[%%%NODEID%%%].renderer.setSize( nodeTHREEviewers[%%%NODEID%%%].container.clientWidth, (nodeTHREEviewers[%%%NODEID%%%].container.clientHeight-60) );
exitFromFF = null;
};
fullScreen( 'div_radar_%%%NODEID%%%' );
//var el = document.getElementById('draw_svg_'+fsDrawID );
//var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 );
//el.removeAttribute("width");
//el.setAttribute( "width", nW+'%' );
nodeTHREEviewers[%%%NODEID%%%].renderer.setSize( window.screen.width, window.screen.height );//200 );
}
}],
listeners:{
beforedestroy: function(){
if( typeof nodeTHREEviewers[%%%NODEID%%%] !== 'undefined' ){
//nodeTHREEviewers[%%%NODEID%%%].container
// object.geometry.dispose(); object.material.dispose(); scene.remove( object );
stopAnimation();
nodeTHREEviewers[%%%NODEID%%%].renderer.renderLists.dispose();
delete nodeTHREEviewers[%%%NODEID%%%].renderer;
delete nodeTHREEviewers[%%%NODEID%%%].scene;
delete nodeTHREEviewers[%%%NODEID%%%].mesh;
delete nodeTHREEviewers[%%%NODEID%%%].geometry;
delete nodeTHREEviewers[%%%NODEID%%%].material;
delete nodeTHREEviewers[%%%NODEID%%%].texture;
delete nodeTHREEviewers[%%%NODEID%%%].camera;
delete nodeTHREEviewers[%%%NODEID%%%];
};
return true;
},
afterrender: function( p ){
var W = p.getWidth();
var H = W + 28;
//if( %%%APPTYPE%%% == 2 ){
// H = PanelH - p.ownerCt.getHeight() + 64;
// if( H > ( W * 0.5625 )+ 32 ){
// H = ( W * 0.5625 ) + 32;
// };
//} else {
// H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
//};
//alert( W + ' koko ' + H );
p.setHeight( H );
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H );//- 70 );
//Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H );// - 70 );
var el = document.getElementById( 'div_radar_%%%NODEID%%%' )
//el.removeAttribute("height");
el.removeAttribute("style");
el.setAttribute("style","display: block; padding: 5px; width: \'100%\'; height:"+(H-20)+"px");
//el.setAttribute( "height", H-20 );//'86%' );
//cleanupDraw( %%%NODEID%%% );
//drawZoomLevels[%%%NODEID%%%]=100;
//const panorama = new PANOLENS.ImagePanorama( '/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%' );
//const viewer = new PANOLENS.Viewer({container: 'targ_canvas_%%%NODEID%%%' });
//viewer.add( panorama );
nodeTHREEviewers[%%%NODEID%%%] = {};
nodeTHREEviewers[%%%NODEID%%%].container = document.getElementById( 'div_radar_%%%NODEID%%%' );
nodeTHREEviewers[%%%NODEID%%%].camera = new THREE.PerspectiveCamera( 100, 1, 1, 600 );
nodeTHREEviewers[%%%NODEID%%%].camera.fov = 75;
nodeTHREEviewers[%%%NODEID%%%].scene = new THREE.Scene();
nodeTHREEviewers[%%%NODEID%%%].geometry = new THREE.SphereGeometry( 500, 60, 40 );
// invert the geometry on the x-axis so that all of the faces point inward
nodeTHREEviewers[%%%NODEID%%%].geometry.scale( -1, 1, 1 );
nodeTHREEviewers[%%%NODEID%%%].texture = new THREE.TextureLoader().load( '/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%' );
nodeTHREEviewers[%%%NODEID%%%].material = new THREE.MeshBasicMaterial( { map: nodeTHREEviewers[%%%NODEID%%%].texture } );
nodeTHREEviewers[%%%NODEID%%%].mesh = new THREE.Mesh( nodeTHREEviewers[%%%NODEID%%%].geometry, nodeTHREEviewers[%%%NODEID%%%].material );
nodeTHREEviewers[%%%NODEID%%%].scene.add( nodeTHREEviewers[%%%NODEID%%%].mesh );
nodeTHREEviewers[%%%NODEID%%%].scene.add( l3dMapOverlayMesh );
nodeTHREEviewers[%%%NODEID%%%].renderer = new THREE.WebGLRenderer();
nodeTHREEviewers[%%%NODEID%%%].renderer.setPixelRatio( 1 );
nodeTHREEviewers[%%%NODEID%%%].renderer.setSize( nodeTHREEviewers[%%%NODEID%%%].container.clientWidth, (H-80) );
nodeTHREEviewers[%%%NODEID%%%].container.appendChild( nodeTHREEviewers[%%%NODEID%%%].renderer.domElement );
nodeTHREEviewers[%%%NODEID%%%].container.style.touchAction = 'none';
nodeTHREEviewers[%%%NODEID%%%].container.myVID = %%%NODEID%%%;
nodeTHREEviewers[%%%NODEID%%%].container.addEventListener( 'pointerdown', onPointerDown );
nodeTHREEviewers[%%%NODEID%%%].container.addEventListener( 'wheel', onDocumentMouseWheel );
nodeTHREEviewers[%%%NODEID%%%].targets = new Array();
nodeTHREEviewers[%%%NODEID%%%].targetShowCopunter = 0;
nodeTHREEviewers[%%%NODEID%%%].targetIndex = 0;
//addl3dTarget( %%%NODEID%%%, 200, Math.PI/4, Math.PI/4 );
//addl3dTarget( %%%NODEID%%%, 150, 0, 0 );
//document.addEventListener( 'wheel', onDocumentMouseWheel );
/*
container.addEventListener( 'dragover', function ( event ) {
event.preventDefault();
event.dataTransfer.dropEffect = 'copy';
} );
container.addEventListener('dragenter', function () {
document.body.style.opacity = 0.5;
} );
container.addEventListener('dragleave', function () {
document.body.style.opacity = 1;
} );
container.addEventListener('drop', function ( event ) {
event.preventDefault();
const reader = new FileReader();
reader.addEventListener( 'load', function ( event ) {
material.map.image.src = event.target.result;
material.map.needsUpdate = true;
} );
reader.readAsDataURL( event.dataTransfer.files[ 0 ] );
document.body.style.opacity = 1;
} );
*/
/*
document.addEventListener( 'dragover', function ( event ) {
event.preventDefault();
event.dataTransfer.dropEffect = 'copy';
} );
document.addEventListener( 'dragenter', function () {
document.body.style.opacity = 0.5;
} );
document.addEventListener( 'dragleave', function () {
document.body.style.opacity = 1;
} );
document.addEventListener( 'drop', function ( event ) {
event.preventDefault();
const reader = new FileReader();
reader.addEventListener( 'load', function ( event ) {
material.map.image.src = event.target.result;
material.map.needsUpdate = true;
} );
reader.readAsDataURL( event.dataTransfer.files[ 0 ] );
document.body.style.opacity = 1;
} );
*/
//animateTargets();
animate();
//
//window.addEventListener( 'resize', onWindowResize );
}
},
layout:'border',
items:[{
id: 'cp_radar_%%%NODEID%%%',
region: 'center',
html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"></div>',
width: '56%'
},{
region: 'east',
collapsible: true,
minSize: 75, // defaults to 50
maxSize: 220,
frame: false,
border: false,
collapsed: true,
collapseMode: 'mini',
title: '%%%LABEL%%%TOOLBOX%%%',
floatable: true,
animFloat: false,
autoHide: true,
id: 'toolbox_%%%NODEID%%%',
//unstyled: true,
margins: '5 0 0 5',
//cmargins: '5 0 5 5',
width: 200,
items:[{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_clear_btn_%%%NODEID%%%',
width: '100%',
disabled: true,
text: '%%%LABEL%%%CLEALARM%%%',
iconCls: 'ctrl_panel_clean_sm',
iconAlign: 'left',
handler: function(){
doDeviceOperation( 1, 125,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_draw_btn_%%%NODEID%%%',
width: '100%',
text: '%%%LABEL%%%DRABACKGROUND%%%',
iconCls: 'ctrl_panel_drawscan_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
doDeviceOperation( %%%NODEID%%%, 3,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
id: 'cp_study_btn_%%%NODEID%%%',
width: '100%',
text: '%%%LABEL%%%STUBACKGROUND%%%',
iconCls: 'ctrl_panel_study_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
doDeviceOperation( %%%NODEID%%%, 2,'', true );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
text: '%%%LABEL%%%MASKEDITOR%%%',
id: 'DMED_%%%NODEID%%%',
width: '100%',
disabled: true,
iconCls: 'ctrl_panel_drawscan_sm',
handler: function(){
showMaskEditor( false, 0, %%%NODEID%%% );
}
},{
xtype: 'spacer',
height: 3
},{
xtype: 'panel',
title: '%%%LABEL%%%MASKMNGR%%%',
height: 70,
frame: true,
flex: 1,
layout: 'hbox',
items:[{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'small',
id: 'mz_btn_%%%NODEID%%%_0',
iconCls: 'mask_zone1_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){
doMaskOperation( %%%NODEID%%%, 1, 0 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 0 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',
id: 'mz_btn_%%%NODEID%%%_1',
iconCls: 'mask_zone2_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){
doMaskOperation( %%%NODEID%%%, 1, 1 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 1 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '19%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_2',
iconCls: 'mask_zone3_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){
doMaskOperation( %%%NODEID%%%, 1, 2 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 2 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_3',
iconCls: 'mask_zone4_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){
doMaskOperation( %%%NODEID%%%, 1, 3 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 3 );
};
}
},{
xtype: 'button',
enableToggle: true,
width: '20%',
scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_4',
iconCls: 'mask_zone5_btn',
iconAlign: 'top',
pressed: false,
disabled: true,
handler: function(){
if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){
doMaskOperation( %%%NODEID%%%, 1, 4 );
} else {
doMaskOperation( %%%NODEID%%%, 0, 4 );
};
}
}]
},{
xtype: 'spacer',
height: 3
},{
xtype: 'button',
width: '100%',
enableToggle: true,
id: 'cp_ack_btn_%%%NODEID%%%',
text: '%%%LABEL%%%ACKNOLAGE%%%',
iconCls: 'ctrl_panel_clean_sm',
iconAlign: 'left',
disabled: true,
handler: function(){
if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){
//doMaskOperation( %%%NODEID%%%, 1, 4 );
doAckOperation( %%%NODEID%%%, 1 );
} else {
//doMaskOperation( %%%NODEID%%%, 0, 4 );
doAckOperation( %%%NODEID%%%, 0 );
};
}
}/*,{
xtype: 'panel',
title: 'Detection Sensitivity',
height: 95,
frame: true,
flex: 1,
layout: 'hbox',
items:[{
xtype: 'button',
text: 'Factory',
id: 'DDSPBTN0',
width: 80,
iconCls: 'detection_btn_factory',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'Low',
id: 'DDSPBTN1',
width: 80,
iconCls: 'detection_btn_low',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'Meduim',
id: 'DDSPBTN2',
width: 80,
iconCls: 'detection_btn_medium',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
},{
xtype: 'button',
text: 'High',
id: 'DDSPBTN3',
width: 80,
iconCls: 'detection_btn_high',
enableToggle: true,
toggleGroup: 'det_sens_btn_grp',
disabled: true,
scale: 'large',
iconAlign: 'top'
}]
}*/]
}],
bbar:[{
xtype: 'panel',
id: 'status_%%%NODEID%%%',
border: false,
frame: false,
width: 800,
height: 28,
html: ''
}]
}

16
lib/controller/settings/tpl.js

@ -0,0 +1,16 @@
[{
columnWidth: '320px',
style:'padding:10px 0 10px 10px',
items:[
%%%ITEMS%%%
]
},{
columnWidth: '320px',
style:'padding:10px 0 10px 10px'
},{
columnWidth: '320px',
style:'padding:10px 0 10px 10px'
},{
columnWidth: '320px',
style:'padding:10px 0 10px 10px'
}]

28
lib/controller/updateLocation.php

@ -19,19 +19,26 @@
};
};
if( $TYP != 1 && $TYP != 4 ){
$QS="SELECT `anchor_lat`, `anchor_lon`, `anchor_alt`, `local_binding` FROM `system_props` LIMIT 1";
$QS="SELECT `anchor_lat`, `anchor_lon`, `anchor_alt`, `local_binding`, `oem_logo` FROM `system_props` LIMIT 1";
$R = $DATABASE->Query( $QS );
$SLAT = $R[0]['anchor_lat'];
$SLON = $R[0]['anchor_lon'];
$SALT = $R[0]['anchor_alt'];
$DIFF = intval( $R[0]['local_binding'] );
//check logo
if( $R[0]['oem_logo'] !='3b4ad2078aa0b06e78fa417e2e47bf32' ){
$QS = "UPDATE `system_props` SET `oem_logo`='3b4ad2078aa0b06e78fa417e2e47bf32'";
$DATABASE->Query( $QS );
};
$DIFF = intval( $R[0]['local_binding'] );
if( $DIFF == 0 ){
$A = new gPoint();
$A->setLongLat( $SLON, $SLAT );
$A->convertLLtoTM();
//$A->printLatLong();echo"<br/>";
//$A->printUTM();
$XC = $A->E();
$YC = $A->N();
$ZC = $A->Z();
$ZC = $SALT;//$A->Z(); is a Zone
} else {
$XC = $SLON;
$YC = $SLAT;
@ -62,19 +69,23 @@
if( $DIFF ){
$DX = $LON - $XC;
$DY = $LAT - $YC;
$DZ = 0;//$ALT - $ZC;
$DZ = $ALT - $ZC;
} else {
$CC = new gPoint();
$CC->setLongLat( $LON, $LAT );
$CC->convertLLtoTM();
$DX = $CC->E() - $XC;
$DY = $CC->N() - $YC;
$DZ = 0;//$CC->Z() - $ZC;
$DZ = $ALT - $ZC;
};
$QS="UPDATE `{$TBL}` SET `x`={$DX}, `y`={$DY}, `z`={$DZ} WHERE `id`={$CD['aux_id']}";
break;
case 1://Anchore update
$QS="UPDATE `system_props` SET `anchor_lat`={$LAT}, `anchor_lon`={$LON}, `anchor_alt`={$ALT} ";
if( $LAT < 0 ){
$QS="UPDATE `system_props` SET `anchor_lat`={$LAT}, `anchor_lon`={$LON}, `anchor_alt`={$ALT}, `hemisphere`='S' ";
} else {
$QS="UPDATE `system_props` SET `anchor_lat`={$LAT}, `anchor_lon`={$LON}, `anchor_alt`={$ALT}, `hemisphere`='N' ";
};
break;
case 2://long update
$CC = new gPoint();
@ -82,8 +93,9 @@
$CC->convertLLtoTM();
$XX = $CC->E();
$YY = $CC->N();
$ZZ = $CC->Z();
if( $DIFF ){
echo "{$XC} = {$XX} {$YC} = {$YY} {$ZC}={$ZZ}<br/>";
$ZZ = $ALT;
if( $DIFF == 0 ){
$DX = $XX - $XC;
$DY = $YY - $YC;
$DZ = $ZZ - $ZC;

2
lib/javascript/jsapi_dynamic/mojo_map.js

@ -374,6 +374,7 @@ function initMapMonitoring__00(){
//loadTimeLineGroups( selectedSite );
loadMapZones( 0 );
//getData( 'arch' );
geoMapIsPresent = true;
};
function initMapMonitoring(){
var aK = true;
@ -450,6 +451,7 @@ function initMapMonitoring(){
};
//ToDo: Fix Initial Zoom level -> May be saving into a user profile
loadMapZones( 0 );
geoMapIsPresent = true;
};
function initMapReporting(){

103
lib/javascript/jsapi_dynamic/mojo_settings.js

@ -1635,6 +1635,102 @@ function addDetectedIPCam(){
addDetCamDialog.show();
};
var settingsSelectedDevice = 0;
function fetchDeviceStatus(){
if( tlInterval!= null ){
window.clearTimeout( tlInterval );
tlInterval = null;
};
Ext.Ajax.request({
url: '/lib/controller/getStatus.php',
params: {
SITE: <?=$SiteID;?>,
LNID: lastNotificationID,
SPID: StatusTS,
LSID: log_store_id, //LoadTS,
DEVID: settingsSelectedDevice,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
StatusTS = data.CTS;
if( data.nodes.length > 0 ){
for( i=0; i < data.nodes.length; i++ ){
switch( data.nodes[i].type ){
case 1:
case 2:
case 3:
case 4:{ // 2D
if( data.nodes[i].status ){
if( data.nodes[i].reload_draw ) {
load2DDraw( data.nodes[i].id );
LoadTS = StatusTS;
};
if( data.nodes[i].targets != undefined ){
if( data.nodes[i].targets.length ){
targets_2d[data.nodes[i].id]=[];
for( idx = 0; idx < data.nodes[i].targets.length; idx++)
targets_2d[data.nodes[i].id][idx]={ range: data.nodes[i].targets[idx].digital, az: data.nodes[i].targets[idx].az, color: data.nodes[i].targets[idx].color, stroke: data.nodes[i].targets[idx].stroke };
draw2DTargets( data.nodes[i].id );
} else cleanup2DDraw( data.nodes[i].id );
} else cleanup2DDraw( data.nodes[i].id );
};
if( data.nodes[i].bubbles !== undefined ){
if( data.nodes[i].bubbles.length ){
bubbles_2d[data.nodes[i].id]=[];
for( idx = 0; idx < data.nodes[i].bubbles.length; idx++)
bubbles_2d[data.nodes[i].id][idx]={ range: data.nodes[i].bubbles[idx].digital, az: data.nodes[i].bubbles[idx].az, color: data.nodes[i].bubbles[idx].color, stroke: data.nodes[i].bubbles[idx].stroke };
draw2DBubbles( data.nodes[i].id );
} else cleanup2DBubbles( data.nodes[i].id );
} else cleanup2DBubbles( data.nodes[i].id );
setStatus2D( data.nodes[i].id, data.nodes[i].status, data.nodes[i].masks_exist, data.nodes[i].masks_status );
break;
};
case 5:{ // 3d
if( data.nodes[i].reload_draw ){
reload3dTexture( data.nodes[i].id );
};
if( data.nodes[i].targets != undefined ){
if( data.nodes[i].targets.length ){
draw3DTargets( data.nodes[i].id, data.nodes[i].targets );
animateTargets();
} else {
cleanup3DDraw( data.nodes[i].id );
animate();
};
} else {
cleanup3DDraw( data.nodes[i].id );
animate();
};
setStatus2D( data.nodes[i].id, data.nodes[i].status, data.nodes[i].masks_exist, data.nodes[i].masks_status );
break;
};
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:{// Cameras
var iel = document.getElementById('img-img-'+data.nodes[i].id );
if( iel != null ){
if( data.nodes[i].status == 0 ){
if( iel.src != "/style/assets/no-signal.png" ) iel.src = "/style/assets/no-signal.png";
} else {
if( data.nodes[i].src != iel.src ) iel.src = data.nodes[i].src;
};
};
break;
};
};
};
};
tlInterval = window.setTimeout( fetchDeviceStatus, 333, selectedSite );
},
failure: failureAJAXFunction
});
};
var devUploadTimeout = null;
var devUploadID = -1;
function fetchDeviceUploadStatus(){
@ -3055,7 +3151,9 @@ function initSettingsView(){
allowDepress: false,
toggleGroup: 'sys_settings',
handler: showSettingsSensors
},{
}<?php
if( $AP_DATA['type'] != 0 ){
?>,{
xtype: 'button',
width: '100%',
id:'video_set',
@ -3065,7 +3163,8 @@ function initSettingsView(){
allowDepress: false,
toggleGroup: 'sys_settings',
handler: showSettingsVideo
},{
}
<?php }; ?>,{
xtype: 'button',
width: '100%',
id:'app_set',

2
lib/php/db/MySQL_class.php

@ -8,7 +8,7 @@ class MySQL_DB{
var $CachePath;
var $isConnected=false;
var $isCached=false;
function MySQL_DB( $Host,$Name,$User,$Password){
function __construct( $Host,$Name,$User,$Password){
$this->DBHost=$Host;
$this->DBName=$Name;
$this->DBUser=$User;

2
lib/php/db/MySQLi_class.php

@ -8,7 +8,7 @@ class MySQLi_DB{
var $CachePath;
var $isConnected=false;
var $isCached=false;
function MySQLi_DB( $Host, $Name, $User, $Password, $DBCREATE = false ){
function __construct( $Host, $Name, $User, $Password, $DBCREATE = false ){
$this->DBHost=$Host;
$this->DBName=$Name;
$this->DBUser=$User;

2
lib/php/db/VS_ObjectHelper_class.php

@ -3,7 +3,7 @@ class VS_ObjectHelper{
var $DB_Name;
var $DB_Link;
var $DATABASE;
function VS_ObjectHelper($DB){
function __construct($DB){
$this->DATABASE=$DB;
}
function ListItems($Type, $Parent=0){

2
lib/php/db/VS_Object_class.php

@ -1,6 +1,6 @@
<?php
class VS_Object{
function VS_Object(){
function __construct(){
}
function Create(){

2
lib/php/db/VS_Tree_class.php

@ -14,7 +14,7 @@ class VS_Property{
var $type;
var $value;
var $defaults;
function VS_Property($Name='Uninitialized Property',$Type='',$ID='00',$Value='',$Default=''){
function __construct($Name='Uninitialized Property',$Type='',$ID='00',$Value='',$Default=''){
$this->name=$Name;
$this->id=$ID;
if ($Type!==''){

2
lib/php/db/gz_class.php

@ -4,7 +4,7 @@ class GZ{
var $CachePath;
var $isCached=false;
var $Prefetch;
function GZ($cache_path=''){
function __construct($cache_path=''){
$this->SetCacheDir($cache_path);
if($this->isCached){
$this->URL=$_SERVER['REQUEST_URI'];

2
lib/php/db/language_class.php

@ -1,7 +1,7 @@
<?php
class Language{
var $Labels;
function Language($LangID=1, $_module = '', $DBM = null ){
function __construct($LangID=1, $_module = '', $DBM = null ){
global $DATABASE;
$this->Labels=array();
$QS="SELECT key, label FROM labels" . $_module . " WHERE language_id='{$LangID}'";

2
lib/php/db/language_json_class.php

@ -2,7 +2,7 @@
class Language_json{
var $Labels;
var $FileName;
function Language_json( $FN ){
function __construct( $FN ){
$this->FileName = $FN;
$DOP = file_get_contents( $FN );
$this->Labels = json_decode( $DOP, true );

2
lib/php/db/logio_class.php

@ -30,7 +30,7 @@ define( "LOG_LVL_ALL", 255 );
class Logio{
var $USERID;
var $FLT;
function Logio( $LL = LOG_LVL_ALL ){
function __construct( $LL = LOG_LVL_ALL ){
$this->FLT = $LL;
$this->USERID = 1;
}

2
lib/php/db/user_class.php

@ -3,7 +3,7 @@
class User{
var $Data;
var $Account;
function User(){
function __construct(){
}
function FillInfo($UID){
global $DATABASE;

2
lib/php/utm/gPoint.php

@ -104,7 +104,7 @@ class gPoint
var $secondStdParallel; // For lambert Projection
// constructor
function gPoint($datum='WGS 84') // Default datum is WGS 84
function __construct($datum='WGS 84') // Default datum is WGS 84
{
$this->a = $this->ellipsoid[$datum][0]; // Set datum Equatorial Radius
$this->e2 = $this->ellipsoid[$datum][1]; // Set datum Square of eccentricity

BIN
style/assets/3b4ad2078aa0b06e78fa417e2e47bf32.png

Binary file not shown.

After

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

Loading…
Cancel
Save