Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

481 lines
12 KiB

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
6 years ago
​
​
​
​
​
5 years ago
​
​
5 years ago
​
​
​
​
​
5 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 years ago
​
​
​
​
​
5 years ago
​
​
​
​
​
​
​
5 years ago
​
​
​
​
​
​
​
​
​
​
​
5 years ago
​
​
​
​
​
​
​
5 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 years ago
​
​
​
​
​
​
​
5 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 years ago
5 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //<?php require_once('../../js_asm.php'); ?>
  2. var devicesStore = new Ext.data.JsonStore({
  3. root: 'nodes',
  4. totalProperty: 'totalCount',
  5. idProperty: 'id',
  6. remoteSort: true,
  7. fields: [{
  8. name: 'id',
  9. type: 'int'
  10. },{
  11. name: 'name',
  12. type: 'string'
  13. },{
  14. name: 'hardware',
  15. type: 'string'
  16. },{
  17. name: 'caps',
  18. type: 'int'
  19. },{
  20. name: 'ip',
  21. type: 'string'
  22. },{
  23. name: 'mac',
  24. type: 'string'
  25. }],
  26. proxy : new Ext.data.HttpProxy({
  27. method: 'POST',
  28. prettyUrls: false,
  29. url: '/lib/controller/listDiscoveredCameraSources.php',
  30. headers: {
  31. 'UID': '<?=$CUser->Data['id'];?>',
  32. 'SID': '<?=$Session;?>'
  33. }
  34. })
  35. });
  36. var LRF1D2_st_win = null;
  37. var LRF2D2_st_win = null;
  38. var LRF16D3_st_win = null;
  39. function loadFullLRF1D2Data( NodeID ){
  40. if( LRF1D2_st_win == null ) return;
  41. Ext.Ajax.request({
  42. url: '/lib/controller/getSettingsLRF.php',
  43. params: {
  44. NID: NodeID,
  45. UID: '<?=$CUser->Data['id'];?>',
  46. SID: '<?=$Session;?>',
  47. },
  48. success: function( response, opts ){
  49. if( LRF1D2_st_win!= null ){
  50. var data = Ext.decode(response.responseText);
  51. if( data.online ){
  52. switch( data.data_status ){
  53. case 0: Ext.getCmp('dev_online').update('<p class="green_status">ONLINE/Data Incomplete</p>'); break;
  54. case 1: Ext.getCmp('dev_online').update('<p class="green_status">ONLINE/Synced</p>'); break;
  55. case 2: Ext.getCmp('dev_online').update('<p class="green_status">ONLINE/Data Not Applyed</p>'); break;
  56. };
  57. } else {
  58. switch( data.data_status ){
  59. case 0: Ext.getCmp('dev_online').update('<p class="blue_status">OFFLINE/Data Incomplete</p>'); break;
  60. case 1: Ext.getCmp('dev_online').update('<p class="blue_status">OFFLINE/Synced</p>'); break;
  61. case 2: Ext.getCmp('dev_online').update('<p class="blue_status">OFFLINE/Data Not Applyed</p>'); break;
  62. };
  63. };
  64. Ext.getCmp('dev_name').setValue( data.name );
  65. Ext.getCmp('serial_num').setValue( data.serial );
  66. Ext.getCmp('version_id').setValue( data.version );
  67. Ext.getCmp('device_id').setValue( data.device_id );
  68. Ext.getCmp('com_spd').setValue( data.com_spd );
  69. Ext.getCmp('max_range').setValue( data.max_range );
  70. Ext.getCmp('base_shift').setValue( data.base_shift );
  71. Ext.getCmp('com_spd').setValue( data.uart_speed );
  72. Ext.getCmp('mlrf_offset').setValue( data.m_offset );
  73. Ext.getCmp('slrf_offset').setValue( data.s_offset );
  74. Ext.getCmp('mlrf_delta').setValue( data.m_delta );
  75. Ext.getCmp('slrf_delta').setValue( data.s_delta );
  76. Ext.getCmp('mlrf_width').setValue( data.m_width );
  77. Ext.getCmp('slrf_width').setValue( data.s_width );
  78. Ext.getCmp('mlrf_order').setValue( data.m_order );
  79. Ext.getCmp('slrf_order').setValue( data.s_order );
  80. Ext.getCmp('mlrf_sst').setValue( data.m_sst );
  81. Ext.getCmp('slrf_sst').setValue( data.s_sst );
  82. Ext.getCmp('mlrf_flip').setValue( data.m_flip );
  83. Ext.getCmp('slrf_flip').setValue( data.s_flip );
  84. Ext.getCmp('mlrf_sun').setValue( data.m_sun );
  85. Ext.getCmp('slrf_sun').setValue( data.s_sun );
  86. };
  87. },
  88. failure: failureAJAXFunction
  89. });
  90. };
  91. function LRF1D2_settings(){
  92. if( LRF1D2_st_win == null ){
  93. LRF1D2_st_win = new Ext.Window({
  94. title: 'Sensor Settings',
  95. modal: true,
  96. width: 800,
  97. height: 600,
  98. closeAction: 'hide',
  99. items:{
  100. xtype: 'tabpanel',
  101. activeTab: 0,
  102. items:[{
  103. title: 'General Settings',
  104. xtype: 'form',
  105. layout: 'table',
  106. defaults: {
  107. bodyStyle:'padding:20px'
  108. },
  109. layoutConfig: {
  110. columns: 3
  111. },
  112. items:[{
  113. html: 'Status',
  114. frame: false,
  115. border: false
  116. },{
  117. html: '<p class="green_status">ONLINE</p>',
  118. id: 'dev_online',
  119. frame: false,
  120. border: false
  121. },{},{
  122. html: 'Device Title',
  123. frame: false,
  124. border: false
  125. },{
  126. xtype: 'field',
  127. id: 'dev_name',
  128. readOnly: false,
  129. value: 'KOKO'
  130. },{},{
  131. html: 'Serial Number',
  132. frame: false,
  133. border: false
  134. },{
  135. xtype: 'field',
  136. id: 'serial_num',
  137. readOnly: true,
  138. value: '1212'
  139. },{},{
  140. html: 'Version ID',
  141. frame: false,
  142. border: false
  143. },{
  144. xtype: 'field',
  145. id: 'version_id',
  146. readOnly: true,
  147. value: 'LiberManDA122'
  148. },{},{
  149. html: 'Device Adress',
  150. frame: false,
  151. border: false
  152. },{
  153. xtype: 'numberfield',
  154. id: 'device_id'
  155. },{
  156. xtype: 'button',
  157. id: 'upddiBTN',
  158. text: 'Update Device Address',
  159. handler: function(){
  160. Ext.Msg.show({
  161. title:'Update Device Address?',
  162. msg: 'Are you sure to do so?',
  163. buttons: Ext.Msg.YESNOCANCEL,
  164. //fn: processResult,
  165. animEl: 'upddiBTN',
  166. icon: Ext.MessageBox.QUESTION
  167. });
  168. }
  169. },{
  170. html: 'Device COM Speed',
  171. frame: false,
  172. border: false
  173. },{
  174. xtype: 'combo',
  175. id: 'com_spd',
  176. editable: false,
  177. typeAhead: true,
  178. triggerAction: 'all',
  179. width: '100%',
  180. lazyRender:true,
  181. mode: 'local',
  182. store: new Ext.data.ArrayStore({
  183. id: 0,
  184. fields: ['mySPD', 'displayText' ],
  185. data: [[4800,'4800'],[9600,'9600'],[14400,'14400'],[19200,'19200'],[38400, '38400'],[56000,'56000'],[57600,'57600'],[115200,'115200']]
  186. }),
  187. valueField: 'mySPD',
  188. displayField: 'displayText'
  189. },{
  190. xtype: 'button',
  191. id: 'updspBTN',
  192. text: 'Set Device Speed',
  193. handler: function(){
  194. Ext.Msg.show({
  195. title:'Update Device Speed?',
  196. msg: 'Are you sure to do so?',
  197. buttons: Ext.Msg.YESNOCANCEL,
  198. //fn: processResult,
  199. animEl: 'upddiBTN',
  200. icon: Ext.MessageBox.QUESTION
  201. });
  202. }
  203. },{
  204. html: 'Detection Maximal Range',
  205. frame: false,
  206. border: false
  207. },{
  208. xtype: 'numberfield',
  209. id: 'max_range',
  210. readOnly: true,
  211. value: '1212'
  212. },{},{
  213. html: 'Base Shift',
  214. frame: false,
  215. border: false
  216. },{
  217. xtype: 'numberfield',
  218. id: 'base_shift',
  219. readOnly: true,
  220. value: '1212'
  221. },{}]
  222. },{
  223. title: 'Mantenence',
  224. xtype: 'form',
  225. layout: 'table',
  226. defaults: {
  227. bodyStyle:'padding:20px'
  228. },
  229. layoutConfig: {
  230. columns: 2
  231. },
  232. items:[{
  233. html: 'Restart Device',
  234. frame: false,
  235. border: false
  236. },{
  237. xtype: 'button',
  238. id: 'rstBTN',
  239. text: 'Full Reset',
  240. handler: function(){
  241. Ext.Msg.show({
  242. title:'Reset Device?',
  243. msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
  244. buttons: Ext.Msg.YESNOCANCEL,
  245. //fn: processResult,
  246. animEl: 'rstBTN',
  247. icon: Ext.MessageBox.QUESTION
  248. });
  249. }
  250. }]
  251. },{
  252. title: 'Detection Settings',
  253. xtype: 'form',
  254. layout: 'table',
  255. defaults: {
  256. bodyStyle:'padding:20px'
  257. },
  258. layoutConfig: {
  259. columns: 4
  260. },
  261. items:[{
  262. html: 'Master Offset',
  263. frame: false,
  264. border: false
  265. },{
  266. xtype: 'numberfield',
  267. id: 'mlrf_offset',
  268. name: 'mlrf_offset',
  269. allowBlank: false,
  270. allowDecimals: false,
  271. maxText: 'The Range is: 0 - 60',
  272. maxValue: 60,
  273. minText: 'No Negative Values Allowed',
  274. minValue: 0,
  275. },{
  276. html: 'Slave Offset',
  277. frame: false,
  278. border: false
  279. },{
  280. xtype: 'numberfield',
  281. id: 'slrf_offset',
  282. name: 'slrf_offset',
  283. allowBlank: false,
  284. allowDecimals: false,
  285. maxText: 'The Range is: 0 - 60',
  286. maxValue: 60,
  287. minText: 'No Negative Values Allowed',
  288. minValue: 0,
  289. },{
  290. html: 'Master Delta',
  291. frame: false,
  292. border: false
  293. },{
  294. xtype: 'numberfield',
  295. id: 'mlrf_delta',
  296. name: 'mlrf_delta',
  297. allowBlank: false,
  298. allowDecimals: false,
  299. maxText: 'The Range is: 0 - 320',
  300. maxValue: 320,
  301. minText: 'No Negative Values Allowed',
  302. minValue: 0
  303. },{
  304. html: 'Slave Delta',
  305. frame: false,
  306. border: false
  307. },{
  308. xtype: 'numberfield',
  309. id: 'slrf_delta',
  310. name: 'slrf_delta',
  311. allowBlank: false,
  312. allowDecimals: false,
  313. maxText: 'The Range is: 0 - 320',
  314. maxValue: 320,
  315. minText: 'No Negative Values Allowed',
  316. minValue: 0
  317. },{
  318. html: 'Master Width',
  319. frame: false,
  320. border: false
  321. },{
  322. xtype: 'numberfield',
  323. id: 'mlrf_width',
  324. name: 'mlrf_width',
  325. allowBlank: false,
  326. allowDecimals: false,
  327. maxText: 'The Range is: 1800 - 16000',
  328. maxValue: 16000,
  329. minText: 'The Range is: 1800 - 16000',
  330. minValue: 1800
  331. },{
  332. html: 'Slave Width',
  333. frame: false,
  334. border: false
  335. },{
  336. xtype: 'numberfield',
  337. id: 'slrf_width',
  338. name: 'slrf_width',
  339. allowBlank: false,
  340. allowDecimals: false,
  341. maxText: 'The Range is: 1800 - 16000',
  342. maxValue: 16000,
  343. minText: 'The Range is: 1800 - 16000',
  344. minValue: 1800
  345. },{
  346. html: 'Master Order',
  347. frame: false,
  348. border: false
  349. },{
  350. xtype: 'numberfield',
  351. id: 'mlrf_order',
  352. name: 'mlrf_order',
  353. allowBlank: false,
  354. allowDecimals: false,
  355. maxText: 'The Range is: 0 - 10',
  356. maxValue: 10,
  357. minText: 'No Negative Values Allowed',
  358. minValue: 0
  359. },{
  360. html: 'Slave Order',
  361. frame: false,
  362. border: false
  363. },{
  364. xtype: 'numberfield',
  365. id: 'slrf_order',
  366. name: 'slrf_order',
  367. allowBlank: false,
  368. allowDecimals: false,
  369. maxText: 'The Range is: 0 - 10',
  370. maxValue: 10,
  371. minText: 'No Negative Values Allowed',
  372. minValue: 0
  373. },{
  374. html: 'Master SST',
  375. frame: false,
  376. border: false
  377. },{
  378. xtype: 'numberfield',
  379. id: 'mlrf_sst',
  380. name: 'mlrf_sst',
  381. allowBlank: false,
  382. allowDecimals: false,
  383. maxText: 'The Range is: 0 - 100',
  384. maxValue: 100,
  385. minText: 'No Negative Values Allowed',
  386. minValue: 0
  387. },{
  388. html: 'Slave SST',
  389. frame: false,
  390. border: false
  391. },{
  392. xtype: 'numberfield',
  393. id: 'slrf_sst',
  394. name: 'slrf_sst',
  395. allowBlank: false,
  396. allowDecimals: false,
  397. maxText: 'The Range is: 0 - 100',
  398. maxValue: 100,
  399. minText: 'No Negative Values Allowed',
  400. minValue: 0
  401. },{
  402. html: 'Mastr Flip',
  403. frame: false,
  404. border: false
  405. },{
  406. xtype: 'numberfield',
  407. id: 'mlrf_flip',
  408. name: 'mlrf_flip',
  409. allowBlank: false,
  410. allowDecimals: false,
  411. maxText: 'The Range is: 8 - 128',
  412. maxValue: 128,
  413. minText: 'The Range is: 8 - 128',
  414. minValue: 8
  415. },{
  416. html: 'Slave Flip',
  417. frame: false,
  418. border: false
  419. },{
  420. xtype: 'numberfield',
  421. id: 'slrf_flip',
  422. name: 'slrf_flip',
  423. allowBlank: false,
  424. allowDecimals: false,
  425. maxText: 'The Range is: 8 - 128',
  426. maxValue: 128,
  427. minText: 'The Range is: 8 - 128',
  428. minValue: 8
  429. },{
  430. html: 'Master Sun',
  431. frame: false,
  432. border: false
  433. },{
  434. xtype: 'numberfield',
  435. id: 'mlrf_sun',
  436. name: 'mlrf_sun',
  437. allowBlank: false,
  438. allowDecimals: false,
  439. maxText: 'The Range is: 0 - 100',
  440. maxValue: 100,
  441. minText: 'No Negative Values Allowed',
  442. minValue: 0
  443. },{
  444. html: 'Slave Sun',
  445. frame: false,
  446. border: false
  447. },{
  448. xtype: 'numberfield',
  449. id: 'slrf_sun',
  450. name: 'slrf_sun',
  451. allowBlank: false,
  452. allowDecimals: false,
  453. maxText: 'The Range is: 0 - 100',
  454. maxValue: 100,
  455. minText: 'No Negative Values Allowed',
  456. minValue: 0
  457. }]
  458. },{
  459. title: 'Embed Options'
  460. },{
  461. title: 'Target Width Table'
  462. }]
  463. }
  464. });
  465. };
  466. LRF1D2_st_win.show();
  467. loadFullLRF1D2Data( SelectedNodeID );
  468. };
  469. function LRF2D2_settings(){
  470. };
  471. function LRF16D3_settings(){
  472. };