fix: update list

This commit is contained in:
Qiuxia Fan 2022-01-25 21:38:58 +08:00
parent e30592b79c
commit 80bcac12c5
3 changed files with 19 additions and 2 deletions

View File

@ -156,6 +156,9 @@ export const dashboardStore = defineStore({
if (type == "All") {
this.layout = [ConfigData3];
}
if (type == "Service") {
this.layout = [ConfigData];
}
},
setConfigs(param: { [key: string]: unknown }) {
const actived = this.activedGridItem.split("-");

View File

@ -49,10 +49,16 @@ limitations under the License. -->
<template #default="scope">
<div class="chart">
<Line
:data="{ metric: scope.row[metric] }"
v-if="config.metricTypes[index] === 'readMetricsValues'"
:data="{ [metric]: scope.row[metric] }"
:intervalTime="intervalTime"
:config="{ showXAxis: false, showYAxis: false }"
/>
<Card
v-else
:data="{ [metric]: scope.row[metric] }"
:config="{ textAlign: 'left' }"
/>
</div>
</template>
</el-table-column>
@ -79,6 +85,7 @@ import { Endpoint } from "@/types/selector";
import { useDashboardStore } from "@/store/modules/dashboard";
import { useQueryPodsMetrics, usePodsSource } from "@/hooks/useProcessor";
import Line from "./Line.vue";
import Card from "./Card.vue";
import { EntityType } from "../data";
/*global defineProps */

View File

@ -50,10 +50,16 @@ limitations under the License. -->
<template #default="scope">
<div class="chart">
<Line
:data="{ metric: scope.row[metric] }"
v-if="config.metricTypes[index] === 'readMetricsValues'"
:data="{ [metric]: scope.row[metric] }"
:intervalTime="intervalTime"
:config="{ showXAxis: false, showYAxis: false }"
/>
<Card
v-else
:data="{ [metric]: scope.row[metric] }"
:config="{ textAlign: 'left' }"
/>
</div>
</template>
</el-table-column>
@ -76,6 +82,7 @@ import { ElMessage } from "element-plus";
import type { PropType } from "vue";
import { ServiceListConfig } from "@/types/dashboard";
import Line from "./Line.vue";
import Card from "./Card.vue";
import { useSelectorStore } from "@/store/modules/selectors";
import { useDashboardStore } from "@/store/modules/dashboard";
import { Service } from "@/types/selector";