From 31987e978eb0fec63d7a9fb4b20c7d817a5b5730 Mon Sep 17 00:00:00 2001 From: Fine Date: Thu, 8 Jun 2023 14:48:19 +0800 Subject: [PATCH] fix: config --- .../configuration/widget/metric/Standard.vue | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/views/dashboard/configuration/widget/metric/Standard.vue b/src/views/dashboard/configuration/widget/metric/Standard.vue index 67c5ebc9..5026b972 100644 --- a/src/views/dashboard/configuration/widget/metric/Standard.vue +++ b/src/views/dashboard/configuration/widget/metric/Standard.vue @@ -34,7 +34,7 @@ limitations under the License. --> class="input" v-model="currentMetric.label" size="small" - placeholder="Please input a name" + placeholder="Please input a label" @change=" updateConfig(index, { label: encodeURIComponent(currentMetric.label || ''), @@ -42,13 +42,13 @@ limitations under the License. --> " /> -
+
{{ t("detailLabel") }}
-
+
{{ t("labelsIndex") }} ].includes(metricType.value) ); }); + const isList = computed(() => { + const graph = dashboardStore.selectedGrid.graph || {}; + return ListChartTypes.includes(graph.type); + }); const isTopn = computed(() => [ProtocolTypes.SortMetrics, ProtocolTypes.ReadSampledRecords, ProtocolTypes.ReadRecords].includes( metricTypes.value[props.index], @@ -176,6 +174,7 @@ limitations under the License. --> watch( () => props.currentMetricConfig, () => { + isExpression.value = dashboardStore.selectedGrid.metricMode === MetricModes.Expression; currentMetric.value = { ...props.currentMetricConfig, topN: Number(props.currentMetricConfig.topN) || 10,