fix: config

This commit is contained in:
Fine 2023-02-03 11:09:00 +08:00
parent 190d66268b
commit 70704bb232

View File

@ -80,11 +80,13 @@ limitations under the License. -->
tips: encodeURIComponent(dashboardStore.selectedGrid.widget.tips),
};
const metricConfig = (dashboardStore.selectedGrid.metricConfig || []).map((d: any) => {
return {
...d,
label: encodeURIComponent(d.label),
unit: encodeURIComponent(d.unit),
};
if (d.label) {
d.label = encodeURIComponent(d.label);
}
if (d.unit) {
d.unit = encodeURIComponent(d.unit);
}
return d;
});
const config = JSON.stringify({
type: dashboardStore.selectedGrid.type,