Update url!
This commit is contained in:
parent
60afefac96
commit
06f28fd426
@ -25,7 +25,7 @@ export class Container extends EventHandler{
|
||||
});
|
||||
|
||||
}
|
||||
this.refresh()
|
||||
//this.refresh()
|
||||
this.terminal.focus()
|
||||
}
|
||||
refresh(){
|
||||
@ -40,8 +40,6 @@ export class Container extends EventHandler{
|
||||
this._fitAddon.fit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
constructor(channelUid,log){
|
||||
super()
|
||||
this.terminal = new Terminal({ cursorBlink: true ,theme: {
|
||||
@ -63,7 +61,15 @@ export class Container extends EventHandler{
|
||||
this.terminal.write(new TextDecoder().decode(fixedData));
|
||||
|
||||
})
|
||||
this.ws = new WebSocket(`/container/sock/${channelUid}.json`)
|
||||
|
||||
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||
const host = window.location.host;
|
||||
const wsUrl = `${protocol}//${host}/container/sock/${this.channelUid}.json`;
|
||||
this.ws = new WebSocket(wsUrl);
|
||||
|
||||
|
||||
|
||||
|
||||
this.ws.binaryType = "arraybuffer"; // Support binary data
|
||||
this.ws.onmessage = (event) => {
|
||||
this.emit("stdout", event.data)
|
||||
|
Loading…
Reference in New Issue
Block a user