This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push:
new f0df8d7831a ui: fix limit format (#9060)
f0df8d7831a is described below
commit f0df8d7831ae13f8ef8411dfbaae12041e4590bc
Author: Abhishek Kumar <[email protected]>
AuthorDate: Mon May 20 14:45:01 2024 +0530
ui: fix limit format (#9060)
An undefined variable `item` was used.
Signed-off-by: Abhishek Kumar <[email protected]>
---
ui/src/views/dashboard/UsageDashboard.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/src/views/dashboard/UsageDashboard.vue
b/ui/src/views/dashboard/UsageDashboard.vue
index e9edd0cfb6e..fe835cbd0d0 100644
--- a/ui/src/views/dashboard/UsageDashboard.vue
+++ b/ui/src/views/dashboard/UsageDashboard.vue
@@ -202,7 +202,7 @@
<a-progress
status="active"
:percent="parseFloat(getPercentUsed(entity[usageType + 'total'],
entity[usageType + 'limit']))"
- :format="p => resource[item + 'limit'] !== '-1' && resource[item +
'limit'] !== 'Unlimited' ? p.toFixed(0) + '%' : ''"
+ :format="p => entity[usageType + 'limit'] !== '-1' &&
entity[usageType + 'limit'] !== 'Unlimited' ? p.toFixed(0) + '%' : ''"
stroke-color="#52c41a"
size="small"
/>
@@ -238,7 +238,7 @@
<a-progress
status="active"
:percent="parseFloat(getPercentUsed(entity[usageType + 'total'],
entity[usageType + 'limit']))"
- :format="p => resource[item + 'limit'] !== '-1' && resource[item +
'limit'] !== 'Unlimited' ? p.toFixed(0) + '%' : ''"
+ :format="p => entity[usageType + 'limit'] !== '-1' &&
entity[usageType + 'limit'] !== 'Unlimited' ? p.toFixed(0) + '%' : ''"
stroke-color="#52c41a"
size="small"
/>
@@ -274,7 +274,7 @@
<a-progress
status="active"
:percent="parseFloat(getPercentUsed(entity[usageType + 'total'],
entity[usageType + 'limit']))"
- :format="p => resource[item + 'limit'] !== '-1' && resource[item +
'limit'] !== 'Unlimited' ? p.toFixed(0) + '%' : ''"
+ :format="p => entity[usageType + 'limit'] !== '-1' &&
entity[usageType + 'limit'] !== 'Unlimited' ? p.toFixed(0) + '%' : ''"
stroke-color="#52c41a"
size="small"
/>