fix config

This commit is contained in:
Qiuxia Fan 2022-03-26 18:41:14 +08:00
parent d4a900fe7f
commit a5fe322304
3 changed files with 5 additions and 13 deletions

View File

@ -331,7 +331,7 @@ function update() {
}
});
const htmlClient = linkClientMetrics.map((m: string, index: number) => {
const opt: MetricConfigOpt = linkClientMetricConfig[index];
const opt: MetricConfigOpt = linkClientMetricConfig[index] || {};
const metric = topologyStore.linkClientMetrics[m].values.find(
(val: { id: string; value: unknown }) => val.id === data.id
);

View File

@ -126,9 +126,9 @@ function changeMetric(val: string) {
};
}
watch(
() => props.metrics,
(arr) => {
const m = arr.map((d: string) => {
() => props.type,
() => {
const m = props.metrics.map((d: string) => {
return { label: d, value: d };
});
metrics.value = m.length ? m : [{ label: "", value: "" }];
@ -140,6 +140,7 @@ watch(
label: "",
calculation: "",
};
console.log(currentConfig.value);
}
);
</script>

View File

@ -215,15 +215,6 @@ limitations under the License. -->
</span>
<div v-show="index !== legend.metric.length - 1">&&</div>
</div>
<!-- <div class="label">{{ t("conditions") }}</div>
<Selector
class="inputs"
:value="legend.condition"
:options="LegendConditions"
size="small"
placeholder="Select a condition"
@change="changeCondition"
/> -->
<el-button
@click="setLegend"
class="legend-btn"