Skip to content

Fetch project capacity and usage items for all types of storage

Sheldon Led requested to merge led/334884-fetch-project-capacity-usage into master

What does this MR do?

Resolves https://gitlab.com/gitlab-org/gitlab/-/issues/334884

Adds all the Apollo/GraphQL code to fetch project capacity and usage items for all types of storage (the statistics related to storage, ProjectStatistics )

Screenshots or Screencasts (strongly suggested)

There were no visual changes in this MR except an alert, in case something goes wrong when fetching project statistics.

Successful fetch Failed fetch
initial_project_storage_ui initial_project_storage_ui_alert

How to test the alert

(Instructions on how to setup Feature Flag below)

  1. Block localhost:3000/api/graphql url on network tab, or mess up the GraphQl query
  2. Visit /<namespace>/<project>/-/usage_quotas on a project you have maintainer permission

How to setup and validate locally (strongly suggested)

  1. Enable project_storage_ui feature flag. Go to rails console and execute the following:
    Feature.enable(:project_storage_ui)
  2. Visit /<namespace>/<project>/-/usage_quotas on a project you have maintainer permission
  3. Open Vue Devtools find StorageCounterApp in the component tree
  4. Under data there should be a project object with storageTypes and totalUsage in it

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Sheldon Led

Merge request reports