Commit 5f55a666 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'JohnMcGuire-master-patch-58064' into 'master'

Filter Searching Requires a keyword

See merge request gitlab-org/gitlab!46796
parents ea501ff8 a8c5dcf1
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
= notice[:message].html_safe = notice[:message].html_safe
- if @license.present? && show_license_breakdown? - if @license.present? && show_license_breakdown?
= render_if_exists 'admin/licenses/breakdown' .license-panel.gl-mt-5
= render_if_exists 'admin/licenses/summary'
= render_if_exists 'admin/licenses/breakdown'
.admin-dashboard.gl-mt-3 .admin-dashboard.gl-mt-3
.row .row
......
...@@ -17,68 +17,49 @@ ...@@ -17,68 +17,49 @@
- billable_users_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer nofollow">'.html_safe % { url: billable_users_url } - billable_users_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer nofollow">'.html_safe % { url: billable_users_url }
- link_end = '</a>'.html_safe - link_end = '</a>'.html_safe
.license-panel.gl-mt-5 .d-flex.gl-mb-5
.gl-mb-5.info-well.dark-well .col-sm-6.d-flex.pl-0
.gl-display-flex.gl-justify-content-space-between.gl-align-items-center.gl-p-5 .info-well.dark-well.gl-mb-0
%div .well-segment.well-centered
%h4.gl-mt-0 %h3.center
= _('License overview') = _('Users in License:')
%p.gl-mb-0 = licensed_users
= sprite_icon('license', css_class: 'gl-fill-gray-700') %hr
%span.gl-ml-3 - if @license.will_expire?
= _('Plan:') = _('Your license is valid from')
%strong= @license.plan.capitalize %strong<>
%span.gl-ml-5 = _(' %{start} to %{end}') % { start: @license.starts_at, end: @license.expires_at }
= render 'admin/licenses/license_status' \.
%span.gl-ml-5 = _('The %{link_start}true-up model%{link_end} allows having more users, and additional users will incur a retroactive charge on renewal.').html_safe % { link_start: true_up_link_start, link_end: link_end }
= _('Licensed to:') = seats_calculation_message(@license)
%strong= @license.licensee['Name'] .col-sm-6.d-flex.pr-0
= "(#{@license.licensee['Email']})" .info-well.dark-well.gl-mb-0
%div .well-segment.well-centered
= link_to 'View details', admin_license_path, class: "gl-button btn btn-secondary" %h3.center
.d-flex.gl-mb-5 = _('Billable Users:')
.col-sm-6.d-flex.pl-0 = number_with_delimiter current_active_user_count
.info-well.dark-well.gl-mb-0 %hr
.well-segment.well-centered %p
%h3.center = _('This is the number of %{billable_users_link_start}billable users%{link_end} on your installation, and this is the minimum number you need to purchase when you renew your license.').html_safe % { billable_users_link_start: billable_users_link_start, link_end: link_end }
= _('Users in License:') .d-flex.gl-pb-5
= licensed_users .col-sm-6.d-flex.pl-0
%hr .info-well.dark-well.flex-fill.gl-mb-0
- if @license.will_expire? .well-segment.well-centered
= _('Your license is valid from') %h3.center
%strong<> = _('Maximum Users:')
= _(' %{start} to %{end}') % { start: @license.starts_at, end: @license.expires_at } = number_with_delimiter max_user_count
\. %hr
= _('The %{link_start}true-up model%{link_end} allows having more users, and additional users will incur a retroactive charge on renewal.').html_safe % { link_start: true_up_link_start, link_end: link_end } = _('This is the highest peak of users on your installation since the license started.')
= seats_calculation_message(@license) .col-sm-6.d-flex.pr-0
.col-sm-6.d-flex.pr-0 .info-well.dark-well.gl-mb-0
.info-well.dark-well.gl-mb-0 .well-segment.well-centered
.well-segment.well-centered %h3.center
%h3.center = _('Users over License:')
= _('Billable Users:') = number_with_delimiter users_over_license
= number_with_delimiter current_active_user_count %hr
%hr - if license_is_over_capacity?
%p .gl-alert.gl-alert-info.gl-mb-3{ role: 'alert' }
= _('This is the number of %{billable_users_link_start}billable users%{link_end} on your installation, and this is the minimum number you need to purchase when you renew your license.').html_safe % { billable_users_link_start: billable_users_link_start, link_end: link_end } = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
.d-flex.gl-pb-5 .gl-alert-body
.col-sm-6.d-flex.pl-0 = s_('Your instance has exceeded your subscription\'s licensed user count.')
.info-well.dark-well.flex-fill.gl-mb-0 = _('You\'ll be charged for %{true_up_link_start}users over license%{link_end} on a quartely or annual basis, depending on the terms of your agreement.').html_safe % { true_up_link_start: true_up_link_start, link_end: link_end }
.well-segment.well-centered
%h3.center
= _('Maximum Users:')
= number_with_delimiter max_user_count
%hr
= _('This is the highest peak of users on your installation since the license started.')
.col-sm-6.d-flex.pr-0
.info-well.dark-well.gl-mb-0
.well-segment.well-centered
%h3.center
= _('Users over License:')
= number_with_delimiter users_over_license
%hr
- if license_is_over_capacity?
.gl-alert.gl-alert-info.gl-mb-3{ role: 'alert' }
= sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
.gl-alert-body
= s_('Your instance has exceeded your subscription\'s licensed user count.')
= _('You\'ll be charged for %{true_up_link_start}users over license%{link_end} on a quartely or annual basis, depending on the terms of your agreement.').html_safe % { true_up_link_start: true_up_link_start, link_end: link_end }
.gl-mb-5.info-well.dark-well
.gl-display-flex.gl-justify-content-space-between.gl-align-items-center.gl-p-5
%div
%h4.gl-mt-0
= _('License overview')
%p.gl-mb-0
= sprite_icon('license', css_class: 'gl-fill-gray-700')
%span.gl-ml-3
= _('Plan:')
%strong= @license.plan.capitalize
%span.gl-ml-5
= render 'admin/licenses/license_status'
%span.gl-ml-5
= _('Licensed to:')
%strong= @license.licensee['Name']
= "(#{@license.licensee['Email']})"
%div
= link_to 'View details', admin_license_path, class: "gl-button btn btn-secondary"
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
- if @license.present? - if @license.present?
= render 'info' = render 'info'
= render 'breakdown' .license-panel.gl-mt-5
= render 'breakdown'
- if @licenses.present? - if @licenses.present?
= render 'license_history' = render 'license_history'
---
title: Remove admin/license page duplicate summary
merge_request: 46827
author:
type: changed
...@@ -15,6 +15,7 @@ RSpec.describe 'admin/licenses/show.html.haml' do ...@@ -15,6 +15,7 @@ RSpec.describe 'admin/licenses/show.html.haml' do
render render
expect(rendered).to have_content('Buy License') expect(rendered).to have_content('Buy License')
expect(rendered).not_to have_content('License overview')
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment