fix: fix cinder snapshot quota in overview page

Fix cinder snapshot quota info in overview page && project detail page: it was replaced by the quota of the same name of share

Change-Id: I2cb72c229f110396a40c1ce8b52e5c588c3f4999
This commit is contained in:
Jingwei.Zhang 2022-06-28 11:23:35 +08:00
parent e760b2ebee
commit 444daccac7

View File

@ -264,11 +264,8 @@ export class ProjectStore extends Base {
limit: ram.limit === -1 ? ram.limit : getGiBValue(ram.limit),
};
const renameShareQuota = Object.keys(shareQuota).reduce((pre, cur) => {
if (cur === 'gigabytes') {
pre.share_gigabytes = shareQuota[cur];
} else {
pre[cur] = shareQuota[cur];
}
const key = !cur.includes('share') ? `share_${cur}` : cur;
pre[key] = shareQuota[cur];
return pre;
}, {});
const quota = {