diff --git a/.gitignore b/.gitignore
index 252cb09..445bb6e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,9 @@
*.mp4
*.ogg
*.webm
-/temp/*
-/storage/*
-/saved_images/*
-/lib/javascript/extjs/*
-/lib/error.log
\ No newline at end of file
+temp/*
+storage/*
+saved_images/*
+lib/javascript/extjs/*
+lib/error.log
+lib/controller/data/*
\ No newline at end of file
diff --git a/index.php b/index.php
index 079bfda..493e01e 100644
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
if( $CUser->Data['id'] > 1 ){
UI_PageHeaderExt(
'rgoose_general.js',
- array('rgoose_timeline.js','rgoose_camera_editor.js','rgoose_mediaserver_module.js','rgoose_sysmap_editor.js','rgoose_location_editor.js','rgoose_dashboard.js','rgoose_main.js')
+ array('rgoose_timeline.js','rgoose_camera_editor.js','rgoose_mediaserver_module.js','rgoose_sysmap_editor.js','rgoose_location_editor.js','rgoose_dashboard.js','rgoose_main.js', 'rgoose_devices_module.js')
);
UI_PageBottomExt();
} else {
diff --git a/lib/controller/dash/node_13.js b/lib/controller/dash/node_13.js
index acfc418..eb72725 100644
--- a/lib/controller/dash/node_13.js
+++ b/lib/controller/dash/node_13.js
@@ -64,6 +64,18 @@
xtype: 'button',
text: 'PTZ Control',
width: 244,
+ listeners:{
+ mouseover: function( btn, e ){
+ if( e.buttons ){
+ alert("KOKO");
+ };
+ return false;
+ },
+ click: function( btn, e ){
+ alert("clc");
+ return true;
+ }
+ },
handler: function(){
alert("ptz ");
}
diff --git a/lib/controller/dash/node_3.js b/lib/controller/dash/node_3.js
new file mode 100644
index 0000000..4bbe47c
--- /dev/null
+++ b/lib/controller/dash/node_3.js
@@ -0,0 +1,88 @@
+{
+ id: 'db_node_%%%NODEID%%%',
+ width: 258,
+ height: 320,
+ title: '%%%NODENAME%%%',
+ listeners:{
+ afterrender: function(){
+ cleanupDraw( %%%NODEID%%% );
+ drawZoomLevels[%%%NODEID%%%]=100;
+ }
+ },
+ items:[{
+ html: '
',
+ 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(){
+ cleanupDraw( %%%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(){
+ cleanupDraw( %%%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(){
+ cleanupDraw( %%%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(){
+ cleanupDraw( %%%NODEID%%% );
+ };
+ };
+ }
+ }]
+}
\ No newline at end of file
diff --git a/lib/controller/getDashBoardItems.php b/lib/controller/getDashBoardItems.php
index 473f0ba..7533e99 100644
--- a/lib/controller/getDashBoardItems.php
+++ b/lib/controller/getDashBoardItems.php
@@ -34,10 +34,14 @@
if(!file_exists( $TFN )) continue;
$TPL[$index] = file_get_contents( $TFN );
$TPL[$index] = str_replace('%%%NODEID%%%', ''.$R['id'] , $TPL[$index] );
+ $TPL[$index] = str_replace('%%%NODENAME%%%', ''.$R['name'] , $TPL[$index] );
switch( $R['type'] ){
case ARGUS_SERVER:{
break;
};
+ case ARGUS_2D_SENSOR:{
+ break;
+ };
case ARGUS_3D_SENSOR:{
break;
};
diff --git a/lib/controller/getDashBoardStatus.php b/lib/controller/getDashBoardStatus.php
new file mode 100644
index 0000000..532ac45
--- /dev/null
+++ b/lib/controller/getDashBoardStatus.php
@@ -0,0 +1,55 @@
+Data['id'] > 1 ){
+ $SiteID = intval( $_POST['SITE'] );
+ $UID = intval( $CUser->Data['id'] );
+ $Data = array();
+ $Data['nodes'] = array();
+ $QS = "SELECT * FROM nodes WHERE site_id = {$SiteID}";
+ $result = $DATABASE->Query( $QS, false );
+ if( count( $result ) > 0 ){
+ foreach( $result as $R ){
+ $CN = array();
+ $CN['id'] = $R['id'];
+ $CN['status'] = intval($R['online']);
+ switch( $R['type'] ){
+ case ARGUS_SERVER:{
+ break;
+ };
+ case 3:
+ case ARGUS_2D_SENSOR:{
+ if( $CN['status'] ){
+ // check Targets
+ $CN['targets'] = array();
+ $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 = $DATABASE->Query( $QS );
+ if( count( $zult ) ){
+ $CN['status'] = 2; // Alarmed
+ $CT = array();
+ foreach( $zult as $Z ){
+ $CT['digital'] = $Z['range_digital'];
+ $CT['az'] = $Z['azimuth'];
+ $CN['targets'][] = $CT;
+ };
+ };
+ };
+ break;
+ };
+ case ARGUS_3D_SENSOR:{
+ break;
+ };
+ case ARGUS_IP_PTZ_CAMERA:{
+ break;
+ };
+ };
+ $index++;
+ $Data['nodes'][] = $CN;
+ };
+ };
+ echo json_encode( $Data );
+ } else {
+ echo '[]';
+ };
+?>
\ No newline at end of file
diff --git a/lib/controller/getDeviceDraw.php b/lib/controller/getDeviceDraw.php
index 2abf1d5..33c9948 100644
--- a/lib/controller/getDeviceDraw.php
+++ b/lib/controller/getDeviceDraw.php
@@ -4,22 +4,214 @@
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
- if(isset( $_POST['PID'] )){
- $PID = intval($_POST['PID']);
+ header("Content-Type: image/png");
+ if(isset( $_POST['NID'] )){
+ $NID = intval($_POST['NID']);
} else {
- $PID = intval($_GET['PID']);
+ $NID = intval($_GET['NID']);
};
if(isset( $_POST['AUX'] )){
$AUX = intval($_POST['AUX']);
} else {
$AUX = intval($_GET['AUX']);
};
- $QS = "SELECT * FROM pictures WHERE id={$PID}";
+ $QS = "SELECT * FROM lrf_draw WHERE node_id={$NID} ORDER BY ts DESC LIMIT 1";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
- loadPicture( $Result[0] );
+ if( $Result[0]['rendered'] == 'Y' ){
+ if( $AUX ){
+ $FN = "data/{$Result[0]['md5']}_{$AUX}.png";
+ } else {
+ $FN = "data/{$Result[0]['md5']}_100.png";
+ };
+ } else {
+ $FF = "data/{$Result[0]['md5']}.raw";
+ $FN = "ddd";
+ if( file_exists( $FF ) ) {
+ $FD = fopen( $FF, "rb" );
+ if( $FD ){
+ $CL = fread( $FD, 4 );
+ $size = unpack( "V", $CL );
+ $pts = array();
+ $as = $size[1];
+ for($i=0; $i< $as; $i++ ){
+ $CL = fread( $FD, 4 );
+ $T = unpack( "V", $CL );
+ //print_r( $T );
+ $pts[] = $T[1] >> 16;
+ };
+ fclose( $FD );
+ $QS = "SELECT ls.base_shift, ls.max_range FROM nodes ns LEFT JOIN lrf_sensors ls ON ( ls.id=ns.aux_id ) WHERE ns.id={$NID}";
+ $PP = $DATABASE->Query( $QS );
+ $stp = 2.0 * ( M_PI / $as );
+ $MR = intval( $PP[0]['max_range'] );
+ $S = ( M_PI / 3000.0 ) * intval( $PP[0]['base_shift'] );
+
+ $IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_100.png");
+ imagesavealpha( $IM, true );
+ $bg = imagecolorallocate($IM, 0, 0, 0);
+ $black = imagecolorallocate($IM, 255, 255, 0);
+ //$green = imagecolorallocate($IM, 0, 255, 0);
+ $green = imagecolorallocatealpha( $IM, 0, 255, 0, 64 );
+ imagefilledrectangle( $IM, 5, 5, 36, 18, $bg );
+ imagestring( $IM, 2, 6, 5, $MR . "m.", $black );
+ $maxR = 98.0;
+ $rst = $maxR / 1025.0;
+ $x0 = 100;
+ $y0 = 100;
+ $ppA = array();
+ $ppB = array();
+ for( $i=0; $i< $as; $i++ ){
+ if( $pts[$i] > 0 ){
+ $cr = ($rst * $pts[$i]);
+ $ca = 0.0 - ( $S + $i * $stp );
+ $ppA[] = $x0 + $cr * cos( $ca );
+ $ppA[] = $y0 + $cr * sin( $ca );
+ $ppB[] = $x0 + $maxR * cos( $ca );
+ $ppB[] = $y0 + $maxR * sin( $ca );
+ } else {
+ $ca = 0.0 - ( $S + $i * $stp );
+ $ppA[] = $x0 + $maxR * cos( $ca );
+ $ppA[] = $y0 + $maxR * sin( $ca );
+ $ppB[] = $x0 + $maxR * cos( $ca );
+ $ppB[] = $y0 + $maxR * sin( $ca );
+ };
+ };
+ $ppB[] = $ppA[count($ppA)-2];
+ $ppB[] = $ppA[count($ppA)-1];
+ $popo = array_merge( $ppA, $ppB );
+ imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green );
+ imagepng( $IM, "data/{$Result[0]['md5']}_100.png" );
+ imagedestroy( $IM );
+
+ $IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_50.png");
+ imagesavealpha( $IM, true );
+ $bg = imagecolorallocate($IM, 0, 0, 0);
+ $black = imagecolorallocate($IM, 255, 255, 0);
+ //$green = imagecolorallocate($IM, 0, 255, 0);
+ $green = imagecolorallocatealpha( $IM, 0, 255, 0, 64 );
+ imagefilledrectangle( $IM, 5, 5, 36, 18, $bg );
+ imagestring( $IM, 2, 6, 5, ( $MR / 2 ) . "m.", $black );
+ $rst = $maxR / 513.0;
+ $ppA = array();
+ $ppB = array();
+ for( $i=0; $i< $as; $i++ ){
+ if( $pts[$i] > 0 && $pts[$i] < 513 ){
+ $cr = ($rst * $pts[$i]);
+ $ca = 0.0 - ( $S + $i * $stp );
+ $ppA[] = $x0 + $cr * cos( $ca );
+ $ppA[] = $y0 + $cr * sin( $ca );
+ $ppB[] = $x0 + $maxR * cos( $ca );
+ $ppB[] = $y0 + $maxR * sin( $ca );
+ } else {
+ $ca = 0.0 - ( $S + $i * $stp );
+ $ppA[] = $x0 + $maxR * cos( $ca );
+ $ppA[] = $y0 + $maxR * sin( $ca );
+ $ppB[] = $x0 + $maxR * cos( $ca );
+ $ppB[] = $y0 + $maxR * sin( $ca );
+ };
+ };
+ $ppB[] = $ppA[count($ppA)-2];
+ $ppB[] = $ppA[count($ppA)-1];
+ $popo = array_merge( $ppA, $ppB );
+ imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green );
+ imagepng( $IM, "data/{$Result[0]['md5']}_50.png" );
+ imagedestroy( $IM );
+
+ $IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_25.png");
+ imagesavealpha( $IM, true );
+ $bg = imagecolorallocate($IM, 0, 0, 0);
+ $black = imagecolorallocate($IM, 255, 255, 0);
+ //$green = imagecolorallocate($IM, 0, 255, 0);
+ $green = imagecolorallocatealpha( $IM, 0, 255, 0, 64 );
+ imagefilledrectangle( $IM, 5, 5, 36, 18, $bg );
+ imagestring( $IM, 2, 6, 5, ( $MR / 4 ) . "m.", $black );
+ $rst = $maxR / 257.0;
+ $ppA = array();
+ $ppB = array();
+ for( $i=0; $i< $as; $i++ ){
+ if( $pts[$i] > 0 && $pts[$i] < 256 ){
+ $cr = ($rst * $pts[$i]);
+ $ca = 0.0 - ( $S + $i * $stp );
+ $ppA[] = $x0 + $cr * cos( $ca );
+ $ppA[] = $y0 + $cr * sin( $ca );
+ $ppB[] = $x0 + $maxR * cos( $ca );
+ $ppB[] = $y0 + $maxR * sin( $ca );
+ } else {
+ $ca = 0.0 - ( $S + $i * $stp );
+ $ppA[] = $x0 + $maxR * cos( $ca );
+ $ppA[] = $y0 + $maxR * sin( $ca );
+ $ppB[] = $x0 + $maxR * cos( $ca );
+ $ppB[] = $y0 + $maxR * sin( $ca );
+ };
+ };
+ $ppB[] = $ppA[count($ppA)-2];
+ $ppB[] = $ppA[count($ppA)-1];
+ $popo = array_merge( $ppA, $ppB );
+ imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green );
+ imagepng( $IM, "data/{$Result[0]['md5']}_25.png" );
+ imagedestroy( $IM );
+
+ $IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_12.png");
+ imagesavealpha( $IM, true );
+ $bg = imagecolorallocate($IM, 0, 0, 0);
+ $black = imagecolorallocate($IM, 255, 255, 0);
+ //$green = imagecolorallocate($IM, 0, 255, 0);
+ $green = imagecolorallocatealpha( $IM, 0, 255, 0, 64 );
+ imagefilledrectangle( $IM, 5, 5, 36, 18, $bg );
+ imagestring( $IM, 2, 6, 5, ( $MR / 8 ) . "m.", $black );
+ $rst = $maxR / 129.0;
+ $ppA = array();
+ $ppB = array();
+ for( $i=0; $i< $as; $i++ ){
+ if( $pts[$i] > 0 && $pts[$i] < 128 ){
+ $cr = ($rst * $pts[$i]);
+ $ca = 0.0 - ( $S + $i * $stp );
+ $ppA[] = $x0 + $cr * cos( $ca );
+ $ppA[] = $y0 + $cr * sin( $ca );
+ $ppB[] = $x0 + $maxR * cos( $ca );
+ $ppB[] = $y0 + $maxR * sin( $ca );
+ } else {
+ $ca = 0.0 - ( $S + $i * $stp );
+ $ppA[] = $x0 + $maxR * cos( $ca );
+ $ppA[] = $y0 + $maxR * sin( $ca );
+ $ppB[] = $x0 + $maxR * cos( $ca );
+ $ppB[] = $y0 + $maxR * sin( $ca );
+ };
+ };
+ $ppB[] = $ppA[count($ppA)-2];
+ $ppB[] = $ppA[count($ppA)-1];
+ $popo = array_merge( $ppA, $ppB );
+ imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green );
+ imagepng( $IM, "data/{$Result[0]['md5']}_12.png" );
+ imagedestroy( $IM );
+ $QS = "UPDATE lrf_draw SET rendered='Y' WHERE id={$Result[0]['id']}";
+ $DATABASE->Query( $QS );
+ if( $AUX ){
+ $FN = "data/{$Result[0]['md5']}_{$AUX}.png";
+ } else {
+ $FN = "data/{$Result[0]['md5']}_100.png";
+ };
+ };
+ } else {
+ echo "No Res"; exit();
+ if( $AUX ){
+ $FN = "../../style/assets/lfs_draw_empty_{$AUX}.png";
+ } else {
+ $FN = "../../style/assets/lfs_draw_empty_100.png";
+ };
+ };
+ };
+ if( !file_exists( $FN ) ) $FN = "../../style/assets/lfs_draw_empty_100.png";
+ readfile( $FN );
} else {
- loadNotPicture();
+ if( $AUX ){
+ $FN = "../../style/assets/lfs_draw_empty_{$AUX}.png";
+ } else {
+ $FN = "../../style/assets/lfs_draw_empty_100.png";
+ };
+ if( !file_exists( $FN ) ) $FN = "../../style/assets/lfs_draw_empty_100.png";
+ readfile( $FN );
};
} else {
header('location: /');
diff --git a/lib/controller/getLocationNodes.php b/lib/controller/getLocationNodes.php
new file mode 100644
index 0000000..eb80773
--- /dev/null
+++ b/lib/controller/getLocationNodes.php
@@ -0,0 +1,19 @@
+Data['id'] > 1 ){
+ $GID = intval($_POST['SITE']);
+ $QS = "SELECT * FROM nodes WHERE site_id={$GID}";
+ $Result = $DATABASE->Query( $QS, false );
+ $Data = "{ xtype: 'panel', frame: false, bodyStyle:'padding:5px 5px 0', items: [";
+ foreach( $Result as $CD ){
+ $cid = intval($CD['id']);
+ $ct = intval($CD['type']);
+ if( in_array( $ct, array( 2, 3, 5, 13 ) ) ){
+ $Data .= "{ xtype: 'button', text: '{$CD['name']}', width: '100%', handler: function(){ loadNodeLocationProps({$cid}); } },";
+ };
+ };
+ echo $Data . "{}] }";
+ } else {
+ echo "{}";
+ };
+?>
\ No newline at end of file
diff --git a/lib/controller/getNetworkNodeProps.php b/lib/controller/getNetworkNodeProps.php
index e0654a8..678391c 100644
--- a/lib/controller/getNetworkNodeProps.php
+++ b/lib/controller/getNetworkNodeProps.php
@@ -23,6 +23,14 @@
$Data = str_replace('%%%DEVICE_ID%%%', $CC['device_id'] , $Data );
$Data = str_replace('%%%NODENAME%%%', $Props['name'] , $Data );
$Data = str_replace('%%%MAX_RANGE%%%', $CC['max_range'] , $Data );
+ $Data = str_replace('%%%M_ORDER%%%', $CC['m_order'] , $Data );
+ $Data = str_replace('%%%M_OFFSET%%%', $CC['m_offset'] , $Data );
+ $Data = str_replace('%%%M_WIDTH%%%', $CC['m_width'] , $Data );
+ $Data = str_replace('%%%M_SST%%%', $CC['m_sst'] , $Data );
+ $Data = str_replace('%%%S_ORDER%%%', $CC['s_order'] , $Data );
+ $Data = str_replace('%%%S_OFFSET%%%', $CC['s_offset'] , $Data );
+ $Data = str_replace('%%%S_WIDTH%%%', $CC['s_width'] , $Data );
+ $Data = str_replace('%%%S_SST%%%', $CC['s_sst'] , $Data );
break;
};
case ARGUS_3D_SENSOR:{
@@ -35,6 +43,14 @@
$Data = str_replace('%%%NODENAME%%%', $Props['name'] , $Data );
$Data = str_replace('%%%IP_ADDRESS%%%', $CC['ip_address'] , $Data );
$Data = str_replace('%%%IP_PORT%%%', $CC['port'] , $Data );
+ $Data = str_replace('%%%M_ORDER%%%', $CC['m_order'] , $Data );
+ $Data = str_replace('%%%M_OFFSET%%%', $CC['m_offset'] , $Data );
+ $Data = str_replace('%%%M_WIDTH%%%', $CC['m_width'] , $Data );
+ $Data = str_replace('%%%M_SST%%%', $CC['m_sst'] , $Data );
+ $Data = str_replace('%%%S_ORDER%%%', $CC['s_order'] , $Data );
+ $Data = str_replace('%%%S_OFFSET%%%', $CC['s_offset'] , $Data );
+ $Data = str_replace('%%%S_WIDTH%%%', $CC['s_width'] , $Data );
+ $Data = str_replace('%%%S_SST%%%', $CC['s_sst'] , $Data );
break;
};
case 13:{
diff --git a/lib/controller/getNetworkServerProps.php b/lib/controller/getNetworkServerProps.php
index b2824e8..e70b436 100644
--- a/lib/controller/getNetworkServerProps.php
+++ b/lib/controller/getNetworkServerProps.php
@@ -53,8 +53,50 @@
};
$Data = str_replace('%%%SOCKETS%%%', $SocketsData, $Data );
//Get Modules
- $ModulesData = '{}';
- $Data = str_replace('%%%MODULES%%%', $ModulesData, $Data );
+ $QS = "SELECT * FROM `server_modules` WHERE `server_id`={$Props['aux_id']}";
+ $MDAT = $DATABASE->Query( $QS );
+ if(count($MDAT)){
+ $MODITEMS = array();
+ foreach( $MDAT as $M ){
+ switch( $M['type'] ){
+ case 1:{
+ //ZLMedia
+ $MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Media Server\'}';
+ break;
+ };
+ case 2:{
+ //DCB_USB
+ $MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Dry Contacts\'}';
+ break;
+ };
+ case 3:{
+ //Kafka
+ $MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Kafka Proxy\'}';
+ break;
+ };
+ case 4:{
+ //GPS
+ $MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'GPS Anchor\'}';
+ break;
+ };
+ case 5:{
+ //Netvork
+ $MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Network Proxy\'}';
+ break;
+ };
+ case 6:{
+ //FlyHunter
+ $MODITEMS[] = '{ xtype:\'button\', width: \'100%\', text:\'Fly Hunter\', handler: function(){ module_prop_FlyHunter('.$M['id'].'); } }';
+ break;
+ };
+ };
+ };
+ $IMPL = implode( ',', $MODITEMS );
+ $ModulesData = "{ items: [{$IMPL}]}";
+ $Data = str_replace('%%%MODULES%%%', $ModulesData, $Data );
+ } else {
+ $Data = str_replace('%%%MODULES%%%', '', $Data );
+ };
echo $Data;
} else {
echo '{ html: \'Node '.$_POST['NODE'].' Loadded\'}';
diff --git a/lib/controller/props/1_node_prop.js b/lib/controller/props/1_node_prop.js
index 8baf48b..257191b 100644
--- a/lib/controller/props/1_node_prop.js
+++ b/lib/controller/props/1_node_prop.js
@@ -1,4 +1,5 @@
{
+ //ALS-LGS sensor
xtype: 'form',
labelWidth: 40, // label settings here cascade unless overridden
frame: false,
diff --git a/lib/controller/props/2_node_prop.js b/lib/controller/props/2_node_prop.js
index 238ccad..7ec0e41 100644
--- a/lib/controller/props/2_node_prop.js
+++ b/lib/controller/props/2_node_prop.js
@@ -45,6 +45,7 @@
text: 'Change Settings',
width: '100%',
handler: function(){
+ return LRF1D2_settings();
var wAddSocket = new Ext.Window({
title: 'Sensor Settings',
width: 450,
@@ -105,7 +106,7 @@
}
},{
xtype:'fieldset',
- title: 'Master LRF',
+ title: 'LRF Settings',
collapsible: true,
autoHeight: true,
defaults: {
@@ -124,26 +125,5 @@
xtype: 'panel',
html: 'SST: %%%M_SST%%%
'
}]
- },{
- xtype:'fieldset',
- title: 'Slave LRF',
- collapsible: true,
- autoHeight: true,
- defaults: {
- //width: 168
- },
- items :[{
- xtype: 'panel',
- html: 'Order: %%%S_ORDER%%%
'
- },{
- xtype: 'panel',
- html: 'Offset: %%%S_OFFSET%%%
'
- },{
- xtype: 'panel',
- html: 'Width: %%%S_WIDTH%%%
'
- },{
- xtype: 'panel',
- html: 'SST: %%%S_SST%%%
'
- }]
}]
}
\ No newline at end of file
diff --git a/lib/controller/props/3_node_prop.js b/lib/controller/props/3_node_prop.js
index 416a53f..ac2d073 100644
--- a/lib/controller/props/3_node_prop.js
+++ b/lib/controller/props/3_node_prop.js
@@ -45,6 +45,7 @@
text: 'Change Settings',
width: '100%',
handler: function(){
+ return LRF1D2_settings();
var wAddSocket = new Ext.Window({
title: 'Sensor Settings',
width: 450,
@@ -105,7 +106,7 @@
}
},{
xtype:'fieldset',
- title: 'Master LRF',
+ title: 'LRF Settings',
collapsible: true,
autoHeight: true,
defaults: {
@@ -124,26 +125,5 @@
xtype: 'panel',
html: 'SST: %%%M_SST%%%
'
}]
- },{
- xtype:'fieldset',
- title: 'Slave LRF',
- collapsible: true,
- autoHeight: true,
- defaults: {
- //width: 168
- },
- items :[{
- xtype: 'panel',
- html: 'Order: %%%S_ORDER%%%
'
- },{
- xtype: 'panel',
- html: 'Offset: %%%S_OFFSET%%%
'
- },{
- xtype: 'panel',
- html: 'Width: %%%S_WIDTH%%%
'
- },{
- xtype: 'panel',
- html: 'SST: %%%S_SST%%%
'
- }]
}]
}
\ No newline at end of file
diff --git a/lib/controller/props/4_node_prop.js b/lib/controller/props/4_node_prop.js
index 55dcc5e..864d490 100644
--- a/lib/controller/props/4_node_prop.js
+++ b/lib/controller/props/4_node_prop.js
@@ -105,7 +105,7 @@
}
},{
xtype:'fieldset',
- title: 'Master LRF',
+ title: 'LRF Settings',
collapsible: true,
autoHeight: true,
defaults: {
@@ -124,26 +124,5 @@
xtype: 'panel',
html: 'SST: %%%M_SST%%%
'
}]
- },{
- xtype:'fieldset',
- title: 'Slave LRF',
- collapsible: true,
- autoHeight: true,
- defaults: {
- //width: 168
- },
- items :[{
- xtype: 'panel',
- html: 'Order: %%%S_ORDER%%%
'
- },{
- xtype: 'panel',
- html: 'Offset: %%%S_OFFSET%%%
'
- },{
- xtype: 'panel',
- html: 'Width: %%%S_WIDTH%%%
'
- },{
- xtype: 'panel',
- html: 'SST: %%%S_SST%%%
'
- }]
}]
}
\ No newline at end of file
diff --git a/lib/controller/props/loc_prop.js b/lib/controller/props/loc_prop.js
index 8f66c6b..b7dab50 100644
--- a/lib/controller/props/loc_prop.js
+++ b/lib/controller/props/loc_prop.js
@@ -37,6 +37,11 @@
value: %%%ALT%%%,
name: 'salt',
allowBlank:false
+ },{
+ xtype: 'button',
+ text: 'Set To Anchor Position',
+ width: '100%',
+ handler: setNodeLocationToAnchor
}]
},{
xtype:'fieldset',
diff --git a/lib/javascript/jsapi_dynamic/rgoose_dashboard.js b/lib/javascript/jsapi_dynamic/rgoose_dashboard.js
index cb13d80..c0a87a7 100644
--- a/lib/javascript/jsapi_dynamic/rgoose_dashboard.js
+++ b/lib/javascript/jsapi_dynamic/rgoose_dashboard.js
@@ -28,6 +28,121 @@ function updateDashBoardItemLayout( id, x, y ){
});
};
+var drawZoomLevels = Array();
+
+function cleanupDraw( a ){
+ var canvas = document.getElementById('targ_canvas_'+a );
+ var ctx = canvas.getContext('2d');
+ var img = document.getElementById('draw_img_'+a );
+ ctx.drawImage( img, 0, 0 );
+ canvas.style='display: block;';
+ img.style='display: none;';
+};
+
+function DrawTargets( a, b ){
+ var canvas = document.getElementById('targ_canvas_'+a );
+ var ctx = canvas.getContext('2d');
+ var img = document.getElementById('draw_img_'+a );
+ ctx.drawImage( img, 0, 0 );
+ canvas.style='display: block;';
+ img.style='display: none;';
+ for( var i=0; i< b.length; i++ ){
+ switch( drawZoomLevels[a] ){
+ case 12:{
+ if( b[i].digital < 256 ){
+ var cc = 255 - i ;//* ( 255 / 33 );
+ ctx.fillStyle = "#" + cc.toString(16) + "0000";
+ //ctx.strokeStyle = "#FF0000";
+ var r = (196 / 256) * b[i].digital;
+ var a = -1.0 * b[i].az * ( Math.PI / 180 );
+ var x = 100 + Math.cos( a ) * r;
+ var y = 100 + Math.sin( a ) * r;
+ ctx.fillRect( x, y, 6, 6 );
+ };
+ break;
+ };
+ case 25:{
+ if( b[i].digital < 512 ){
+ var cc = 255 - i ;//* ( 255 / 33 );
+ ctx.fillStyle = "#" + cc.toString(16) + "0000";
+ //ctx.strokeStyle = "#FF0000";
+ var r = (196 / 512) * b[i].digital;
+ var a = -1.0 * b[i].az * ( Math.PI / 180 );
+ var x = 100 + Math.cos( a ) * r;
+ var y = 100 + Math.sin( a ) * r;
+ ctx.fillRect( x, y, 5, 5 );
+ };
+ break;
+ };
+ case 50:{
+ if( b[i].digital < 1024 ){
+ var cc = 255 - i ;//* ( 255 / 33 );
+ ctx.fillStyle = "#" + cc.toString(16) + "0000";
+ //ctx.strokeStyle = "#FF0000";
+ var r = (196 / 1024) * b[i].digital;
+ var a = -1.0 * b[i].az * ( Math.PI / 180 );
+ var x = 100 + Math.cos( a ) * r;
+ var y = 100 + Math.sin( a ) * r;
+ ctx.fillRect( x, y, 4, 4 );
+ };
+ break;
+ };
+ default:{
+ var cc = 255 - i ;//* ( 255 / 33 );
+ ctx.fillStyle = "#" + cc.toString(16) + "0000";
+ //ctx.strokeStyle = "#FF0000";
+ var r = (196 / 2048) * b[i].digital;
+ var a = -1.0 * b[i].az * ( Math.PI / 180 );
+ var x = 100 + Math.cos( a ) * r;
+ var y = 100 + Math.sin( a ) * r;
+ ctx.fillRect( x, y, 3, 3 );
+ break;
+ };
+ };
+ };
+};
+
+function fetchSiteStatus(){
+ Ext.Ajax.request({
+ url: '/lib/controller/getDashBoardStatus.php',
+ params: {
+ SITE: =$SiteID;?>,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
+ },
+ success: function( response, opts ){
+ var data = Ext.decode(response.responseText);
+ if( data.nodes.length > 0 ){
+ for( i=0; i < data.nodes.length; i++ ){
+ var tt = Ext.getCmp('status_'+data.nodes[i].id );
+ if( tt != undefined ){
+ switch( data.nodes[i].status ){
+ case 0:{
+ cleanupDraw( data.nodes[i].id );
+ tt.update('| Offline |  |
');
+ break;
+ };
+ case 1:{
+ cleanupDraw( data.nodes[i].id );
+ tt.update('| Online |  |
');
+ break;
+ };
+ case 2:{
+ DrawTargets( data.nodes[i].id, data.nodes[i].targets );
+ tt.update('| Alarm |  |
');
+ break;
+ };
+ };
+ };
+ };
+ };
+ },
+ failure: function( response, opts ) {
+
+ }
+ });
+};
+
function loadDashBoard(){
if( tlInterval!= null ){
window.clearInterval( tlInterval );
@@ -47,6 +162,7 @@ function loadDashBoard(){
tPanel.removeAll(true);
for( i=0; i < data.length; i++) tPanel.add( data[i] );
tPanel.doLayout();
+ tlInterval = window.setInterval( fetchSiteStatus, 333, selectedSite );
},
failure: function( response, opts ) {
var tPanel = Ext.getCmp('main_portal');
diff --git a/lib/javascript/jsapi_dynamic/rgoose_devices_module.js b/lib/javascript/jsapi_dynamic/rgoose_devices_module.js
index 9693815..ad0d054 100644
--- a/lib/javascript/jsapi_dynamic/rgoose_devices_module.js
+++ b/lib/javascript/jsapi_dynamic/rgoose_devices_module.js
@@ -35,3 +35,416 @@ var devicesStore = new Ext.data.JsonStore({
})
});
+var LRF1D2_st_win = null;
+var LRF2D2_st_win = null;
+var LRF16D3_st_win = null;
+
+function loadFullLRF1D2Data( NodeID ){
+ Ext.Ajax.request({
+ url: '/lib/controller/getSettingsLidsr3D.php',
+ params: {
+ NID: NodeID,
+ UID: '=$CUser->Data['id'];?>',
+ SID: '=$Session;?>',
+ },
+ success: function( response, opts ){
+ var data = Ext.decode(response.responseText);
+ Ext.getCmp('setting_master_ip').setValue( data.ip_address );
+ Ext.getCmp('setting_master_port').setValue( data.port );
+ Ext.getCmp('setting_slave_ip').setValue( data.aux_ip_address );
+ Ext.getCmp('setting_slave_port').setValue( data.aux_port );
+ Ext.getCmp('setting_lat').setValue( data.lat );
+ Ext.getCmp('setting_lon').setValue( data.lon );
+ Ext.getCmp('setting_alt').setValue( data.alt );
+ Ext.getCmp('setting_roll').setValue( data.roll );
+ Ext.getCmp('setting_pitch').setValue( data.pitch );
+ Ext.getCmp('setting_yaw').setValue( data.yaw );
+ },
+ failure: function( response, opts ) {
+ //Ext.fly('some_div').update('Fail!');
+ }
+ });
+};
+
+function LRF1D2_settings(){
+ if( LRF1D2_st_win == null ){
+ LRF1D2_st_win = new Ext.Window({
+ title: 'Sensor Settings',
+ modal: true,
+ width: 800,
+ height: 600,
+ closeAction: 'hide',
+ items:{
+ xtype: 'tabpanel',
+ activeTab: 0,
+ items:[{
+ title: 'General Settings',
+ xtype: 'form',
+ layout: 'table',
+ defaults: {
+ bodyStyle:'padding:20px'
+ },
+ layoutConfig: {
+ columns: 2
+ },
+ items:[{
+ html: 'Status',
+ frame: false,
+ border: false
+ },{
+ html: 'ONLINE
',
+ frame: false,
+ border: false
+ },{
+ html: 'Serial Number',
+ frame: false,
+ border: false
+ },{
+ xtype: 'field',
+ id: 'serial_num',
+ readOnly: true,
+ value: '1212'
+ },{
+ html: 'Version ID',
+ frame: false,
+ border: false
+ },{
+ xtype: 'field',
+ id: 'version_id',
+ readOnly: true,
+ value: 'LiberManDA122'
+ },{
+ html: 'Device Adress',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'device_id'
+ },{
+ frame: false,
+ border: false
+ },{
+ xtype: 'button',
+ id: 'upddiBTN',
+ text: 'Update Device Address',
+ handler: function(){
+ Ext.Msg.show({
+ title:'Update Device Address?',
+ msg: 'Are you sure to do so?',
+ buttons: Ext.Msg.YESNOCANCEL,
+ //fn: processResult,
+ animEl: 'upddiBTN',
+ icon: Ext.MessageBox.QUESTION
+ });
+ }
+ },{
+ html: 'Device COM Speed',
+ frame: false,
+ border: false
+ },{
+ xtype: 'combo',
+ id: 'com_spd',
+ editable: false,
+ typeAhead: true,
+ triggerAction: 'all',
+ lazyRender:true,
+ mode: 'local',
+ store: new Ext.data.ArrayStore({
+ id: 0,
+ fields: ['mySPD', 'displayText' ],
+ data: [[4800,'4800'],[9600,'9600'],[14400,'14400'],[19200,'19200'],[38400, '38400'],[56000,'56000'],[57600,'57600'],[115200,'115200']]
+ }),
+ valueField: 'mySPD',
+ displayField: 'displayText'
+ },{
+ frame: false,
+ border: false
+ },{
+ xtype: 'button',
+ id: 'updspBTN',
+ text: 'Set Device Speed',
+ handler: function(){
+ Ext.Msg.show({
+ title:'Update Device Speed?',
+ msg: 'Are you sure to do so?',
+ buttons: Ext.Msg.YESNOCANCEL,
+ //fn: processResult,
+ animEl: 'upddiBTN',
+ icon: Ext.MessageBox.QUESTION
+ });
+ }
+ },{
+ html: 'Detection Maximal Range',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'max_range',
+ readOnly: true,
+ value: '1212'
+ },{
+ html: 'Base Shift',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'base_shift',
+ readOnly: true,
+ value: '1212'
+ }]
+ },{
+ title: 'Mantenence',
+ xtype: 'form',
+ layout: 'table',
+ defaults: {
+ bodyStyle:'padding:20px'
+ },
+ layoutConfig: {
+ columns: 2
+ },
+ items:[{
+ html: 'Restart Device',
+ frame: false,
+ border: false
+ },{
+ xtype: 'button',
+ id: 'rstBTN',
+ text: 'Full Reset',
+ handler: function(){
+ Ext.Msg.show({
+ title:'Reset Device?',
+ msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
+ buttons: Ext.Msg.YESNOCANCEL,
+ //fn: processResult,
+ animEl: 'rstBTN',
+ icon: Ext.MessageBox.QUESTION
+ });
+ }
+ }]
+ },{
+ title: 'Detection Settings',
+ xtype: 'form',
+ layout: 'table',
+ defaults: {
+ bodyStyle:'padding:20px'
+ },
+ layoutConfig: {
+ columns: 4
+ },
+ items:[{
+ html: 'Master Offset',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'mlrf_offset',
+ name: 'mlrf_offset',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 0 - 60',
+ maxValue: 60,
+ minText: 'No Negative Values Allowed',
+ minValue: 0,
+ },{
+ html: 'Slave Offset',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'slrf_offset',
+ name: 'slrf_offset',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 0 - 60',
+ maxValue: 60,
+ minText: 'No Negative Values Allowed',
+ minValue: 0,
+ },{
+ html: 'Master Delta',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'mlrf_delta',
+ name: 'mlrf_delta',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 0 - 320',
+ maxValue: 320,
+ minText: 'No Negative Values Allowed',
+ minValue: 0
+ },{
+ html: 'Slave Delta',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'slrf_delta',
+ name: 'slrf_delta',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 0 - 320',
+ maxValue: 320,
+ minText: 'No Negative Values Allowed',
+ minValue: 0
+ },{
+ html: 'Master Width',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'mlrf_width',
+ name: 'mlrf_width',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 1800 - 16000',
+ maxValue: 16000,
+ minText: 'The Range is: 1800 - 16000',
+ minValue: 1800
+ },{
+ html: 'Slave Width',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'slrf_width',
+ name: 'slrf_width',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 1800 - 16000',
+ maxValue: 16000,
+ minText: 'The Range is: 1800 - 16000',
+ minValue: 1800
+ },{
+ html: 'Master Order',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'mlrf_order',
+ name: 'mlrf_order',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 0 - 10',
+ maxValue: 10,
+ minText: 'No Negative Values Allowed',
+ minValue: 0
+ },{
+ html: 'Slave Order',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'slrf_order',
+ name: 'slrf_order',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 0 - 10',
+ maxValue: 10,
+ minText: 'No Negative Values Allowed',
+ minValue: 0
+ },{
+ html: 'Master SST',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'mlrf_sst',
+ name: 'mlrf_sst',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 0 - 100',
+ maxValue: 100,
+ minText: 'No Negative Values Allowed',
+ minValue: 0
+ },{
+ html: 'Slave SST',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'slrf_sst',
+ name: 'slrf_sst',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 0 - 100',
+ maxValue: 100,
+ minText: 'No Negative Values Allowed',
+ minValue: 0
+ },{
+ html: 'Mastr Flip',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'mlrf_flip',
+ name: 'mlrf_flip',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 8 - 128',
+ maxValue: 128,
+ minText: 'The Range is: 8 - 128',
+ minValue: 8
+ },{
+ html: 'Slave Flip',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'slrf_flip',
+ name: 'slrf_flip',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 8 - 128',
+ maxValue: 128,
+ minText: 'The Range is: 8 - 128',
+ minValue: 8
+ },{
+ html: 'Master Sun',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'mlrf_sun',
+ name: 'mlrf_sun',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 0 - 100',
+ maxValue: 100,
+ minText: 'No Negative Values Allowed',
+ minValue: 0
+ },{
+ html: 'Slave Sun',
+ frame: false,
+ border: false
+ },{
+ xtype: 'numberfield',
+ id: 'slrf_sun',
+ name: 'slrf_sun',
+ allowBlank: false,
+ allowDecimals: false,
+ maxText: 'The Range is: 0 - 100',
+ maxValue: 100,
+ minText: 'No Negative Values Allowed',
+ minValue: 0
+ }]
+ },{
+ title: 'Camera/DC Settings'
+ },{
+ title: 'Width Table'
+ },{
+ title: 'Zoom/Tilt Table'
+ }]
+ }
+ });
+ };
+ LRF1D2_st_win.show();
+ loadFullLRF1D2Data( SelectedNodeID );
+};
+
+function LRF2D2_settings(){
+};
+
+function LRF16D3_settings(){
+};
+
diff --git a/lib/javascript/jsapi_dynamic/rgoose_location_editor.js b/lib/javascript/jsapi_dynamic/rgoose_location_editor.js
index 8562895..6126057 100644
--- a/lib/javascript/jsapi_dynamic/rgoose_location_editor.js
+++ b/lib/javascript/jsapi_dynamic/rgoose_location_editor.js
@@ -615,63 +615,82 @@ function updateLocation( e ){
});
};
+function setNodeLocationToAnchor(){
+ Ext.Ajax.request({
+ url: '/lib/controller/updateLocation.php',
+ params: {
+ NODE: locationSelectedNode,
+ SITE: =$SiteID;?>,
+ UID: =$UserID;?>,
+ TYPE: 0,
+ SID: '=$Session;?>',
+ LAT: SiteLat,
+ LON: SiteLon,
+ ALT: SiteAlt
+ },
+ success: function( response, opts ){
+ //loadNodeLocationProps( locationSelectedNode );
+ loadLocationEditor();
+ }
+ });
+};
+
function loadLocationNodes(){
Ext.Ajax.request({
- url: '/lib/controller/getLocationItems.php',
- params: {
- SITE: =$SiteID;?>,
- UID: =$UserID;?>,
- SID: '=$Session;?>'
+ url: '/lib/controller/getLocationItems.php',
+ params: {
+ SITE: =$SiteID;?>,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
},
success: function( response, opts ){
-
var data = Ext.decode(response.responseText);
- for( i=0; i < data.length; i++){
- switch( data[i].type ){
- case 1:{
- L.marker([data[i].lat, data[i].lon], {draggable: true,icon: ALS_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
- break;
- };
- case 2:{
- L.marker([data[i].lat, data[i].lon], {draggable: true,icon: LFS_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
- break;
- };
- case 3:{
- L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLS200_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
- break;
- };
- case 4:{
- L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLS360_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
- break;
- };
- case 5:{
- L.marker([data[i].lat, data[i].lon], {draggable: true,icon: LRF3D_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
- break;
- };
- case 6:{
- L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLSNET200_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
- break;
- };
- case 10:
- case 12:{
- L.marker([data[i].lat, data[i].lon], {draggable: true,icon: FIXCAM_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
- break;
- };
- case 11:
- case 13:{
- L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PTZCAM_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
- break;
- };
- };
- //bindPopup('A pretty CSS3 popup.
Easily customizable.');//.openPopup();
- };
+ for( i=0; i < data.length; i++){
+ switch( data[i].type ){
+ case 1:{
+ L.marker([data[i].lat, data[i].lon], {draggable: true,icon: ALS_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
+ break;
+ };
+ case 2:{
+ L.marker([data[i].lat, data[i].lon], {draggable: true,icon: LFS_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
+ break;
+ };
+ case 3:{
+ L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLS200_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
+ break;
+ };
+ case 4:{
+ L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLS360_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
+ break;
+ };
+ case 5:{
+ L.marker([data[i].lat, data[i].lon], {draggable: true,icon: LRF3D_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
+ break;
+ };
+ case 6:{
+ L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLSNET200_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
+ break;
+ };
+ case 10:
+ case 12:{
+ L.marker([data[i].lat, data[i].lon], {draggable: true,icon: FIXCAM_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
+ break;
+ };
+ case 11:
+ case 13:{
+ L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PTZCAM_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dragend', updateLocation );
+ break;
+ };
+ };
+ //bindPopup('A pretty CSS3 popup.
Easily customizable.');//.openPopup();
+ };
},
failure: function( response, opts ) {
var tPanel = Ext.getCmp('main_portal');
- tPanel.remove(0);
- tPanel.add( { html: 'Failed to load dashboard!' } );
- tPanel.doLayout();
+ tPanel.remove(0);
+ tPanel.add( { html: 'Failed to load dashboard!' } );
+ tPanel.doLayout();
}
});
};
@@ -845,142 +864,156 @@ function loadNodeLocationProps( NodeID ){
Ext.Ajax.request({
url: '/lib/controller/getLocationNodeProps.php',
params: {
- NID: =$SiteID;?>,
+ NID: =$SiteID;?>,
UID: =$UserID;?>,
- SID: '=$Session;?>',
- NODE: NodeID
+ SID: '=$Session;?>',
+ NODE: NodeID
},
success: function( response, opts ){
// If the response is JSON, you have to decode it
var data = Ext.decode(response.responseText);
- var tPanel = Ext.getCmp('prop_content');
- tPanel.remove(0);
- tPanel.add( data );
- tPanel.doLayout();
+ var tPanel = Ext.getCmp('prop_content');
+ tPanel.remove(0);
+ tPanel.add( data );
+ tPanel.doLayout();
},
failure: function( response, opts ) {
//Ext.fly('some_div').update('Fail!');
- }/*,
- callback: function(options,success,response){
- // use this if you need to perform your own success/failure checking
- }*/
+ }
+ });
+};
+
+function LoadNodesList(){
+ Ext.Ajax.request({
+ url: '/lib/controller/getLocationNodes.php',
+ params: {
+ SITE: =$SiteID;?>,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>'
+ },
+ success: function( response, opts ){
+ // If the response is JSON, you have to decode it
+ var data = Ext.decode(response.responseText);
+ var tPanel = Ext.getCmp('prop_content');
+ tPanel.remove(0);
+ tPanel.add( data );
+ tPanel.doLayout();
+ },
+ failure: function( response, opts ) {
+ //Ext.fly('some_div').update('Fail!');
+ }
});
};
function loadLocationEditor(){
if( tlInterval!= null ){
- window.clearInterval( tlInterval );
- tlInterval = null;
- timelineObj = null;
+ window.clearInterval( tlInterval );
+ tlInterval = null;
+ timelineObj = null;
};
var tPanel = Ext.getCmp('main_portal');
tPanel.removeAll( true );
- Ext.getCmp('main_content').setTitle( 'Location Map' );
+ Ext.getCmp('main_content').setTitle( '=$Labels->GetLabel('_LOC_MAP_LBL_');?>' );
tPanel.add({
- columnWidth: 0.83,
- frame: false,
- border: false,
+ columnWidth: 0.83,
+ frame: false,
+ border: false,
items: [{
layout: 'fit',
- height: PanelH-150,
- flex: 1,
+ height: PanelH-150,
+ flex: 1,
//border: true,
- items:{
- id: 'location_map'
- }
+ items:{
+ id: 'location_map'
+ }
},{
- layout: 'table',
- title: 'Site Properties',
- fileUpload: true,
- flex: 1,
- defaults: {
- bodyStyle:'padding:20px'
- },
- layoutConfig: {
- // The total column count must be specified here
- columns: 7
- },
- items:[{
- html: 'System Anchor Lat:'
- },{
- xtype: 'textfield',
- id: 'siteLat',
- value: SiteLat
- },{
- html: 'Lon:'
- },{
- xtype: 'textfield',
- id: 'siteLon',
- value: SiteLon
- },{
- html: 'Alt:'
- },{
- xtype: 'textfield',
- id: 'siteAlt',
- value: SiteAlt
- },{
- xtype: 'button',
- text: 'Update',
- handler: updateSiteAnchor
- },{
- html: 'Map Type:'
- },{
- xtype: 'radio',
- name: 'map_type',
- boxLabel: 'Regular WGS84 Map',
- checked: true,
- value: 0
- },{
- xtype: 'radio',
- name: 'map_type',
- boxLabel: 'Custom Image',
- value: 1
- },{
- xtype: 'combo',
- disabled: true,
- typeAhead: true,
- triggerAction: 'all',
- lazyRender:true,
- mode: 'local',
- store: new Ext.data.ArrayStore({
- id: 0,
- fields: ['myId', 'displayText' ],
- data: [[1, 'item1'], [2, 'item2']]
- }),
- valueField: 'myId',
- displayField: 'displayText'
- },{
- colspan: 2,
- xtype: 'fileuploadfield',
- id: 'form-file',
- disabled: true,
- emptyText: 'Select an image',
- fieldLabel: 'Photo',
- name: 'photo-path',
- buttonText: 'UPLOAD',
- buttonCfg: {
- iconCls: 'upload-icon'
- }
- }]
- }]
+ layout: 'table',
+ title: '=$Labels->GetLabel('_SITE_PROP_LBL_');?>',
+ flex: 1,
+ defaults: {
+ bodyStyle:'padding:20px'
+ },
+ layoutConfig: {
+ // The total column count must be specified here
+ columns: 7,
+ textAlign: 'center'
+ },
+ items:[{
+ html: '=$Labels->GetLabel('_SYS_ANCHORT_LBL_');?> =$Labels->GetLabel('_LAT_SHORT_LBL_');?>:'
+ },{
+ xtype: 'textfield',
+ id: 'siteLat',
+ value: SiteLat
+ },{
+ html: '=$Labels->GetLabel('_LON_SHORT_LBL_');?>:'
+ },{
+ xtype: 'textfield',
+ id: 'siteLon',
+ value: SiteLon
+ },{
+ html: '=$Labels->GetLabel('_ALT_SHORT_LBL_');?>:'
+ },{
+ xtype: 'textfield',
+ id: 'siteAlt',
+ value: SiteAlt
+ },{
+ xtype: 'button',
+ text: '=$Labels->GetLabel('_UPDATE_LBL_');?>',
+ handler: updateSiteAnchor
+ },{
+ html: '=$Labels->GetLabel('_MAP_TYP_LBL_');?>:'
+ },{
+ xtype: 'radio',
+ name: 'map_type',
+ boxLabel: '=$Labels->GetLabel('_MAP_REG_LBL_');?>',
+ checked: true,
+ value: 0
+ },{
+ xtype: 'radio',
+ name: 'map_type',
+ boxLabel: '=$Labels->GetLabel('_MAP_CUST_LBL_');?>',
+ colspan: 2,
+ value: 1
+ },{
+ xtype: 'combo',
+ disabled: true,
+ typeAhead: true,
+ triggerAction: 'all',
+ lazyRender:true,
+ colspan: 2,
+ mode: 'local',
+ store: new Ext.data.ArrayStore({
+ id: 0,
+ fields: ['myId', 'displayText' ],
+ data: [[1, 'item1'], [2, 'item2']]
+ }),
+ valueField: 'myId',
+ displayField: 'displayText'
+ },{
+
+ xtype: 'button',
+ id: 'add-c_map-btn',
+ disabled: true,
+ text: '=$Labels->GetLabel('_CREATE_NEW_LBL_');?>'
+ }]
+ }]
});
tPanel.add({
- title: 'Properties',
- xtype: 'panel',
- flex: 1,
- height: 700,
- columnWidth: 0.17,
- layout: 'fit',
- id: 'prop_content',
- items:{
- html: 'Select Item From Map'
- }
- });
-
+ title: 'Properties',
+ xtype: 'panel',
+ flex: 1,
+ height: 700,
+ columnWidth: 0.17,
+ layout: 'fit',
+ id: 'prop_content',
+ items:{
+ html: 'Select Item From Map'
+ }
+ });
tPanel.doLayout();
map = L.map('location_map').setView([SiteLat, SiteLon], 17);
- L.marker([SiteLat, SiteLon], { draggable: false, icon: SITEZ_Icon } ).addTo(map).bindPopup("System Anchor!");//.openPopup();
+ L.marker([SiteLat, SiteLon], { draggable: false, icon: SITEZ_Icon } ).addTo(map).on('click', LoadNodesList ).bindPopup("=$Labels->GetLabel('_SYS_ANCHORT_LBL_');?>");//.openPopup();
/*
var map = L.map('map', {
diff --git a/lib/javascript/jsapi_dynamic/rgoose_main.js b/lib/javascript/jsapi_dynamic/rgoose_main.js
index 8d986a5..11a3769 100644
--- a/lib/javascript/jsapi_dynamic/rgoose_main.js
+++ b/lib/javascript/jsapi_dynamic/rgoose_main.js
@@ -63,6 +63,8 @@ Ext.onReady(function(){
//alert( winW + 'x' + winH );
CheckWindowSize();
+ Ext.QuickTips.init();
+
var viewport = new Ext.Viewport({
id: 'main_viewport',
layout:'border',
@@ -159,27 +161,53 @@ Ext.onReady(function(){
},{
title: 'Profile Settings',
html: 'Panel content!
'
+ }
+Data['access'] > 5 ){
+?>,{
+ title: 'Admin Settings',
+ items:[{
+ xtype: 'button',
+ width: '100%',
+ id:'adm_acc',
+ text: 'Users Management',
+ handler: function( b, e ){
+ window.location = '/login.php?UID=1';
+ }
+ },{
+ xtype: 'button',
+ width: '100%',
+ id:'adm_acclog',
+ text: 'Access Log',
+ handler: function( b, e ){
+ window.location = '/login.php?UID=1';
+ }
}]
+}
+
+ ]
},{
- xtype: 'panel',
- region:'center',
- margins: '5 5 5 0',
- id: 'main_content',
- title: 'System Dashboard',
- items:[{
- xtype: 'portal',
- id: 'main_portal',
- frame: false,
- border: false,
- items:{
- html: '
'
- },
- listeners:{
- drop: function( a ){
- updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position );
- }
- }
- }]
+ xtype: 'panel',
+ region:'center',
+ margins: '5 5 5 0',
+ id: 'main_content',
+ title: 'System Dashboard',
+ items:[{
+ xtype: 'portal',
+ id: 'main_portal',
+ frame: false,
+ border: false,
+ items:{
+ html: '
'
+ },
+ listeners:{
+ drop: function( a ){
+ updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position );
+ }
+ }
+ }]
}]
});
loadDashBoard();
diff --git a/lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js b/lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js
index 38aaa1c..08c3f69 100644
--- a/lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js
+++ b/lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js
@@ -414,6 +414,111 @@ function loadServerProperties( NodeID ){
}*/
});
};
+
+var mp_FlyHunterWindow = null;
+
+function module_prop_FlyHunter( module_id ){
+ if( mp_FlyHunterWindow == null ){
+ mp_FlyHunterWindow = new Ext.Window({
+ modal: true,
+ title: '=$Labels->GetLabel("_FHM_PROPS_");?>',
+ width: 773,
+ height: 600,
+ layout: 'table',
+ closeAction: 'hide',
+ flex: 1,
+ defaults: {
+ bodyStyle:'padding:20px'
+ },
+ layoutConfig: {
+ // The total column count must be specified here
+ columns: 2
+ },
+ items:[{
+ html: 'Radio LINK UART Port'
+ },{
+ xtype: 'combo',
+ editable: false,
+ typeAhead: true,
+ triggerAction: 'all',
+ lazyRender:true,
+ mode: 'local',
+ store: new Ext.data.ArrayStore({
+ id: 0,
+ fields: ['myId', 'displayText' ],
+ data: [ Query( $QS );
+ if( count( $RR ) ){
+ $RE=array();
+ foreach( $RR as $R ){
+ $RE[] = "[ {$R['id']}, '{$R['name']}']";
+ };
+ echo implode( ',', $RE );
+ } else {
+ echo "[0, 'No UARTS DEFINED']";
+ };
+ ?>]
+ }),
+ valueField: 'myId',
+ displayField: 'displayText'
+ },{
+ html: 'ChakaLaka DC Channel'
+ },{
+ xtype: 'combo',
+ editable: false,
+ typeAhead: true,
+ triggerAction: 'all',
+ lazyRender:true,
+ mode: 'local',
+ store: new Ext.data.ArrayStore({
+ id: 1,
+ fields: ['myId', 'displayText' ],
+ data: [ Query( $QS );
+ if( count( $RR ) ){
+ $RE=array();
+ foreach( $RR as $R ){
+ $RE[] = "[ {$R['id']}, '{$R['serial_id']}_{$R['channel_id']}']";
+ };
+ echo implode( ',', $RE );
+ } else {
+ echo "[0, 'No DCB Connected']";
+ };
+ ?>]
+ }),
+ valueField: 'myId',
+ displayField: 'displayText'
+ }],
+ bbar:[{
+ text:'cancel'
+ },{
+ text:'submit'
+ }]
+ });
+ };
+ mp_FlyHunterWindow.show();
+ Ext.Ajax.request({
+ url: '/lib/controller/getModuleProps.php',
+ params: {
+ NID: =$SiteID;?>,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>',
+ MODULE: module_id
+ },
+ success: function( response, opts ){
+ var data = Ext.decode(response.responseText);
+ var tPanel = Ext.getCmp('prop_content');
+ tPanel.remove(0);
+ tPanel.add( data );
+ tPanel.doLayout();
+ },
+ failure: function( response, opts ) {
+ }
+ });
+};
+
function loadSystemEditor(){
if( tlInterval!= null ){
window.clearInterval( tlInterval );
diff --git a/lib/javascript/jsapi_dynamic/rgoose_timeline.js b/lib/javascript/jsapi_dynamic/rgoose_timeline.js
index efe29a0..35cbce8 100644
--- a/lib/javascript/jsapi_dynamic/rgoose_timeline.js
+++ b/lib/javascript/jsapi_dynamic/rgoose_timeline.js
@@ -104,12 +104,12 @@ function LocRenderer( val ){
var eventsListColModel = new Ext.grid.ColumnModel({
columns: [
- {header: "id", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' },
- {header: "date",width: 80, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'date' },
- {header: "time", width: 80, sortable: false, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'time' },
- {header: "device", width: 80, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'device' },
- {header: "event", width: 80, sortable: false, dataIndex: 'event' },
- {header: "targ", width: 200, sortable: false, dataindex: 'data' },
+ {header: "ID", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' },
+ {header: "Date",width: 80, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'date' },
+ {header: "Time", width: 80, sortable: false, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'time' },
+ {header: "Device", width: 150, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'device' },
+ {header: "Event", width: 80, sortable: false, dataIndex: 'event' },
+ {header: "Info", width: 200, sortable: false, dataindex: 'data' },
{header: "", width: 20, sortable: false, dataIndex: 'has_geo', renderer: LocRenderer }
],
defaults: {
diff --git a/lib/php/sys/r-goose_sys.php b/lib/php/sys/r-goose_sys.php
index 0613dd9..ffa5b1b 100644
--- a/lib/php/sys/r-goose_sys.php
+++ b/lib/php/sys/r-goose_sys.php
@@ -4,6 +4,11 @@ function getIfIp($IF){
return $RVal;
};
+function generate2DMapImage( $datafile, $a ){
+ $image = @imagecreate( 150, 150 ) or die("Cannot Initialize new GD image stream");
+
+};
+
function generate3DMapImage( $datafile, $byMin = true, $imagefile='' ){
$thumbnail = imagecreatetruecolor( 2304, 288);
if(!$thumbnail) {
diff --git a/style/assets/Untitled-1.psd b/style/assets/Untitled-1.psd
new file mode 100644
index 0000000..3070c8e
Binary files /dev/null and b/style/assets/Untitled-1.psd differ
diff --git a/style/assets/Untitled-2.psd b/style/assets/Untitled-2.psd
new file mode 100644
index 0000000..472239f
Binary files /dev/null and b/style/assets/Untitled-2.psd differ
diff --git a/style/assets/lfs_draw_empty_100.png b/style/assets/lfs_draw_empty_100.png
new file mode 100644
index 0000000..41ab500
Binary files /dev/null and b/style/assets/lfs_draw_empty_100.png differ
diff --git a/style/assets/lfs_draw_empty_12.png b/style/assets/lfs_draw_empty_12.png
new file mode 100644
index 0000000..dbd9b00
Binary files /dev/null and b/style/assets/lfs_draw_empty_12.png differ
diff --git a/style/assets/lfs_draw_empty_25.png b/style/assets/lfs_draw_empty_25.png
new file mode 100644
index 0000000..1e820ea
Binary files /dev/null and b/style/assets/lfs_draw_empty_25.png differ
diff --git a/style/assets/lfs_draw_empty_50.png b/style/assets/lfs_draw_empty_50.png
new file mode 100644
index 0000000..44faa7a
Binary files /dev/null and b/style/assets/lfs_draw_empty_50.png differ
diff --git a/style/assets/loading (1).gif b/style/assets/loading (1).gif
new file mode 100644
index 0000000..309ca8d
Binary files /dev/null and b/style/assets/loading (1).gif differ
diff --git a/style/assets/loading.gif b/style/assets/loading.gif
new file mode 100644
index 0000000..ed12a37
Binary files /dev/null and b/style/assets/loading.gif differ
diff --git a/style/assets/offline.png b/style/assets/offline.png
new file mode 100644
index 0000000..2ac822e
Binary files /dev/null and b/style/assets/offline.png differ
diff --git a/style/assets/online.gif b/style/assets/online.gif
new file mode 100644
index 0000000..629dd60
Binary files /dev/null and b/style/assets/online.gif differ
diff --git a/style/style.css b/style/style.css
index 1668bfd..f12dee3 100644
--- a/style/style.css
+++ b/style/style.css
@@ -245,3 +245,10 @@ object:hover {
transform: scale(0.6, 0.6);
}
}
+
+.dev_draw_container {
+}
+
+.dev_draw_img{
+
+}
\ No newline at end of file