diff --git a/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue b/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue index e90cefc24..ef4e0323b 100644 --- a/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue +++ b/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue @@ -4,7 +4,7 @@ - +
{{panelLock ? $t("overall.locked") : $t("overall.unlocked")}}
@@ -102,7 +102,7 @@ export default { props: { size: { type: String, - default: 'small' + default: 'medium' }, exportUrl: { type: String, default: '' }, params: { type: Object }, diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index 4bf433feb..2fe748e98 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -8,16 +8,33 @@
-
- - - - -
+ + + + + + + + + + + + + + + + {{selectValue}} + + + + {{item.label}} + + + +
@@ -327,13 +344,17 @@ export default { searchMetrics: [ { value: 'Metrics', - label: this.$t('project.metrics.metrics') + label: this.$t('project.metrics.metrics'), + icon: 'nz-icon nz-icon-Metrics' }, { value: 'Logs', - label: this.$t('overall.logs') + label: this.$t('overall.logs'), + icon: 'nz-icon nz-icon-logs' } ], + selectValue: '', + selectIcon: '', fromData: { status: '' }, @@ -463,8 +484,30 @@ export default { this.queryMetrics() this.promqlKeys.push(getUUID()) this.fromData.status = this.searchMetrics[0].label + this.selectMetricsLogs() }, methods: { + selectMetricsLogs (val, icon) { + if (this.selectValue === 'Metrics') { + this.selectValue = val + this.selectIcon = icon + this.showMetrics = val === 'Metrics' + this.showIntroduce = true + this.resetExpression() + } else if (this.selectValue === 'Logs') { + this.selectValue = val + this.selectIcon = icon + this.showMetrics = val === 'Metrics' + this.showIntroduce = true + this.resetExpression() + } else { + this.selectValue = 'Metrics' + this.selectIcon = 'nz-icon nz-icon-Metrics' + this.showMetrics = 'Metrics' + this.showIntroduce = true + this.resetExpression() + } + }, changeType (value) { this.showMetrics = value === 'Metrics' this.showIntroduce = true @@ -1108,6 +1151,22 @@ export default {