Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-07 18:08:44 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-07 18:08:44 +0300
commit06c9acad67a086a66f1d63aa1b79fc77a19cc646 (patch)
treeb2c642197d4a9e549417dadfb050d2645ec7ffa7 /app/assets/javascripts/clusters_list/components/clusters.vue
parent01f48ebf027baee9f845cecbf094e91a98c9a324 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/clusters_list/components/clusters.vue')
-rw-r--r--app/assets/javascripts/clusters_list/components/clusters.vue12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/assets/javascripts/clusters_list/components/clusters.vue b/app/assets/javascripts/clusters_list/components/clusters.vue
index 590fdb947b3..0258d8e0da0 100644
--- a/app/assets/javascripts/clusters_list/components/clusters.vue
+++ b/app/assets/javascripts/clusters_list/components/clusters.vue
@@ -125,9 +125,11 @@ export default {
k8sQuantityToGb(quantity) {
if (!quantity) {
return 0;
- } else if (quantity.endsWith(__('Ki'))) {
+ }
+ if (quantity.endsWith(__('Ki'))) {
return parseInt(quantity.substr(0, quantity.length - 2), 10) * 0.000001024;
- } else if (quantity.endsWith(__('Mi'))) {
+ }
+ if (quantity.endsWith(__('Mi'))) {
return parseInt(quantity.substr(0, quantity.length - 2), 10) * 0.001048576;
}
@@ -138,9 +140,11 @@ export default {
k8sQuantityToCpu(quantity) {
if (!quantity) {
return 0;
- } else if (quantity.endsWith('m')) {
+ }
+ if (quantity.endsWith('m')) {
return parseInt(quantity.substr(0, quantity.length - 1), 10) / 1000.0;
- } else if (quantity.endsWith('n')) {
+ }
+ if (quantity.endsWith('n')) {
return parseInt(quantity.substr(0, quantity.length - 1), 10) / 1000000000.0;
}