mirror of https://github.com/openspug/spug
				
				
				
			U web update
							parent
							
								
									f1f20ec00a
								
							
						
					
					
						commit
						ee568f1e6f
					
				| 
						 | 
				
			
			@ -37,7 +37,8 @@ class Ext1Index extends React.Component {
 | 
			
		|||
      .then(({token, outputs}) => {
 | 
			
		||||
        store.request.status = '2';
 | 
			
		||||
        store.outputs = outputs;
 | 
			
		||||
        this.socket = new WebSocket(`ws://localhost:8000/ws/exec/${token}/`);
 | 
			
		||||
        const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
 | 
			
		||||
        this.socket = new WebSocket(`${protocol}//${window.location.host}/api/ws/exec/${token}/`);
 | 
			
		||||
        this.socket.onopen = () => {
 | 
			
		||||
          this.socket.send('ok');
 | 
			
		||||
        };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,8 @@ class Ext1Index extends React.Component {
 | 
			
		|||
      .then(({token, outputs}) => {
 | 
			
		||||
        store.request.status = '2';
 | 
			
		||||
        store.outputs = outputs;
 | 
			
		||||
        this.socket = new WebSocket(`ws://localhost:8000/ws/exec/${token}/`);
 | 
			
		||||
        const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
 | 
			
		||||
        this.socket = new WebSocket(`${protocol}//${window.location.host}/api/ws/exec/${token}/`);
 | 
			
		||||
        this.socket.onopen = () => {
 | 
			
		||||
          this.socket.send('ok');
 | 
			
		||||
        };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,8 @@ class ExecConsole extends React.Component {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  componentDidMount() {
 | 
			
		||||
    this.socket = new WebSocket(`ws://localhost:8000/ws/exec/${store.token}/`);
 | 
			
		||||
    const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
 | 
			
		||||
    this.socket = new WebSocket(`${protocol}//${window.location.host}/api/ws/exec/${store.token}/`);
 | 
			
		||||
    this.socket.onopen = () => {
 | 
			
		||||
      this.socket.send('ok');
 | 
			
		||||
      for (let item of Object.values(store.outputs)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue