From 0ce962598e5ca6f67e8e81311d1a273708a62b94 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 16 Oct 2023 18:52:21 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-3236=20fix=EF=BC=9Apromql=20=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86placeholder=20=E6=98=BE=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/cli/consoleNew.vue | 9 +- .../page/dashboard/explore/explore.vue | 2 +- .../page/dashboard/explore/exploreItem.vue | 87 ++++++++----------- .../dashboard/explore/exploreItemMixin.js | 3 +- 4 files changed, 46 insertions(+), 55 deletions(-) diff --git a/nezha-fronted/src/components/cli/consoleNew.vue b/nezha-fronted/src/components/cli/consoleNew.vue index c99714ee1..b0477f8a9 100644 --- a/nezha-fronted/src/components/cli/consoleNew.vue +++ b/nezha-fronted/src/components/cli/consoleNew.vue @@ -183,10 +183,13 @@ export default { if (userInfo) { this.waterMarkText = `${userInfo.username}(${userInfo.name})` } + if (!baseUrl.endsWith('/')) { + baseUrl += '/' + } if (this.terminal.type === 'asset') { - url = baseUrl + '/terminal.ws?width=' + this.terminal.width + '&height=' + this.terminal.height + '&cols=' + this.term.cols + '&rows=' + this.term.rows + '&token=' + token + '&assetId=' + this.terminal.assetId + '&accountId=' + this.terminal.accountId + '&uuid=' + this.terminal.uuid + url = baseUrl + 'terminal.ws?width=' + this.terminal.width + '&height=' + this.terminal.height + '&cols=' + this.term.cols + '&rows=' + this.term.rows + '&token=' + token + '&assetId=' + this.terminal.assetId + '&accountId=' + this.terminal.accountId + '&uuid=' + this.terminal.uuid } else if (this.terminal.type === 'custom') { - url = baseUrl + '/terminal.ws?width=' + this.terminal.width + '&height=' + this.terminal.height + '&cols=' + this.term.cols + '&rows=' + this.term.rows + '&token=' + token + '&accountId=' + this.terminal.accountId + '&uuid=' + this.terminal.uuid + url = baseUrl + 'terminal.ws?width=' + this.terminal.width + '&height=' + this.terminal.height + '&cols=' + this.term.cols + '&rows=' + this.term.rows + '&token=' + token + '&accountId=' + this.terminal.accountId + '&uuid=' + this.terminal.uuid Object.keys(this.terminal.custom).forEach(key => { if (this.terminal.custom[key]) { url += '&' + key + '=' + this.terminal.custom[key] @@ -250,8 +253,6 @@ export default { // 关闭 this.terminalSocket.onclose = () => { this.terminal.isLogin = false - // 报错sorry的,还没来得及看信息就关闭 - // this.$emit("closeConsole",this.terminal.name);// this.term && (this.term.options.disableStdin = true) } diff --git a/nezha-fronted/src/components/page/dashboard/explore/explore.vue b/nezha-fronted/src/components/page/dashboard/explore/explore.vue index 8946669f0..33a545d0f 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/explore.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/explore.vue @@ -1,7 +1,7 @@