Add submit license usage data banner
What does this MR do and why?
Part of https://gitlab.com/gitlab-org/gitlab/-/issues/353804+
Add a banner to remind instance admins of submitting the license usage data to the renewals service. The banner is only shown on the Admin dashboard and on the subscription page.
The banner will start showing up one month after the license's start date. It is non-dismissable until the license usage data/seat utilization data was exported by any admin. When dismissed, it will show up in the next month again.
Screenshots or screen recordings
Page | Screenshot |
---|---|
Admin page (non-dismissable) | ![]() |
Admin page (dismissable) | ![]() |
Subscription page (non-dismissable) | ![]() |
Subscription page (dismissable) | ![]() |
How to set up and validate locally
You need to start a rails console to check some things:
- Make sure
Gitlab::CurrentSettings.should_check_namespace_plan?
returnsfalse
. - Make sure
Feature.enabled?(:automated_email_provision)
returnstrue
. - This assumes you haven't interacted with anything regarding this banner before (e.g. not testing !89142 (merged) before).
- Upload a license into your GitLab instance that fulfills the following conditions:
- It's an Offline Cloud License.
- It's not for a trial.
- It started today
- Visit the Admin area's Dashboard page (
/admin
) and the Subscription page (/admin/subscription
) and verify the banner is not shown. - Upload a similar license as above but make sure it started more than a month ago.
- Visit the Admin area's Dashboard page (
/admin
) and the Subscription page (/admin/subscription
) to see the banner. - Verify the banner is not dismissble.
- Download the license usage data on the Subscription page (
/admin/subscription
) with another admin user. - With the first admin, visit the Dashboard page (
/admin
) or the Subscription page (/admin/subscription
) again and verify the banner is now dismissable. - Dismiss the banner and reload the page to verify the banner does not show up anymore.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Corinna Gogolok