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.

421 lines
12 KiB

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