Skip to content

Hide lead time graphs if not available

Nathan Friend requested to merge nfriend-hide-lead-time-if-not-availabl into master

What does this MR do?

Fixes a ~bug in the lead time graphs (added in !57872 (merged)) that caused them to render (with errors) even in projects where they are not licensed. These graphs are only available to Ultimate users, so non-Ultimate users shouldn't see the tab.

Screenshots

When the user doesn't have access to the lead time graphs:

Before After
image image

In the second image, no tabs are shown, since there is only a single chart to show (the "Pipelines" charts).

A note on code duplication

This MR introduces a bit of duplication. The existing code that implemented #should_render_deployment_frequency_charts has been more or less duplicated to implement #should_render_lead_time_charts.

Once the deployment_frequency_charts feature flag is removed, these two methods can be combined into a single #should_render_dora_charts method. These two tasks (feature flag removal, code de-duplication) will be done in follow-ups:

Related to #250329 (closed)

Edited by Nathan Friend

Merge request reports