Skip to content

Update license breakdown alert to pajamas

What does this MR do and why?

Describe in detail what your merge request does and why.

Update license breakdown alert to pajamas

  • use new View component for alert

Changelog: other

EE: true

Screenshots or screen recordings

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

Before After
license_-_b license_-_a

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Navigate to Menu => Admin => Dashboard
  2. Apply the below patch
diff --git a/ee/app/views/layouts/header/_licensed_user_count_threshold.html.haml b/ee/app/views/layouts/header/_licensed_user_count_threshold.html.haml
index 905682e2c0a..5b9f791286a 100644
--- a/ee/app/views/layouts/header/_licensed_user_count_threshold.html.haml
+++ b/ee/app/views/layouts/header/_licensed_user_count_threshold.html.haml
@@ -1,10 +1,10 @@
-- return unless show_active_user_count_threshold_banner?
+- return if show_active_user_count_threshold_banner?
 .container-fluid.container-limited.pt-3
   = render Pajamas::AlertComponent.new(title: _('Your instance is approaching its licensed user count'),
     alert_options: { class: 'gitlab-ee-license-banner js-admin-licensed-user-count-threshold', data: { feature_id: Users::CalloutsHelper::ACTIVE_USER_COUNT_THRESHOLD, dismiss_endpoint: callouts_path } },
     close_button_options: { type: 'button', 'aria-label' => _('Dismiss'), data: { testid: 'gitlab-ee-license-banner-dismiss' } }) do |c|
     = c.body do
-      = _('Your instance has %{remaining_user_count} users remaining of the %{total_user_count} included in your subscription. You can add more users than the number included in your license, and we will include the overage in your next bill.') % { remaining_user_count: remaining_user_count, total_user_count: total_user_count }
+      = _('Your instance has %{remaining_user_count} users remaining of the %{total_user_count} included in your subscription. You can add more users than the number included in your license, and we will include the overage in your next bill.') % { remaining_user_count: 1, total_user_count: 1 }
     = c.actions do
       = link_to _('View users statistics'), admin_users_path, class: 'btn gl-alert-action btn-confirm btn-md gl-button'
       = link_to _('Contact support'), EE::CUSTOMER_LICENSE_SUPPORT_URL, rel: 'nofollow', class: 'btn gl-alert-action btn-confirm btn-md gl-button btn-confirm-secondary'
  1. Verify

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #325404 (closed)

Edited by Alexander Turinske

Merge request reports

Loading