Web Interface For Lite Argus Control modules
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.

914 lines
25 KiB

​
​
​
​
4 years ago
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
4 years ago
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
4 years ago
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
4 years ago
4 years ago
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
4 years ago
​
​
4 years ago
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
4 years ago
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
4 years ago
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
4 years ago
​
​
​
​
4 years ago
​
4 years ago
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $EID = intval( $_POST['CID'] );
  5. $QS = "SELECT `sen`.*, `no`.`enable`, `no`.`name`, `no`.`id` as `node_id` FROM `lrf_sensors` `sen` LEFT JOIN `nodes` `no` ON( `no`.`aux_id`=`sen`.`id` AND `no`.`type`=`sen`.`type`) WHERE `sen`.`id`={$EID}";
  6. $Result = $DATABASE->Query( $QS, false );
  7. if( count( $Result ) ){
  8. $CR = $Result[0];
  9. $CR['ack_mask_type'] = intval( $CR['ack_mask_type'] );
  10. $CR['ack_mask_size'] = intval( $CR['ack_mask_size'] );
  11. $TTPL=<<<JOJOKA
  12. {
  13. xtype: 'panel',
  14. border: false,
  15. frame: false,
  16. items:[%%%ITEMS%%%]
  17. }
  18. JOJOKA;
  19. $ITEMS = array();
  20. switch( $CR['type'] ){
  21. case 1: $NAME = '<b>'.$CR['name'].'</b><br/>ALS ' . $Labels->getLabel('SENSOR'); break;
  22. case 2: $NAME = '<b>'.$CR['name'].'</b><br/>LFS ' . $Labels->getLabel('SENSOR'); break;
  23. case 3: $NAME = '<b>'.$CR['name'].'</b><br/>PLS200 ' . $Labels->getLabel('SENSOR'); break;
  24. case 4: $NAME = '<b>'.$CR['name'].'</b><br/>PLS360 ' . $Labels->getLabel('SENSOR'); break;
  25. default: $NAME = '<b>'.$CR['name'].'</b><br/>Unknown Sensor';
  26. };
  27. $NAME .='<br/>communication errors per minute: '.$CR['com_epm'];
  28. $INFO = '<table width="100%" border=0 style="font-weight: bold;"><tr><td width="130px" align="right">'.$Labels->GetLabel('_SERIAL_').':</td><td>'.(($CR['serial']!='')?$CR['serial']:'No Serial Defined').'</td></tr><tr><td align="right">'.$Labels->GetLabel('_VERSION_').':</td><td>'.(($CR['version']!='')?$CR['version']:'No Version Info').'</td></tr></table>';
  29. $ITEMS[0]="{ xtype:'panel', border: false, frame: false, html: '<table width=\"100%\" border=0 class=\"setEd_infoPanel\" id=\"SENSOR_".(($CR['enable']==1)?'A':'N')."\"><tr><td width=\"200px\"><div class=\"node_".$CR['type']."_img_sset\"></div></td><td valign=\"middle\">{$NAME}</td></tr><tr><td colspan=2>{$INFO}</td></tr></table><br/>'}";
  30. $QS="SELECT aux_id, device FROM resources WHERE ( type=1 OR type=129 )";
  31. $RR=$DATABASE->Query( $QS );
  32. if( count( $RR ) ){
  33. $RE=array();
  34. foreach( $RR as $R ){
  35. $RE[] = "[ {$R['aux_id']}, '{$R['device']}']";
  36. };
  37. $UARTS = implode( ',', $RE );
  38. } else {
  39. $UARTS = "[0, \"".$Labels->GetLabel('_NO_UARTS_DEF_')."\"]";
  40. };
  41. $QS = "SELECT * FROM `lrf_ini_settings` WHERE `sensor_id`={$EID}";
  42. $RRR = $DATABASE->Query( $QS );
  43. if( count( $RRR ) ){
  44. $INI_S = $RRR[0];
  45. } else {
  46. $INI_S = array();
  47. $INI_S['AUTORESET_ENABLE'] = 0;
  48. $INI_S['AUTORESET_INTERLEAVE'] = 2000;
  49. $INI_S['AUTORESET_TIMEOUT'] = 60000;
  50. $INI_S['BOARD_TEMPERATURE'] = 1;
  51. $INI_S['BOARD_ZEROSHIFT'] = 0;
  52. $INI_S['BOARD_SPEED'] = 4;
  53. $INI_S['RUN_DIR'] = 2;
  54. $INI_S['NO_BLACK_TARGETS'] = 1;
  55. $INI_S['JUST_MOVING_TARGETS'] = 0;
  56. $INI_S['JUST_MOVING_RADIAL'] = 0;
  57. $INI_S['JUST_MOVING_DISTANCE'] = 0;
  58. if( stripos( $CR['version'], ' FF ' )!== false ) {
  59. $INI_S['FREEZ_FIRST_TH'] = 1;
  60. $INI_S['SAVE_FIRST_TH'] = 1;
  61. } else if( stripos( $CR['version'], ' FS ' )!== false ){
  62. $INI_S['FREEZ_FIRST_TH'] = 1;
  63. $INI_S['SAVE_FIRST_TH'] = 1;
  64. } else if( stripos( $CR['version'], ' FD ' )!== false ){
  65. $INI_S['FREEZ_FIRST_TH'] = 0;
  66. $INI_S['SAVE_FIRST_TH'] = 0;
  67. } else {
  68. $INI_S['FREEZ_FIRST_TH'] = 0;
  69. $INI_S['SAVE_FIRST_TH'] = 0;
  70. };
  71. $QS = "INSERT INTO `lrf_ini_settings`(`sensor_id`,`AUTORESET_ENABLE`,`AUTORESET_INTERLEAVE`,`AUTORESET_TIMEOUT`,`BOARD_TEMPERATURE`,`BOARD_ZEROSHIFT`,`BOARD_SPEED`,`RUN_DIR`,`NO_BLACK_TARGETS`,`JUST_MOVING_TARGETS`,`JUST_MOVING_RADIAL`,`JUST_MOVING_DISTANCE`,`FREEZ_FIRST_TH`,`SAVE_FIRST_TH`) VALUES({$EID},0,0,0,0,0,4,2,0,0,0,0,{$INI_S['FREEZ_FIRST_TH']},{$INI_S['SAVE_FIRST_TH']})";
  72. $DATABASE->Query( $QS );
  73. };
  74. $QS = "SELECT `id`, `name` FROM `nodes` WHERE `type` IN (10,11,12,13,14,15)";
  75. $KD = $DATABASE->Query( $QS );
  76. if( count( $KD ) ){
  77. $CO = array();
  78. $CO[] = "[0,'{$Labels->GetLabel('__DISABLED__')}']";
  79. foreach( $KD as $CK ){
  80. $CO[] = "[{$CK['id']},'{$CK['name']}']";
  81. };
  82. $SYSTEM_CAMERAS = '['.implode( ',', $CO ).']';
  83. } else {
  84. $SYSTEM_CAMERAS = "[[0,'{$Labels->GetLabel('__DISABLED__')}']]";
  85. };
  86. if( ( stripos( $CR['version'], 'FD' )!== false ) || ( stripos( $CR['version'], 'FS' )!== false ) || ( stripos( $CR['version'], 'FF' )!== false ) ){
  87. //Frozen TH
  88. if( stripos( $CR['version'], 'FD' )!== false ){
  89. $THF_OPERATION = ",{
  90. xtype: 'button',
  91. text: '{$Labels->GetLabel('_SENS_ENA_FROTH_')}',
  92. width: '100%',
  93. iconCls: 'srv_op_fth_ble',
  94. scale: 'large',
  95. handler: function(){
  96. doSensorOperation( {$CR['id']}, 21, 0, true );
  97. }
  98. }";
  99. } else {
  100. if( stripos( $CR['version'], 'FS' )!== false ){
  101. $THF_OPERATION = ",{
  102. xtype: 'button',
  103. text: '{$Labels->GetLabel('_SENS_FIN_FROTH_')}',
  104. width: '100%',
  105. iconCls: 'srv_op_fth_study',
  106. scale: 'large',
  107. handler: function(){
  108. doSensorOperation( {$CR['id']}, 24, 0, true );
  109. }
  110. }";
  111. };
  112. if( stripos( $CR['version'], 'FF' )!== false ){
  113. $THF_OPERATION = ",{
  114. xtype: 'button',
  115. text: '{$Labels->GetLabel('_SENS_DEL_FROTH_')}',
  116. width: '100%',
  117. iconCls: 'srv_op_fth_frozen',
  118. scale: 'large',
  119. handler: function(){
  120. doSensorOperation( {$CR['id']}, 23, 0, true );
  121. }
  122. }";
  123. };
  124. $THF_OPERATION .= ",{
  125. xtype: 'button',
  126. text: '{$Labels->GetLabel('_SENS_DIS_FROTH_')}',
  127. width: '100%',
  128. iconCls: 'srv_op_fth_ble',
  129. scale: 'large',
  130. handler: function(){
  131. doSensorOperation( {$CR['id']}, 22, 0, true );
  132. }
  133. }";
  134. };
  135. } else {
  136. $THF_OPERATION = '';
  137. }
  138. $ED =<<<kokakskhkajhskr
  139. {
  140. xtype: 'tabpanel',
  141. activeTab: 0,
  142. items:[{
  143. xtype: 'form',
  144. title: '{$Labels->GetLabel('_GENERAL_')}',
  145. labelWidth: 200,
  146. border: false,
  147. frame: false,
  148. labelAlign: 'right',
  149. height: PanelH - 283,
  150. items:[{
  151. xtype: 'combo',
  152. id: 'sens_se',
  153. fieldLabel: "{$Labels->GetLabel('_SENS_STATUS_')}",
  154. lazyRender: true,
  155. mode: 'local',
  156. forceSelection: true,
  157. triggerAction: 'all',
  158. editable: false,
  159. disableKeyFilter: true,
  160. store: new Ext.data.ArrayStore({
  161. fields: ['mode','mode_txt'],
  162. data: [
  163. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  164. [1,'{$Labels->GetLabel('___ENABLED__')}']
  165. ]
  166. }),
  167. valueField: 'mode',
  168. displayField: 'mode_txt',
  169. value: {$CR['enable']},
  170. width: 200,
  171. listeners:{
  172. select: function( a, c, b ){
  173. doSensorOperation( {$CR['id']}, 1, b, true );
  174. }
  175. }
  176. },{
  177. xtype: 'combo',
  178. id: 'sens_range',
  179. fieldLabel: "{$Labels->GetLabel('SENS_RANGE')}",
  180. lazyRender: true,
  181. mode: 'local',
  182. forceSelection: true,
  183. triggerAction: 'all',
  184. editable: false,
  185. disableKeyFilter: true,
  186. store: new Ext.data.ArrayStore({
  187. fields: ['range','range_txt'],
  188. data: [
  189. [15,'15 {$Labels->GetLabel('_METERS_')}'],
  190. [35,'35 {$Labels->GetLabel('_METERS_')}'],
  191. [45,'45 {$Labels->GetLabel('_METERS_')}'],
  192. [65,'65 {$Labels->GetLabel('_METERS_')}'],
  193. [75,'75 {$Labels->GetLabel('_METERS_')}'],
  194. [150,'150 {$Labels->GetLabel('_METERS_')}'],
  195. [200,'200 {$Labels->GetLabel('_METERS_')}'],
  196. [300,'300 {$Labels->GetLabel('_METERS_')}'],
  197. [350,'350 {$Labels->GetLabel('_METERS_')}']
  198. ]
  199. }),
  200. valueField: 'range',
  201. displayField: 'range_txt',
  202. value: {$CR['max_range']},
  203. width: 200,
  204. listeners:{
  205. select: function( a, c, b ){
  206. doSensorOperation( {$CR['id']}, 2, b, true );
  207. }
  208. }
  209. },{
  210. xtype: 'numberfield',
  211. id: 'sens_id',
  212. fieldLabel: '{$Labels->GetLabel('_PROTO_DEVICE_ID_')}',
  213. width: 200,
  214. value: {$CR['device_id']},
  215. listeners:{
  216. change: function( a, c, b ){
  217. doSensorOperation( {$CR['id']}, 3, c, true );
  218. }
  219. }
  220. },{
  221. xtype: 'combo',
  222. fieldLabel: '{$Labels->GetLabel('_UART_PORT_')}',
  223. lazyRender: true,
  224. id: 'uart_id',
  225. mode: 'local',
  226. disabled: false,
  227. forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true,
  228. store: new Ext.data.ArrayStore({
  229. fields: ['uart','uart_txt'],
  230. data: [{$UARTS}]
  231. }),
  232. valueField: 'uart',
  233. displayField: 'uart_txt',
  234. value: {$CR['uart_id']},
  235. width: 200,
  236. listeners:{
  237. select: function( a, c, b ){
  238. doSensorOperation( {$CR['id']}, 4, c.data.uart, true );
  239. }
  240. }
  241. },{
  242. xtype: 'combo',
  243. id: 'ad_se',
  244. fieldLabel: "{$Labels->GetLabel('AUTO_DRAW')}",
  245. lazyRender: true,
  246. mode: 'local',
  247. forceSelection: true,
  248. triggerAction: 'all',
  249. editable: false,
  250. disableKeyFilter: true,
  251. store: new Ext.data.ArrayStore({
  252. fields: ['ad','ad_txt'],
  253. data: [
  254. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  255. [10,'Each 10 Flips'],
  256. [20,'Each 20 Flips'],
  257. [30,'Each 30 Flips'],
  258. [40,'Each 40 Flips'],
  259. [50,'Each 50 Flips'],
  260. [100,'Each 100 Flips'],
  261. [200,'Each 200 Flips']
  262. ]
  263. }),
  264. valueField: 'ad',
  265. displayField: 'ad_txt',
  266. value: {$CR['auto_draw']},
  267. width: 200,
  268. listeners:{
  269. select: function( a, c, b ){
  270. doSensorOperation( {$CR['id']}, 5, b, true );
  271. }
  272. }
  273. },{
  274. xtype: 'numberfield',
  275. id: 'basesh_id',
  276. fieldLabel: 'Background {$Labels->GetLabel('__ZERO_SHIFT__')}',
  277. width: 200,
  278. value: {$CR['base_shift']},
  279. listeners:{
  280. change: function( a, c, b ){
  281. doSensorOperation( {$CR['id']}, 6, c, true );
  282. }
  283. }
  284. },{
  285. xtype: 'combo',
  286. id: 'sens_at',
  287. fieldLabel: "{$Labels->GetLabel('_SENS_ACKT_')}",
  288. lazyRender: true,
  289. mode: 'local',
  290. forceSelection: true,
  291. triggerAction: 'all',
  292. editable: false,
  293. disableKeyFilter: true,
  294. store: new Ext.data.ArrayStore({
  295. fields: ['mode','mode_txt'],
  296. data: [
  297. [0,'{$Labels->GetLabel('_MA_ROUND_')}'],
  298. [1,'{$Labels->GetLabel('_MA_CIRCLE__')}']
  299. ]
  300. }),
  301. valueField: 'mode',
  302. displayField: 'mode_txt',
  303. value: {$CR['ack_mask_type']},
  304. width: 200,
  305. listeners:{
  306. select: function( a, c, b ){
  307. doSensorOperation( {$CR['id']}, 25, b, true );
  308. }
  309. }
  310. },{
  311. xtype: 'combo',
  312. id: 'sens_as',
  313. fieldLabel: "{$Labels->GetLabel('_SENS_ACKS_')}",
  314. lazyRender: true,
  315. mode: 'local',
  316. forceSelection: true,
  317. triggerAction: 'all',
  318. editable: false,
  319. disableKeyFilter: true,
  320. store: new Ext.data.ArrayStore({
  321. fields: ['size','size_txt'],
  322. data: [
  323. [10,'10 {$Labels->GetLabel('_METERS_')}'],
  324. [20,'20 {$Labels->GetLabel('_METERS_')}'],
  325. [30,'30 {$Labels->GetLabel('_METERS_')}'],
  326. [40,'40 {$Labels->GetLabel('_METERS_')}'],
  327. [50,'50 {$Labels->GetLabel('_METERS_')}'],
  328. [60,'60 {$Labels->GetLabel('_METERS_')}'],
  329. [70,'70 {$Labels->GetLabel('_METERS_')}']
  330. ]
  331. }),
  332. valueField: 'size',
  333. displayField: 'size_txt',
  334. value: {$CR['ack_mask_size']},
  335. width: 200,
  336. listeners:{
  337. select: function( a, c, b ){
  338. doSensorOperation( {$CR['id']}, 26, b, true );
  339. }
  340. }
  341. },{
  342. xtype: 'combo',
  343. id: 'sens_bindcam',
  344. fieldLabel: "{$Labels->GetLabel('_SENS_BOCAM_')}",
  345. lazyRender: true,
  346. mode: 'local',
  347. forceSelection: true,
  348. triggerAction: 'all',
  349. editable: false,
  350. disableKeyFilter: true,
  351. store: new Ext.data.ArrayStore({
  352. fields: ['mode','mode_txt'],
  353. data: {$SYSTEM_CAMERAS}
  354. }),
  355. valueField: 'mode',
  356. displayField: 'mode_txt',
  357. value: {$CR['prefered_camera_id']},
  358. width: 200,
  359. listeners:{
  360. select: function( a, c, b ){
  361. doSensorOperation( {$CR['id']}, 36, c.data.mode, true );
  362. }
  363. }
  364. }]
  365. },{
  366. xtype: 'form',
  367. title: '{$Labels->GetLabel('_HARDWARE_')}',
  368. labelWidth: 200,
  369. border: false,
  370. frame: false,
  371. labelAlign: 'right',
  372. height: PanelH - 283,
  373. items:[{
  374. xtype: 'checkbox',
  375. id: 'autores_ena',
  376. fieldLabel: '{$Labels->GetLabel('_SENS_AUTOR_ENA_')}',
  377. width: 200,
  378. checked: {$INI_S['AUTORESET_ENABLE']},
  379. listeners:{
  380. check: function( a, c ){
  381. if( c ){
  382. doSensorOperation( {$CR['id']}, 7, 1, false );
  383. } else {
  384. doSensorOperation( {$CR['id']}, 7, 0, false );
  385. };
  386. }
  387. }
  388. },{
  389. xtype: 'numberfield',
  390. id: 'autores_il',
  391. fieldLabel: '{$Labels->GetLabel('_SENS_AUTOR_INTER_')}',
  392. width: 200,
  393. value: {$INI_S['AUTORESET_INTERLEAVE']},
  394. listeners:{
  395. change: function( a, c, b ){
  396. doSensorOperation( {$CR['id']}, 8, c, false );
  397. }
  398. }
  399. },{
  400. xtype: 'numberfield',
  401. id: 'autores_to',
  402. fieldLabel: '{$Labels->GetLabel('_SENS_AUTOR_TO_')}',
  403. width: 200,
  404. value: {$INI_S['AUTORESET_TIMEOUT']},
  405. listeners:{
  406. change: function( a, c, b ){
  407. doSensorOperation( {$CR['id']}, 9, c, false );
  408. }
  409. }
  410. },{
  411. xtype: 'numberfield',
  412. id: 'board_zsh',
  413. fieldLabel: '{$Labels->GetLabel('_SENS_BZSHIFT_')}',
  414. width: 200,
  415. value: {$INI_S['BOARD_ZEROSHIFT']},
  416. listeners:{
  417. change: function( a, c, b ){
  418. doSensorOperation( {$CR['id']}, 10, c, false );
  419. }
  420. }
  421. },{
  422. xtype: 'numberfield',
  423. id: 'board_temp',
  424. fieldLabel: '{$Labels->GetLabel('_SENS_HTEMP_')}',
  425. width: 200,
  426. value: {$INI_S['BOARD_TEMPERATURE']},
  427. listeners:{
  428. change: function( a, c, b ){
  429. doSensorOperation( {$CR['id']}, 11, c, false );
  430. }
  431. }
  432. },{
  433. xtype: 'combo',
  434. id: 'board_spd',
  435. fieldLabel: "{$Labels->GetLabel('_SENS_SCANSPEED_')}",
  436. lazyRender: true,
  437. mode: 'local',
  438. forceSelection: true,
  439. triggerAction: 'all',
  440. editable: false,
  441. disableKeyFilter: true,
  442. store: new Ext.data.ArrayStore({
  443. fields: ['sd','sd_txt'],
  444. data: [
  445. [2,'2 Scans per second'],
  446. [4,'4 Scans per second'],
  447. [6,'6 Scans per second'],
  448. [8,'8 Scans per second'],
  449. [10,'10 Scans per second'],
  450. [12,'12 Scans per second']
  451. ]
  452. }),
  453. valueField: 'sd',
  454. displayField: 'sd_txt',
  455. value: {$INI_S['BOARD_SPEED']},
  456. width: 200,
  457. listeners:{
  458. select: function( a, c, b ){
  459. doSensorOperation( {$CR['id']}, 12, b, false );
  460. }
  461. }
  462. },{
  463. xtype: 'checkbox',
  464. id: 'nbt_ena',
  465. fieldLabel: '{$Labels->GetLabel('_SENS_NOBLA_')}',
  466. width: 200,
  467. checked: {$INI_S['NO_BLACK_TARGETS']},
  468. listeners:{
  469. check: function( a, c ){
  470. if( c ){
  471. doSensorOperation( {$CR['id']}, 13, 1, false );
  472. } else {
  473. doSensorOperation( {$CR['id']}, 13, 0, false );
  474. };
  475. }
  476. }
  477. },{
  478. xtype: 'checkbox',
  479. id: 'jmt_ena',
  480. fieldLabel: '{$Labels->GetLabel('_SENS_JUMOTA_')}',
  481. width: 200,
  482. checked: {$INI_S['JUST_MOVING_TARGETS']},
  483. listeners:{
  484. check: function( a, c ){
  485. if( c ){
  486. doSensorOperation( {$CR['id']}, 14, 1, false );
  487. } else {
  488. doSensorOperation( {$CR['id']}, 14, 0, false );
  489. };
  490. }
  491. }
  492. },{
  493. xtype: 'checkbox',
  494. id: 'jmt_rad',
  495. fieldLabel: '{$Labels->GetLabel('_SENS_JUMORA_')}',
  496. width: 200,
  497. checked: {$INI_S['JUST_MOVING_RADIAL']},
  498. listeners:{
  499. check: function( a, c ){
  500. if( c ){
  501. doSensorOperation( {$CR['id']}, 15, 1, false );
  502. } else {
  503. doSensorOperation( {$CR['id']}, 15, 0, false );
  504. };
  505. }
  506. }
  507. },{
  508. xtype: 'checkbox',
  509. id: 'jmt_range',
  510. fieldLabel: '{$Labels->GetLabel('_SENS_JUMODI_')}',
  511. width: 200,
  512. checked: {$INI_S['JUST_MOVING_DISTANCE']},
  513. listeners:{
  514. check: function( a, c ){
  515. if( c ){
  516. doSensorOperation( {$CR['id']}, 16, 1, false );
  517. } else {
  518. doSensorOperation( {$CR['id']}, 16, 0, false );
  519. };
  520. }
  521. }
  522. },{
  523. xtype: 'checkbox',
  524. id: 'fth_freeze',
  525. fieldLabel: '{$Labels->GetLabel('_SENS_FFTH_')}',
  526. width: 200,
  527. checked: {$INI_S['FREEZ_FIRST_TH']},
  528. listeners:{
  529. check: function( a, c ){
  530. if( c ){
  531. doSensorOperation( {$CR['id']}, 17, 1, false );
  532. } else {
  533. doSensorOperation( {$CR['id']}, 17, 0, false );
  534. };
  535. }
  536. }
  537. },{
  538. xtype: 'checkbox',
  539. id: 'fth_save',
  540. fieldLabel: '{$Labels->GetLabel('_SENS_SFTH_')}',
  541. width: 200,
  542. checked: {$INI_S['SAVE_FIRST_TH']},
  543. listeners:{
  544. check: function( a, c ){
  545. if( c ){
  546. doSensorOperation( {$CR['id']}, 18, 1, false );
  547. } else {
  548. doSensorOperation( {$CR['id']}, 18, 0, false );
  549. };
  550. }
  551. }
  552. },{
  553. xtype: 'button',
  554. text: '{$Labels->GetLabel('_SENS_APPLY_RES_')}',
  555. width: '100%',
  556. iconCls: 'srv_op_download',
  557. scale: 'large',
  558. handler: function(){
  559. doSensorOperation( {$CR['id']}, 20, 0, true );
  560. }
  561. }]
  562. },{
  563. xtype: 'panel',
  564. title: '{$Labels->GetLabel('_POSITION_')}',
  565. height: PanelH - 283,
  566. items:[{
  567. xtype: 'panel',
  568. id: 'sens_posrot',
  569. height: PanelH - 283,
  570. layout: 'table',
  571. frame: false,
  572. border: false,
  573. layoutConfig: {
  574. columns: 3
  575. },
  576. defaults: {
  577. frame: false,
  578. bodyStyle: 'padding:10px',
  579. border: false
  580. },
  581. items:[{
  582. html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-x-512.png"></td></tr></table>'
  583. },{
  584. xtype: 'numberfield',
  585. decimalPrecision: 3,
  586. value: {$CR['x_rot']},
  587. listeners:{
  588. change: function( a, c, b ){
  589. doSensorOperation( {$CR['id']}, 30, c );
  590. }
  591. }
  592. },{
  593. html: '&nbsp;'
  594. },{
  595. html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-y-512.png"></td></tr></table>'
  596. },{
  597. xtype: 'numberfield',
  598. decimalPrecision: 3,
  599. value: {$CR['y_rot']},
  600. listeners:{
  601. change: function( a, c, b ){
  602. doSensorOperation( {$CR['id']}, 31, c );
  603. }
  604. }
  605. },{
  606. html: '&nbsp;'
  607. },{
  608. html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-z-512.png"></td></tr></table>'
  609. },{
  610. xtype: 'numberfield',
  611. decimalPrecision: 3,
  612. value: {$CR['z_rot']},
  613. listeners:{
  614. change: function( a, c, b ){
  615. doSensorOperation( {$CR['id']}, 32, c );
  616. }
  617. }
  618. },{
  619. html: '&nbsp;'
  620. },{
  621. html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-x-512.png"></td></tr></table>'
  622. },{
  623. xtype: 'numberfield',
  624. decimalPrecision: 3,
  625. value: {$CR['x']},
  626. listeners:{
  627. change: function( a, c, b ){
  628. doSensorOperation( {$CR['id']}, 33, c );
  629. }
  630. }
  631. },{
  632. html: '&nbsp;'
  633. },{
  634. html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-y-512.png"></td></tr></table>'
  635. },{
  636. xtype: 'numberfield',
  637. decimalPrecision: 3,
  638. value: {$CR['y']},
  639. listeners:{
  640. change: function( a, c, b ){
  641. doSensorOperation( {$CR['id']}, 34, c );
  642. }
  643. }
  644. },{
  645. html: '&nbsp;'
  646. },{
  647. html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-z-512.png"></td></tr></table>'
  648. },{
  649. xtype: 'numberfield',
  650. decimalPrecision: 3,
  651. value: {$CR['z']},
  652. listeners:{
  653. change: function( a, c, b ){
  654. doSensorOperation( {$CR['id']}, 35, c );
  655. }
  656. }
  657. },{
  658. html: '&nbsp;'
  659. }]
  660. }]
  661. },{
  662. xtype: 'panel',
  663. title: '{$Labels->GetLabel('_MAINTENENCE_')}',
  664. height: PanelH - 283,
  665. items:[{
  666. xtype: 'button',
  667. text: '{$Labels->GetLabel('_SENS_DO_FULLR_')}',
  668. width: '100%',
  669. iconCls: 'srv_op_restart',
  670. scale: 'large',
  671. handler: function(){
  672. doDeviceOperation( {$CR['node_id']}, 1,'', true );
  673. }
  674. },{
  675. xtype: 'button',
  676. text: '{$Labels->GetLabel('_SENS_DO_FULLDRAW_')}',
  677. width: '100%',
  678. iconCls: 'srv_op_fth_frozen',
  679. scale: 'large',
  680. handler: function(){
  681. doDeviceOperation( {$CR['node_id']}, 5,'', true );
  682. }
  683. },{
  684. xtype: 'button',
  685. text: '{$Labels->GetLabel('_SENS_DO_READALL_')}',
  686. width: '100%',
  687. iconCls: 'srv_op_upload',
  688. scale: 'large',
  689. handler: function(){
  690. doDeviceOperation( {$CR['node_id']}, 128,'', true );
  691. }
  692. },{
  693. xtype: 'button',
  694. text: '{$Labels->GetLabel('_SENS_DO_SAVEALL_')}',
  695. width: '100%',
  696. iconCls: 'srv_op_download',
  697. scale: 'large',
  698. handler: function(){
  699. doDeviceOperation( {$CR['node_id']}, 129,'', true );
  700. }
  701. }{$THF_OPERATION}]
  702. },{
  703. xtype: 'panel',
  704. title: '{$Labels->getLabel('_SND_FILES2_DEV__')}',
  705. height: PanelH - 283,
  706. items:[{
  707. title: '{$Labels->getLabel('_UPLOAD_PACKAGE_')}',
  708. xtype: 'panel',
  709. //height: 300,
  710. //flex: 1,
  711. frame: true,
  712. border: false,
  713. //layout: 'vbox',
  714. items:[{
  715. xtype:'button',
  716. id: 'pickfiles_3',
  717. width: '100%',
  718. text: '{$Labels->GetLabel('_CHOOSEF_')}',
  719. listeners:{
  720. afterrender: function(){
  721. muploader = new plupload.Uploader({
  722. runtimes : 'html5,html4',
  723. browse_button : Ext.getDom('pickfiles_3'),
  724. max_file_size : '1000mb',
  725. chunk_size: '200kb',
  726. max_retries: 3,
  727. multi_selection: false,
  728. max_file_count: 1,
  729. url: '/lib/controller/uploadToDevice.php?DID={$EID}',
  730. init: {
  731. PostInit: function() {
  732. },
  733. FilesAdded: function( up, files ) {
  734. Ext.getCmp('upload_files_btn').enable();
  735. Ext.getCmp('uploads_clr_btn').enable();
  736. plupload.each( files, function(file) {
  737. uploads_store.loadData( [[ uploads_store_id, file.name, file.id, plupload.formatSize( file.size ), 0, 'N' ]], true );
  738. uploads_store_id++;
  739. Ext.getCmp('upload_grid').doLayout();
  740. });
  741. },
  742. UploadProgress: function(up, file) {
  743. var pb = Ext.getCmp( 'progress_'+file.id );
  744. if( file.percent < 100 ){
  745. pb.updateProgress( file.percent / 100, file.percent + '%', false );
  746. } else {
  747. pb.updateProgress( 1.0, 'Uploaded', false );
  748. uploads_store.removeAll();
  749. loadModuleFiles( {$EID} );
  750. };
  751. },
  752. Error: function(up, err) {
  753. Ext.Msg.show({
  754. title:'Upload Status',
  755. msg: "Error #" + err.code + ": " + err.message,
  756. buttons: Ext.Msg.OK,
  757. icon: Ext.MessageBox.ERROR
  758. });
  759. }
  760. }
  761. });
  762. muploader.init();
  763. //Ext.getCmp('uploaded_grid').hide();
  764. //Ext.getCmp('upload_progres_panel').show();
  765. devUploadID = {$CR['id']};
  766. fetchDeviceUploadStatus();
  767. //loadModuleFiles( {$EID} );
  768. }
  769. }
  770. },{
  771. height: 200,
  772. xtype: 'grid',
  773. id: 'upload_grid',
  774. border: false,
  775. frame: false,
  776. mode: 'local',
  777. lazyRender: true,
  778. width: '100%',
  779. autoScroll: true,
  780. ds: uploads_store,
  781. cm: new Ext.grid.ColumnModel( fileUploadsColModel_ops ),
  782. sm: new Ext.grid.RowSelectionModel( fileUploadsSelModel_ops ),
  783. viewConfig: {
  784. forceFit: true
  785. },
  786. bbar: [{
  787. text: '{$Labels->GetLabel('_CLEAR_')}',
  788. id: 'uploads_clr_btn',
  789. disabled: true,
  790. handler: function(){
  791. muploader.splice();
  792. uploads_store.removeAll();
  793. uploads_store_id = 0;
  794. Ext.getCmp('uploads_clr_btn').disable();
  795. Ext.getCmp('upload_files_btn').disable();
  796. }
  797. },{
  798. xtype:'button',
  799. id: 'upload_files_btn',
  800. disabled: true,
  801. text: '{$Labels->GetLabel('_UPLOA2MODULE_')}',
  802. handler: function(){
  803. if( muploader!= null ){
  804. muploader.start();
  805. Ext.getCmp('upload_files_btn').disable();
  806. };
  807. }
  808. }]
  809. },{
  810. xtype: 'panel',
  811. height: 20
  812. },{
  813. title: '{$Labels->GetLabel('_FISONMODULE_')}',
  814. height: 200,
  815. xtype: 'grid',
  816. id: 'uploaded_grid',
  817. border: false,
  818. hidden: true,
  819. frame: false,
  820. mode: 'local',
  821. lazyRender: true,
  822. width: '100%',
  823. autoScroll: true,
  824. ds: uploaded_store,
  825. cm: new Ext.grid.ColumnModel( fileModuleColModel_ops ),
  826. sm: new Ext.grid.RowSelectionModel( fileUploadsSelModel_ops ),
  827. viewConfig: {
  828. forceFit: true
  829. },
  830. bbar: [{
  831. text: '{$Labels->GetLabel('_CLEAR_')}',
  832. id: 'oploaded_clr_btn',
  833. disabled: false,
  834. handler: function(){
  835. //muploader.splice();
  836. uploaded_store.removeAll();
  837. uploaded_store_id = 0;
  838. }
  839. },{
  840. text: '{$Labels->GetLabel('_RESETSTATUS_')}',
  841. id: 'oploaded_rst_btn',
  842. disabled: true,
  843. handler: function(){
  844. //muploader.splice();
  845. //uploaded_store.removeAll();
  846. //uploaded_store_id = 0;
  847. }
  848. },{
  849. text: '{$Labels->GetLabel('_ISSURES_')}',
  850. id: 'oploaded_sres_btn',
  851. disabled: true,
  852. handler: function(){
  853. //muploader.splice();
  854. //uploaded_store.removeAll();
  855. //uploaded_store_id = 0;
  856. }
  857. },{
  858. xtype:'button',
  859. //disabled: true,
  860. id: 'oploaded_snd_btn',
  861. text: '{$Labels->GetLabel('_SENDTOSENS_')}',
  862. handler: function(){
  863. doDeviceOperation( {$CR['node_id']}, 120,'', true );
  864. Ext.getCmp('uploaded_grid').hide();
  865. Ext.getCmp('upload_progres_panel').show();
  866. devUploadID = {$CR['id']};
  867. fetchDeviceUploadStatus();
  868. }
  869. }]
  870. },{
  871. xtype: 'panel',
  872. id: 'upload_progres_panel',
  873. hidden: false,
  874. items:[{
  875. id: 'upp_ttext',
  876. html: 'Sending 3 file(s) to the device'
  877. },{
  878. id: 'upp_ctext_',
  879. html: '<table width="100%" height="50" border=0><tr><td width="100">&nbsp;</td><td width="50" align="right" height="50"><svg version="1.1" id="L3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve"><circle fill="none" stroke="#fff" stroke-width="4" cx="50" cy="50" r="44" style="opacity:0.5;"/><circle fill="#fff" stroke="#e74c3c" stroke-width="3" cx="8" cy="54" r="6" ><animateTransform attributeName="transform" dur="2s" type="rotate" from="0 50 48" to="360 50 52" repeatCount="indefinite" /></circle></svg></td><td align="left" id="upp_ctext"></td></tr></table>'
  880. },{
  881. xtype: 'progress',
  882. id: 'upp_pbar',
  883. width: '100%',
  884. value: 0.0
  885. }]
  886. }]
  887. }]
  888. }],
  889. bbar:[{
  890. text: '{$Labels->GetLabel('_REMOVE_SENSOR_')}',
  891. handler: function(){
  892. doSensorOperation( {$CR['id']}, 255,'', true );
  893. }
  894. }]
  895. }
  896. kokakskhkajhskr;
  897. $ITEMS[1] = $ED;
  898. $CONTENT = implode(',',$ITEMS);
  899. $TTPL = str_ireplace( '%%%ITEMS%%%', $CONTENT, $TTPL );
  900. echo $TTPL;
  901. } else {
  902. echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}';
  903. };
  904. } else {
  905. header('location: /');
  906. };
  907. ?>