Web UI for ARGUS server
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.

189 lines
3.8 KiB

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //<?php require_once('../../js_asm.php'); ?>
  2. function loadLocationEditor(){
  3. var tPanel = Ext.getCmp('main_content');
  4. if( tlInterval!= null ){
  5. window.clearInterval( tlInterval );
  6. tlInterval = null;
  7. timelineObj = null;
  8. };
  9. tPanel.remove(0);
  10. tPanel.add({
  11. title: 'Locaton Map',
  12. // id: 'sys_map',
  13. frame: false,
  14. border: false,
  15. //layout: 'column', // Specifies that the items will now be arranged in columns
  16. layout:'hbox',
  17. layoutConfig: {
  18. align : 'stretch',
  19. pack : 'start',
  20. //padding:'5',
  21. //align:'middle'
  22. },
  23. items: [{
  24. //columnWidth: 0.60,
  25. layout: 'fit',
  26. //height: 700,
  27. flex: 1,
  28. border: true,
  29. items:{
  30. id: 'location_map'
  31. }
  32. },{
  33. title: 'Properties',
  34. flex: 1,
  35. width: 210,
  36. layout: 'fit',
  37. frame: true,
  38. id: 'prop_content',
  39. // border: true
  40. items:{
  41. html: 'Select Item From Map'
  42. }
  43. }],
  44. tbar: [{
  45. xtype: 'splitbutton',
  46. text: 'Add Laser Sensor',
  47. split: true,
  48. enableToggle : undefined,
  49. menu : {
  50. items: [{
  51. text:'ALS',
  52. handler: function(){
  53. createNode( 0, 1 );
  54. }
  55. },{
  56. text:'LFS',
  57. handler: function(){
  58. createNode( 0, 2 );
  59. }
  60. },{
  61. text:'PLS-200',
  62. handler: function(){
  63. createNode( 0, 3 );
  64. }
  65. },{
  66. text:'PLS-360',
  67. handler: function(){
  68. createNode( 0, 4 );
  69. }
  70. },{
  71. text:'3DLIDAR',
  72. handler: function(){
  73. createNode( 0, 5 );
  74. }
  75. }]
  76. }
  77. },{
  78. xtype: 'splitbutton',
  79. text: 'Add Additional Equipment',
  80. split: true,
  81. enableToggle : undefined,
  82. menu : {
  83. items: [{
  84. text:'Static Analog Camera'
  85. },{
  86. text:'PTZ Analog Camera'
  87. },{
  88. text:'Static IP Camera',
  89. handler: function(){
  90. addIpCam();
  91. }
  92. },{
  93. text:'PTZ IP Camera',
  94. handler: function(){
  95. addIpCam();
  96. }
  97. },{
  98. text:'DVR/Video Server/Streamer'
  99. },{
  100. text:'Network Video Recorder'
  101. },{
  102. text:'Ethernet to UART transeiver'
  103. },{
  104. text:'DC to Ethernet (ADAM)'
  105. }]
  106. }
  107. },{
  108. xtype: 'splitbutton',
  109. text: 'Add Connection',
  110. split: true,
  111. enableToggle : undefined,
  112. menu : {
  113. items: [{
  114. text:'COM_TYPE_RS485_CTRL',
  115. handler: function(){
  116. startCreateConnection(1);
  117. }
  118. },{
  119. text:'COM_TYPE_RS422_CTRL',
  120. handler: function(){
  121. startCreateConnection(2);
  122. }
  123. },{
  124. text:'COM_TYPE_RS232_CTRL',
  125. handler: function(){
  126. startCreateConnection(3);
  127. }
  128. },{
  129. text:'COM_TYPE_TCP_CTRL',
  130. handler: function(){
  131. startCreateConnection(4);
  132. }
  133. },{
  134. text:'COM_TYPE_RS485_PTZ',
  135. handler: function(){
  136. startCreateConnection(5);
  137. }
  138. },{
  139. text:'COM_TYPE_RS422_PTZ',
  140. handler: function(){
  141. startCreateConnection(6);
  142. }
  143. },{
  144. text:'COM_TYPE_RS232_PTZ',
  145. handler: function(){
  146. startCreateConnection(7);
  147. }
  148. },{
  149. text:'COM_TYPE_TCP_PTZ',
  150. handler: function(){
  151. startCreateConnection(8);
  152. }
  153. },{
  154. text:'COM_TYPE_ANALOG_VIDEO',
  155. handler: function(){
  156. startCreateConnection(9);
  157. }
  158. },{
  159. text:'COM_TYPE_ANALOG_AUDIO',
  160. handler: function(){
  161. startCreateConnection(10);
  162. }
  163. },{
  164. text:'COM_TYPE_DC_ALARM_NC',
  165. handler: function(){
  166. startCreateConnection(11);
  167. }
  168. },{
  169. text:'COM_TYPE_DC_ALARM_NO',
  170. handler: function(){
  171. startCreateConnection(12);
  172. }
  173. }]
  174. }
  175. }]
  176. });
  177. tPanel.doLayout();
  178. var map = L.map('location_map').setView([51.505, -0.09], 13);
  179. L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
  180. attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
  181. }).addTo(map);
  182. L.marker([51.5, -0.09]).addTo(map)
  183. .bindPopup('A pretty CSS3 popup.<br> Easily customizable.')
  184. .openPopup();
  185. };