diff --git a/src/views/dashboard/List.vue b/src/views/dashboard/List.vue
index d6822f45..84a8507c 100644
--- a/src/views/dashboard/List.vue
+++ b/src/views/dashboard/List.vue
@@ -158,8 +158,9 @@ limitations under the License. -->
diff --git a/src/views/dashboard/related/topology/config/Metrics.vue b/src/views/dashboard/related/topology/config/Metrics.vue
index 8f2ddd23..12b7263d 100644
--- a/src/views/dashboard/related/topology/config/Metrics.vue
+++ b/src/views/dashboard/related/topology/config/Metrics.vue
@@ -72,6 +72,7 @@ limitations under the License. -->
isExpression: { type: Boolean, default: true },
layer: { type: String, default: "" },
expressions: { type: Array, default: () => [] },
+ entity: { type: String, default: EntityType[0].value },
});
const { t } = useI18n();
const emit = defineEmits(["update"]);
@@ -120,7 +121,7 @@ limitations under the License. -->
const { dashboard } = getDashboard(
{
layer: props.layer || "",
- entity: EntityType[0].value,
+ entity: props.entity,
},
ConfigFieldTypes.ISDEFAULT,
);
@@ -165,7 +166,7 @@ limitations under the License. -->
};
}
watch(
- () => props.type,
+ () => [props.type, ...props.expressions],
() => {
currentMetric.value = metricList.value[0].value;
const config = getMetricConfig.value || [];