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.

371 lines
11 KiB

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