Skip to content

Update additional storage purchase messages

What does this MR do and why?

The MR make these changes to namespace's storage usage:

  1. Remove storage alert title
  2. Remove the warning banner (orange 17% banner)
  3. Tweak red error banner copy to remove the limit size: You have consumed all of your additional storage. Purchase more to unlock projects over the limit.

Screenshots or screen recordings

before after
Screenshot_2022-12-09_at_11.19.25 Screenshot_2022-12-09_at_11.20.16
Screenshot_2022-12-09_at_11.21.12 Screenshot_2022-12-09_at_11.20.50
Screenshot_2022-12-09_at_11.22.11 Screenshot_2022-12-09_at_11.21.40
Screenshot_2022-12-09_at_11.22.45 Screenshot_2022-12-09_at_11.22.33

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 6cebc9b81e19..dee42fdb090d 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
@@ -58,6 +58,7 @@ export default {
         : this.hasNotPurchasedStorageText();
     },
     excessStorageRatio() {
+      return 1;
       return this.totalRepositorySizeExcess / this.additionalPurchasedStorageSize;
     },
     excessStoragePercentageUsed() {
@@ -88,6 +89,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 6cebc9b81e19..dee42fdb090d 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
@@ -58,6 +58,7 @@ export default {
         : this.hasNotPurchasedStorageText();
     },
     excessStorageRatio() {
+      return 0.87;
       return this.totalRepositorySizeExcess / this.additionalPurchasedStorageSize;
     },
     excessStoragePercentageUsed() {
@@ -88,6 +89,7 @@ export default {
   },
   methods: {
     hasPurchasedStorage() {
+      return true;
       return this.additionalPurchasedStorageSize > 0;
     },
     formatSize(size) {
100% 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 6cebc9b81e19..dee42fdb090d 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
@@ -58,6 +58,7 @@ export default {
         : this.hasNotPurchasedStorageText();
     },
     excessStorageRatio() {
+      return 0;
       return this.totalRepositorySizeExcess / this.additionalPurchasedStorageSize;
     },
     excessStoragePercentageUsed() {
@@ -88,6 +89,7 @@ export default {
   },
   methods: {
     hasPurchasedStorage() {
+      return true;
       return this.additionalPurchasedStorageSize > 0;
     },
     formatSize(size) {
locked with no purchased storage
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 6cebc9b81e19..75779d3070bf 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
@@ -50,6 +50,7 @@ export default {
   },
   computed: {
     shouldShowAlert() {
+      return true;
       return this.hasPurchasedStorage() || this.containsLockedProjects;
     },
     alertText() {
@@ -58,6 +59,7 @@ export default {
         : this.hasNotPurchasedStorageText();
     },
     excessStorageRatio() {
+      return 1;
       return this.totalRepositorySizeExcess / this.additionalPurchasedStorageSize;
     },
     excessStoragePercentageUsed() {
@@ -88,6 +90,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