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.

364 lines
11 KiB

5 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
​
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. window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%% );
  57. }
  58. },
  59. //layout: 'hbox',
  60. layout:'border',
  61. items:[{
  62. id: 'cp_radar_%%%NODEID%%%',
  63. region: 'center',
  64. 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="100%" 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>',
  65. width: '56%'
  66. },{
  67. region: 'east',
  68. collapsible: true,
  69. minSize: 75, // defaults to 50
  70. maxSize: 220,
  71. frame: false,
  72. border: false,
  73. collapsed: true,
  74. collapseMode: 'mini',
  75. title: '%%%LABEL%%%TOOLBOX%%%',
  76. floatable: true,
  77. animFloat: false,
  78. autoHide: true,
  79. id: 'toolbox_%%%NODEID%%%',
  80. //unstyled: true,
  81. margins: '5 0 0 5',
  82. //cmargins: '5 0 5 5',
  83. width: 200,
  84. items:[{
  85. xtype: 'spacer',
  86. height: 3
  87. },{
  88. xtype: 'button',
  89. id: 'cp_clear_btn_%%%NODEID%%%',
  90. width: '100%',
  91. disabled: true,
  92. text: '%%%LABEL%%%CLEALARM%%%',
  93. iconCls: 'ctrl_panel_clean_sm',
  94. iconAlign: 'left',
  95. handler: function(){
  96. doDeviceOperation( 1, 125,'', true );
  97. }
  98. },{
  99. xtype: 'spacer',
  100. height: 3
  101. },{
  102. xtype: 'button',
  103. id: 'cp_draw_btn_%%%NODEID%%%',
  104. width: '100%',
  105. text: '%%%LABEL%%%DRABACKGROUND%%%',
  106. iconCls: 'ctrl_panel_drawscan_sm',
  107. iconAlign: 'left',
  108. disabled: true,
  109. handler: function(){
  110. doDeviceOperation( %%%NODEID%%%, 3,'', true );
  111. }
  112. },{
  113. xtype: 'spacer',
  114. height: 3
  115. },{
  116. xtype: 'button',
  117. id: 'cp_study_btn_%%%NODEID%%%',
  118. width: '100%',
  119. text: '%%%LABEL%%%STUBACKGROUND%%%',
  120. iconCls: 'ctrl_panel_study_sm',
  121. iconAlign: 'left',
  122. disabled: true,
  123. handler: function(){
  124. doDeviceOperation( %%%NODEID%%%, 2,'', true );
  125. }
  126. },{
  127. xtype: 'spacer',
  128. height: 3
  129. },{
  130. xtype: 'button',
  131. text: '%%%LABEL%%%MASKEDITOR%%%',
  132. id: 'DMED_%%%NODEID%%%',
  133. width: '100%',
  134. disabled: true,
  135. iconCls: 'ctrl_panel_drawscan_sm',
  136. handler: function(){
  137. showMaskEditor( false, 0, %%%NODEID%%% );
  138. }
  139. },{
  140. xtype: 'spacer',
  141. height: 3
  142. },{
  143. xtype: 'panel',
  144. title: '%%%LABEL%%%MASKMNGR%%%',
  145. height: 70,
  146. frame: true,
  147. flex: 1,
  148. layout: 'hbox',
  149. items:[{
  150. xtype: 'button',
  151. enableToggle: true,
  152. width: '20%',
  153. scale: 'medium',//scale: 'small',
  154. id: 'mz_btn_%%%NODEID%%%_0',
  155. iconCls: 'mask_zone1_btn',
  156. iconAlign: 'top',
  157. pressed: false,
  158. disabled: true,
  159. handler: function(){
  160. if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){
  161. doMaskOperation( %%%NODEID%%%, 1, 0 );
  162. } else {
  163. doMaskOperation( %%%NODEID%%%, 0, 0 );
  164. };
  165. }
  166. },{
  167. xtype: 'button',
  168. enableToggle: true,
  169. width: '20%',
  170. scale: 'medium',
  171. id: 'mz_btn_%%%NODEID%%%_1',
  172. iconCls: 'mask_zone2_btn',
  173. iconAlign: 'top',
  174. pressed: false,
  175. disabled: true,
  176. handler: function(){
  177. if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){
  178. doMaskOperation( %%%NODEID%%%, 1, 1 );
  179. } else {
  180. doMaskOperation( %%%NODEID%%%, 0, 1 );
  181. };
  182. }
  183. },{
  184. xtype: 'button',
  185. enableToggle: true,
  186. width: '19%',
  187. scale: 'medium',//scale: 'large',
  188. id: 'mz_btn_%%%NODEID%%%_2',
  189. iconCls: 'mask_zone3_btn',
  190. iconAlign: 'top',
  191. pressed: false,
  192. disabled: true,
  193. handler: function(){
  194. if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){
  195. doMaskOperation( %%%NODEID%%%, 1, 2 );
  196. } else {
  197. doMaskOperation( %%%NODEID%%%, 0, 2 );
  198. };
  199. }
  200. },{
  201. xtype: 'button',
  202. enableToggle: true,
  203. width: '20%',
  204. scale: 'medium',//scale: 'large',
  205. id: 'mz_btn_%%%NODEID%%%_3',
  206. iconCls: 'mask_zone4_btn',
  207. iconAlign: 'top',
  208. pressed: false,
  209. disabled: true,
  210. handler: function(){
  211. if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){
  212. doMaskOperation( %%%NODEID%%%, 1, 3 );
  213. } else {
  214. doMaskOperation( %%%NODEID%%%, 0, 3 );
  215. };
  216. }
  217. },{
  218. xtype: 'button',
  219. enableToggle: true,
  220. width: '20%',
  221. scale: 'medium',//scale: 'large',
  222. id: 'mz_btn_%%%NODEID%%%_4',
  223. iconCls: 'mask_zone5_btn',
  224. iconAlign: 'top',
  225. pressed: false,
  226. disabled: true,
  227. handler: function(){
  228. if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){
  229. doMaskOperation( %%%NODEID%%%, 1, 4 );
  230. } else {
  231. doMaskOperation( %%%NODEID%%%, 0, 4 );
  232. };
  233. }
  234. }]
  235. },{
  236. xtype: 'spacer',
  237. height: 3
  238. },{
  239. xtype: 'button',
  240. width: '100%',
  241. enableToggle: true,
  242. id: 'cp_ack_btn_%%%NODEID%%%',
  243. text: '%%%LABEL%%%ACKNOLAGE%%%',
  244. iconCls: 'ctrl_panel_clean_sm',
  245. iconAlign: 'left',
  246. disabled: true,
  247. handler: function(){
  248. if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){
  249. //doMaskOperation( %%%NODEID%%%, 1, 4 );
  250. doAckOperation( %%%NODEID%%%, 1 );
  251. } else {
  252. //doMaskOperation( %%%NODEID%%%, 0, 4 );
  253. doAckOperation( %%%NODEID%%%, 0 );
  254. };
  255. }
  256. }/*,{
  257. xtype: 'panel',
  258. title: 'Detection Sensitivity',
  259. height: 95,
  260. frame: true,
  261. flex: 1,
  262. layout: 'hbox',
  263. items:[{
  264. xtype: 'button',
  265. text: 'Factory',
  266. id: 'DDSPBTN0',
  267. width: 80,
  268. iconCls: 'detection_btn_factory',
  269. enableToggle: true,
  270. toggleGroup: 'det_sens_btn_grp',
  271. disabled: true,
  272. scale: 'large',
  273. iconAlign: 'top'
  274. },{
  275. xtype: 'button',
  276. text: 'Low',
  277. id: 'DDSPBTN1',
  278. width: 80,
  279. iconCls: 'detection_btn_low',
  280. enableToggle: true,
  281. toggleGroup: 'det_sens_btn_grp',
  282. disabled: true,
  283. scale: 'large',
  284. iconAlign: 'top'
  285. },{
  286. xtype: 'button',
  287. text: 'Meduim',
  288. id: 'DDSPBTN2',
  289. width: 80,
  290. iconCls: 'detection_btn_medium',
  291. enableToggle: true,
  292. toggleGroup: 'det_sens_btn_grp',
  293. disabled: true,
  294. scale: 'large',
  295. iconAlign: 'top'
  296. },{
  297. xtype: 'button',
  298. text: 'High',
  299. id: 'DDSPBTN3',
  300. width: 80,
  301. iconCls: 'detection_btn_high',
  302. enableToggle: true,
  303. toggleGroup: 'det_sens_btn_grp',
  304. disabled: true,
  305. scale: 'large',
  306. iconAlign: 'top'
  307. }]
  308. }*/]
  309. }],
  310. bbar:[{
  311. xtype: 'button',
  312. text: '12.5%',
  313. enableToggle: true,
  314. id: 'zoom_bt12_%%%NODEID%%%',
  315. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  316. toggleHandler: function( bt, st ){
  317. if( st ){
  318. set2DZoomLevel( %%%NODEID%%%, 12 );
  319. };
  320. }
  321. },{
  322. xtype: 'button',
  323. text: '25%',
  324. enableToggle: true,
  325. id: 'zoom_bt25_%%%NODEID%%%',
  326. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  327. toggleHandler: function( bt, st ){
  328. if( st ){
  329. set2DZoomLevel( %%%NODEID%%%, 25 );
  330. };
  331. }
  332. },{
  333. xtype: 'button',
  334. text: '50%',
  335. enableToggle: true,
  336. id: 'zoom_bt50_%%%NODEID%%%',
  337. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  338. toggleHandler: function( bt, st ){
  339. if( st ){
  340. set2DZoomLevel( %%%NODEID%%%, 50 );
  341. };
  342. }
  343. },{
  344. xtype: 'button',
  345. text: '100%',
  346. pressed: true,
  347. enableToggle: true,
  348. id: 'zoom_bt100_%%%NODEID%%%',
  349. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  350. toggleHandler: function( bt, st ){
  351. if( st ){
  352. set2DZoomLevel( %%%NODEID%%%, 100 );
  353. };
  354. }
  355. },{
  356. xtype: 'panel',
  357. id: 'status_%%%NODEID%%%',
  358. border: false,
  359. frame: false,
  360. width: 800,
  361. height: 28,
  362. html: ''
  363. }]
  364. }