mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
fix metrics
This commit is contained in:
parent
21778fb399
commit
b359b03402
@ -179,12 +179,16 @@ const setVisTypes = computed(() => {
|
|||||||
|
|
||||||
async function setMetricType(chart?: any) {
|
async function setMetricType(chart?: any) {
|
||||||
const g = chart || dashboardStore.selectedGrid.graph || {};
|
const g = chart || dashboardStore.selectedGrid.graph || {};
|
||||||
const json = await dashboardStore.fetchMetricList();
|
let arr: any[] = states.metricList;
|
||||||
if (json.errors) {
|
if (!chart) {
|
||||||
ElMessage.error(json.errors);
|
const json = await dashboardStore.fetchMetricList();
|
||||||
return;
|
if (json.errors) {
|
||||||
|
ElMessage.error(json.errors);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
arr = json.data.metrics;
|
||||||
}
|
}
|
||||||
states.metricList = (json.data.metrics || []).filter(
|
states.metricList = (arr || []).filter(
|
||||||
(d: { catalog: string; type: string }) => {
|
(d: { catalog: string; type: string }) => {
|
||||||
if (states.isList) {
|
if (states.isList) {
|
||||||
if (d.type === MetricsType.REGULAR_VALUE) {
|
if (d.type === MetricsType.REGULAR_VALUE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user