fix: update

This commit is contained in:
Fine 2023-06-03 23:33:40 +08:00
parent 0b06b1d6ba
commit efc25bf8d7
3 changed files with 14 additions and 1 deletions

View File

@ -149,6 +149,7 @@ limitations under the License. -->
metrics: config.value.metrics || [],
metricTypes: config.value.metricTypes || [],
metricConfig: config.value.metricConfig || [],
subExpressions: config.value.subExpressions || [],
};
source.value = isExpression ? await useExpressionsSourceProcessor(json, d) : await useSourceProcessor(json, d);
}

View File

@ -92,7 +92,7 @@ limitations under the License. -->
step: appStore.durationRow.step,
utc: appStore.utc,
});
const { widget, graph, metrics, metricTypes, metricConfig, metricMode, expressions, typesOfMQE } =
const { widget, graph, metrics, metricTypes, metricConfig, metricMode, expressions, typesOfMQE, subExpressions } =
dashboardStore.selectedGrid;
const c = (metricConfig || []).map((d: any) => {
const t: any = {};
@ -114,6 +114,9 @@ limitations under the License. -->
if (metricMode === MetricModes.Expression) {
opt.expressions = expressions;
opt.typesOfMQE = typesOfMQE;
if (subExpressions && subExpressions.length) {
opt.subExpressions = subExpressions;
}
} else {
opt.metrics = metrics;
opt.metricTypes = metricTypes;

View File

@ -34,6 +34,10 @@ limitations under the License. -->
size="small"
@change="changeMetricMode"
/>
<div v-if="isExpression">
<span class="title">Summary</span>
<span>Detail</span>
</div>
<div v-for="(metric, index) in states.metrics" :key="index" class="mb-10">
<span v-if="isExpression">
<div class="expression-param" contenteditable="true" @blur="changeExpression($event, index)">
@ -643,4 +647,9 @@ limitations under the License. -->
border-color: #409eff;
}
}
.title {
display: inline-block;
width: 410px;
}
</style>