Update additional storage purchase messages
What does this MR do and why?
The MR make these changes to namespace's storage usage:
- Remove storage alert title
- Remove the warning banner (orange 17% banner)
- 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 |
---|---|
How to set up and validate locally
- navigate to a namespaces's settings > usage quotas > storage tab
- apply the appropriate patch from below (copy the diff then in the terminal run:
pbpaste | git apply -
) - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #371963
Edited by Ammar Alakkad