Browse Source

Including all libs

master
Evgeny Gagua 4 years ago
parent
commit
f96d2e941c
  1. 44
      lib/ajax_asm.php
  2. 57
      lib/assembler.php
  3. 24
      lib/controller/.htaccess
  4. 36
      lib/controller/addCameraNode.php
  5. 81
      lib/controller/addConnection.php
  6. 46
      lib/controller/addDetectionProfile.php
  7. 172
      lib/controller/addNetworkNode.php
  8. 59
      lib/controller/addServerModule.php
  9. 25
      lib/controller/addWidthTableRow.php
  10. 38
      lib/controller/camMakeMove.php
  11. 22
      lib/controller/camStop.php
  12. 24
      lib/controller/checkDeviceOperation.php
  13. 14
      lib/controller/clearEventCloud.php
  14. 10
      lib/controller/clearServerLog.php
  15. 28
      lib/controller/dash/node_0.js
  16. 96
      lib/controller/dash/node_1.js
  17. 18
      lib/controller/dash/node_10.js
  18. 96
      lib/controller/dash/node_11.js
  19. 18
      lib/controller/dash/node_12.js
  20. 92
      lib/controller/dash/node_13.js
  21. 19
      lib/controller/dash/node_13.js.bk
  22. 88
      lib/controller/dash/node_2.js
  23. 95
      lib/controller/dash/node_3.js
  24. 95
      lib/controller/dash/node_4.js
  25. 164
      lib/controller/dash/node_5.js
  26. 16
      lib/controller/dash/tpl.js
  27. BIN
      lib/controller/data/assets/images/2d_MAP.png
  28. BIN
      lib/controller/data/assets/images/2d_MAP.psd
  29. BIN
      lib/controller/data/assets/images/7shields.png
  30. BIN
      lib/controller/data/assets/images/Untitled-1.psd
  31. BIN
      lib/controller/data/assets/images/empty_3d.png
  32. BIN
      lib/controller/data/assets/images/empty_3d2.png
  33. BIN
      lib/controller/data/assets/images/empty_3d24.png
  34. BIN
      lib/controller/data/assets/images/lfs_draw_empty_100.png
  35. BIN
      lib/controller/data/assets/images/lfs_draw_empty_12.png
  36. BIN
      lib/controller/data/assets/images/lfs_draw_empty_25.png
  37. BIN
      lib/controller/data/assets/images/lfs_draw_empty_50.png
  38. BIN
      lib/controller/data/assets/images/mask_3d.png
  39. BIN
      lib/controller/data/assets/images/mstile-150x150.png
  40. BIN
      lib/controller/data/device_draws/0538abbb6f245daa4357f44d2e55b8bb_100.png
  41. BIN
      lib/controller/data/device_draws/0538abbb6f245daa4357f44d2e55b8bb_map.png
  42. BIN
      lib/controller/data/device_draws/08beb6ff373e967e369f85cb67a24adb.raw
  43. BIN
      lib/controller/data/device_draws/08beb6ff373e967e369f85cb67a24adb_100.png
  44. BIN
      lib/controller/data/device_draws/08beb6ff373e967e369f85cb67a24adb_12.png
  45. BIN
      lib/controller/data/device_draws/08beb6ff373e967e369f85cb67a24adb_25.png
  46. BIN
      lib/controller/data/device_draws/08beb6ff373e967e369f85cb67a24adb_50.png
  47. BIN
      lib/controller/data/device_draws/11422faa09dfb8f63fda24d1152772e7_100.png
  48. BIN
      lib/controller/data/device_draws/11422faa09dfb8f63fda24d1152772e7_map.png
  49. BIN
      lib/controller/data/device_draws/13c6fa9012d8723c3573f936b89c02c0_100.png
  50. BIN
      lib/controller/data/device_draws/13c6fa9012d8723c3573f936b89c02c0_map.png
  51. BIN
      lib/controller/data/device_draws/14c334510ae7655b3c921f2a5b792948_map.png
  52. BIN
      lib/controller/data/device_draws/156a1339b93d716b9a21bfc2afb82909_100.png
  53. BIN
      lib/controller/data/device_draws/156a1339b93d716b9a21bfc2afb82909_map.png
  54. BIN
      lib/controller/data/device_draws/1965aa42e743b528b8c749658e8d8b5a_100.png
  55. BIN
      lib/controller/data/device_draws/1965aa42e743b528b8c749658e8d8b5a_map.png
  56. BIN
      lib/controller/data/device_draws/1a0bf5600d3887efc7ccc9f9c5745b5a_100.png
  57. BIN
      lib/controller/data/device_draws/1a0bf5600d3887efc7ccc9f9c5745b5a_map.png
  58. BIN
      lib/controller/data/device_draws/24992edb3031b47fdf13377a0f1e62df_100.png
  59. BIN
      lib/controller/data/device_draws/24992edb3031b47fdf13377a0f1e62df_map.png
  60. BIN
      lib/controller/data/device_draws/2d3ea29274dffefc7f695a37e7cb7194.raw
  61. BIN
      lib/controller/data/device_draws/2d3ea29274dffefc7f695a37e7cb7194_100.png
  62. BIN
      lib/controller/data/device_draws/2d3ea29274dffefc7f695a37e7cb7194_12.png
  63. BIN
      lib/controller/data/device_draws/2d3ea29274dffefc7f695a37e7cb7194_25.png
  64. BIN
      lib/controller/data/device_draws/2d3ea29274dffefc7f695a37e7cb7194_50.png
  65. BIN
      lib/controller/data/device_draws/349f24c3825b5bc57653a8fe4d3d9a7b_100.png
  66. BIN
      lib/controller/data/device_draws/349f24c3825b5bc57653a8fe4d3d9a7b_map.png
  67. BIN
      lib/controller/data/device_draws/352d5b5952021666f6bc83f6410c2df9_100.png
  68. BIN
      lib/controller/data/device_draws/352d5b5952021666f6bc83f6410c2df9_map.png
  69. BIN
      lib/controller/data/device_draws/41757ecf843f37bc9059e9888ab9ffe0_100.png
  70. BIN
      lib/controller/data/device_draws/41757ecf843f37bc9059e9888ab9ffe0_map.png
  71. BIN
      lib/controller/data/device_draws/43079e64b67be013b35fbafcdb540240_100.png
  72. BIN
      lib/controller/data/device_draws/43079e64b67be013b35fbafcdb540240_map.png
  73. BIN
      lib/controller/data/device_draws/450b6e064d1de21ad65e87a6e021e5ea_100.png
  74. BIN
      lib/controller/data/device_draws/450b6e064d1de21ad65e87a6e021e5ea_map.png
  75. BIN
      lib/controller/data/device_draws/51f7265a0cc9cf16bf44e65ff47e4ff1_100.png
  76. BIN
      lib/controller/data/device_draws/51f7265a0cc9cf16bf44e65ff47e4ff1_map.png
  77. BIN
      lib/controller/data/device_draws/568b4623ab7e5e5711db7cf45e9f60f5_100.png
  78. BIN
      lib/controller/data/device_draws/568b4623ab7e5e5711db7cf45e9f60f5_map.png
  79. BIN
      lib/controller/data/device_draws/57a752073e4e74cbbdd5c81e55d15cd8_100.png
  80. BIN
      lib/controller/data/device_draws/57a752073e4e74cbbdd5c81e55d15cd8_map.png
  81. BIN
      lib/controller/data/device_draws/57ae1221ac5f5524189153caf611aac5_100.png
  82. BIN
      lib/controller/data/device_draws/57ae1221ac5f5524189153caf611aac5_map.png
  83. BIN
      lib/controller/data/device_draws/591fe9bce955ff198ee8652e613b18d8_100.png
  84. BIN
      lib/controller/data/device_draws/591fe9bce955ff198ee8652e613b18d8_map.png
  85. BIN
      lib/controller/data/device_draws/6a294527eeb8fead421c99d0ba2550da_100.png
  86. BIN
      lib/controller/data/device_draws/6a294527eeb8fead421c99d0ba2550da_map.png
  87. BIN
      lib/controller/data/device_draws/740e28f37c4bae206261a8e1d2e2e026_100.png
  88. BIN
      lib/controller/data/device_draws/740e28f37c4bae206261a8e1d2e2e026_map.png
  89. BIN
      lib/controller/data/device_draws/78892d1f2ff4b1ba6d52d882dcb53b63_100.png
  90. BIN
      lib/controller/data/device_draws/78892d1f2ff4b1ba6d52d882dcb53b63_map.png
  91. BIN
      lib/controller/data/device_draws/897dfd0fd2515f3e72da5de4b2c6b78a_100.png
  92. BIN
      lib/controller/data/device_draws/897dfd0fd2515f3e72da5de4b2c6b78a_map.png
  93. BIN
      lib/controller/data/device_draws/9fde77c50c889f311237079f5875a45f_100.png
  94. BIN
      lib/controller/data/device_draws/9fde77c50c889f311237079f5875a45f_map.png
  95. BIN
      lib/controller/data/device_draws/TEST2221_100.png
  96. BIN
      lib/controller/data/device_draws/TEST2221_12.png
  97. BIN
      lib/controller/data/device_draws/TEST2221_25.png
  98. BIN
      lib/controller/data/device_draws/TEST2221_50.png
  99. BIN
      lib/controller/data/device_draws/a44388677e65489ff0e84dc6b6fb8a03_100.png
  100. BIN
      lib/controller/data/device_draws/a44388677e65489ff0e84dc6b6fb8a03_map.png

44
lib/ajax_asm.php

@ -0,0 +1,44 @@
<?php
error_reporting( E_ALL );
require_once('settings.php');
require_once('defines.php');
// SET DATA CONNECTION AND GLOBAL USER VARIABLES
$TT_123 = explode( '.', PHP_VERSION );
if( $TT_123[0] == '4' ){
require_once( 'php/db/MySQL_class.php' );
$DATABASE = new MySQL_DB($DBHost, $DBName, $DBUser, $DBPassword);
} elseif( $TT_123[0] > '4' ){
require_once( 'php/db/MySQLi_class.php' );
$DATABASE = new MySQLi_DB($DBHost, $DBName, $DBUser, $DBPassword);
} else {
exit();
};
//$DATABASE->SetCacheDir( $DBCacheDir );
session_start();
require_once('php/db/logio_class.php');
$LOG = new Logio( LOG_LVL_ALL );
require_once('php/db/user_class.php');
require_once('php/auth/web.php');
require_once('php/db/language_class.php');
require_once('php/sys/r-goose_sys.php');
require_once('php/argus/argus.php');
if( isset($_GET['Lang'])){
$UCL=$_GET['Lang']/1;
if ($UCL) $_SESSION['userlang']=$UCL; else $_SESSION['userlang']=$UserLang;
}
if( isset($_SESSION['userlang']) )$Labels=new Language($_SESSION['userlang']);//, '_php');
else $Labels=new Language( $UserLang );//, '_php');
if( $UserLang == 3 || $UserLang == 255 ){
$RTL_SITE = true;
} else {
$RTL_SITE = false;
};
?>

57
lib/assembler.php

@ -0,0 +1,57 @@
<?php
error_reporting( E_ALL );
require_once('settings.php');
require_once('defines.php');
// SET DATA CONNECTION AND GLOBAL USER VARIABLES
$TT_123 = explode( '.', PHP_VERSION );
if( $TT_123[0] == '4' ){
require_once( 'php/db/MySQL_class.php' );
$DATABASE = new MySQL_DB($DBHost, $DBName, $DBUser, $DBPassword);
} elseif( $TT_123[0] > '4' ){
require_once( 'php/db/MySQLi_class.php' );
$DATABASE = new MySQLi_DB($DBHost, $DBName, $DBUser, $DBPassword);
} else {
exit();
};
$str = @file_get_contents('/proc/uptime');
$num = floatval($str);
$secs = fmod($num, 60); $num = (int)($num / 60);
$mins = $num % 60; $num = (int)($num / 60);
$hours = $num % 24; $num = (int)($num / 24);
$days = $num;
if( !$DATABASE->isConnected && $secs > 120 ) {
header( 'location: /setup/');
exit();
};
//$DATABASE->SetCacheDir( $DBCacheDir );
session_start();
require_once('php/db/logio_class.php');
$LOG = new Logio( LOG_LVL_ALL );
require_once('php/db/user_class.php');
require_once('php/auth/web.php');
require_once('php/db/language_class.php');
//require_once('php/sys/SYSTEM_functions.php');
require_once('php/ui/UI_functions.php');
//require_once('php/web/WEB_functions.php');
if( isset($_GET['Lang'])){
$UCL=$_GET['Lang']/1;
if ($UCL) $_SESSION['userlang']=$UCL; else $_SESSION['userlang']=$UserLang;
}
if( isset($_SESSION['userlang']) )$Labels=new Language( $_SESSION['userlang'] ); // '_php');
else $Labels=new Language( $UserLang );// '_php');
if( $UserLang == 3 || $UserLang == 255 ){
$RTL_SITE = true;
} else {
$RTL_SITE = false;
};
?>

24
lib/controller/.htaccess

@ -0,0 +1,24 @@
#AddType video/mp4 .mp4 .m4v
#AddType video/ogg .ogv
#AddType video/webm .webm
#AddType video/x-flv .flv
#AddType application/x-shockwave-flash .swf
#<FilesMatch "\.(mp4|m4v)$">
# ForceType video/mp4
#</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine on
# /sensors/lidar2d/LRF_2D_001/event
# RewriteRule ^sensor/(.*)/(.*)/$ $1$3?pid=$2 [L]
RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/([^/.]+)?$ soap.php?z=$1&y=$2&x=$3&w=$4 [L]
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^([^/.]+/[^/.]+/[^/.]+).png$ index.php?param=$1 [L]
# RewriteBase /
# RewriteCond %{REQUEST_FILENAME} -f [OR]
# RewriteCond %{HTTP_HOST} ^waxed.com
# RewriteRule (.*) http://www.waxed.com/$1 [R=301,L]
</IfModule>

36
lib/controller/addCameraNode.php

@ -0,0 +1,36 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
if( $CUser->Data['access'] > 5 ){
$Data = array();
if(isset($_POST['SITEID'])) $SiteID = intval($_POST['SITEID']); else $SiteID = 0;
if(isset($_POST['CID'])) $CamID = intval($_POST['CID']); else $CamID = 0;
if(isset($_POST['CTYPE'])) $CCTYPE = intval($_POST['CTYPE']); else $CCTYPE = 0;
if(isset($_POST['STREAM'])) $CSTR = intval($_POST['STREAM']); else $CSTR = 0;
if(isset($_POST['PTZ'])) $PTZ = intval($_POST['PTZ']); else $PTZ = 0;
if(isset($_POST['UART'])) $UART = intval($_POST['UART']); else $UART = 0;
if(isset($_POST['FMIN'])) $FMIN = floatval($_POST['FMIN']); else $FMIN = 0;
if(isset($_POST['FMAX'])) $FMAX = floatval($_POST['FMAX']); else $FMAX = 0;
if(isset($_POST['IMSIZE'])) $IMSIZE = intval($_POST['IMSIZE']); else $IMSIZE = 2;
if(isset($_POST['TILTMODE'])) $TILTMODE = intval($_POST['TILTMODE']); else $TILTMODE = 0;
if(isset($_POST['PANMODE'])) $PANMODE = intval($_POST['PANMODE']); else $PANMODE = 0;
if(isset($_POST['PANANG'])) $PANANG = floatval( $_POST['PANANG']); else $PANANG = 360.0;
if(isset($_POST['TILTANG'])) $TILTANG = floatval( $_POST['TILTANG']); else $TILTANG = 90.0;
if(isset($_POST['PROTOID'])) $PROTOID = intval( $_POST['PROTOID'] ); else $PROTOID = 0;
if(isset($_POST['LAB'])) $CNAME = $DATABASE->escape($_POST['LAB']); else $CNAME = '';
if( $CSTR && $CNAME!='' ){
$RV = false;
switch( $CCTYPE ){
case ARGUS_ANALOG_STATIC_CAMERA: $RV = addAnalogStaticCamera( $SiteID, $CNAME, $CSTR, $IMSIZE, $FMIN ); break;
case ARGUS_ANALOG_PTZ_CAMERA: $RV = addAnalogPtzCamera( $SiteID, $CNAME, $CSTR, $IMSIZE, $FMIN, $FMAX, $PANMODE, $PANANG, $TILTMODE, $TILTANG, $PTZ, $PROTOID, $UART ); break;
case ARGUS_IP_STATIC_CAMERA: $RV = addAnalogStaticCamera( $SiteID, $CNAME, $CamID, $CSTR, $IMSIZE, $FMIN ); break;
case ARGUS_IP_PTZ_CAMERA: $RV = addAnalogPtzCamera( $SiteID, $CNAME, $CamID, $CSTR, $IMSIZE, $FMIN, $FMAX, $PANMODE, $PANANG, $TILTMODE, $TILTANG, $PTZ, $PROTOID ); break;
};
} else {
};
};
} else {
header('location: /');
};
?>

81
lib/controller/addConnection.php

@ -0,0 +1,81 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$SiteID = intval($_POST['NID']);
$SSID = intval($_POST['SOSID']);
$SEID = intval($_POST['SOEID']);
$N1ID = intval($_POST['SNID']);
$N2ID = intval($_POST['ENID']);
$QS = "SELECT * FROM `sockets` WHERE `id`={$SSID}";
$result1 = $DATABASE->Query( $QS, false );
$QS = "SELECT * FROM `sockets` WHERE `id`={$SEID}";
$result2 = $DATABASE->Query( $QS, false );
if( count( $result1 ) && count( $result2 ) ){
$node1 = $result1[0];
$node2 = $result2[0];
$t1 = intval( $node1['type'] ); $m1 = intval( $node1['mode'] ); $n1 = intval( $node1['node_id'] ); $a1 = intval( $node1['aux_id'] ); $d1=intval( $node1['multidrop'] );
$t2 = intval( $node2['type'] ); $m2 = intval( $node2['mode'] ); $n2 = intval( $node2['node_id'] ); $a2 = intval( $node2['aux_id'] ); $d2=intval( $node2['multidrop'] );
if( $t1 && $t2 && $m1 && $m2 ){
if( $m2 == 1 || $m1 == 2 ){
// from 1 to 2
$QS = "INSERT INTO `connections` SET `site_id`={$SiteID}, `from`={$n1}, `from_aux`={$a1}, `to`={$n2}, `to_aux`={$a2}, `type`={$t1}";
$DATABASE->Query( $QS, false );
} else {
// from 2 to 1
$QS = "INSERT INTO `connections` SET `site_id`={$SiteID}, `from`={$n2}, `from_aux`={$a2}, `to`={$n1}, `to_aux`={$a1}, `type`={$t2}";
$DATABASE->Query( $QS, false );
};
// Check for Media Channels
if( $t1==6 || $t1 ==7 || $t1==4 || $t1==9 ){
if( $t1==7 || $t1 == 9 ){
// 1 is Media Server
// $QS="UPDATE media_streams SET binded=1, destination_id={$a1} WHERE id={$a2}";
//$DATABASE->Query( $QS, false );
$QS="INSERT INTO `media_server_streams` SET `site_id`={$SiteID}, `media_server_id`={$a1}, `media_stream_id`={$a2}";
} else {
// 2 is Media Server
//$QS="UPDATE media_streams SET binded=1, destination_id={$a2} WHERE id={$a1}";
//$DATABASE->Query( $QS, false );
$QS="INSERT INTO `media_server_streams` SET `site_id`={$SiteID}, `media_server_id`={$a2}, `media_stream_id`={$a1}";
};
$DATABASE->Query( $QS, false );
};
$QS="SELECT * FROM `nodes` WHERE `id`={$node1['node_id']}";
$RR=$DATABASE->Query( $QS, false );
$Z1=$RR[0];
$QS="SELECT * FROM `nodes` WHERE `id`={$node2['node_id']}";
$RR=$DATABASE->Query( $QS, false );
$Z2=$RR[0];
if( ( $Z1['type']==20 && $Z2['type']< 5 ) || ( $Z1['type'] < 5 && $Z2['type'] == 20 ) ){
// Bind LRF Sensor to Ethernet UART
if( $Z1['type'] == 20 ){
$QS = "UPDATE `lrf_sensors` SET `uart_id`={$a1} WHERE `id`={$a2}";
} else {
$QS = "UPDATE `lrf_sensors` SET `uart_id`={$a2} WHERE `id`={$a1}";
};
$DATABASE->Query( $QS, false );
};
if( $d1==0 ){
$QS="UPDATE `sockets` SET `binded`=1 WHERE id={$SSID}";
$DATABASE->Query( $QS, false );
};
if( $d2==0 ){
$QS="UPDATE `sockets` SET `binded`=1 WHERE id={$SEID}";
$DATABASE->Query( $QS, false );
};
$RetVal['status'] = true;
$RetVal['edge'] = array('from'=>$N1ID, 'to'=>$N2ID, 'color'=>'red' );
} else {
$RetVal['status'] = false;
$RetVal['message']='No Possibillty to Make such Connection!';
};
} else {
$RetVal['status'] = false;
$RetVal['message']='No Possibillty to Make such Connection!';
};
echo json_encode( $RetVal );
} else {
header('location: /');
};
?>

46
lib/controller/addDetectionProfile.php

@ -0,0 +1,46 @@
<?php
require_once('../ajax_asm.php');
$UID = intval($CUser->Data['id'] );
$ACCESS = intval($CUser->Data['access'] );
if( $UID > 1 && $ACCESS > 4 ){
$Z = $_POST['NID'];
if( $Z != '' ){
$TArr = explode( ':', $Z );
$NodeID = intval( $TArr[0] );
$QS = "SELECT * FROM nodes WHERE id={$NodeID}";
$result = $DATABASE->Query( $QS, false );
if( count( $result ) ){
$T = $result[0];
$AID = intval( $T['aux_id'] );
$QS = "SELECT `profile_id` FROM `lrf_detection_profiles` WHERE `aux_id`={$AID} ORDER BY `profile_id`";
$result = $DATABASE->Query( $QS, false );
if( count($result) ) {
$LP = 0;
foreach( $result as $R ){
$LP=intval($R['profile_id']);
};
if( $LP < 3 ){
$LP++;
$QS="INSERT INTO `lrf_detection_profiles` SET `aux_id`={$AID}, `master`=1, `profile_id`={$LP}";
$DATABASE->Query( $QS );
if( $T['type'] == 1 || $T['type'] == 5 ){
$QS="INSERT INTO `lrf_detection_profiles` SET `aux_id`={$AID}, `master`=0, `profile_id`={$LP}";
$DATABASE->Query( $QS );
};
};
} else {
$QS="INSERT INTO `lrf_detection_profiles` SET `aux_id`={$AID}, `master`=1, `profile_id`=0";
$DATABASE->Query( $QS );
if( $T['type'] == 1 || $T['type'] == 5 ){
$QS="INSERT INTO `lrf_detection_profiles` SET `aux_id`={$AID}, `master`=0, `profile_id`=0";
$DATABASE->Query( $QS );
};
};
$QS="INSERT INTO `access_log` SET ts=NOW(), `user_id`={$UID}, `cmd`=12, `dataset`='{}'";
$DATABASE->Query( $QS );
};
exit();
};
};
header('location: /');
?>

172
lib/controller/addNetworkNode.php

@ -0,0 +1,172 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$Data['success'] = false;
if( $CUser->Data['access'] > 5 ){
if( isset($_POST['SITEID']) ) $SiteID = intval($_POST['SITEID']); else $SiteID = 0;
if( isset($_POST['SRVID']) ) $ServerID = intval($_POST['SRVID']); else $ServerID = 0;
if( $ServerID == 0 && isset($_POST['SERVER']) ) $ServerID = intval($_POST['SERVER']);
if( $ServerID == 0 && isset($_POST['UART']) ) $ServerID = getServerIdByUartId( intval($_POST['UART']) );
if( isset($_POST['TYPE']) ) $NodeType = intval($_POST['TYPE']); else $NodeType = 0;
if( $SiteID && $ServerID && $NodeType ){
$ServerNODE = getServerNode( $ServerID );
if( $ServerNODE ){
switch( $NodeType ){
case ARGUS_ALS_SENSOR:
case ARGUS_LFS_SENSOR:
case ARGUS_PLS_200_SENSOR:
case ARGUS_PLS_360_SENSOR:
if(isset($_POST['SNAME'])) $CNAME = $DATABASE->escape($_POST['SNAME']); else $CNAME = '';
if(isset($_POST['RANGE'])) $CRANGE = intval($_POST['RANGE']); else $CRANGE = 0;
if(isset($_POST['UART'])) $CUART = intval($_POST['UART']); else $CUART = 0;
if(isset($_POST['DEVID'])) $DEVID = intval($_POST['DEVID']); else $DEVID = 0;
if( $CNAME != '' && $CRANGE > 0 && $CUART > 0 ){
$Data['success'] = addSerialSensor( $SiteID, $ServerID, $NodeType, $CRANGE, $CNAME, $CUART, $DEVID );
if( !$Data['success'] ){
$Data['msg'] = $Labels->GetLabel('NODE_CREA_ERROR');
};
} else {
$Data['msg'] = $Labels->GetLabel('PARAM_ERROR');
};
break;
case ARGUS_3D_SENSOR://3D
if(isset($_POST['SNAME'])) $CNAME = $DATABASE->escape($_POST['SNAME']); else $CNAME = '';
if(isset($_POST['PORT'])) $CPORT = validatePort($_POST['PORT']); else $CPORT = false;
if(isset($_POST['ADDR'])) $CADDR = validateIP4($_POST['ADDR']); else $CADDR = false;
if(isset($_POST['SERVER'])) $ServerNODE = intval($_POST['SERVER']); else $ServerNODE = 0;
if( $CNAME != '' && $CPORT !== false && $CADDR!==false && $ServerNODE > 0 ){
$Data['success'] = add3DSensor( $SiteID, $ServerID, $CNAME, $CADDR, $CPORT );
if( !$Data['success'] ){
$Data['msg'] = $Labels->GetLabel('NODE_CREA_ERROR');
};
} else {
$Data['msg'] = $Labels->GetLabel('PARAM_ERROR');
};
break;
case ARGUS_ANALOG_STATIC_CAMERA:
if(isset($_POST['STREAM'])) $CSTR = intval($_POST['STREAM']); else $CSTR = 0;
if(isset($_POST['FMIN'])) $FMIN = floatval($_POST['FMIN']); else $FMIN = 0;
if(isset($_POST['IMSIZE'])) $IMSIZE = intval($_POST['IMSIZE']); else $IMSIZE = 2;
if(isset($_POST['LAB'])) $CNAME = $DATABASE->escape($_POST['LAB']); else $CNAME = '';
if( $CSTR && $CNAME!='' ){
$VA = validateCamConnections( $CSTR, 0 );
if( $VA > -1 ){
if( $VA ){
//$SNID = getServerNode( $ServerID );
if( $VA!= $ServerNODE ){
$Data['msg'] = $Labels->GetLabel('ERR_WRONG_SERVER'); break;
break;
};
};
$Data['success'] = addAnalogStaticCamera( $SiteID, $ServerID, $CNAME, $CSTR, $IMSIZE, $FMIN );
if( !$Data['success'] ){
$Data['msg'] = $Labels->GetLabel('NODE_CREA_ERROR');
};
} else {
switch( $VA ){
case -1: $Data['msg'] = $Labels->GetLabel('ERR_DINO_SRC_CTL'); break;
case -2: $Data['msg'] = $Labels->GetLabel('ERR_UART_NOCONNE'); break;
case -3: $Data['msg'] = $Labels->GetLabel('ERR_ERROR_UART'); break;
case -4: $Data['msg'] = $Labels->GetLabel('ERR_NO_ANAL_RES'); break;
case -5: $Data['msg'] = $Labels->GetLabel('ERR_WRONG_STREAM'); break;
};
};
} else {
$Data['msg'] = $Labels->GetLabel('PARAM_ERROR');
};
break;
case ARGUS_ANALOG_PTZ_CAMERA:
if(isset($_POST['STREAM'])) $CSTR = intval($_POST['STREAM']); else $CSTR = 0;
if(isset($_POST['PTZ'])) $PTZ = intval($_POST['PTZ']); else $PTZ = 0;
if(isset($_POST['UART'])) $UART = intval($_POST['UART']); else $UART = 0;
if(isset($_POST['FMIN'])) $FMIN = floatval($_POST['FMIN']); else $FMIN = 0;
if(isset($_POST['FMAX'])) $FMAX = floatval($_POST['FMAX']); else $FMAX = 0;
if(isset($_POST['IMSIZE'])) $IMSIZE = intval($_POST['IMSIZE']); else $IMSIZE = 2;
if(isset($_POST['TILTMODE'])) $TILTMODE = intval($_POST['TILTMODE']); else $TILTMODE = 0;
if(isset($_POST['PANMODE'])) $PANMODE = intval($_POST['PANMODE']); else $PANMODE = 0;
if(isset($_POST['PANANG'])) $PANANG = floatval( $_POST['PANANG']); else $PANANG = 360.0;
if(isset($_POST['TILTANG'])) $TILTANG = floatval( $_POST['TILTANG']); else $TILTANG = 90.0;
if(isset($_POST['PROTOID'])) $PROTOID = intval( $_POST['PROTOID'] ); else $PROTOID = 0;
if(isset($_POST['LAB'])) $CNAME = $DATABASE->escape($_POST['LAB']); else $CNAME = '';
if( $CSTR && $CNAME!='' ){
$Data['success'] = addAnalogPtzCamera( $SiteID, $ServerID, $CNAME, $CSTR, $IMSIZE, $FMIN, $FMAX, $PANMODE, $PANANG, $TILTMODE, $TILTANG, $PTZ, $PROTOID, $UART );
if( !$Data['success'] ){
$Data['msg'] = $Labels->GetLabel('NODE_CREA_ERROR');
};
} else {
$Data['msg'] = $Labels->GetLabel('PARAM_ERROR');
};
break;
case ARGUS_IP_STATIC_CAMERA:
if(isset($_POST['CID'])) $CamID = intval($_POST['CID']); else $CamID = 0;
if(isset($_POST['STREAM'])) $CSTR = intval($_POST['STREAM']); else $CSTR = 0;
if(isset($_POST['LFL'])) $LFL = intval($_POST['LFL']); else $LFL = 0;
if(isset($_POST['IMSIZE'])) $IMSIZE = intval($_POST['IMSIZE']); else $IMSIZE = 2;
if(isset($_POST['LAB'])) $CNAME = $DATABASE->escape($_POST['LAB']); else $CNAME = '';
if( $CSTR && $CNAME!='' ){
$Data['success'] = addIpStaticCamera( $SiteID, $ServerID, $CNAME, $CamID, $CSTR, $IMSIZE, $LFL );
if( !$Data['success'] ){
$Data['msg'] = $Labels->GetLabel('NODE_CREA_ERROR');
};
} else {
$Data['msg'] = $Labels->GetLabel('PARAM_ERROR');
};
break;
case ARGUS_IP_PTZ_CAMERA:
if(isset($_POST['CID'])) $CamID = intval($_POST['CID']); else $CamID = 0;
if(isset($_POST['STREAM'])) $CSTR = intval($_POST['STREAM']); else $CSTR = 0;
if(isset($_POST['PTZ'])) $PTZ = intval($_POST['PTZ']); else $PTZ = 0;
if(isset($_POST['UART'])) $UART = intval($_POST['UART']); else $UART = 0;
if(isset($_POST['LFL'])) $LFL = intval($_POST['LFL']); else $LFL = 0;
if(isset($_POST['ZOOM'])) $ZOOM = intval($_POST['ZOOM']); else $ZOOM = 1;
if(isset($_POST['IMSIZE'])) $IMSIZE = intval($_POST['IMSIZE']); else $IMSIZE = 2;
if(isset($_POST['TILTMODE'])) $TILTMODE = intval($_POST['TILTMODE']); else $TILTMODE = 0;
if(isset($_POST['PANMODE'])) $PANMODE = intval($_POST['PANMODE']); else $PANMODE = 0;
if(isset($_POST['PANANG'])) $PANANG = floatval( $_POST['PANANG']); else $PANANG = 360.0;
if(isset($_POST['TILTANG'])) $TILTANG = floatval( $_POST['TILTANG']); else $TILTANG = 90.0;
if(isset($_POST['PROTOID'])) $PROTOID = intval( $_POST['PROTOID'] ); else $PROTOID = 0;
if(isset($_POST['LAB'])) $CNAME = $DATABASE->escape($_POST['LAB']); else $CNAME = '';
if( $CamID && $CSTR && $CNAME!='' ){
$Data['success'] = addIpPtzCamera( $SiteID, $ServerID, $CNAME, $CamID, $CSTR, $IMSIZE, $LFL, $ZOOM, $PANMODE, $PANANG, $TILTMODE, $TILTANG, $PTZ, $PROTOID, $UART );
if( !$Data['success'] ){
$Data['msg'] = $Labels->GetLabel('NODE_CREA_ERROR');
};
} else {
$Data['msg'] = $Labels->GetLabel('PARAM_ERROR');
};
break;
case ARGUS_IP_UART_GATEWAY://IpUart
if(isset($_POST['UART_NAME'])) $NAME = $DATABASE->escape( $_POST['UART_NAME'] );
if(isset($_POST['UART_SPEED'])) $SPD = intval( $_POST['UART_SPEED'] );
if(isset($_POST['UART_BITS'])) $BITS = intval( $_POST['UART_BITS'] );
if(isset($_POST['UART_STOP'])) $STOP = floatval( $_POST['UART_STOP'] );
if(isset($_POST['UART_PAR'])) $PAR = strtoupper( substr($_POST['UART_PAR'],0,1) );
if(isset($_POST['UART_MODE'])) $MODE = intval( $_POST['UART_MODE'] );
if(isset($_POST['UART_PORT'])) $PORT = intval( $_POST['UART_PORT'] );
if(isset($_POST['UART_IP'])) $IP = $DATABASE->escape( $_POST['UART_IP'] );
if(isset($_POST['UART_MAC'])) $MAC = $DATABASE->escape( $_POST['UART_MAC'] );
if( $PORT && $IP != '' ){
$Data['success'] = addEthernet2Serial( $SiteID, $ServerID, $NAME, $MAC, $IP, $PORT, $MODE, $SPD, $BITS, $STOP, $PAR );
if( !$Data['success'] ){
$Data['msg'] = $Labels->GetLabel('NODE_CREA_ERROR');
};
} else {
$Data['msg'] = $Labels->GetLabel('PARAM_ERROR');
};
break;
};
} else {
$Data['msg'] = $ServerID . $Labels->GetLabel('WRONG_SITE_ID');
};
} else {
$Data['msg'] = $Labels->GetLabel('NO_SITE_RSERV_SELECTED');
};
} else {
$Data['msg'] = $Labels->GetLabel('No Access');
};
echo json_encode( $Data );
} else {
header('location: /');
};
?>

59
lib/controller/addServerModule.php

@ -0,0 +1,59 @@
<?php
require_once('../ajax_asm.php');
$UID = intval($CUser->Data['id'] );
$ACCESS = intval($CUser->Data['access'] );
if( $UID > 1 && $ACCESS > 4 ){
$Data['status'] = 'nok';
$Z = intval( $_POST['SERVID'] );
$T = intval( $_POST['TYPE'] );
if( $Z && $T ){
$QS = "SELECT * FROM `server_module_types` WHERE `id`={$T}";
$ZZ = $DATABASE->Query( $QS );
if( count( $ZZ ) ){
$CTI = $ZZ[0];
$ADE = true;
if( $CTI['allow_multiply'] == 0 ){
$QS = "SELECT * FROM `server_modules` WHERE `server_id`={$Z} AND `type`={$T}";
$SS = $DATABASE->Query( $QS );
if( count( $SS ) ){
$ADE = false;
$Data['msg'] = 'This type of Module can be added only Once!';
};
};
if( $ADE ){
$QS = "INSERT INTO `server_modules` SET `server_id`={$Z}, `type`={$T}, `enabled`=0";
$DATABASE->Query( $QS );
$MID = $DATABASE->getLastInsertID();
$MCID = 0;
switch( $T ){
case 3:{
//Kafka
$QS = "INSERT INTO `modules_kafka` SET `brocker_port`=2929";
$DATABASE->Query( $QS );
$MCID = $DATABASE->getLastInsertID();
break;
};
case 9:{
//EmbedVido
$QS = "INSERT INTO `module_embed_video_settings` SET `web_port`=8972";
$DATABASE->Query( $QS );
$MCID = $DATABASE->getLastInsertID();
break;
};
};
$QS = "UPDATE `server_modules` SET `aux_id`={$MCID} WHERE `id`={$MID}";
$DATABASE->Query( $QS );
$Data['status'] = 'ok';
};
} else {
$Data['msg'] = 'Wrong Module Type is supplied!';
};
} else {
$Data['msg'] = 'No Server ID or Module Type is supplied!';
};
echo json_encode( $Data );
exit();
};
header('location: /');
?>

25
lib/controller/addWidthTableRow.php

@ -0,0 +1,25 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
if( isset( $_POST['NID'] ) ){
$NID = intval( $_POST['NID'] );
$SBM = ( $_POST['SBM'] == 'true' );
$RNG = floatval( $_POST['RNG'] );
$WDZ = floatval( $_POST['WDZ'] ) / 100.0;
if( $NID ){
if( $SBM ){
$QS = "SELECT `max_range` FROM `lrf_sensors` WHERE `id`={$NID}";
$RR = $DATABASE->Query( $QS );
$MR = floatval($RR[0]['max_range']);
$VAL = $RNG / $MR;
if( $VAL > 1.0 ) $VAL = 1.0;
} else {
$VAL = $RNG / 100.0;
if( $VAL > 1.0 ) $VAL = 1.0;
};
$QS = "INSERT INTO `lrf_detection_width_tables` SET `aux_id`={$NID}, `width_k`={$WDZ}, `range_k`={$VAL}";
$DATABASE->Query( $QS );
};
};
};
?>

38
lib/controller/camMakeMove.php

@ -0,0 +1,38 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$CMD = '';
if(isset( $_POST['CMD'] )){
$CMD = $_POST['CMD'];
} else {
$CMD = $_GET['CMD'];
};
$TArr = explode( '_', $CMD );
$CID = intval($TArr[3]);
$CCC = intval($TArr[2]);
if( $CID ){
//$QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$CID}";
//$RR = $DATABASE->Query( $QS );
//$CID = intval( $RR[0]['aux_id'] );
//if( $CID == 0 ) exit();
$ACMD = 0;
switch( $CCC ){
case 10: $ACMD = 0x21; break; //Zoom In
case 11: $ACMD = 0x41; break; //Zoom Out
case 27: $ACMD = 0x03; break; // Right
case 28: $ACMD = 0x13; break; // RD
case 29: $ACMD = 0x11; break; // Down
case 30: $ACMD = 0x15; break; // LD
case 31: $ACMD = 0x05; break; // Left
case 32: $ACMD = 0x0d; break; // LU
case 33: $ACMD = 0x09; break; // Up
case 34: $ACMD = 0x0B; break; // RU
};
echo $CID . " -> " .$ACMD;
if( $ACMD ){
$QS = "INSERT `nodes_qcq` SET `cmd`={$ACMD}, `node_id`={$CID}, `status`=0";
$DATABASE->Query( $QS );
};
};
};
?>

22
lib/controller/camStop.php

@ -0,0 +1,22 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$CMD = '';
if(isset( $_POST['CMD'] )){
$CMD = $_POST['CMD'];
} else {
$CMD = $_GET['CMD'];
};
$TArr = explode( '_', $CMD );
$CID = intval($TArr[3]);
if( $CID ){
//$QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$CID}";
//$RR = $DATABASE->Query( $QS );
//$CID = intval( $RR[0]['aux_id'] );
//if( $CID == 0 ) exit();
$QS = "INSERT `nodes_qcq` SET `cmd`=1, `node_id`={$CID}, `status`=0";
$DATABASE->Query( $QS );
};
};
?>

24
lib/controller/checkDeviceOperation.php

@ -0,0 +1,24 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$Data = array();
$Data['success'] = false;
if( isset( $_POST['OID'] ) ) {
$OpID = intval($_POST['OID']);
} else $OpID = 0;
if( $OpID > 0 ){
$QS = "SELECT `status` FROM `nodes_qcq` WHERE `id`={$OpID}";
$RV = $DATABASE->Query( $QS, false );
if( count( $RV ) ){
$Data['success'] = true;
$Data['code'] = intval( $RV[0]['status'] );
};
} else {
$Data['msg']='Wrong Parameters';
};
echo json_encode( $Data );
exit();
};
header('location: /');
?>

14
lib/controller/clearEventCloud.php

@ -0,0 +1,14 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
if( isset( $_POST['NID'] )){
$NODE = intval( $_POST['NID'] );
$QS = "DELETE FROM `events_cloud` WHERE `node_id`={$NODE}";
} else {
$QS = "DELETE FROM `events_cloud`";
};
$DATABASE->Query( $QS, false );
} else {
header('location: /');
};
?>

10
lib/controller/clearServerLog.php

@ -0,0 +1,10 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 5 ){
if( $FID = fopen("data/server.log", "r")){
fclose($FID);
};
} else {
header('location: /');
};
?>

28
lib/controller/dash/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%%%
}]
}

96
lib/controller/dash/node_1.js

@ -0,0 +1,96 @@
{
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;
//Deffer
}
},
items:[{
html: '<center><img id="draw_img_%%%NODEID%%%" src="/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100"><canvas id="targ_canvas_%%%NODEID%%%" style="display: none;" onclick="DrawClicker( %%%NODEID%%%, event );" 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%%% );
};
};
}
}]
}

18
lib/controller/dash/node_10.js

@ -0,0 +1,18 @@
{
id: 'db_node_%%%NODEID%%%',
xtype: 'portlet',
width: 258,
height: %%%HEIGHT%%%+40,
tools: [{
id:'gear',
handler: function(){
editAnalogStream( %%%STREAMID%%%, 1 );
}
}],
frame: true,
bodyStyle: 'padding: 0px;',
title: '%%%NODENAME%%%',
items:[{
html: '<img data-enlargeable000 ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="%%%WIDTH%%%" height="%%%HEIGHT%%%"/>',
}]
}

96
lib/controller/dash/node_11.js

@ -0,0 +1,96 @@
{
id: 'db_node_%%%NODEID%%%',
//xxtype: 'panel',
xtype: 'portlet',
//columnWidth:.33,
//layout: 'fit',
width: 258,
height: %%%HEIGHT%%%+68,
tools: [{
id:'gear',
handler: function(){
editAnalogStream( %%%STREAMID%%%, 1 );
}
}/*,{
id:'close',
handler: function(e, target, panel){
panel.ownerCt.remove(panel, true);
}
}*/],
frame: true,
bodyStyle: 'padding: 0px;',
plr: null,
title: '%%%NODENAME%%%',
items:[{
html: '<img onmouseover="ptzCtrl(\'img-%%%NODEID%%%\');" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="%%%WIDTH%%%" height="%%%HEIGHT%%%"/>',
},{
xtype: 'spacer',
height: 5
},{
xtype: 'button',
id: 'ptz_btn_%%%NODEID%%%',
width: '100%',
text: 'PTZ Control',
enableToggle: true,
handler: function(){
var t = Ext.getCmp('db_node_%%%NODEID%%%');
if( Ext.getCmp('ptz_btn_%%%NODEID%%%').pressed ){
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 );
} else {
t.setSize( 258, %%%HEIGHT%%%+68 );
//Ext.Msg.alert('Message', 'The 270 tool was clicked.');
};
t.doLayout();
}
},{
xtype: 'spacer',
height: 3
},{
html: '<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>&nbsp;</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>',
height: 90
}],
listeners:{
afterrender: function( t ){
/*
t.plr = videojs.getPlayer('hls-%%%NODEID%%%');
if( t.plr == null ){
t.plr = videojs('hls-%%%NODEID%%%',{
autoplay: 'muted',
controls: true,
controlBar: {
volumePanel: false,
playToggle: false,
pictureInPictureToggle: false
}
});
};
t.plr.src({type: 'application/x-mpegURL', src: '%%%SELURL%%%'});
*/
return true;
},
destroy: function( t ){
if( t.plr != null ) t.plr.dispose();
t.plr = null;
}
}
}

18
lib/controller/dash/node_12.js

@ -0,0 +1,18 @@
{
id: 'db_node_%%%NODEID%%%',
xtype: 'portlet',
width: 258,
height: %%%HEIGHT%%%+40,
tools: [{
id:'gear',
handler: function(){
editAnalogStream( %%%STREAMID%%%, 1 );
}
}],
frame: true,
bodyStyle: 'padding: 0px;',
title: '%%%NODENAME%%%',
items:[{
html: '<img data-enlargeable000 ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="%%%WIDTH%%%" height="%%%HEIGHT%%%"/>',
}]
}

92
lib/controller/dash/node_13.js

@ -0,0 +1,92 @@
{
id: 'db_node_%%%NODEID%%%',
//xxtype: 'panel',
xtype: 'portlet',
//columnWidth:.33,
//layout: 'fit',
width: 258,
height: %%%HEIGHT%%%+68,
tools: [{
id:'gear',
handler: function(){
Ext.Msg.alert('Message', 'The Settings tool was clicked.');
}
}],
frame: true,
bodyStyle: 'padding: 0px;',
plr: null,
title: '%%%NODENAME%%%',
items:[{
html: '<img onmouseover="ptzCtrl(\'img-%%%NODEID%%%\');" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="%%%WIDTH%%%" height="%%%HEIGHT%%%"/>',
},{
xtype: 'spacer',
height: 5
},{
xtype: 'button',
id: 'ptz_btn_%%%NODEID%%%',
width: '100%',
text: 'PTZ Control',
enableToggle: true,
handler: function(){
var t = Ext.getCmp('db_node_%%%NODEID%%%');
if( Ext.getCmp('ptz_btn_%%%NODEID%%%').pressed ){
t.setSize( 258, %%%HEIGHT%%%+162 );
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 );
} else {
t.setSize( 258, %%%HEIGHT%%%+68 );
//Ext.Msg.alert('Message', 'The 270 tool was clicked.');
};
t.doLayout();
}
},{
xtype: 'spacer',
height: 3
},{
html: '<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>&nbsp;</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>',
height: 90
}],
listeners:{
afterrender: function( t ){
/*
t.plr = videojs.getPlayer('hls-%%%NODEID%%%');
if( t.plr == null ){
t.plr = videojs('hls-%%%NODEID%%%',{
autoplay: 'muted',
controls: true,
controlBar: {
volumePanel: false,
playToggle: false,
pictureInPictureToggle: false
}
});
};
t.plr.src({type: 'application/x-mpegURL', src: '%%%SELURL%%%'});
*/
return true;
},
destroy: function( t ){
if( t.plr != null ) t.plr.dispose();
t.plr = null;
}
}
}

19
lib/controller/dash/node_13.js.bk

@ -0,0 +1,19 @@
{
id: 'db_node_%%%NODEID%%%',
xtype: 'panel',
width: 400,
height: 400,
frame: true,
title: 'Camera %%%NODEID%%%',
items:[{
html: '<video id="hls-example" class="video-js vjs-default-skin" width="400" height="300"><source type="application/x-mpegURL" src="http://192.168.0.116:8081/d7d823703f68ba05c04efdb7474c2de5/7/hls.m3u8"></video>',
}],
listeners:{
afterrender: function(){
var player = videojs('hls-example',{
autoplay: 'muted'
});
return true;
},
}
}

88
lib/controller/dash/node_2.js

@ -0,0 +1,88 @@
{
id: 'db_node_%%%NODEID%%%',
width: 258,
height: 320,
title: '%%%NODENAME%%%',
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%%% );
};
};
}
}]
}

95
lib/controller/dash/node_3.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%%%&AUX=100" style="cursor: crosshair;"><canvas id="targ_canvas_%%%NODEID%%%" style="display: none; cursor: crosshair;" onclick="DrawClicker( %%%NODEID%%%, event );" 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%%% );
};
};
}
}]
}

95
lib/controller/dash/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%%% );
};
};
}
}]
}

164
lib/controller/dash/node_5.js

@ -0,0 +1,164 @@
{
id: 'db_node_%%%NODEID%%%',
width: 258,
height: 336,
title: '%%%NODENAME%%%',
tools: [{
id:'gear',
handler: function(){
//Ext.Msg.alert('Message', 'The Settings tool was clicked.');
showSensorToolBox( %%%NODEID%%% );
}
}],
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(){
//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( 'container_%%%NODEID%%%' );
nodeTHREEviewers[%%%NODEID%%%].camera = new THREE.PerspectiveCamera( 75, 1, 1, 1100 );
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, 200 );
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 );
}
},
items:[{
html: '<center><div id="container_%%%NODEID%%%"></div></center>',
height: 210
},{
id: 'status_%%%NODEID%%%',
border: true,
frame: true,
height: 36,
html: ''
},{ xtype: 'spacer', height: 3 },{
id: 'det_status_%%%NODEID%%%',
border: true,
frame: true,
height: 46,
html: '<canvas id="status_canvas_%%%NODEID%%%" style="display: none;" width="240" height="43"></canvas>'
}]
}

16
lib/controller/dash/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'
}]

BIN
lib/controller/data/assets/images/2d_MAP.png

Binary file not shown.

After

Width: 2000  |  Height: 2000  |  Size: 24 KiB

BIN
lib/controller/data/assets/images/2d_MAP.psd

Binary file not shown.

BIN
lib/controller/data/assets/images/7shields.png

Binary file not shown.

After

Width: 271  |  Height: 325  |  Size: 29 KiB

BIN
lib/controller/data/assets/images/Untitled-1.psd

Binary file not shown.

BIN
lib/controller/data/assets/images/empty_3d.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 459 KiB

BIN
lib/controller/data/assets/images/empty_3d2.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 5.9 KiB

BIN
lib/controller/data/assets/images/empty_3d24.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 412 KiB

BIN
lib/controller/data/assets/images/lfs_draw_empty_100.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 12 KiB

BIN
lib/controller/data/assets/images/lfs_draw_empty_12.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 7.8 KiB

BIN
lib/controller/data/assets/images/lfs_draw_empty_25.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 10 KiB

BIN
lib/controller/data/assets/images/lfs_draw_empty_50.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 11 KiB

BIN
lib/controller/data/assets/images/mask_3d.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 6.2 KiB

BIN
lib/controller/data/assets/images/mstile-150x150.png

Binary file not shown.

After

Width: 270  |  Height: 270  |  Size: 9.5 KiB

BIN
lib/controller/data/device_draws/0538abbb6f245daa4357f44d2e55b8bb_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/0538abbb6f245daa4357f44d2e55b8bb_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/08beb6ff373e967e369f85cb67a24adb.raw

Binary file not shown.

BIN
lib/controller/data/device_draws/08beb6ff373e967e369f85cb67a24adb_100.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 4.4 KiB

BIN
lib/controller/data/device_draws/08beb6ff373e967e369f85cb67a24adb_12.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 4.4 KiB

BIN
lib/controller/data/device_draws/08beb6ff373e967e369f85cb67a24adb_25.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 4.4 KiB

BIN
lib/controller/data/device_draws/08beb6ff373e967e369f85cb67a24adb_50.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 4.4 KiB

BIN
lib/controller/data/device_draws/11422faa09dfb8f63fda24d1152772e7_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/11422faa09dfb8f63fda24d1152772e7_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/13c6fa9012d8723c3573f936b89c02c0_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/13c6fa9012d8723c3573f936b89c02c0_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/14c334510ae7655b3c921f2a5b792948_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/156a1339b93d716b9a21bfc2afb82909_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/156a1339b93d716b9a21bfc2afb82909_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/1965aa42e743b528b8c749658e8d8b5a_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/1965aa42e743b528b8c749658e8d8b5a_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/1a0bf5600d3887efc7ccc9f9c5745b5a_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/1a0bf5600d3887efc7ccc9f9c5745b5a_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/24992edb3031b47fdf13377a0f1e62df_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/24992edb3031b47fdf13377a0f1e62df_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/2d3ea29274dffefc7f695a37e7cb7194.raw

Binary file not shown.

BIN
lib/controller/data/device_draws/2d3ea29274dffefc7f695a37e7cb7194_100.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 8.0 KiB

BIN
lib/controller/data/device_draws/2d3ea29274dffefc7f695a37e7cb7194_12.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 5.5 KiB

BIN
lib/controller/data/device_draws/2d3ea29274dffefc7f695a37e7cb7194_25.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 6.4 KiB

BIN
lib/controller/data/device_draws/2d3ea29274dffefc7f695a37e7cb7194_50.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 6.9 KiB

BIN
lib/controller/data/device_draws/349f24c3825b5bc57653a8fe4d3d9a7b_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/349f24c3825b5bc57653a8fe4d3d9a7b_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/352d5b5952021666f6bc83f6410c2df9_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/352d5b5952021666f6bc83f6410c2df9_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/41757ecf843f37bc9059e9888ab9ffe0_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/41757ecf843f37bc9059e9888ab9ffe0_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/43079e64b67be013b35fbafcdb540240_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/43079e64b67be013b35fbafcdb540240_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/450b6e064d1de21ad65e87a6e021e5ea_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/450b6e064d1de21ad65e87a6e021e5ea_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/51f7265a0cc9cf16bf44e65ff47e4ff1_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/51f7265a0cc9cf16bf44e65ff47e4ff1_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/568b4623ab7e5e5711db7cf45e9f60f5_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/568b4623ab7e5e5711db7cf45e9f60f5_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/57a752073e4e74cbbdd5c81e55d15cd8_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/57a752073e4e74cbbdd5c81e55d15cd8_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/57ae1221ac5f5524189153caf611aac5_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/57ae1221ac5f5524189153caf611aac5_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/591fe9bce955ff198ee8652e613b18d8_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/591fe9bce955ff198ee8652e613b18d8_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/6a294527eeb8fead421c99d0ba2550da_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/6a294527eeb8fead421c99d0ba2550da_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/740e28f37c4bae206261a8e1d2e2e026_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/740e28f37c4bae206261a8e1d2e2e026_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/78892d1f2ff4b1ba6d52d882dcb53b63_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/78892d1f2ff4b1ba6d52d882dcb53b63_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/897dfd0fd2515f3e72da5de4b2c6b78a_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/897dfd0fd2515f3e72da5de4b2c6b78a_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/9fde77c50c889f311237079f5875a45f_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/9fde77c50c889f311237079f5875a45f_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

BIN
lib/controller/data/device_draws/TEST2221_100.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 9.6 KiB

BIN
lib/controller/data/device_draws/TEST2221_12.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 8.0 KiB

BIN
lib/controller/data/device_draws/TEST2221_25.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 8.0 KiB

BIN
lib/controller/data/device_draws/TEST2221_50.png

Binary file not shown.

After

Width: 200  |  Height: 200  |  Size: 9.1 KiB

BIN
lib/controller/data/device_draws/a44388677e65489ff0e84dc6b6fb8a03_100.png

Binary file not shown.

After

Width: 1024  |  Height: 512  |  Size: 193 KiB

BIN
lib/controller/data/device_draws/a44388677e65489ff0e84dc6b6fb8a03_map.png

Binary file not shown.

After

Width: 2304  |  Height: 288  |  Size: 34 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save