summaryrefslogtreecommitdiff
path: root/src/views/_sila/Operations/Kvm/KvmConsole.vue
diff options
context:
space:
mode:
authorAlexandr Ilenko <AIlenko@IBS.RU>2022-08-22 18:33:14 +0300
committerAlexandr Ilenko <AIlenko@IBS.RU>2022-08-30 10:46:01 +0300
commit788f3f3566bea46a164ed8ed68b39f69344fc65e (patch)
tree893ae3b39eec0679d41a0cb2136dafa8f0bcfab1 /src/views/_sila/Operations/Kvm/KvmConsole.vue
parent89f53857e6377828cccf81ca3fefce3bd6f7557c (diff)
downloadwebui-vue-sila-fix/fix-SILABMC-172.tar.xz
[SILABMC-280] Fix: use wsS only when httpSsila-fix/fix-SILABMC-172
Diffstat (limited to 'src/views/_sila/Operations/Kvm/KvmConsole.vue')
-rw-r--r--src/views/_sila/Operations/Kvm/KvmConsole.vue8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/views/_sila/Operations/Kvm/KvmConsole.vue b/src/views/_sila/Operations/Kvm/KvmConsole.vue
index 603aa115..b4fddb9d 100644
--- a/src/views/_sila/Operations/Kvm/KvmConsole.vue
+++ b/src/views/_sila/Operations/Kvm/KvmConsole.vue
@@ -111,12 +111,10 @@ export default {
this.rfb = null;
},
openTerminal() {
+ const url = new URL('/kvm/0', window.location.href);
+ url.protocol = url.protocol.replace('http', 'ws');
const token = this.$store.getters['authentication/token'];
- this.rfb = new RFB(
- this.$refs.panel,
- `wss://${window.location.host}/kvm/0`,
- { wsProtocols: [token] }
- );
+ this.rfb = new RFB(this.$refs.panel, url, { wsProtocols: [token] });
this.rfb.scaleViewport = true;
this.rfb.clipViewport = true;