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.

369 lines
11 KiB

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