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.

120 lines
7.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. {
  2. id: 'db_node_%%%NODEID%%%',
  3. title: '%%%NODENAME%%%',
  4. draggable: false,
  5. collapsible: false,
  6. tools: [{
  7. id:'gear',
  8. handler: function(){
  9. //Ext.Msg.alert('Message', 'The Settings tool was clicked.');
  10. //showSensorToolBox( %%%NODEID%%% );
  11. }
  12. }],
  13. listeners:{
  14. afterrender: function(p){
  15. var W=p.getWidth();
  16. var H=9*(W/16);
  17. p.setHeight( H + 32 );
  18. Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 18 );
  19. document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-45 );
  20. set2DZoomLevel( %%%NODEID%%%, 100 );
  21. }
  22. },
  23. layout: 'hbox',
  24. items:[{
  25. id: 'cp_radar_%%%NODEID%%%',
  26. //html: '<center><img id="draw_img_%%%NODEID%%%" src="/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100" style="cursor: crosshair;"><canvas id="targ_canvas_%%%NODEID%%%" style="display: none; cursor: crosshair;" onclick="DrawClicker( %%%NODEID%%%, event );" width="200" height="210"></canvas></center>',
  27. //html: '<center><img id="draw_svg_%%%NODEID%%%" width="86%" src="/style/assets/draw100.svg" style="cursor: crosshair;"></center>',
  28. //html: '<center><img id="draw_svg_%%%NODEID%%%" width="86%" src=\'data:image/svg+xml;utf8,<svg id="layer_0_%%%NODEID%%%" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="1024px" height="1024px" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><circle fill="%2300A859" stroke="%23373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><line fill="none" stroke="%23FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="%23FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="%23373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="%23FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><circle id="r25_%%%NODEID%%%" fill="none" stroke="%23FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><circle id="r12_%%%NODEID%%%" fill="none" stroke="%23FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/></svg>\' style="cursor: crosshair;"/></center>',
  29. //html: '<center><object id="draw_svg_%%%NODEID%%%" type="image/svg+xml" width="86%" data=\'data:image/svg+xml;utf8,<svg id="layer_0_%%%NODEID%%%" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="1024px" height="1024px" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><circle fill="%2300A859" stroke="%23373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><line fill="none" stroke="%23FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="%23FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="%23373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="%23FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><circle id="r25_%%%NODEID%%%" fill="none" stroke="%23FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><circle id="r12_%%%NODEID%%%" fill="none" stroke="%23FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/></svg>\' style="cursor: crosshair;"></object></center>',
  30. html: '<center><svg id="draw_svg_%%%NODEID%%%" opacity="0.3" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="86%" height="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"><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="#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>',
  31. width: '56%'
  32. },{
  33. frame: false,
  34. border: false,
  35. width: '44%',
  36. items:[{
  37. xtype: 'button',
  38. id: 'cp_clear_btn_%%%NODEID%%%',
  39. width: '100%',
  40. text: 'Clear Allerts'
  41. },{
  42. xtype: 'spacer',
  43. height: 6
  44. },{
  45. xtype: 'button',
  46. id: 'cp_draw_btn_%%%NODEID%%%',
  47. width: '100%',
  48. text: 'Draw Background',
  49. disabled: true,
  50. handler: function(){
  51. doDeviceOperation( %%%NODEID%%%, 3,'', true );
  52. }
  53. },{
  54. xtype: 'spacer',
  55. height: 6
  56. },{
  57. xtype: 'button',
  58. id: 'cp_study_btn_%%%NODEID%%%',
  59. width: '100%',
  60. text: 'Study Background',
  61. disabled: true,
  62. handler: function(){
  63. doDeviceOperation( %%%NODEID%%%, 2,'', true );
  64. }
  65. }]
  66. }],
  67. bbar:[{
  68. xtype: 'button',
  69. text: '12.5%',
  70. enableToggle: true,
  71. id: 'zoom_bt12_%%%NODEID%%%',
  72. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  73. toggleHandler: function( bt, st ){
  74. if( st ){
  75. set2DZoomLevel( %%%NODEID%%%, 12 );
  76. };
  77. }
  78. },{
  79. xtype: 'button',
  80. text: '25%',
  81. enableToggle: true,
  82. id: 'zoom_bt25_%%%NODEID%%%',
  83. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  84. toggleHandler: function( bt, st ){
  85. if( st ){
  86. set2DZoomLevel( %%%NODEID%%%, 25 );
  87. };
  88. }
  89. },{
  90. xtype: 'button',
  91. text: '50%',
  92. enableToggle: true,
  93. id: 'zoom_bt50_%%%NODEID%%%',
  94. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  95. toggleHandler: function( bt, st ){
  96. if( st ){
  97. set2DZoomLevel( %%%NODEID%%%, 50 );
  98. };
  99. }
  100. },{
  101. xtype: 'button',
  102. text: '100%',
  103. pressed: true,
  104. enableToggle: true,
  105. id: 'zoom_bt100_%%%NODEID%%%',
  106. toggleGroup: 'zoom_tg_%%%NODEID%%%',
  107. toggleHandler: function( bt, st ){
  108. if( st ){
  109. set2DZoomLevel( %%%NODEID%%%, 100 );
  110. };
  111. }
  112. },{
  113. xtype: 'panel',
  114. id: 'status_%%%NODEID%%%',
  115. border: false,
  116. frame: false,
  117. width: 800,
  118. height: 28,
  119. html: ''
  120. }]
  121. }