Commit 257af818 authored by Rajendra Kadam's avatar Rajendra Kadam

Rename doc links to service ping and refactor js

parent 7c55cc72
......@@ -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',
......
......@@ -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
......
......@@ -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') } }
......@@ -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') } }
......@@ -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 = () => {
......
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