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.

974 lines
28 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
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
12 months 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
​
​
​
​
​
12 months 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. $QS = "SELECT * FROM `node_target_filters` WHERE `node_id`={$CR['node_id']} ORDER BY `order` ASC ";
  139. $RJK = $DATABASE->Query( $QS );
  140. $FILTERS = '';
  141. $FPART = array();
  142. foreach( $RJK as $R ){
  143. $QS = "SELECT `type`, `enabled` FROM `target_filters` WHERE `id`={$R['filter_id']}";
  144. $HHH = $DATABASE->Query( $QS );
  145. $CFFF = $HHH[0];
  146. switch( $CFFF['type'] ){
  147. case 1:$FNAME = $Labels->GetLabel('FILTER_TRAIN'); break;
  148. case 2:$FNAME = $Labels->GetLabel('FILTER_APF'); break;
  149. case 3:$FNAME = $Labels->GetLabel('FILTER_BUBBLE'); break;
  150. case 4:$FNAME = $Labels->GetLabel('FILTER_YOLO'); break;
  151. };
  152. $FPART[]=<<<DATA_BOUNDARY
  153. {
  154. xtype: 'spacer',
  155. height: 3
  156. },{
  157. xtype: 'panel',
  158. farme: false,
  159. border: false,
  160. html: '<table id="UART_O" width="100%" class="sideInfo_item"><tr><td align="center" width="100%">{$FNAME}</td><td width="20px" onclick="doSensorOperation({$CR['node_id']},39,{$R['filter_id']}, true );"><img width="16px" src="/style/png/player/033.png"></td><td width="20px" onclick="doSensorOperation({$CR['node_id']},40,{$R['filter_id']}, true );"><img width="16px" src="/style/png/player/029.png"></td><td width="20px" onclick="doSensorOperation({$CR['node_id']},38,{$R['filter_id']}, true );"><img width="16px" src="/style/png/player/060.png"></td></tr></table>'
  161. }
  162. DATA_BOUNDARY;
  163. };
  164. if( count( $FPART ) ){
  165. $FILTERS = implode( ',', $FPART );
  166. };
  167. $ED =<<<kokakskhkajhskr
  168. {
  169. xtype: 'tabpanel',
  170. activeTab: 0,
  171. items:[{
  172. xtype: 'form',
  173. title: '{$Labels->GetLabel('_GENERAL_')}',
  174. labelWidth: 200,
  175. border: false,
  176. frame: false,
  177. labelAlign: 'right',
  178. height: PanelH - 283,
  179. items:[{
  180. xtype: 'combo',
  181. id: 'sens_se',
  182. fieldLabel: "{$Labels->GetLabel('_SENS_STATUS_')}",
  183. lazyRender: true,
  184. mode: 'local',
  185. forceSelection: true,
  186. triggerAction: 'all',
  187. editable: false,
  188. disableKeyFilter: true,
  189. store: new Ext.data.ArrayStore({
  190. fields: ['mode','mode_txt'],
  191. data: [
  192. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  193. [1,'{$Labels->GetLabel('___ENABLED__')}']
  194. ]
  195. }),
  196. valueField: 'mode',
  197. displayField: 'mode_txt',
  198. value: {$CR['enable']},
  199. width: 200,
  200. listeners:{
  201. select: function( a, c, b ){
  202. doSensorOperation( {$CR['id']}, 1, b, true );
  203. }
  204. }
  205. },{
  206. xtype: 'combo',
  207. id: 'sens_range',
  208. fieldLabel: "{$Labels->GetLabel('SENS_RANGE')}",
  209. lazyRender: true,
  210. mode: 'local',
  211. forceSelection: true,
  212. triggerAction: 'all',
  213. editable: false,
  214. disableKeyFilter: true,
  215. store: new Ext.data.ArrayStore({
  216. fields: ['range','range_txt'],
  217. data: [
  218. [15,'15 {$Labels->GetLabel('_METERS_')}'],
  219. [35,'35 {$Labels->GetLabel('_METERS_')}'],
  220. [45,'45 {$Labels->GetLabel('_METERS_')}'],
  221. [65,'65 {$Labels->GetLabel('_METERS_')}'],
  222. [75,'75 {$Labels->GetLabel('_METERS_')}'],
  223. [150,'150 {$Labels->GetLabel('_METERS_')}'],
  224. [200,'200 {$Labels->GetLabel('_METERS_')}'],
  225. [300,'300 {$Labels->GetLabel('_METERS_')}'],
  226. [350,'350 {$Labels->GetLabel('_METERS_')}']
  227. ]
  228. }),
  229. valueField: 'range',
  230. displayField: 'range_txt',
  231. value: {$CR['max_range']},
  232. width: 200,
  233. listeners:{
  234. select: function( a, c, b ){
  235. doSensorOperation( {$CR['id']}, 2, b, true );
  236. }
  237. }
  238. },{
  239. xtype: 'numberfield',
  240. id: 'sens_id',
  241. fieldLabel: '{$Labels->GetLabel('_PROTO_DEVICE_ID_')}',
  242. width: 200,
  243. value: {$CR['device_id']},
  244. listeners:{
  245. change: function( a, c, b ){
  246. doSensorOperation( {$CR['id']}, 3, c, true );
  247. }
  248. }
  249. },{
  250. xtype: 'combo',
  251. fieldLabel: '{$Labels->GetLabel('_UART_PORT_')}',
  252. lazyRender: true,
  253. id: 'uart_id',
  254. mode: 'local',
  255. disabled: false,
  256. forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true,
  257. store: new Ext.data.ArrayStore({
  258. fields: ['uart','uart_txt'],
  259. data: [{$UARTS}]
  260. }),
  261. valueField: 'uart',
  262. displayField: 'uart_txt',
  263. value: {$CR['uart_id']},
  264. width: 200,
  265. listeners:{
  266. select: function( a, c, b ){
  267. doSensorOperation( {$CR['id']}, 4, c.data.uart, true );
  268. }
  269. }
  270. },{
  271. xtype: 'combo',
  272. id: 'ad_se',
  273. fieldLabel: "{$Labels->GetLabel('AUTO_DRAW')}",
  274. lazyRender: true,
  275. mode: 'local',
  276. forceSelection: true,
  277. triggerAction: 'all',
  278. editable: false,
  279. disableKeyFilter: true,
  280. store: new Ext.data.ArrayStore({
  281. fields: ['ad','ad_txt'],
  282. data: [
  283. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  284. [10,'Each 10 Flips'],
  285. [20,'Each 20 Flips'],
  286. [30,'Each 30 Flips'],
  287. [40,'Each 40 Flips'],
  288. [50,'Each 50 Flips'],
  289. [100,'Each 100 Flips'],
  290. [200,'Each 200 Flips']
  291. ]
  292. }),
  293. valueField: 'ad',
  294. displayField: 'ad_txt',
  295. value: {$CR['auto_draw']},
  296. width: 200,
  297. listeners:{
  298. select: function( a, c, b ){
  299. doSensorOperation( {$CR['id']}, 5, b, true );
  300. }
  301. }
  302. },{
  303. xtype: 'numberfield',
  304. id: 'basesh_id',
  305. fieldLabel: 'Background {$Labels->GetLabel('__ZERO_SHIFT__')}',
  306. width: 200,
  307. value: {$CR['base_shift']},
  308. listeners:{
  309. change: function( a, c, b ){
  310. doSensorOperation( {$CR['id']}, 6, c, true );
  311. }
  312. }
  313. },{
  314. xtype: 'combo',
  315. id: 'sens_at',
  316. fieldLabel: "{$Labels->GetLabel('_SENS_ACKT_')}",
  317. lazyRender: true,
  318. mode: 'local',
  319. forceSelection: true,
  320. triggerAction: 'all',
  321. editable: false,
  322. disableKeyFilter: true,
  323. store: new Ext.data.ArrayStore({
  324. fields: ['mode','mode_txt'],
  325. data: [
  326. [0,'{$Labels->GetLabel('_MA_ROUND_')}'],
  327. [1,'{$Labels->GetLabel('_MA_CIRCLE__')}']
  328. ]
  329. }),
  330. valueField: 'mode',
  331. displayField: 'mode_txt',
  332. value: {$CR['ack_mask_type']},
  333. width: 200,
  334. listeners:{
  335. select: function( a, c, b ){
  336. doSensorOperation( {$CR['id']}, 25, b, true );
  337. }
  338. }
  339. },{
  340. xtype: 'combo',
  341. id: 'sens_as',
  342. fieldLabel: "{$Labels->GetLabel('_SENS_ACKS_')}",
  343. lazyRender: true,
  344. mode: 'local',
  345. forceSelection: true,
  346. triggerAction: 'all',
  347. editable: false,
  348. disableKeyFilter: true,
  349. store: new Ext.data.ArrayStore({
  350. fields: ['size','size_txt'],
  351. data: [
  352. [10,'10 {$Labels->GetLabel('_METERS_')}'],
  353. [20,'20 {$Labels->GetLabel('_METERS_')}'],
  354. [30,'30 {$Labels->GetLabel('_METERS_')}'],
  355. [40,'40 {$Labels->GetLabel('_METERS_')}'],
  356. [50,'50 {$Labels->GetLabel('_METERS_')}'],
  357. [60,'60 {$Labels->GetLabel('_METERS_')}'],
  358. [70,'70 {$Labels->GetLabel('_METERS_')}']
  359. ]
  360. }),
  361. valueField: 'size',
  362. displayField: 'size_txt',
  363. value: {$CR['ack_mask_size']},
  364. width: 200,
  365. listeners:{
  366. select: function( a, c, b ){
  367. doSensorOperation( {$CR['id']}, 26, b, true );
  368. }
  369. }
  370. },{
  371. xtype: 'combo',
  372. id: 'sens_bindcam',
  373. fieldLabel: "{$Labels->GetLabel('_SENS_BOCAM_')}",
  374. lazyRender: true,
  375. mode: 'local',
  376. forceSelection: true,
  377. triggerAction: 'all',
  378. editable: false,
  379. disableKeyFilter: true,
  380. store: new Ext.data.ArrayStore({
  381. fields: ['mode','mode_txt'],
  382. data: {$SYSTEM_CAMERAS}
  383. }),
  384. valueField: 'mode',
  385. displayField: 'mode_txt',
  386. value: {$CR['prefered_camera_id']},
  387. width: 200,
  388. listeners:{
  389. select: function( a, c, b ){
  390. doSensorOperation( {$CR['id']}, 36, c.data.mode, true );
  391. }
  392. }
  393. }]
  394. },{
  395. xtype: 'form',
  396. title: '{$Labels->GetLabel('_HARDWARE_')}',
  397. labelWidth: 200,
  398. border: false,
  399. frame: false,
  400. labelAlign: 'right',
  401. height: PanelH - 283,
  402. items:[{
  403. xtype: 'checkbox',
  404. id: 'autores_ena',
  405. fieldLabel: '{$Labels->GetLabel('_SENS_AUTOR_ENA_')}',
  406. width: 200,
  407. checked: {$INI_S['AUTORESET_ENABLE']},
  408. listeners:{
  409. check: function( a, c ){
  410. if( c ){
  411. doSensorOperation( {$CR['id']}, 7, 1, false );
  412. } else {
  413. doSensorOperation( {$CR['id']}, 7, 0, false );
  414. };
  415. }
  416. }
  417. },{
  418. xtype: 'numberfield',
  419. id: 'autores_il',
  420. fieldLabel: '{$Labels->GetLabel('_SENS_AUTOR_INTER_')}',
  421. width: 200,
  422. value: {$INI_S['AUTORESET_INTERLEAVE']},
  423. listeners:{
  424. change: function( a, c, b ){
  425. doSensorOperation( {$CR['id']}, 8, c, false );
  426. }
  427. }
  428. },{
  429. xtype: 'numberfield',
  430. id: 'autores_to',
  431. fieldLabel: '{$Labels->GetLabel('_SENS_AUTOR_TO_')}',
  432. width: 200,
  433. value: {$INI_S['AUTORESET_TIMEOUT']},
  434. listeners:{
  435. change: function( a, c, b ){
  436. doSensorOperation( {$CR['id']}, 9, c, false );
  437. }
  438. }
  439. },{
  440. xtype: 'numberfield',
  441. id: 'board_zsh',
  442. fieldLabel: '{$Labels->GetLabel('_SENS_BZSHIFT_')}',
  443. width: 200,
  444. value: {$INI_S['BOARD_ZEROSHIFT']},
  445. listeners:{
  446. change: function( a, c, b ){
  447. doSensorOperation( {$CR['id']}, 10, c, false );
  448. }
  449. }
  450. },{
  451. xtype: 'numberfield',
  452. id: 'board_temp',
  453. fieldLabel: '{$Labels->GetLabel('_SENS_HTEMP_')}',
  454. width: 200,
  455. value: {$INI_S['BOARD_TEMPERATURE']},
  456. listeners:{
  457. change: function( a, c, b ){
  458. doSensorOperation( {$CR['id']}, 11, c, false );
  459. }
  460. }
  461. },{
  462. xtype: 'combo',
  463. id: 'board_spd',
  464. fieldLabel: "{$Labels->GetLabel('_SENS_SCANSPEED_')}",
  465. lazyRender: true,
  466. mode: 'local',
  467. forceSelection: true,
  468. triggerAction: 'all',
  469. editable: false,
  470. disableKeyFilter: true,
  471. store: new Ext.data.ArrayStore({
  472. fields: ['sd','sd_txt'],
  473. data: [
  474. [2,'2 Scans per second'],
  475. [4,'4 Scans per second'],
  476. [6,'6 Scans per second'],
  477. [8,'8 Scans per second'],
  478. [10,'10 Scans per second'],
  479. [12,'12 Scans per second']
  480. ]
  481. }),
  482. valueField: 'sd',
  483. displayField: 'sd_txt',
  484. value: {$INI_S['BOARD_SPEED']},
  485. width: 200,
  486. listeners:{
  487. select: function( a, c, b ){
  488. doSensorOperation( {$CR['id']}, 12, b, false );
  489. }
  490. }
  491. },{
  492. xtype: 'checkbox',
  493. id: 'nbt_ena',
  494. fieldLabel: '{$Labels->GetLabel('_SENS_NOBLA_')}',
  495. width: 200,
  496. checked: {$INI_S['NO_BLACK_TARGETS']},
  497. listeners:{
  498. check: function( a, c ){
  499. if( c ){
  500. doSensorOperation( {$CR['id']}, 13, 1, false );
  501. } else {
  502. doSensorOperation( {$CR['id']}, 13, 0, false );
  503. };
  504. }
  505. }
  506. },{
  507. xtype: 'checkbox',
  508. id: 'jmt_ena',
  509. fieldLabel: '{$Labels->GetLabel('_SENS_JUMOTA_')}',
  510. width: 200,
  511. checked: {$INI_S['JUST_MOVING_TARGETS']},
  512. listeners:{
  513. check: function( a, c ){
  514. if( c ){
  515. doSensorOperation( {$CR['id']}, 14, 1, false );
  516. } else {
  517. doSensorOperation( {$CR['id']}, 14, 0, false );
  518. };
  519. }
  520. }
  521. },{
  522. xtype: 'checkbox',
  523. id: 'jmt_rad',
  524. fieldLabel: '{$Labels->GetLabel('_SENS_JUMORA_')}',
  525. width: 200,
  526. checked: {$INI_S['JUST_MOVING_RADIAL']},
  527. listeners:{
  528. check: function( a, c ){
  529. if( c ){
  530. doSensorOperation( {$CR['id']}, 15, 1, false );
  531. } else {
  532. doSensorOperation( {$CR['id']}, 15, 0, false );
  533. };
  534. }
  535. }
  536. },{
  537. xtype: 'checkbox',
  538. id: 'jmt_range',
  539. fieldLabel: '{$Labels->GetLabel('_SENS_JUMODI_')}',
  540. width: 200,
  541. checked: {$INI_S['JUST_MOVING_DISTANCE']},
  542. listeners:{
  543. check: function( a, c ){
  544. if( c ){
  545. doSensorOperation( {$CR['id']}, 16, 1, false );
  546. } else {
  547. doSensorOperation( {$CR['id']}, 16, 0, false );
  548. };
  549. }
  550. }
  551. },{
  552. xtype: 'checkbox',
  553. id: 'fth_freeze',
  554. fieldLabel: '{$Labels->GetLabel('_SENS_FFTH_')}',
  555. width: 200,
  556. checked: {$INI_S['FREEZ_FIRST_TH']},
  557. listeners:{
  558. check: function( a, c ){
  559. if( c ){
  560. doSensorOperation( {$CR['id']}, 17, 1, false );
  561. } else {
  562. doSensorOperation( {$CR['id']}, 17, 0, false );
  563. };
  564. }
  565. }
  566. },{
  567. xtype: 'checkbox',
  568. id: 'fth_save',
  569. fieldLabel: '{$Labels->GetLabel('_SENS_SFTH_')}',
  570. width: 200,
  571. checked: {$INI_S['SAVE_FIRST_TH']},
  572. listeners:{
  573. check: function( a, c ){
  574. if( c ){
  575. doSensorOperation( {$CR['id']}, 18, 1, false );
  576. } else {
  577. doSensorOperation( {$CR['id']}, 18, 0, false );
  578. };
  579. }
  580. }
  581. },{
  582. xtype: 'button',
  583. text: '{$Labels->GetLabel('_SENS_APPLY_RES_')}',
  584. width: '100%',
  585. iconCls: 'srv_op_download',
  586. scale: 'large',
  587. handler: function(){
  588. doSensorOperation( {$CR['id']}, 20, 0, true );
  589. }
  590. }]
  591. },{
  592. xtype: 'panel',
  593. title: '{$Labels->GetLabel('_POSITION_')}',
  594. height: PanelH - 283,
  595. items:[{
  596. xtype: 'panel',
  597. id: 'sens_posrot',
  598. height: PanelH - 283,
  599. layout: 'table',
  600. frame: false,
  601. border: false,
  602. layoutConfig: {
  603. columns: 3
  604. },
  605. defaults: {
  606. frame: false,
  607. bodyStyle: 'padding:10px',
  608. border: false
  609. },
  610. items:[{
  611. html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-x-512.png"></td></tr></table>'
  612. },{
  613. xtype: 'numberfield',
  614. decimalPrecision: 3,
  615. value: {$CR['x_rot']},
  616. listeners:{
  617. change: function( a, c, b ){
  618. doSensorOperation( {$CR['id']}, 30, c );
  619. }
  620. }
  621. },{
  622. html: '&nbsp;'
  623. },{
  624. html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-y-512.png"></td></tr></table>'
  625. },{
  626. xtype: 'numberfield',
  627. decimalPrecision: 3,
  628. value: {$CR['y_rot']},
  629. listeners:{
  630. change: function( a, c, b ){
  631. doSensorOperation( {$CR['id']}, 31, c );
  632. }
  633. }
  634. },{
  635. html: '&nbsp;'
  636. },{
  637. html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-z-512.png"></td></tr></table>'
  638. },{
  639. xtype: 'numberfield',
  640. decimalPrecision: 3,
  641. value: {$CR['z_rot']},
  642. listeners:{
  643. change: function( a, c, b ){
  644. doSensorOperation( {$CR['id']}, 32, c );
  645. }
  646. }
  647. },{
  648. html: '&nbsp;'
  649. },{
  650. html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-x-512.png"></td></tr></table>'
  651. },{
  652. xtype: 'numberfield',
  653. decimalPrecision: 3,
  654. value: {$CR['x']},
  655. listeners:{
  656. change: function( a, c, b ){
  657. doSensorOperation( {$CR['id']}, 33, c );
  658. }
  659. }
  660. },{
  661. html: '&nbsp;'
  662. },{
  663. html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-y-512.png"></td></tr></table>'
  664. },{
  665. xtype: 'numberfield',
  666. decimalPrecision: 3,
  667. value: {$CR['y']},
  668. listeners:{
  669. change: function( a, c, b ){
  670. doSensorOperation( {$CR['id']}, 34, c );
  671. }
  672. }
  673. },{
  674. html: '&nbsp;'
  675. },{
  676. html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-z-512.png"></td></tr></table>'
  677. },{
  678. xtype: 'numberfield',
  679. decimalPrecision: 3,
  680. value: {$CR['z']},
  681. listeners:{
  682. change: function( a, c, b ){
  683. doSensorOperation( {$CR['id']}, 35, c );
  684. }
  685. }
  686. },{
  687. html: '&nbsp;'
  688. }]
  689. }]
  690. },{
  691. xtype: 'panel',
  692. title: '{$Labels->GetLabel('_MAINTENENCE_')}',
  693. height: PanelH - 283,
  694. items:[{
  695. xtype: 'button',
  696. text: '{$Labels->GetLabel('_SENS_DO_FULLR_')}',
  697. width: '100%',
  698. iconCls: 'srv_op_restart',
  699. scale: 'large',
  700. handler: function(){
  701. doDeviceOperation( {$CR['node_id']}, 1,'', true );
  702. }
  703. },{
  704. xtype: 'button',
  705. text: '{$Labels->GetLabel('_SENS_DO_FULLDRAW_')}',
  706. width: '100%',
  707. iconCls: 'srv_op_fth_frozen',
  708. scale: 'large',
  709. handler: function(){
  710. doDeviceOperation( {$CR['node_id']}, 5,'', true );
  711. }
  712. },{
  713. xtype: 'button',
  714. text: '{$Labels->GetLabel('_SENS_DO_READALL_')}',
  715. width: '100%',
  716. iconCls: 'srv_op_upload',
  717. scale: 'large',
  718. handler: function(){
  719. doDeviceOperation( {$CR['node_id']}, 128,'', true );
  720. }
  721. },{
  722. xtype: 'button',
  723. text: '{$Labels->GetLabel('_SENS_DO_SAVEALL_')}',
  724. width: '100%',
  725. iconCls: 'srv_op_download',
  726. scale: 'large',
  727. handler: function(){
  728. doDeviceOperation( {$CR['node_id']}, 129,'', true );
  729. }
  730. }{$THF_OPERATION}]
  731. },{
  732. xtype: 'panel',
  733. title: '{$Labels->getLabel('_DEV_FILTERS_')}',
  734. height: PanelH - 283,
  735. items:[{
  736. xtype: 'panel',
  737. frame: false,
  738. border: false,
  739. tbar:[{
  740. text: 'Add',
  741. handler: function(){
  742. Ext.Ajax.request({
  743. url: '/lib/controller/getSensorAvFilters.php',
  744. params: {
  745. UID: {$UserID},
  746. SID: '{$Session}',
  747. SEN: {$CR['node_id']}
  748. },
  749. success: function( response, opts ){
  750. var data = Ext.decode( response.responseText );
  751. var tComp = new Ext.Window(data);
  752. tComp.show();
  753. },
  754. failure: function(){
  755. }
  756. });
  757. var tBobo = new Ext.Window
  758. }
  759. }],
  760. items:[{$FILTERS}]
  761. }]
  762. },{
  763. xtype: 'panel',
  764. title: '{$Labels->getLabel('_SND_FILES2_DEV__')}',
  765. height: PanelH - 283,
  766. items:[{
  767. title: '{$Labels->getLabel('_UPLOAD_PACKAGE_')}',
  768. xtype: 'panel',
  769. //height: 300,
  770. //flex: 1,
  771. frame: true,
  772. border: false,
  773. //layout: 'vbox',
  774. items:[{
  775. xtype:'button',
  776. id: 'pickfiles_3',
  777. width: '100%',
  778. text: '{$Labels->GetLabel('_CHOOSEF_')}',
  779. listeners:{
  780. afterrender: function(){
  781. muploader = new plupload.Uploader({
  782. runtimes : 'html5,html4',
  783. browse_button : Ext.getDom('pickfiles_3'),
  784. max_file_size : '1000mb',
  785. chunk_size: '200kb',
  786. max_retries: 3,
  787. multi_selection: false,
  788. max_file_count: 1,
  789. url: '/lib/controller/uploadToDevice.php?DID={$EID}',
  790. init: {
  791. PostInit: function() {
  792. },
  793. FilesAdded: function( up, files ) {
  794. Ext.getCmp('upload_files_btn').enable();
  795. Ext.getCmp('uploads_clr_btn').enable();
  796. plupload.each( files, function(file) {
  797. uploads_store.loadData( [[ uploads_store_id, file.name, file.id, plupload.formatSize( file.size ), 0, 'N' ]], true );
  798. uploads_store_id++;
  799. Ext.getCmp('upload_grid').doLayout();
  800. });
  801. },
  802. UploadProgress: function(up, file) {
  803. var pb = Ext.getCmp( 'progress_'+file.id );
  804. if( file.percent < 100 ){
  805. pb.updateProgress( file.percent / 100, file.percent + '%', false );
  806. } else {
  807. pb.updateProgress( 1.0, 'Uploaded', false );
  808. uploads_store.removeAll();
  809. loadModuleFiles( {$EID} );
  810. };
  811. },
  812. Error: function(up, err) {
  813. Ext.Msg.show({
  814. title:'Upload Status',
  815. msg: "Error #" + err.code + ": " + err.message,
  816. buttons: Ext.Msg.OK,
  817. icon: Ext.MessageBox.ERROR
  818. });
  819. }
  820. }
  821. });
  822. muploader.init();
  823. //Ext.getCmp('uploaded_grid').hide();
  824. //Ext.getCmp('upload_progres_panel').show();
  825. devUploadID = {$CR['id']};
  826. fetchDeviceUploadStatus();
  827. //loadModuleFiles( {$EID} );
  828. }
  829. }
  830. },{
  831. height: 200,
  832. xtype: 'grid',
  833. id: 'upload_grid',
  834. border: false,
  835. frame: false,
  836. mode: 'local',
  837. lazyRender: true,
  838. width: '100%',
  839. autoScroll: true,
  840. ds: uploads_store,
  841. cm: new Ext.grid.ColumnModel( fileUploadsColModel_ops ),
  842. sm: new Ext.grid.RowSelectionModel( fileUploadsSelModel_ops ),
  843. viewConfig: {
  844. forceFit: true
  845. },
  846. bbar: [{
  847. text: '{$Labels->GetLabel('_CLEAR_')}',
  848. id: 'uploads_clr_btn',
  849. disabled: true,
  850. handler: function(){
  851. muploader.splice();
  852. uploads_store.removeAll();
  853. uploads_store_id = 0;
  854. Ext.getCmp('uploads_clr_btn').disable();
  855. Ext.getCmp('upload_files_btn').disable();
  856. }
  857. },{
  858. xtype:'button',
  859. id: 'upload_files_btn',
  860. disabled: true,
  861. text: '{$Labels->GetLabel('_UPLOA2MODULE_')}',
  862. handler: function(){
  863. if( muploader!= null ){
  864. muploader.start();
  865. Ext.getCmp('upload_files_btn').disable();
  866. };
  867. }
  868. }]
  869. },{
  870. xtype: 'panel',
  871. height: 20
  872. },{
  873. title: '{$Labels->GetLabel('_FISONMODULE_')}',
  874. height: 200,
  875. xtype: 'grid',
  876. id: 'uploaded_grid',
  877. border: false,
  878. hidden: true,
  879. frame: false,
  880. mode: 'local',
  881. lazyRender: true,
  882. width: '100%',
  883. autoScroll: true,
  884. ds: uploaded_store,
  885. cm: new Ext.grid.ColumnModel( fileModuleColModel_ops ),
  886. sm: new Ext.grid.RowSelectionModel( fileUploadsSelModel_ops ),
  887. viewConfig: {
  888. forceFit: true
  889. },
  890. bbar: [{
  891. text: '{$Labels->GetLabel('_CLEAR_')}',
  892. id: 'oploaded_clr_btn',
  893. disabled: false,
  894. handler: function(){
  895. //muploader.splice();
  896. uploaded_store.removeAll();
  897. uploaded_store_id = 0;
  898. }
  899. },{
  900. text: '{$Labels->GetLabel('_RESETSTATUS_')}',
  901. id: 'oploaded_rst_btn',
  902. disabled: true,
  903. handler: function(){
  904. //muploader.splice();
  905. //uploaded_store.removeAll();
  906. //uploaded_store_id = 0;
  907. }
  908. },{
  909. text: '{$Labels->GetLabel('_ISSURES_')}',
  910. id: 'oploaded_sres_btn',
  911. disabled: true,
  912. handler: function(){
  913. //muploader.splice();
  914. //uploaded_store.removeAll();
  915. //uploaded_store_id = 0;
  916. }
  917. },{
  918. xtype:'button',
  919. //disabled: true,
  920. id: 'oploaded_snd_btn',
  921. text: '{$Labels->GetLabel('_SENDTOSENS_')}',
  922. handler: function(){
  923. doDeviceOperation( {$CR['node_id']}, 120,'', true );
  924. Ext.getCmp('uploaded_grid').hide();
  925. Ext.getCmp('upload_progres_panel').show();
  926. devUploadID = {$CR['id']};
  927. fetchDeviceUploadStatus();
  928. }
  929. }]
  930. },{
  931. xtype: 'panel',
  932. id: 'upload_progres_panel',
  933. hidden: false,
  934. items:[{
  935. id: 'upp_ttext',
  936. html: 'Sending 3 file(s) to the device'
  937. },{
  938. id: 'upp_ctext_',
  939. 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>'
  940. },{
  941. xtype: 'progress',
  942. id: 'upp_pbar',
  943. width: '100%',
  944. value: 0.0
  945. }]
  946. }]
  947. }]
  948. }],
  949. bbar:[{
  950. text: '{$Labels->GetLabel('_REMOVE_SENSOR_')}',
  951. handler: function(){
  952. doSensorOperation( {$CR['id']}, 255,'', true );
  953. }
  954. }]
  955. }
  956. kokakskhkajhskr;
  957. $ITEMS[1] = $ED;
  958. $CONTENT = implode(',',$ITEMS);
  959. $TTPL = str_ireplace( '%%%ITEMS%%%', $CONTENT, $TTPL );
  960. echo $TTPL;
  961. } else {
  962. echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}';
  963. };
  964. } else {
  965. header('location: /');
  966. };
  967. ?>