-
32index.php
-
18lib/controller/addConnection.php
-
49lib/controller/addNetworkNode.php
-
11lib/controller/clearEventCloud.php
-
2lib/controller/getDashBoardItems.php
-
31lib/controller/getEventProps.php
-
94lib/controller/getEventRecords.php
-
53lib/controller/getLocationNodeProps.php
-
2lib/controller/getNetwork.php
-
57lib/controller/getNetworkNodeProps.php
-
12lib/controller/getTimeLineGroups.php
-
149lib/controller/props/1_node_prop.js
-
224lib/controller/props/20_node_prop.js
-
149lib/controller/props/2_node_prop.js
-
149lib/controller/props/3_node_prop.js
-
149lib/controller/props/4_node_prop.js
-
189lib/controller/props/5_node_prop.js
-
58lib/controller/props/event_prop.js
-
7lib/controller/props/loc_prop.js
-
68lib/controller/removeNode.php
-
2lib/controller/updateLocation.php
-
24lib/controller/updateLrfSettings.php
-
26lib/controller/updateUartSettings.php
-
17lib/controller/updateUserSettings.php
-
142lib/javascript/jsapi_dynamic/rgoose_camera_editor.js
-
55lib/javascript/jsapi_dynamic/rgoose_location_editor.js
-
62lib/javascript/jsapi_dynamic/rgoose_main.js
-
96lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js
-
184lib/javascript/jsapi_dynamic/rgoose_timeline.js
-
14lib/javascript/jsapi_static/rgoose_general.js
-
21lib/php/ui/UI_functions.php
-
BINstyle/assets/1f9ed.png
-
BINstyle/assets/20_node.png
-
BINstyle/assets/argus.psd
-
BINstyle/assets/argus_logo.png
-
BINstyle/assets/argus_logo_text.png
-
BINstyle/assets/chch-1.png
-
BINstyle/assets/cube_bg.png
-
BINstyle/assets/cube_bg.psd
@ -0,0 +1,11 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$QS = "INSERT INTO `events_archive` (`node_id`,`uuid`,`ts`,`ts_ms`,`evt_type`,`range_digital`,`azimuth`,`elevation`,`range`,`area`,`lat`,`lon`,`alt`,`custom`) SELECT `node_id`,`uuid`,`ts`,`ts_ms`,`evt_type`,`range_digital`,`azimuth`,`elevation`,`range`,`area`,`lat`,`lon`,`alt`,`custom` FROM `events_cloud`"; |
||||
|
$DATABASE->Query( $QS, false ); |
||||
|
$QS = "DELETE FROM events_cloud"; |
||||
|
$DATABASE->Query( $QS, false ); |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,31 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$EID = intval( $_POST['EVENT'] ); |
||||
|
$QS = "SELECT * FROM events_cloud WHERE id = {$EID}"; |
||||
|
$Result = $DATABASE->Query( $QS, false ); |
||||
|
if( count( $Result ) ){ |
||||
|
$Props = $Result[0]; |
||||
|
$QS="SELECT * FROM nodes WHERE id={$Props['node_id']}"; |
||||
|
$RR = $DATABASE->Query( $QS ); |
||||
|
$CC = $RR[0]; |
||||
|
$Type = intval( $Props['type'] ); |
||||
|
$TName = 'props/event_prop.js'; |
||||
|
$Data = file_get_contents( $TName ); |
||||
|
$Data = str_replace('%%%NODEID%%%', $Props['node_id'], $Data ); |
||||
|
$Data = str_replace('%%%TYPE%%%', $CC['type'], $Data ); |
||||
|
$Data = str_replace('%%%NAME%%%', $CC['name'], $Data ); |
||||
|
$Data = str_replace('%%%AZIMUTH%%%', sprintf( "%0.2f", $Props['azimuth']), $Data ); |
||||
|
$Data = str_replace('%%%ELEVETION%%%', sprintf( "%0.2f", $Props['elevation']), $Data ); |
||||
|
$Data = str_replace('%%%RANGE%%%', sprintf( "%0.2f", $Props['range']), $Data ); |
||||
|
$Data = str_replace('%%%LON%%%', sprintf( "%0.8f", $Props['lon']), $Data ); |
||||
|
$Data = str_replace('%%%LAT%%%', sprintf( "%0.8f", $Props['lat']), $Data ); |
||||
|
$Data = str_replace('%%%ALT%%%', sprintf( "%0.1f", $Props['alt']), $Data ); |
||||
|
echo $Data; |
||||
|
} else { |
||||
|
echo '{ html: \'Node '.$_POST['NODE'].' Loadded\'}'; |
||||
|
}; |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,94 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
function getNodeName( $NID ){ |
||||
|
global $DATABASE; |
||||
|
$EID = intval( $NID ); |
||||
|
if( $EID ){ |
||||
|
$QS = "SELECT name FROM nodes WHERE id={$EID}"; |
||||
|
$RV = $DATABASE->Query( $QS ); |
||||
|
if( count( $RV ) ){ |
||||
|
return $RV[0]['name']; |
||||
|
}; |
||||
|
return '-NoName-'; |
||||
|
} else { |
||||
|
return 'Argus Server'; |
||||
|
}; |
||||
|
}; |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$Data = array(); |
||||
|
$GID = intval($_POST['NID']); |
||||
|
$QS = "SELECT * FROM events_cloud ORDER BY id DESC LIMIT 20"; |
||||
|
$Result = $DATABASE->Query( $QS, false ); |
||||
|
date_default_timezone_set('UTC'); |
||||
|
//foreach( array_reverse ( $Result ) as $CD ){
|
||||
|
foreach( $Result as $CD ){ |
||||
|
$cnode['has_target'] = false; |
||||
|
$cnode['has_geo'] = false; |
||||
|
switch( intval( $CD['evt_type'] ) ){ |
||||
|
case 0:// NoInit |
||||
|
case 1:// Ready |
||||
|
case 2:// Alarm |
||||
|
case 3:// Command |
||||
|
case 4:// Key |
||||
|
case 5:// Joystick |
||||
|
continue; break; |
||||
|
case 6:// STUDY |
||||
|
$cnode['event']='Device Enters Into Study Mode'; |
||||
|
break; |
||||
|
case 7:// BUSY |
||||
|
$cnode['event']='Device Is BUSY'; |
||||
|
break; |
||||
|
case 8:// FLIP |
||||
|
$cnode['event']='Flip Complete'; |
||||
|
break; |
||||
|
case 9:// SCAN |
||||
|
$cnode['event']='Scan Complete'; |
||||
|
break; |
||||
|
case 10:// Target 1D |
||||
|
case 11:// Target 3DW |
||||
|
case 12:// Target 3DB |
||||
|
case 13:// Target 2DW |
||||
|
case 14:// Target 2DB |
||||
|
$cnode['event']='Target'; |
||||
|
$cnode['data'] = sprintf("AZ: %0.2f El: %0.2f R: %0.2f", floatval($CD['azimuth']), floatval($CD['elevation']), floatval($CD['range'])); |
||||
|
$cnode['has_target'] = true; |
||||
|
$cnode['has_geo'] = true; |
||||
|
break; |
||||
|
case 15:// Capture Start |
||||
|
case 16:// Capture End |
||||
|
case 17:// Capture Done |
||||
|
case 18:// Mission Begin |
||||
|
case 19:// Cancel Action |
||||
|
case 20:// Fly To |
||||
|
case 21:// WayPoint |
||||
|
case 22:// Dest Reached |
||||
|
case 23:// Jaming Begin |
||||
|
case 24:// Jamer On |
||||
|
case 25:// Jamer Off |
||||
|
case 26:// Target Locked |
||||
|
case 27:// Intercept Begin |
||||
|
case 28:// Intercept OK |
||||
|
case 29:// Intercept NOK |
||||
|
case 20:// Mission End |
||||
|
case 31:// Landed |
||||
|
case 32:// FH Busy |
||||
|
case 33:// Camera DM |
||||
|
case 34:// Error |
||||
|
default: |
||||
|
continue; |
||||
|
break; |
||||
|
}; |
||||
|
$cnode['id'] = intval( $CD['id'] ); |
||||
|
$uts = intval($CD['ts']); |
||||
|
$cnode['date'] = date( "m.d.y", $uts ); |
||||
|
$cnode['time'] = date( "H:m:s", $uts ); |
||||
|
$cnode['device'] = getNodeName( $CD['node_id'] ); |
||||
|
$Data[] = $cnode; |
||||
|
}; |
||||
|
$RA['log']=$Data; |
||||
|
$RA['totalCount'] = count( $Data ); |
||||
|
echo json_encode( $RA ); |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,149 @@ |
|||||
|
{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 40, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items: [{ |
||||
|
xtype: 'panel', |
||||
|
height: 100, |
||||
|
html: '<p align="center"><img src="/style/assets/1_node.png"><br/>%%%DEV_LABEL%%%<br/></p>' |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
//checkboxToggle:true,
|
||||
|
collapsible: true, |
||||
|
title: 'Device', |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 180
|
||||
|
}, |
||||
|
collapsed: false, |
||||
|
items :[{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_name', |
||||
|
name: 'dev_name', |
||||
|
value: '%%%DEV_LABEL%%%' |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'max_range', |
||||
|
name: 'max_range', |
||||
|
value: %%%MAX_RANGE%%% |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_id', |
||||
|
name: 'dev_id', |
||||
|
value: %%%DEVICE_ID%%% |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Range: %%%MAX_RANGE%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Dev Address: %%%DEVICE_ID%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Change Settings', |
||||
|
width: '100%', |
||||
|
handler: function(){ |
||||
|
var wAddSocket = new Ext.Window({ |
||||
|
title: 'Sensor Settings', |
||||
|
width: 450, |
||||
|
//height: 480,
|
||||
|
items:[{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 120, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items:[{ |
||||
|
fieldLabel: 'Device Name', |
||||
|
id: 'ued_name' |
||||
|
},{ |
||||
|
fieldLabel: 'Device Address', |
||||
|
id: 'ued_address' |
||||
|
},{ |
||||
|
fieldLabel: 'Maximal Range', |
||||
|
id: 'ued_range' |
||||
|
}] |
||||
|
}], |
||||
|
buttons:[{ |
||||
|
text: 'Cancel', |
||||
|
handler: function(){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
} |
||||
|
},{ |
||||
|
text: 'Apply Settings', |
||||
|
handler: function(){ |
||||
|
var val_name = Ext.getCmp('ued_name').getValue(); |
||||
|
var val_addr = Ext.getCmp('ued_address').getValue(); |
||||
|
var val_range = Ext.getCmp('ued_range').getValue(); |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/updateLrfSettings.php', |
||||
|
params: { |
||||
|
SENSOR: %%%LRF_ID%%%, |
||||
|
SADDR: val_addr, |
||||
|
SNAME: val_name, |
||||
|
SRANGE: val_range |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
loadNodeProperties( %%%NODEID%%% ); |
||||
|
}, |
||||
|
failure: function( response, opts ) { |
||||
|
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}] |
||||
|
}); |
||||
|
wAddSocket.show(); |
||||
|
Ext.getCmp('ued_name').setValue( Ext.getCmp('dev_name').getValue()); |
||||
|
Ext.getCmp('ued_address').setValue( Ext.getCmp('dev_id').getValue()); |
||||
|
Ext.getCmp('ued_range').setValue( Ext.getCmp('max_range').getValue()); |
||||
|
} |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'Master LRF', |
||||
|
collapsible: true, |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%M_ORDER%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%M_OFFSET%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%M_WIDTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%M_SST%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'Slave LRF', |
||||
|
collapsible: true, |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%S_ORDER%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%S_OFFSET%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%S_WIDTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%S_SST%%%</p>' |
||||
|
}] |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,224 @@ |
|||||
|
{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 40, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items: [{ |
||||
|
xtype: 'panel', |
||||
|
height: 100, |
||||
|
html: '<p align="center"><img src="/style/assets/20_node.png"><br/>Ethernet2Serial<br/></p>' |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
//checkboxToggle:true,
|
||||
|
collapsible: true, |
||||
|
title: 'Network', |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 180
|
||||
|
}, |
||||
|
collapsed: false, |
||||
|
items :[{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'uart_mode', |
||||
|
name: 'uart_mode', |
||||
|
value: '%%%CONTYPE%%%' |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'uart_ip', |
||||
|
name: 'uart_ip', |
||||
|
value: '%%%ADR_IP%%%' |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'uart_port', |
||||
|
name: 'uart_port', |
||||
|
value: %%%ADDR_PORT%%% |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">%%%CON_TYPE%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">%%%ADR_IP%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">%%%ADDR_PORT%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'UART', |
||||
|
collapsible: true, |
||||
|
autoHeight:true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'uart_speed', |
||||
|
name: 'uart_speed', |
||||
|
value: %%%UART_SPEED%%% |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'uart_bit', |
||||
|
name: 'uart_bit', |
||||
|
value: %%%UART_BIT%%% |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'uart_parity', |
||||
|
name: 'uart_parity', |
||||
|
value: '%%%UART_PARITY%%%' |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'uart_stops', |
||||
|
name: 'uart_stops', |
||||
|
value: %%%UART_STOP%%% |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">%%%UART_SPEED%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">%%%UART_BIT%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">%%%UART_PARITY%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">%%%UART_STOP%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Change Settings', |
||||
|
width: '100%', |
||||
|
handler: function(){ |
||||
|
var wAddSocket = new Ext.Window({ |
||||
|
title: 'UART Settings', |
||||
|
width: 450, |
||||
|
//height: 480,
|
||||
|
items:[{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 120, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items:[{ |
||||
|
xtype: 'combo', |
||||
|
fieldLabel: 'Speed', |
||||
|
id: 'ued_speed', |
||||
|
lazyRender:true, |
||||
|
mode: 'local', |
||||
|
store: new Ext.data.ArrayStore({ |
||||
|
fields: ['speed'], |
||||
|
data: [[19200], [115200]] |
||||
|
}), |
||||
|
valueField: 'speed', |
||||
|
displayField: 'speed' |
||||
|
},{ |
||||
|
xtype: 'combo', |
||||
|
fieldLabel: 'Bits', |
||||
|
id: 'ued_bit', |
||||
|
lazyRender:true, |
||||
|
mode: 'local', |
||||
|
store: new Ext.data.ArrayStore({ |
||||
|
fields: ['bits'], |
||||
|
data: [[5],[6],[7],[8],[9]] |
||||
|
}), |
||||
|
valueField: 'bits', |
||||
|
displayField: 'bits' |
||||
|
},{ |
||||
|
xtype: 'combo', |
||||
|
fieldLabel: 'Stop Bit', |
||||
|
lazyRender:true, |
||||
|
id: 'ued_stops', |
||||
|
mode: 'local', |
||||
|
store: new Ext.data.ArrayStore({ |
||||
|
fields: ['stops'], |
||||
|
data: [[1],[1.5],[2]] |
||||
|
}), |
||||
|
valueField: 'stops', |
||||
|
displayField: 'stops' |
||||
|
},{ |
||||
|
xtype: 'combo', |
||||
|
fieldLabel: 'Parity', |
||||
|
lazyRender:true, |
||||
|
id: 'ued_parity', |
||||
|
mode: 'local', |
||||
|
store: new Ext.data.ArrayStore({ |
||||
|
fields: ['parity'], |
||||
|
data: [['Odd'], ['Even'],['None']] |
||||
|
}), |
||||
|
valueField: 'parity', |
||||
|
displayField: 'parity' |
||||
|
},{ |
||||
|
xtype: 'combo', |
||||
|
fieldLabel: 'Working Mode', |
||||
|
lazyRender: true, |
||||
|
id: 'ued_mode', |
||||
|
mode: 'local', |
||||
|
store: new Ext.data.ArrayStore({ |
||||
|
fields: ['mode','mode_txt'], |
||||
|
data: [[0,'UDP Client'], [1,'TCP Client'], [2,'UDP Server'], [3,'TCP Server']] |
||||
|
}), |
||||
|
valueField: 'mode', |
||||
|
displayField: 'mode_txt' |
||||
|
},{ |
||||
|
fieldLabel: 'IP Address', |
||||
|
id: 'ued_ip' |
||||
|
},{ |
||||
|
fieldLabel: 'IP Port', |
||||
|
id: 'ued_port' |
||||
|
}] |
||||
|
}], |
||||
|
buttons:[{ |
||||
|
text: 'Cancel', |
||||
|
handler: function(){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
} |
||||
|
},{ |
||||
|
text: 'Apply Settings', |
||||
|
handler: function(){ |
||||
|
var val_uart_speed = Ext.getCmp('ued_speed').getValue(); |
||||
|
var val_uart_bit = Ext.getCmp('ued_bit').getValue(); |
||||
|
var val_uart_stops = Ext.getCmp('ued_stops').getValue(); |
||||
|
var val_uart_parity = Ext.getCmp('ued_parity').getValue(); |
||||
|
var val_uart_ip = Ext.getCmp('ued_ip').getValue(); |
||||
|
var val_uart_port = Ext.getCmp('ued_port').getValue(); |
||||
|
var val_uart_mode = Ext.getCmp('ued_mode').getValue(); |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/updateUartSettings.php', |
||||
|
params: { |
||||
|
UART: %%%UART_ID%%%, |
||||
|
USPD: val_uart_speed, |
||||
|
UBIT: val_uart_bit, |
||||
|
USTP: val_uart_stops, |
||||
|
UPAR: val_uart_parity, |
||||
|
UADR: val_uart_ip, |
||||
|
UPOR: val_uart_port, |
||||
|
UMOD: val_uart_mode |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
loadNodeProperties( %%%NODE_ID%%% ); |
||||
|
}, |
||||
|
failure: function( response, opts ) { |
||||
|
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}] |
||||
|
}); |
||||
|
wAddSocket.show(); |
||||
|
Ext.getCmp('ued_speed').setValue( Ext.getCmp('uart_speed').getValue()); |
||||
|
Ext.getCmp('ued_bit').setValue( Ext.getCmp('uart_bit').getValue()); |
||||
|
Ext.getCmp('ued_stops').setValue( Ext.getCmp('uart_stops').getValue()); |
||||
|
switch( Ext.getCmp('uart_parity').getValue() ){ |
||||
|
case 'E': Ext.getCmp('ued_parity').setValue( 'Even' ); break; |
||||
|
case 'O': Ext.getCmp('ued_parity').setValue( 'Odd' ); break; |
||||
|
case 'N': Ext.getCmp('ued_parity').setValue( 'None' ); break; |
||||
|
}; |
||||
|
Ext.getCmp('ued_ip').setValue( Ext.getCmp('uart_ip').getValue()); |
||||
|
Ext.getCmp('ued_port').setValue( Ext.getCmp('uart_port').getValue()); |
||||
|
Ext.getCmp('ued_mode').setValue( Ext.getCmp('uart_mode').getValue()); |
||||
|
} |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,149 @@ |
|||||
|
{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 40, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items: [{ |
||||
|
xtype: 'panel', |
||||
|
height: 100, |
||||
|
html: '<p align="center"><img src="/style/assets/2_node.png"><br/>%%%DEV_LABEL%%%<br/></p>' |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
//checkboxToggle:true,
|
||||
|
collapsible: true, |
||||
|
title: 'Device', |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 180
|
||||
|
}, |
||||
|
collapsed: false, |
||||
|
items :[{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_name', |
||||
|
name: 'dev_name', |
||||
|
value: '%%%DEV_LABEL%%%' |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'max_range', |
||||
|
name: 'max_range', |
||||
|
value: %%%MAX_RANGE%%% |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_id', |
||||
|
name: 'dev_id', |
||||
|
value: %%%DEVICE_ID%%% |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Range: %%%MAX_RANGE%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Dev Address: %%%DEVICE_ID%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Change Settings', |
||||
|
width: '100%', |
||||
|
handler: function(){ |
||||
|
var wAddSocket = new Ext.Window({ |
||||
|
title: 'Sensor Settings', |
||||
|
width: 450, |
||||
|
//height: 480,
|
||||
|
items:[{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 120, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items:[{ |
||||
|
fieldLabel: 'Device Name', |
||||
|
id: 'ued_name' |
||||
|
},{ |
||||
|
fieldLabel: 'Device Address', |
||||
|
id: 'ued_address' |
||||
|
},{ |
||||
|
fieldLabel: 'Maximal Range', |
||||
|
id: 'ued_range' |
||||
|
}] |
||||
|
}], |
||||
|
buttons:[{ |
||||
|
text: 'Cancel', |
||||
|
handler: function(){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
} |
||||
|
},{ |
||||
|
text: 'Apply Settings', |
||||
|
handler: function(){ |
||||
|
var val_name = Ext.getCmp('ued_name').getValue(); |
||||
|
var val_addr = Ext.getCmp('ued_address').getValue(); |
||||
|
var val_range = Ext.getCmp('ued_range').getValue(); |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/updateLrfSettings.php', |
||||
|
params: { |
||||
|
SENSOR: %%%LRF_ID%%%, |
||||
|
SADDR: val_addr, |
||||
|
SNAME: val_name, |
||||
|
SRANGE: val_range |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
loadNodeProperties( %%%NODEID%%% ); |
||||
|
}, |
||||
|
failure: function( response, opts ) { |
||||
|
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}] |
||||
|
}); |
||||
|
wAddSocket.show(); |
||||
|
Ext.getCmp('ued_name').setValue( Ext.getCmp('dev_name').getValue()); |
||||
|
Ext.getCmp('ued_address').setValue( Ext.getCmp('dev_id').getValue()); |
||||
|
Ext.getCmp('ued_range').setValue( Ext.getCmp('max_range').getValue()); |
||||
|
} |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'Master LRF', |
||||
|
collapsible: true, |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%M_ORDER%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%M_OFFSET%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%M_WIDTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%M_SST%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'Slave LRF', |
||||
|
collapsible: true, |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%S_ORDER%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%S_OFFSET%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%S_WIDTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%S_SST%%%</p>' |
||||
|
}] |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,149 @@ |
|||||
|
{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 40, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items: [{ |
||||
|
xtype: 'panel', |
||||
|
height: 100, |
||||
|
html: '<p align="center"><img src="/style/assets/3_node.png"><br/>%%%DEV_LABEL%%%<br/></p>' |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
//checkboxToggle:true,
|
||||
|
collapsible: true, |
||||
|
title: 'Device', |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 180
|
||||
|
}, |
||||
|
collapsed: false, |
||||
|
items :[{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_name', |
||||
|
name: 'dev_name', |
||||
|
value: '%%%DEV_LABEL%%%' |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'max_range', |
||||
|
name: 'max_range', |
||||
|
value: %%%MAX_RANGE%%% |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_id', |
||||
|
name: 'dev_id', |
||||
|
value: %%%DEVICE_ID%%% |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Range: %%%MAX_RANGE%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Dev Address: %%%DEVICE_ID%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Change Settings', |
||||
|
width: '100%', |
||||
|
handler: function(){ |
||||
|
var wAddSocket = new Ext.Window({ |
||||
|
title: 'Sensor Settings', |
||||
|
width: 450, |
||||
|
//height: 480,
|
||||
|
items:[{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 120, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items:[{ |
||||
|
fieldLabel: 'Device Name', |
||||
|
id: 'ued_name' |
||||
|
},{ |
||||
|
fieldLabel: 'Device Address', |
||||
|
id: 'ued_address' |
||||
|
},{ |
||||
|
fieldLabel: 'Maximal Range', |
||||
|
id: 'ued_range' |
||||
|
}] |
||||
|
}], |
||||
|
buttons:[{ |
||||
|
text: 'Cancel', |
||||
|
handler: function(){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
} |
||||
|
},{ |
||||
|
text: 'Apply Settings', |
||||
|
handler: function(){ |
||||
|
var val_name = Ext.getCmp('ued_name').getValue(); |
||||
|
var val_addr = Ext.getCmp('ued_address').getValue(); |
||||
|
var val_range = Ext.getCmp('ued_range').getValue(); |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/updateLrfSettings.php', |
||||
|
params: { |
||||
|
SENSOR: %%%LRF_ID%%%, |
||||
|
SADDR: val_addr, |
||||
|
SNAME: val_name, |
||||
|
SRANGE: val_range |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
loadNodeProperties( %%%NODEID%%% ); |
||||
|
}, |
||||
|
failure: function( response, opts ) { |
||||
|
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}] |
||||
|
}); |
||||
|
wAddSocket.show(); |
||||
|
Ext.getCmp('ued_name').setValue( Ext.getCmp('dev_name').getValue()); |
||||
|
Ext.getCmp('ued_address').setValue( Ext.getCmp('dev_id').getValue()); |
||||
|
Ext.getCmp('ued_range').setValue( Ext.getCmp('max_range').getValue()); |
||||
|
} |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'Master LRF', |
||||
|
collapsible: true, |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%M_ORDER%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%M_OFFSET%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%M_WIDTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%M_SST%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'Slave LRF', |
||||
|
collapsible: true, |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%S_ORDER%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%S_OFFSET%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%S_WIDTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%S_SST%%%</p>' |
||||
|
}] |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,149 @@ |
|||||
|
{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 40, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items: [{ |
||||
|
xtype: 'panel', |
||||
|
height: 100, |
||||
|
html: '<p align="center"><img src="/style/assets/4_node.png"><br/>%%%DEV_LABEL%%%<br/></p>' |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
//checkboxToggle:true,
|
||||
|
collapsible: true, |
||||
|
title: 'Device', |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 180
|
||||
|
}, |
||||
|
collapsed: false, |
||||
|
items :[{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_name', |
||||
|
name: 'dev_name', |
||||
|
value: '%%%DEV_LABEL%%%' |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'max_range', |
||||
|
name: 'max_range', |
||||
|
value: %%%MAX_RANGE%%% |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_id', |
||||
|
name: 'dev_id', |
||||
|
value: %%%DEVICE_ID%%% |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Range: %%%MAX_RANGE%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Dev Address: %%%DEVICE_ID%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Change Settings', |
||||
|
width: '100%', |
||||
|
handler: function(){ |
||||
|
var wAddSocket = new Ext.Window({ |
||||
|
title: 'Sensor Settings', |
||||
|
width: 450, |
||||
|
//height: 480,
|
||||
|
items:[{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 120, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items:[{ |
||||
|
fieldLabel: 'Device Name', |
||||
|
id: 'ued_name' |
||||
|
},{ |
||||
|
fieldLabel: 'Device Address', |
||||
|
id: 'ued_address' |
||||
|
},{ |
||||
|
fieldLabel: 'Maximal Range', |
||||
|
id: 'ued_range' |
||||
|
}] |
||||
|
}], |
||||
|
buttons:[{ |
||||
|
text: 'Cancel', |
||||
|
handler: function(){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
} |
||||
|
},{ |
||||
|
text: 'Apply Settings', |
||||
|
handler: function(){ |
||||
|
var val_name = Ext.getCmp('ued_name').getValue(); |
||||
|
var val_addr = Ext.getCmp('ued_address').getValue(); |
||||
|
var val_range = Ext.getCmp('ued_range').getValue(); |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/updateLrfSettings.php', |
||||
|
params: { |
||||
|
SENSOR: %%%LRF_ID%%%, |
||||
|
SADDR: val_addr, |
||||
|
SNAME: val_name, |
||||
|
SRANGE: val_range |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
loadNodeProperties( %%%NODEID%%% ); |
||||
|
}, |
||||
|
failure: function( response, opts ) { |
||||
|
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}] |
||||
|
}); |
||||
|
wAddSocket.show(); |
||||
|
Ext.getCmp('ued_name').setValue( Ext.getCmp('dev_name').getValue()); |
||||
|
Ext.getCmp('ued_address').setValue( Ext.getCmp('dev_id').getValue()); |
||||
|
Ext.getCmp('ued_range').setValue( Ext.getCmp('max_range').getValue()); |
||||
|
} |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'Master LRF', |
||||
|
collapsible: true, |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%M_ORDER%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%M_OFFSET%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%M_WIDTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%M_SST%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'Slave LRF', |
||||
|
collapsible: true, |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%S_ORDER%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%S_OFFSET%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%S_WIDTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%S_SST%%%</p>' |
||||
|
}] |
||||
|
}] |
||||
|
} |
||||
@ -1,54 +1,149 @@ |
|||||
{ |
{ |
||||
xtype: 'form', |
xtype: 'form', |
||||
labelWidth: 75, // label settings here cascade unless overridden
|
|
||||
|
labelWidth: 40, // label settings here cascade unless overridden
|
||||
frame: false, |
frame: false, |
||||
bodyStyle:'padding:5px 5px 0', |
bodyStyle:'padding:5px 5px 0', |
||||
width: 190, |
|
||||
defaults: { |
|
||||
width: 190 |
|
||||
}, |
|
||||
defaultType: 'textfield', |
defaultType: 'textfield', |
||||
items: [ |
|
||||
{ |
|
||||
xtype: 'panel', |
|
||||
height: 100, |
|
||||
html: '<p align="center"><img src="/style/assets/5_node.png"><br/>%%%NODENAME%%%<br/></p>' |
|
||||
},{ |
|
||||
xtype:'fieldset', |
|
||||
title: 'Information', |
|
||||
collapsible: true, |
|
||||
autoHeight: true, |
|
||||
defaults: { |
|
||||
width: 168 |
|
||||
}, |
|
||||
items :[ %%%INFO%%% ] |
|
||||
},{ |
|
||||
xtype:'fieldset', |
|
||||
title: 'Settings', |
|
||||
collapsible: true, |
|
||||
autoHeight:true, |
|
||||
defaults: { |
|
||||
width: 168 |
|
||||
}, |
|
||||
items :[{ |
|
||||
xtype: 'button', |
|
||||
text: 'Master LRF', |
|
||||
handler: function(){ |
|
||||
editSettingsLidar3D( 34,true ); |
|
||||
} |
|
||||
},{ |
|
||||
xtype: 'button', |
|
||||
text: 'Slave LRF', |
|
||||
handler: function() { |
|
||||
editSettingsLidar3D( 34,false ); |
|
||||
} |
|
||||
}] |
|
||||
} |
|
||||
], |
|
||||
buttons: [{ |
|
||||
text: 'Refresh', |
|
||||
handler: function(){ |
|
||||
loadNodeProperties(%%%NODEID%%%); |
|
||||
} |
|
||||
|
items: [{ |
||||
|
xtype: 'panel', |
||||
|
height: 100, |
||||
|
html: '<p align="center"><img src="/style/assets/5_node.png"><br/>%%%DEV_LABEL%%%<br/></p>' |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
//checkboxToggle:true,
|
||||
|
collapsible: true, |
||||
|
title: 'Device', |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 180
|
||||
|
}, |
||||
|
collapsed: false, |
||||
|
items :[{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_name', |
||||
|
name: 'dev_name', |
||||
|
value: '%%%DEV_LABEL%%%' |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_ip', |
||||
|
name: 'dev_ip', |
||||
|
value: '%%%IP_ADDRESS%%%' |
||||
|
},{ |
||||
|
xtype: 'hidden', |
||||
|
id: 'dev_port', |
||||
|
name: 'dev_port', |
||||
|
value: %%%IP_PORT%%% |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">IPv4: %%%IP_ADDRESS%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Port: %%%IP_PORT%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Change Settings', |
||||
|
width: '100%', |
||||
|
handler: function(){ |
||||
|
var wAddSocket = new Ext.Window({ |
||||
|
title: 'Sensor Settings', |
||||
|
width: 450, |
||||
|
//height: 480,
|
||||
|
items:[{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 120, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items:[{ |
||||
|
fieldLabel: 'Label', |
||||
|
id: 'ued_name' |
||||
|
},{ |
||||
|
fieldLabel: 'IP Address', |
||||
|
id: 'ued_address' |
||||
|
},{ |
||||
|
fieldLabel: 'Port', |
||||
|
value: 2222, |
||||
|
readOnly: true, |
||||
|
id: 'ued_port' |
||||
|
}] |
||||
|
}], |
||||
|
buttons:[{ |
||||
|
text: 'Cancel', |
||||
|
handler: function(){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
} |
||||
|
},{ |
||||
|
text: 'Apply Settings', |
||||
|
handler: function(){ |
||||
|
var val_addr = Ext.getCmp('ued_address').getValue(); |
||||
|
var val_name = Ext.getCmp('ued_name').getValue(); |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/updateLrfSettings.php', |
||||
|
params: { |
||||
|
SENSOR: %%%LRF_ID%%%, |
||||
|
SNAME: val_name, |
||||
|
SIPADDR: val_addr |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
wAddSocket.close(); |
||||
|
wAddSocket = null; |
||||
|
loadNodeProperties( %%%NODEID%%% ); |
||||
|
}, |
||||
|
failure: function( response, opts ) { |
||||
|
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}] |
||||
|
}); |
||||
|
wAddSocket.show(); |
||||
|
Ext.getCmp('ued_name').setValue( Ext.getCmp('dev_name').getValue()); |
||||
|
Ext.getCmp('ued_address').setValue( Ext.getCmp('dev_ip').getValue()); |
||||
|
Ext.getCmp('ued_port').setValue( Ext.getCmp('dev_port').getValue()); |
||||
|
} |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'Master LRF', |
||||
|
collapsible: true, |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%M_ORDER%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%M_OFFSET%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%M_WIDTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%M_SST%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
title: 'Slave LRF', |
||||
|
collapsible: true, |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 168
|
||||
|
}, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Order: %%%S_ORDER%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Offset: %%%S_OFFSET%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Width: %%%S_WIDTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">SST: %%%S_SST%%%</p>' |
||||
|
}] |
||||
}] |
}] |
||||
} |
} |
||||
@ -0,0 +1,58 @@ |
|||||
|
{ |
||||
|
xtype: 'form', |
||||
|
labelWidth: 75, // label settings here cascade unless overridden
|
||||
|
frame: false, |
||||
|
bodyStyle:'padding:5px 5px 0', |
||||
|
defaultType: 'textfield', |
||||
|
items: [{ |
||||
|
xtype: 'panel', |
||||
|
height: 100, |
||||
|
html: '<p align="center"><img src="/style/assets/%%%TYPE%%%_node.png"><br/>%%%NAME%%%<br/></p>' |
||||
|
},{ |
||||
|
xtype: 'fieldset', |
||||
|
title: 'Event Data', |
||||
|
autoHeight: true, |
||||
|
items: [{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Azimuth: %%%AZIMUTH%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Elevation: %%%ELEVETION%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Range: %%%RANGE%%%</p>' |
||||
|
}] |
||||
|
},{ |
||||
|
xtype:'fieldset', |
||||
|
//checkboxToggle:true,
|
||||
|
collapsible: true, |
||||
|
title: 'Location', |
||||
|
autoHeight: true, |
||||
|
defaults: { |
||||
|
//width: 180
|
||||
|
}, |
||||
|
defaultType: 'textfield', |
||||
|
collapsed: false, |
||||
|
items :[{ |
||||
|
xtype: 'panel', |
||||
|
//html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;"><a href="https://www.google.com/maps/@%%%LAT%%%,%%%LON%%%,19z" target="-new">Goole Map</a></p>'
|
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;"><a href="https://www.google.com/maps/search/?api=1&query=%%%LAT%%%,%%%LON%%%" target="-new">Goole Map</a></p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Lat: %%%LAT%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Lon: %%%LON%%%</p>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<p align="center" style="padding: 5px; color: yellow; background-color: green;">Alt: %%%ALT%%%</p>' |
||||
|
}] |
||||
|
}], |
||||
|
/* |
||||
|
buttons: [{ |
||||
|
text: 'Update', |
||||
|
width: '100%', |
||||
|
handler: updateLocationOrientation |
||||
|
}] |
||||
|
*/ |
||||
|
} |
||||
@ -0,0 +1,68 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$NID = intval($_POST['NID']); |
||||
|
$Data = array(); |
||||
|
if( $NID ){ |
||||
|
$QS = "SELECT * FROM nodes WHERE id={$NID}"; |
||||
|
$result = $DATABASE->Query( $QS, false ); |
||||
|
if( count( $result ) ){ |
||||
|
$T = $result[0]; |
||||
|
$AID = intval( $T['aux_id'] ); |
||||
|
$TYP = intval( $T['type'] ); |
||||
|
$QS = "DELETE FROM `sockets` WHERE `node_id`={$NID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$QS = "DELETE FROM `connections` WHERE `from`={$NID} OR `to`={$NID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
switch( $TYP ){ |
||||
|
case 1: |
||||
|
case 2: |
||||
|
case 3: |
||||
|
case 4: |
||||
|
case 5:{ |
||||
|
// Sensor
|
||||
|
$QS = "DELETE FROM `lrf_sensors` WHERE `id`={$AID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
break; |
||||
|
}; |
||||
|
case 13:{ |
||||
|
// Camera
|
||||
|
$QS = "SELECT * FROM `media_streams` WHERE `source_id`={$AID}"; |
||||
|
$RR = $DATABASE->Query( $QS ); |
||||
|
if( count( $RR ) ){ |
||||
|
foreach( $RR as $R ){ |
||||
|
$QS = "DELETE FROM `media_server_streams` WHERE `media_stream_id`={$R['id']}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
}; |
||||
|
$QS = "DELETE FROM `media_streams` WHERE `source_id`={$AID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
}; |
||||
|
$QS = "UPDATE `cameras` SET `status`=0 WHERE `id`={$AID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
break; |
||||
|
}; |
||||
|
case 20:{ |
||||
|
// EthernetUART
|
||||
|
$QS = "DELETE FROM `uart_settings` WHERE `id`={$AID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$QS = "UPDATE `cameras` SET `uart_id`=0 WHERE `uart_id`={$AID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$QS = "UPDATE `lrf_sensors` SET `uart_id`=0 WHERE `uart_id`={$AID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
$QS = "DELETE FROM `nodes` WHERE `id`={$NID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$Data['success'] = true; |
||||
|
} else { |
||||
|
$Data['error'] = 'Unknown Node ID Provided!'; |
||||
|
}; |
||||
|
} else { |
||||
|
$Data['error'] = 'Unknown Node ID Provided!'; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
header('location: /'); |
||||
|
?>
|
||||
@ -0,0 +1,24 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
if( isset( $_POST['SENSOR'] ) ){ |
||||
|
$S_ID = intval($_POST['SENSOR']); |
||||
|
if( $S_ID ){ |
||||
|
$NAME = $DATABASE->escape($_POST['SNAME']); |
||||
|
if(isset($_POST['SADDR'])){ |
||||
|
$ADDR = intval($_POST['SADDR']); |
||||
|
$RANGE = floatval($_POST['SRANGE']); |
||||
|
$QS="UPDATE `lrf_sensors` SET `device_id`={$ADDR}, `max_range`={$RANGE}, `label`='{$NAME}' WHERE id={$S_ID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
} else { |
||||
|
$IP= $DATABASE->escape($_POST['SIPADDR']); |
||||
|
$NAME = $DATABASE->escape($_POST['SNAME']); |
||||
|
$QS="UPDATE `lrf_sensors` SET `ip_address`='{$IP}', `label`='{$NAME}' WHERE id={$S_ID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
}; |
||||
|
$QS="UPDATE `nodes` SET `name`='{$NAME}' WHERE `aux_id`={$S_ID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,26 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
if( isset( $_POST['UART'] ) ){ |
||||
|
$UART_ID = intval($_POST['UART']); |
||||
|
if( $UART_ID ){ |
||||
|
$UART_SPEED = intval($_POST['USPD']); |
||||
|
$UART_BIT = intval($_POST['UBIT']); |
||||
|
$UART_STOP = floatval($_POST['USTP']); |
||||
|
switch( strtoupper( substr( $_POST['UPAR'], 1 ) ) ){ |
||||
|
case 'E': $UART_PARITY = 'E'; break; |
||||
|
case 'O': $UART_PARITY = 'O'; break; |
||||
|
default: |
||||
|
$UART_PARITY = 'N'; |
||||
|
}; |
||||
|
$UART_IP = $DATABASE->escape( $_POST['UADR'] ); |
||||
|
$UART_PORT = intval( $_POST['UPOR'] ); |
||||
|
$UART_MODE = intval( $_POST['UMOD'] ); |
||||
|
if( $UART_PORT > 0 ){ |
||||
|
$QS="UPDATE `uart_settings` SET `speed`={$UART_SPEED}, `bit`={$UART_BIT}, `parity`='{$UART_PARITY}', `stop_bit`={$UART_STOP}, `port`={$UART_PORT}, `path`='{$UART_IP}', `mode`={$UART_MODE} WHERE id ={$UART_ID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,17 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
if( isset( $_POST['SSS'] ) ){ |
||||
|
$SETTING_ID = intval($_POST['SSS']); |
||||
|
switch( $SETTING_ID ){ |
||||
|
case 15:{ |
||||
|
$WIDTH = intval($_POST['WID']); |
||||
|
$HEIGHT = intval($_POST['HEI']); |
||||
|
$QS="UPDATE `users` SET `width`={$WIDTH}, `height`={$HEIGHT} WHERE id={$CUser->Data['id']}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
?>
|
||||
|
After Width: 512 | Height: 512 | Size: 39 KiB |
|
After Width: 64 | Height: 64 | Size: 11 KiB |
|
After Width: 509 | Height: 525 | Size: 27 KiB |
|
After Width: 1833 | Height: 525 | Size: 55 KiB |
|
Before Width: 1920 | Height: 1040 | Size: 61 KiB |
|
Before Width: 626 | Height: 448 | Size: 56 KiB After Width: 626 | Height: 448 | Size: 72 KiB |