diff --git a/src/views/dashboard/related/topology/components/Metrics.vue b/src/views/dashboard/related/topology/components/Metrics.vue index 6ae9e1bb..aeffa3b2 100644 --- a/src/views/dashboard/related/topology/components/Metrics.vue +++ b/src/views/dashboard/related/topology/components/Metrics.vue @@ -18,7 +18,7 @@ limitations under the License. --> {{ t(dashboardStore.selectedGrid.metricMode === MetricModes.General ? "metrics" : "expressions") }} - +
{{ t("unit") }} @@ -71,8 +71,8 @@ limitations under the License. --> const m = props.metrics.map((d: string) => { return { label: d, value: d }; }); - const metrics = ref(m.length ? m : [{ label: "", value: "" }]); - const currentMetric = ref(metrics.value[0].value); + const metricList = ref(m.length ? m : [{ label: "", value: "" }]); + const currentMetric = ref(metricList.value[0].value); const currentConfig = ref<{ unit: string; calculation: string; label: string }>({ unit: "", calculation: "", @@ -106,7 +106,7 @@ limitations under the License. --> } function changeMetric(val: string) { currentMetric.value = val; - const index = metrics.value.findIndex((d: Option) => d.value === val); + const index = metricList.value.findIndex((d: Option) => d.value === val); currentIndex.value = index || 0; const config = getMetricConfig.value || []; @@ -123,8 +123,8 @@ limitations under the License. --> const m = props.metrics.map((d: string) => { return { label: d, value: d }; }); - metrics.value = m.length ? m : [{ label: "", value: "" }]; - currentMetric.value = metrics.value[0].value; + metricList.value = m.length ? m : [{ label: "", value: "" }]; + currentMetric.value = metricList.value[0].value; const config = getMetricConfig.value || []; currentIndex.value = 0; currentConfig.value = {