Skip to content

Commit

Permalink
fix:主模块没有运行中的进程,导致资源指标不展示 (#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
leafage-collb authored Apr 19, 2024
1 parent 7e4e0a2 commit 42c899b
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,10 @@
:class="{ 'resource-usage': isCloudNativeApp }"
>
<div
v-if="isProcessDataReady && !isChartLoading"
class="search-chart-wrap"
>
<!-- 进程列表 -->
<bk-select
v-if="curEnvProcesses.length"
v-model="curProcessName"
style="width: 116px; font-weight: normal;"
class="fr collapse-select mb10 mr10"
Expand All @@ -195,7 +193,6 @@
</bk-select>
<!-- 环境列表,该环境没有模块信息,不需要显示 -->
<bk-select
v-if="curProcessEnvList.length"
v-model="curEnvName"
style="width: 116px; font-weight: normal;"
class="fr collapse-select mb10 mr10"
Expand All @@ -210,6 +207,7 @@
:name="option.label"
/>
</bk-select>
<!-- 模块列表 -->
<bk-select
v-model="curModuleName"
style="width: 116px; font-weight: normal;"
Expand Down Expand Up @@ -549,6 +547,16 @@ export default {
this.curEnvName = this.curProcessEnvList.length !== 0 ? this.curProcessEnvList[0].name : 'stag';
}
},
curAppModuleList: {
handler(modules) {
const isProcessListPresent = modules.find(module => module.name === this.curModuleName);
// 当前模块没有运行中的进程处理
if (!isProcessListPresent) {
this.curModuleName = modules[0].name;
}
},
deep: true,
},
},
created() {
moment.locale(this.localLanguage);
Expand Down

0 comments on commit 42c899b

Please sign in to comment.