File tree Expand file tree Collapse file tree
packages/dag/src/components/monitor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { IconButton } from '@tap/component/src/icon-button'
77import TimeSelect from ' @tap/component/src/TimeSelect.vue'
88
99import { useI18n } from ' @tap/i18n'
10- import { calcTimeUnit , calcUnit } from ' @tap/shared'
10+ import { calcTimeUnit , calcUnit , getSettingByKey } from ' @tap/shared'
1111import Time from ' @tap/shared/src/time'
1212import dayjs from ' dayjs'
1313import { cloneDeep } from ' lodash-es'
@@ -324,6 +324,11 @@ const replicateLagData = computed(() => {
324324 }
325325})
326326
327+ const showCpuUsageChart = computed (() => {
328+ const flag = getSettingByKey (' cpu_mem_collector' )
329+ return flag && flag !== ' false'
330+ })
331+
327332const cpuUsageData = computed (() => {
328333 const data = props .quota ?.samples ?.lineChartData ?.[0 ]
329334 const { time = [] } = props .quota as any
@@ -1118,7 +1123,7 @@ onMounted(() => {
11181123 </div >
11191124 </div >
11201125 </div >
1121- <div class =" py-2 px-4 info-box" >
1126+ <div v-if = " showCpuUsageChart " class =" py-2 px-4 info-box" >
11221127 <div class =" line-chart__box mb-2" >
11231128 <div class =" flex align-center gap-2" >
11241129 <span class =" inline-flex align-items-center" >
You can’t perform that action at this time.
0 commit comments