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.

373 lines
11 KiB

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