This commit is contained in:
Fine 2024-10-18 11:29:26 +08:00
parent 5c4b3fa6d8
commit 5c6c6a6e63
4 changed files with 5 additions and 4 deletions

View File

@ -387,5 +387,6 @@ const msg = {
hierarchyNodeMetrics: "Metrics for Hierarchy Graph Node",
hierarchyNodeDashboard: "As dashboard for Hierarchy Graph Node",
valueMappings: "Value Mappings",
mappingTip: `Notice: The mapping key support a regex string, for instance, `,
};
export default msg;

View File

@ -387,5 +387,6 @@ const msg = {
hierarchyNodeMetrics: "Metrics for Hierarchy Graph Node",
hierarchyNodeDashboard: "As dashboard for Hierarchy Graph Node",
valueMappings: "Value Mappings",
mappingTip: `Notice: The mapping key support a regex string, for instance, `,
};
export default msg;

View File

@ -385,5 +385,6 @@ const msg = {
hierarchyNodeMetrics: "层次图节点的指标",
hierarchyNodeDashboard: "作为层次图节点的dashboard",
valueMappings: "值映射",
mappingTip: "注意: 映射键是一个正则表达式字符串,比如 ",
};
export default msg;

View File

@ -15,9 +15,7 @@ limitations under the License. -->
<template>
<div>
<span class="label">{{ t("valueMappings") }}</span>
<span class="label red"
>Notice: The mapping key support a regex string, for instance, ^-?(0|[1-9][0-9]*|2)(\\.0+)?$</span
>
<span class="label red">{{ t("mappingTip") }} ^-?(0|[1-9][0-9]*|2)(\\.0+)?$</span>
</div>
<div v-for="(key, index) in keys" :key="index" class="mb-10 flex-h">
<div class="content-decoration" contenteditable="true" @blur="changeKeys($event, index)">
@ -57,7 +55,7 @@ limitations under the License. -->
valueMappings.value[params] = valueMappings.value[list[index]];
}
delete valueMappings.value[list[index]];
keys.value = Object.keys(valueMappings.value);
keys.value = graph.valueMappings ? Object.keys(valueMappings.value) : [""];
updateConfig();
}