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.

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