Skip to content

Use a sectioned percentage bar for pages usage quotas

Janis Altherr requested to merge janis-improve-pages-usage-quota-view into master

What does this MR do and why?

This MR adds the ability to visually split the number of deployments taken up by different projects in the pages usage quota tab.

To enable this, I've added new functionality to the SectionedPercentageBar component:

  • specify a custom color
  • optionally hide a label (eg. for empty space)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2025-01-07_at_12.52.28 Screenshot_2025-01-07_at_12.07.31

How to set up and validate locally

  1. Ensure you have a group with an ultimate license
  2. Inside that group, create 2 or more projects, using the "Plain HTML" template
  3. For each of the projects, perform the following:
  • update the .gitlab-ci.yml to the below:
image: busybox

pages:
  stage: deploy
  script:
    - echo "Pages deployed"
  pages: true
  artifacts:
    paths:
    - public
  rules:
  - if: $CI_COMMIT_BRANCH == "master"

review-pages:
  stage: deploy
  script:
    - echo "Pages deployed"
  pages: 
    path_prefix: 'mr$CI_MERGE_REQUEST_IID'
  artifacts:
    paths:
    - public
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  • Commit the change and ensure the pipeline ran succesfully
  • create a couple of MRs
  • ensure the pipeline runs successfully for each MR
  1. Go back to the Group level, open "Settings>Usage Quotas" and click on the "Pages" tab.
  2. Ensure the statistics bar shows the correct values
Edited by Janis Altherr

Merge request reports

Loading