Skip to content

Create shared haml files for Usage Quotas pages

Sheldon Led requested to merge led/improve-uq-group-haml-file into master

What does this MR do and why?

This MR improves and DRY up the haml files for Usage Quotas Pages. Changes involve:

  1. Create a shared usage_quotas view in app/views/shared/usage_quotas/: Solves #458218
    1. Use this shared view in the pages specific views: Group, Project, Profile
    2. Page specific content using yield and content_for. Three keys: usage_quotas_alerts, :usage_quotas_subtitle, :usage_quotas_tabs
  2. Deduplicate Group usage quotas
    1. Rely only on app/views/groups/usage_quotas/index.html.haml
    2. Delete ee/app/views/groups/usage_quotas/index.html.haml
    3. All the EE specific content is moved into partials under ee/app/views/shared/usage_quotas/
  3. Add License check for pipelines tab. Solves: #455101
    1. Add :admin_ci_minutes to ee/app/policies/ee/namespaces/user_namespace_policy.rb

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

No UI changes

Before After
all_usage_quotas_pages_master all_usage_quotas_pages_150164

How to set up and validate locally

Visit Usage Quotas pages and compare the screenshots:

  1. Group Usage Quotas: https://gitlab.com/groups/<group-id>/-/usage_quotas
  2. Project Usage Quotas: https://gitlab.com/<group-id>/<project-id>/-/usage_quotas
  3. Profile/User Namespace Usage Quotas: https://gitlab.com/-/profile/usage_quotas
Edited by Sheldon Led

Merge request reports