Add configuration file
This commit is contained in:
		@ -1,5 +1,5 @@
 | 
			
		||||
before_script:
 | 
			
		||||
 - export VERSION=1.0.0
 | 
			
		||||
 - export VERSION=1.0.1
 | 
			
		||||
 - chmod +x packaging/build-package.sh packaging/package-upload.sh
 | 
			
		||||
 | 
			
		||||
stages:
 | 
			
		||||
 | 
			
		||||
@ -2,10 +2,11 @@
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
    <meta charset="utf-8">
 | 
			
		||||
    <title>arm-web</title>
 | 
			
		||||
    <title>ARM-Web</title>
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
    <div id="app"></div>
 | 
			
		||||
    <script src="/static/config.js"></script>
 | 
			
		||||
    <!-- built files will be auto injected -->
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
 | 
			
		||||
@ -23,7 +23,7 @@ let d = {
 | 
			
		||||
  sensors: {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
let ws = new EventWebSocket('ws://192.168.2.85:8080/ws');
 | 
			
		||||
let ws = new EventWebSocket(window.arm_config.url);
 | 
			
		||||
 | 
			
		||||
ws.on('jobs', function(data) {
 | 
			
		||||
  // Create jobs components
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								static/config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								static/config.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
			
		||||
window.arm_config = {
 | 
			
		||||
  url: 'ws://127.0.0.1:8080/ws'
 | 
			
		||||
};
 | 
			
		||||
		Reference in New Issue
	
	Block a user