diff --git a/app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/usage_statistics.js b/app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/usage_statistics.js index bab3cce39acc5a64e10a6b5e4018c50232efcc55..9ccb6381a3f0e336bcd6b4a608470274899a28e3 100644 --- a/app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/usage_statistics.js +++ b/app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/usage_statistics.js @@ -9,9 +9,9 @@ export const HELPER_TEXT_USAGE_PING_ENABLED = __( ); function setHelperText(usagePingCheckbox) { - const helperTextId = document.getElementById('usage_ping_features_helper_text'); + const helperTextId = document.getElementById('service_ping_features_helper_text'); - const usagePingFeaturesLabel = document.getElementById('usage_ping_features_label'); + const usagePingFeaturesLabel = document.getElementById('service_ping_features_label'); const usagePingFeaturesCheckbox = document.getElementById( 'application_setting_usage_ping_features_enabled', diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index f45e6c5e8e95012ae0e62f5f8213caf935997ece..ddd0abb4c34ea60d05e0417fcfc026757076fa7a 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -39,14 +39,14 @@ - usage_ping_enabled = @application_setting.usage_ping_enabled? .form-check = f.check_box :usage_ping_features_enabled?, disabled: !usage_ping_enabled, class: 'form-check-input' - = f.label :usage_ping_features_enabled?, class: 'form-check-label gl-cursor-not-allowed', id: 'usage_ping_features_label' do + = f.label :usage_ping_features_enabled?, class: 'form-check-label gl-cursor-not-allowed', id: 'service_ping_features_label' do = _('Enable Registration Features') = link_to sprite_icon('question-o'), help_page_path('development/service_ping/index.md', anchor: 'registration-features-program') .form-text.text-muted - if usage_ping_enabled - %p.gl-mb-3.text-muted{ id: 'usage_ping_features_helper_text' }= _('You can enable Registration Features because Service Ping is enabled. To continue using Registration Features in the future, you will also need to register with GitLab via a new cloud licensing service.') + %p.gl-mb-3.text-muted{ id: 'service_ping_features_helper_text' }= _('You can enable Registration Features because Service Ping is enabled. To continue using Registration Features in the future, you will also need to register with GitLab via a new cloud licensing service.') - else - %p.gl-mb-3.text-muted{ id: 'usage_ping_features_helper_text' }= _('To enable Registration Features, make sure "Enable service ping" is checked.') + %p.gl-mb-3.text-muted{ id: 'service_ping_features_helper_text' }= _('To enable Registration Features, make sure "Enable service ping" is checked.') %p.gl-mb-3.text-muted= _('Registration Features include:') .form-text diff --git a/app/views/admin/dev_ops_report/_report.html.haml b/app/views/admin/dev_ops_report/_report.html.haml index c08a57fdb2541557b257e1d29a1553f0ce50a51e..0b26548d6e6449e0e2a252ad1960b79f51ec7ef5 100644 --- a/app/views/admin/dev_ops_report/_report.html.haml +++ b/app/views/admin/dev_ops_report/_report.html.haml @@ -4,6 +4,6 @@ = render 'callout' - if !service_ping_enabled - #js-devops-service-ping-disabled{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_service_ping_path: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/usage_ping/index.md') } } + #js-devops-service-ping-disabled{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_service_ping_path: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/service_ping/index.md') } } - else #js-devops-score{ data: { devops_score_metrics: devops_score_metrics(@metric).to_json, devops_report_docs_path: help_page_path('user/admin_area/analytics/dev_ops_report'), no_data_image_path: image_path('dev_ops_report_no_data.svg') } } diff --git a/ee/app/views/admin/dev_ops_report/_devops_tabs.html.haml b/ee/app/views/admin/dev_ops_report/_devops_tabs.html.haml index 9ea823db5be0365ac4bc3e180e0edd812278a0ff..d773a7f14580303d7592fba0d4eee685839c1899 100644 --- a/ee/app/views/admin/dev_ops_report/_devops_tabs.html.haml +++ b/ee/app/views/admin/dev_ops_report/_devops_tabs.html.haml @@ -7,6 +7,6 @@ = render_ce 'admin/dev_ops_report/callout' - if !service_ping_enabled - #js-devops-service-ping-disabled{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_service_ping_path: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/usage_ping/index.md') } } + #js-devops-service-ping-disabled{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_service_ping_path: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/service_ping/index.md') } } - else .js-devops-adoption{ data: { empty_state_svg_path: image_path('illustrations/monitoring/getting_started.svg'), devops_score_metrics: devops_score_metrics(@metric).to_json, devops_report_docs_path: help_page_path('user/admin_area/analytics/dev_ops_report'), no_data_image_path: image_path('dev_ops_report_no_data.svg') } } diff --git a/spec/frontend/pages/admin/application_settings/metrics_and_profiling/usage_statistics_spec.js b/spec/frontend/pages/admin/application_settings/metrics_and_profiling/usage_statistics_spec.js index ef649e7697bc41ed810a9cb0f0b94030d39608df..48e51f09c096b77dc9cc50bdd643a1789728b8d5 100644 --- a/spec/frontend/pages/admin/application_settings/metrics_and_profiling/usage_statistics_spec.js +++ b/spec/frontend/pages/admin/application_settings/metrics_and_profiling/usage_statistics_spec.js @@ -17,8 +17,8 @@ describe('UsageStatistics', () => { usagePingFeaturesCheckBox = document.getElementById( 'application_setting_usage_ping_features_enabled', ); - usagePingFeaturesLabel = document.getElementById('usage_ping_features_label'); - usagePingFeaturesHelperText = document.getElementById('usage_ping_features_helper_text'); + usagePingFeaturesLabel = document.getElementById('service_ping_features_label'); + usagePingFeaturesHelperText = document.getElementById('service_ping_features_helper_text'); }); const expectEnabledUsagePingFeaturesCheckBox = () => {