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.

370 lines
11 KiB

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