Skip to content

Update storage alerts copy

Ammar Alakkad requested to merge 371963-update-storage-alerts-copy into master

What does this MR do and why?

It updates the copy of 3 alerts in the group's storage usage (removing please word).

Screenshots or screen recordings

before after
Screenshot_2022-11-21_at_11.49.18 Screenshot_2022-11-21_at_12.18.07
Screenshot_2022-11-21_at_11.48.20 Screenshot_2022-11-21_at_12.17.33
Screenshot_2022-11-21_at_12.11.14 Screenshot_2022-11-21_at_12.17.07

How to set up and validate locally

  1. navigate to a namespaces's settings > usage quotas > storage tab
  2. apply the appropriate patch from below (copy the diff then in the terminal run: pbpaste | git apply -)
  3. observe the notification

Patches

0% purchased storage available
diff --git a/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue b/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue
index fc0fb5c8d9f6..a4d28bc98687 100644
--- a/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue
+++ b/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue
@@ -68,6 +68,7 @@ export default {
       });
     },
     excessStorageRatio() {
+      return 1;
       return this.totalRepositorySizeExcess / this.additionalPurchasedStorageSize;
     },
     excessStoragePercentageUsed() {
@@ -100,6 +101,7 @@ export default {
   },
   methods: {
     hasPurchasedStorage() {
+      return true;
       return this.additionalPurchasedStorageSize > 0;
     },
     formatSize(size) {
13% purchased storage available
diff --git a/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue b/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue
index fc0fb5c8d9f6..a4d28bc98687 100644
--- a/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue
+++ b/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue
@@ -68,6 +68,7 @@ export default {
       });
     },
     excessStorageRatio() {
+      return 0.87;
       return this.totalRepositorySizeExcess / this.additionalPurchasedStorageSize;
     },
     excessStoragePercentageUsed() {
@@ -100,6 +101,7 @@ export default {
   },
   methods: {
     hasPurchasedStorage() {
+      return true;
       return this.additionalPurchasedStorageSize > 0;
     },
     formatSize(size) {
0% purchased storage available with locked projects
diff --git a/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue b/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue
index fc0fb5c8d9f6..5be803d1abc7 100644
--- a/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue
+++ b/ee/app/assets/javascripts/usage_quotas/storage/components/storage_inline_alert.vue
@@ -52,6 +52,7 @@ export default {
   },
   computed: {
     shouldShowAlert() {
+      return true;
       return this.hasPurchasedStorage() || this.containsLockedProjects;
     },
     alertText() {
@@ -68,6 +69,7 @@ export default {
       });
     },
     excessStorageRatio() {
+      return 1;
       return this.totalRepositorySizeExcess / this.additionalPurchasedStorageSize;
     },
     excessStoragePercentageUsed() {
@@ -100,6 +102,7 @@ export default {
   },
   methods: {
     hasPurchasedStorage() {
+      return false;
       return this.additionalPurchasedStorageSize > 0;
     },
     formatSize(size) {

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #371963

Edited by Ammar Alakkad

Merge request reports

Loading