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.

412 lines
12 KiB

5 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. {
  2. id: 'db_node_%%%NODEID%%%',
  3. title: '%%%NODENAME%%%',
  4. draggable: false,
  5. collapsible: false,
  6. tools: [{
  7. id:'toggle',
  8. handler: function( a, b, p ){
  9. fsDrawID = %%%NODEID%%%;
  10. fullScreen( 'div_radar_%%%NODEID%%%' );
  11. var el = document.getElementById('draw_svg_'+fsDrawID );
  12. var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 );
  13. el.removeAttribute("width");
  14. el.setAttribute( "width", nW+'%' );
  15. }
  16. }],
  17. listeners:{
  18. afterrender: function(p){
  19. masks_statuses[%%%NODEID%%%] = 0;
  20. masks_exist[%%%NODEID%%%] = 0;
  21. //alert( PanelH - p.ownerCt.ownerCt.getHeight() + 64+32 );
  22. //alert( document.body.clientHeight - p.ownerCt.ownerCt.getHeight() );
  23. //var expH = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
  24. var W = p.getWidth();
  25. var H = PanelH - 15;// 9*(W/16) - 28;
  26. //alert( W + ' '+ H );
  27. //var W = 16*(H/9);
  28. //p.ownerCt.setWidth( W );
  29. p.setHeight( H );
  30. Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 70 );
  31. Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H - 70 );
  32. //alert( W+" "+H );
  33. //Ext.getCmp( 'toolbox_%%%NODEID%%%' ).setWidth( W - H + 50 );
  34. //Ext.getCmp( 'toolbox_%%%NODEID%%%' ).doLayout( false, true );
  35. //if( H > W ){
  36. //document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", "100%" );
  37. //} else {
  38. document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-80 );
  39. //document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("height", H-80 );//"100%" );
  40. if( W > ( H+130 ) ) Ext.getCmp( 'toolbox_%%%NODEID%%%' ).expand( false );
  41. //};
  42. //alert( W +' '+ ( H+130 ) );
  43. set2DZoomLevel( %%%NODEID%%%, 100 );
  44. var el = document.getElementById('div_radar_%%%NODEID%%%');
  45. el.addEventListener( "fullscreenchange", ( evt )=>{
  46. if( document.fullscreenElement ){
  47. } else {
  48. if( fsDrawID ){
  49. var el = document.getElementById('draw_svg_'+fsDrawID );
  50. el.removeAttribute("width");
  51. el.setAttribute( "width", H-80 );//'86%' );
  52. fsDrawID = 0;
  53. };
  54. };
  55. });
  56. settingsSelectedDevice = %%%NODEID%%%;
  57. window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%% );
  58. window.setTimeout( fetchDeviceStatus, 20*%%%NODEID%%%, %%%NODEID%%% );
  59. }
  60. },
  61. //layout: 'hbox',
  62. layout:'border',
  63. items:[{
  64. id: 'cp_radar_%%%NODEID%%%',
  65. region: 'center',
  66. html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"><center><svg id="draw_svg_%%%NODEID%%%" opacity="0.3" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="86%" version="1.1" onclick="select2DROI( %%%NODEID%%%, event );" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd; cursor: crosshair;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="svg_mask_%%%NODEID%%%"><circle cx="287" cy="287" r="284"/></clipPath></defs><text id="g_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(0,35,35)" x="35" y="35" fill="#FFF212" style="font: 30px sans-serif">100 m.</text><circle fill="#00A859" stroke="none" cx="287" cy="287" r="284"/><circle id="border_%%%NODEID%%%" fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><text id="50_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,140,140)" x="140" y="140" fill="#FFF212" style="font: 25px sans-serif">50</text><circle id="r25_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><text id="25_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,210,210)" x="210" y="210" fill="#FFF212" style="font: 15px sans-serif">25</text><circle id="r12_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/><text id="12_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,245,245)" x="245" y="245" fill="#FFF212" style="font: 10px sans-serif">12.5</text><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/></svg></center></div>',
  67. width: '56%'
  68. },{
  69. region: 'east',
  70. collapsible: true,
  71. minSize: 75, // defaults to 50
  72. maxSize: 220,
  73. frame: false,
  74. border: false,
  75. collapsed: true,
  76. collapseMode: 'mini',
  77. title: '%%%LABEL%%%TOOLBOX%%%',
  78. floatable: true,
  79. animFloat: false,
  80. autoHide: true,
  81. id: 'toolbox_%%%NODEID%%%',
  82. //unstyled: true,
  83. margins: '5 0 0 5',
  84. //cmargins: '5 0 5 5',
  85. width: 200,
  86. items:[{
  87. xtype: 'spacer',
  88. height: 3
  89. },{
  90. xtype: 'button',
  91. id: 'cp_clear_btn_%%%NODEID%%%',
  92. width: '100%',
  93. disabled: true,
  94. text: '%%%LABEL%%%CLEALARM%%%',
  95. iconCls: 'ctrl_panel_clean_sm',
  96. iconAlign: 'left',
  97. handler: function(){
  98. doDeviceOperation( 1, 125,'', true );
  99. }
  100. },{
  101. xtype: 'spacer',
  102. height: 3
  103. },{
  104. xtype: 'button',
  105. id: 'cp_draw_btn_%%%NODEID%%%',
  106. width: '100%',
  107. text: '%%%LABEL%%%DRABACKGROUND%%%',
  108. iconCls: 'ctrl_panel_drawscan_sm',
  109. iconAlign: 'left',
  110. disabled: true,
  111. handler: function(){
  112. doDeviceOperation( %%%NODEID%%%, 3,'', true );
  113. }
  114. },{
  115. xtype: 'spacer',
  116. height: 3
  117. },{
  118. xtype: 'button',
  119. id: 'cp_study_btn_%%%NODEID%%%',
  120. width: '100%',
  121. text: '%%%LABEL%%%STUBACKGROUND%%%',
  122. iconCls: 'ctrl_panel_study_sm',
  123. iconAlign: 'left',
  124. disabled: true,
  125. handler: function(){
  126. doDeviceOperation( %%%NODEID%%%, 2,'', true );
  127. }
  128. },{
  129. xtype: 'spacer',
  130. height: 3
  131. },{
  132. xtype: 'button',
  133. text: '%%%LABEL%%%MASKEDITOR%%%',
  134. id: 'DMED_%%%NODEID%%%',
  135. width: '100%',
  136. disabled: false,
  137. iconCls: 'ctrl_panel_drawscan_sm',
  138. handler: function(){
  139. showMaskEditor( false, 0, %%%NODEID%%% );
  140. }
  141. },{
  142. xtype: 'spacer',
  143. height: 3
  144. },{
  145. xtype: 'panel',
  146. title: '%%%LABEL%%%MASKMNGR%%%',
  147. height: 70,
  148. frame: true,
  149. flex: 1,
  150. layout: 'hbox',
  151. items:[{
  152. xtype: 'button',
  153. enableToggle: true,
  154. width: '20%',
  155. scale: 'medium',//scale: 'small',
  156. id: 'mz_btn_%%%NODEID%%%_0',
  157. iconCls: 'mask_zone1_btn',
  158. iconAlign: 'top',
  159. pressed: false,
  160. disabled: true,
  161. handler: function(){
  162. if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){
  163. doMaskOperation( %%%NODEID%%%, 1, 0 );
  164. } else {
  165. doMaskOperation( %%%NODEID%%%, 0, 0 );
  166. };
  167. }
  168. },{
  169. xtype: 'button',
  170. enableToggle: true,
  171. width: '20%',
  172. scale: 'medium',
  173. id: 'mz_btn_%%%NODEID%%%_1',
  174. iconCls: 'mask_zone2_btn',
  175. iconAlign: 'top',
  176. pressed: false,
  177. disabled: true,
  178. handler: function(){
  179. if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){
  180. doMaskOperation( %%%NODEID%%%, 1, 1 );
  181. } else {
  182. doMaskOperation( %%%NODEID%%%, 0, 1 );
  183. };
  184. }
  185. },{
  186. xtype: 'button',
  187. enableToggle: true,
  188. width: '19%',
  189. scale: 'medium',//scale: 'large',
  190. id: 'mz_btn_%%%NODEID%%%_2',
  191. iconCls: 'mask_zone3_btn',
  192. iconAlign: 'top',
  193. pressed: false,
  194. disabled: true,
  195. handler: function(){
  196. if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){
  197. doMaskOperation( %%%NODEID%%%, 1, 2 );
  198. } else {
  199. doMaskOperation( %%%NODEID%%%, 0, 2 );
  200. };
  201. }
  202. },{
  203. xtype: 'button',
  204. enableToggle: true,
  205. width: '20%',
  206. scale: 'medium',//scale: 'large',
  207. id: 'mz_btn_%%%NODEID%%%_3',
  208. iconCls: 'mask_zone4_btn',
  209. iconAlign: 'top',
  210. pressed: false,
  211. disabled: true,
  212. handler: function(){
  213. if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){
  214. doMaskOperation( %%%NODEID%%%, 1, 3 );
  215. } else {
  216. doMaskOperation( %%%NODEID%%%, 0, 3 );
  217. };
  218. }
  219. },{
  220. xtype: 'button',
  221. enableToggle: true,
  222. width: '20%',
  223. scale: 'medium',//scale: 'large',
  224. id: 'mz_btn_%%%NODEID%%%_4',
  225. iconCls: 'mask_zone5_btn',
  226. iconAlign: 'top',
  227. pressed: false,
  228. disabled: true,
  229. handler: function(){
  230. if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){
  231. doMaskOperation( %%%NODEID%%%, 1, 4 );
  232. } else {
  233. doMaskOperation( %%%NODEID%%%, 0, 4 );
  234. };
  235. }
  236. }]
  237. },{
  238. xtype: 'spacer',
  239. height: 3
  240. },{
  241. xtype: 'button',
  242. width: '100%',
  243. enableToggle: true,
  244. id: 'cp_ack_btn_%%%NODEID%%%',
  245. text: '%%%LABEL%%%ACKNOLAGE%%%',
  246. iconCls: 'ctrl_panel_clean_sm',
  247. iconAlign: 'left',
  248. disabled: true,
  249. handler: function(){
  250. if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){
  251. //doMaskOperation( %%%NODEID%%%, 1, 4 );
  252. doAckOperation( %%%NODEID%%%, 1 );
  253. } else {
  254. //doMaskOperation( %%%NODEID%%%, 0, 4 );
  255. doAckOperation( %%%NODEID%%%, 0 );
  256. };
  257. }
  258. },{
  259. xtype: 'spacer',
  260. height: 3
  261. },{
  262. xtype: 'panel',
  263. height: 95,
  264. frame: false,
  265. border: true,
  266. flex: 1,
  267. layout: 'hbox',
  268. items:[{
  269. xtype: 'button',
  270. width: 80,// 201 202
  271. enableToggle: false,
  272. id: 'cp_dbf_btn_%%%NODEID%%%',
  273. text: '%%%LABEL%%%FREZBUBLE%%%',
  274. iconCls: 'ctrl_panel_freeze_bf_sm',
  275. iconAlign: 'left',
  276. disabled: false,
  277. handler: function(){
  278. doNodeNCQ( 1, 210, '' );
  279. //if( Ext.getCmp('cp_dbf_btn_%%%NODEID%%%').pressed){
  280. //doMaskOperation( %%%NODEID%%%, 1, 4 );
  281. // doAckOperation( %%%NODEID%%%, 1 );
  282. //} else {
  283. //doMaskOperation( %%%NODEID%%%, 0, 4 );
  284. // doAckOperation( %%%NODEID%%%, 0 );
  285. //};
  286. }
  287. },{
  288. xtype: 'button',
  289. width: 80,// 201 202
  290. enableToggle: true,
  291. id: 'cp_daf_btn_%%%NODEID%%%',
  292. text: '%%%LABEL%%%DELBUBLE%%%',
  293. iconCls: 'ctrl_panel_delete_bf_sm',
  294. iconAlign: 'left',
  295. disabled: false,
  296. handler: function(){
  297. if( Ext.getCmp('cp_daf_btn_%%%NODEID%%%').pressed){
  298. selectROI_mode = 2;
  299. } else {
  300. selectROI_mode = 0;
  301. };
  302. }
  303. }],
  304. }/*,{
  305. xtype: 'panel',
  306. title: 'Detection Sensitivity',
  307. height: 95,
  308. frame: true,
  309. flex: 1,
  310. layout: 'hbox',
  311. items:[{
  312. xtype: 'button',
  313. text: 'Factory',
  314. id: 'DDSPBTN0',
  315. width: 80,
  316. iconCls: 'detection_btn_factory',
  317. enableToggle: true,
  318. toggleGroup: 'det_sens_btn_grp',
  319. disabled: true,
  320. scale: 'large',
  321. iconAlign: 'top'
  322. },{
  323. xtype: 'button',
  324. text: 'Low',
  325. id: 'DDSPBTN1',
  326. width: 80,
  327. iconCls: 'detection_btn_low',
  328. enableToggle: true,
  329. toggleGroup: 'det_sens_btn_grp',
  330. disabled: true,
  331. scale: 'large',
  332. iconAlign: 'top'
  333. },{
  334. xtype: 'button',
  335. text: 'Meduim',
  336. id: 'DDSPBTN2',
  337. width: 80,
  338. iconCls: 'detection_btn_medium',
  339. enableToggle: true,
  340. toggleGroup: 'det_sens_btn_grp',
  341. disabled: true,
  342. scale: 'large',
  343. iconAlign: 'top'
  344. },{
  345. xtype: 'button',
  346. text: 'High',
  347. id: 'DDSPBTN3',
  348. width: 80,
  349. iconCls: 'detection_btn_high',
  350. enableToggle: true,
  351. toggleGroup: 'det_sens_btn_grp',
  352. disabled: true,
  353. scale: 'large',
  354. iconAlign: 'top'
  355. }]
  356. }*/]
  357. }],
  358. bbar:[{
  359. xtype: 'button',
  360. text: '12.5%',
  361. enableToggle: true,
  362. id: 'zoom_bt12_%%%NODEID%%%',
  363. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  364. toggleHandler: function( bt, st ){
  365. if( st ){
  366. set2DZoomLevel( %%%NODEID%%%, 12 );
  367. };
  368. }
  369. },{
  370. xtype: 'button',
  371. text: '25%',
  372. enableToggle: true,
  373. id: 'zoom_bt25_%%%NODEID%%%',
  374. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  375. toggleHandler: function( bt, st ){
  376. if( st ){
  377. set2DZoomLevel( %%%NODEID%%%, 25 );
  378. };
  379. }
  380. },{
  381. xtype: 'button',
  382. text: '50%',
  383. enableToggle: true,
  384. id: 'zoom_bt50_%%%NODEID%%%',
  385. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  386. toggleHandler: function( bt, st ){
  387. if( st ){
  388. set2DZoomLevel( %%%NODEID%%%, 50 );
  389. };
  390. }
  391. },{
  392. xtype: 'button',
  393. text: '100%',
  394. pressed: true,
  395. enableToggle: true,
  396. id: 'zoom_bt100_%%%NODEID%%%',
  397. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  398. toggleHandler: function( bt, st ){
  399. if( st ){
  400. set2DZoomLevel( %%%NODEID%%%, 100 );
  401. };
  402. }
  403. },{
  404. xtype: 'panel',
  405. id: 'status_%%%NODEID%%%',
  406. border: false,
  407. frame: false,
  408. width: 800,
  409. height: 28,
  410. html: ''
  411. }]
  412. }