diff --git a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue index 1180f79db..c51414f1e 100644 --- a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue +++ b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue @@ -40,6 +40,7 @@ + @@ -159,22 +160,32 @@ export default { panel: [ { prop: 'panelTab', name: this.$t('overall.detail'), active: true }, { prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false }, - { prop: 'endpointTab', name: 'Endpoint', active: false } + { prop: 'endpointTab', name: 'Endpoint', active: false }, + { prop: 'log', name: 'Log', active: false } ], alertMessage: [ { prop: 'panelTab', name: this.$t('overall.detail'), active: false }, { prop: 'alertMessageTab', name: this.$t('overall.alert'), active: true }, - { prop: 'endpointTab', name: 'Endpoint', active: false } + { prop: 'endpointTab', name: 'Endpoint', active: false }, + { prop: 'log', name: 'Log', active: false } ], endpoint: [ { prop: 'panelTab', name: this.$t('overall.detail'), active: false }, { prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false }, - { prop: 'endpointTab', name: 'Endpoint', active: true } + { prop: 'endpointTab', name: 'Endpoint', active: true }, + { prop: 'log', name: 'Log', active: false } + ], + log: [ + { prop: 'panelTab', name: this.$t('overall.detail'), active: false }, + { prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false }, + { prop: 'endpointTab', name: 'Endpoint', active: false }, + { prop: 'log', name: 'Log', active: true } ], alertMessageSub: [ { prop: 'panelTab', name: this.$t('overall.detail'), active: false }, { prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false }, { prop: 'endpointTab', name: 'Endpoint', active: false }, + { prop: 'log', name: 'Log', active: false }, { prop: 'assetSubTab', name: this.$t('overall.assetSubTab'), active: true } ] }, diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/logBottomTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/logBottomTab.vue index 6cb9cb0e7..81d39a240 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/logBottomTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/logBottomTab.vue @@ -33,6 +33,7 @@ import logTab from '@/components/page/dashboard/explore/logTab' import subDataListMixin from '@/components/common/mixin/subDataList' import axios from 'axios' import bus from '@/libs/bus' +import {fromRoute} from "@/components/common/js/constants"; export default { name: 'logBottomTab', @@ -210,7 +211,11 @@ export default { } }, mounted () { - this.expressions = [`{project="${this.obj.project.name}",module="${this.obj.module.name}",endpoint="${this.obj.name}"}`] + if (this.from === fromRoute.endpoint) { + this.expressions = [`{project="${this.obj.project.name}",module="${this.obj.module.name}",endpoint="${this.obj.name}"}`] + } else if (this.from === fromRoute.asset) { + this.expressions = [`{asset="${this.obj.name}"}`] + } this.queryLogData() } }