From 9dcdf9fc8f6bd4a4b707435344b02937e09c1756 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 11 Oct 2023 18:39:22 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-3213=EF=BC=9A=20=20logql=20=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F=E8=BE=93=E5=85=A5=E6=94=AF=E6=8C=81=20step?= =?UTF-8?q?=20=E5=92=8C=20querytype=20=E7=BB=84=E4=BB=B6=E5=BC=80=E5=8F=91?= =?UTF-8?q?=20=EF=BC=8850%=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../page/dashboard/explore/queryPrompt.scss | 27 +++++++++ .../src/components/chart/panelChart.vue | 3 +- .../explore/queryPrompt/queryPrompt.vue | 56 ++++++++++++++++++- 3 files changed, 81 insertions(+), 5 deletions(-) diff --git a/nezha-fronted/src/assets/css/components/page/dashboard/explore/queryPrompt.scss b/nezha-fronted/src/assets/css/components/page/dashboard/explore/queryPrompt.scss index 1dc3f1046..5b6090a0d 100644 --- a/nezha-fronted/src/assets/css/components/page/dashboard/explore/queryPrompt.scss +++ b/nezha-fronted/src/assets/css/components/page/dashboard/explore/queryPrompt.scss @@ -23,4 +23,31 @@ box-sizing: border-box; padding: 10px 0 10px 10px } + .query-prompt-log { + padding: 20px 0 20px 20px; + .query-prompt-log-content { + height: 210px; + border: 1px solid $--border-color-light; + border-radius: 2px; + display: flex; + .query-prompt-log-content-left { + border-right: 1px solid $--border-color-light; + width: 34%; + max-width: 300px; + box-sizing: border-box; + height: 100%; + overflow-y: auto; + .log-content-left-label { + height: 32px; + line-height: 32px; + text-transform: capitalize; + } + } + .query-prompt-log-content-right { + flex: 1; + overflow-y: auto; + overflow-x: hidden; + } + } + } } diff --git a/nezha-fronted/src/components/chart/panelChart.vue b/nezha-fronted/src/components/chart/panelChart.vue index 408e5caa5..ee53b7e96 100644 --- a/nezha-fronted/src/components/chart/panelChart.vue +++ b/nezha-fronted/src/components/chart/panelChart.vue @@ -310,10 +310,9 @@ export default { if (this.from === fromRoute.chartTemp || this.from === fromRoute.dashboardTemp) { return chartTempData } - console.log(element.queryType) let queryStr = 'query_range' let query = '' - if (element.queryType == 1) { + if (element.queryType == 2) { queryStr = 'query_instant' query = `${urlPre}/api/v1/${queryStr}?time=${endTime}` } else { diff --git a/nezha-fronted/src/components/page/dashboard/explore/queryPrompt/queryPrompt.vue b/nezha-fronted/src/components/page/dashboard/explore/queryPrompt/queryPrompt.vue index e14a22177..0f06c9d20 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/queryPrompt/queryPrompt.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/queryPrompt/queryPrompt.vue @@ -61,14 +61,31 @@
{{$t('overall.noDataAvailable')}}
-
+
+
1.Select label names and values
+
+
+
+ {{item}} +
+
+
+
+
+
+
+
2.Resulting selector
+
+ {{logFinalStr}} +