Skip to content

Render storage alert on all project sub-pages

What does this MR do?

Prior work: !37308 (merged)

Related: https://gitlab.com/gitlab-org/gitlab/-/issues/230935

We want to ensure that users are aware of their storage usage. So we want to render the storage alert on all sub-pages of a project if the user has hit one of the limits in place.

No changelog since this lives behind a feature flag.

Screenshots

Screenshot_2020-07-23_at_09.25.57

Testing this locally

Feature.enable(:namespace_storage_limit)

n = Group.find_by(name: "Twitter")
n.root_storage_statistics&.destroy!
s = Namespace::RootStorageStatistics.new(
namespace: n,
build_artifacts_size: 400000,
wiki_size: 300000,
repository_size: 3900000,
packages_size: 3800000,
lfs_objects_size: 4800000
)
s.storage_size = s.repository_size + s.lfs_objects_size + s.wiki_size + s.build_artifacts_size + s.packages_size
s.save!

n.additional_purchased_storage_size = 15
n.save!

Does this MR meet the acceptance criteria?

Conformity

Edited by Ragnar Hardarson

Merge request reports