fix: Fix tags column and validator tips

1. Fix tags error in hypervisors page
2. Fix validator tips about commas

Change-Id: Idb92d62e2f309476b647532e01d3e05fa23c7748
This commit is contained in:
xusongfu 2022-03-30 10:28:29 +08:00
parent 76859287e8
commit adabf42783
2 changed files with 14 additions and 3 deletions

View File

@ -303,7 +303,7 @@
"Code": "编码", "Code": "编码",
"Cold Migrate": "冷迁移", "Cold Migrate": "冷迁移",
"Colombia": "哥伦比亚", "Colombia": "哥伦比亚",
"Commas , are not allowed to be in a tag name in order to simplify requests that specify lists of tags": "标记名称中不允许使用逗号“,”,以简化指定标记列表的请求", "Commas , are not allowed to be in a tag name in order to simplify requests that specify lists of tags": "标记名称中不允许使用英文逗号“,”,以简化指定标记列表的请求",
"Commit Latency(ms)": "提交延迟(毫秒)", "Commit Latency(ms)": "提交延迟(毫秒)",
"Common Server": "云主机", "Common Server": "云主机",
"Comoros": "科摩罗", "Comoros": "科摩罗",

View File

@ -139,14 +139,25 @@ export class ServerStore extends Base {
if (imageId.indexOf(server.image) !== -1) { if (imageId.indexOf(server.image) !== -1) {
server.iso_server = true; server.iso_server = true;
} }
server.tags = (server.origin_data || {}).tags || [];
return server; return server;
}); });
} }
if (isServerGroup) { if (isServerGroup) {
return newData.filter((it) => members.indexOf(it.id) >= 0); return newData
.filter((it) => members.indexOf(it.id) >= 0)
.map((it) => ({
...it,
tags: (it.origin_data || {}).tags || [],
}));
} }
if (host) { if (host) {
return newData.filter((it) => it.host === host); return newData
.filter((it) => it.host === host)
.map((it) => ({
...it,
tags: (it.origin_data || {}).tags || [],
}));
} }
return newData.map((it) => ({ return newData.map((it) => ({
...it, ...it,