Skip to content

Add storage tab to render both in CE and EE

What does this MR do and why?

After the work in !143633 (merged) we now can dynamically add tabs to be rendered in the Usage Quotas Layout App. This finishes the implementation of #440195 (closed). This is what we're doing here:

  • In the new View (under usage_quotas_for_all_editions Feature Flag)
    • Create a parseProvideData method in utils
    • Use this method to populate usageQuotasViewProvideData array. This array will be different in CE and EE, using ee_else_ce stratetgy
    • We also create a usageQuotasTabsMetadata array, to load the tabs metadata.
      • It was suggested here (!140210 (comment 1720456607)) that we also import the component that will be used in the tab, so we can have the tabs truly dynamic
    • We import all the above in the index.js file, where we initiate the View App.
  • In the legacy view (What we currently have when the FF is off)
    • We offload init_namespace_storage.js with using parseProvideData from utils

Some other changes we needed to do:

  • Amend isCostFactored method so we don't show this piece of UI unintetended
  • Standardize DOM queries with querySelector method and STORAGE_TAB_METADATA_EL_SELECTOR constant
  • Implement a follow up suggested here !139568 (comment 1750272594)

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

FF on Before FF on After FF off
uq-storage-tab-ff-on_before uq-storage-tab-ff-on_after uq-storage-tab-ff-off

How to set up and validate locally

  1. Navigate to a Group Usage Quotas: https://gdk.test:3443/groups/<group-id>/-/usage_quotas
  2. Turn on and off the FF usage_quotas_for_all_editions
  3. Compare with the screenshots
Edited by Sheldon Led

Merge request reports