From 444daccac757db756865ee246918c4b29c6a6019 Mon Sep 17 00:00:00 2001 From: "Jingwei.Zhang" Date: Tue, 28 Jun 2022 11:23:35 +0800 Subject: [PATCH] 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 --- src/stores/keystone/project.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/stores/keystone/project.js b/src/stores/keystone/project.js index 5104c932..0c8ca1bd 100644 --- a/src/stores/keystone/project.js +++ b/src/stores/keystone/project.js @@ -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 = {