diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-04 06:09:49 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-04 06:09:49 +0000 |
commit | b41e09c9ce655d61557a3513508952240506b161 (patch) | |
tree | 30c4c04800383f01175961e84415ecf9b8eff437 /app/assets/javascripts/pages | |
parent | 47b5ca54362fa51c08f4525415bb6887b8a7ba92 (diff) | |
download | gitlab-ce-b41e09c9ce655d61557a3513508952240506b161.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r-- | app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/usage_statistics.js | 26 |
1 files changed, 13 insertions, 13 deletions
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 bf27b1a81ff..4c312a008cb 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 @@ -8,34 +8,34 @@ export const HELPER_TEXT_SERVICE_PING_ENABLED = __( '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.', ); -function setHelperText(usagePingCheckbox) { +function setHelperText(servicePingCheckbox) { const helperTextId = document.getElementById('service_ping_features_helper_text'); - const usagePingFeaturesLabel = document.getElementById('service_ping_features_label'); + const servicePingFeaturesLabel = document.getElementById('service_ping_features_label'); - const usagePingFeaturesCheckbox = document.getElementById( + const servicePingFeaturesCheckbox = document.getElementById( 'application_setting_usage_ping_features_enabled', ); - helperTextId.textContent = usagePingCheckbox.checked + helperTextId.textContent = servicePingCheckbox.checked ? HELPER_TEXT_SERVICE_PING_ENABLED : HELPER_TEXT_SERVICE_PING_DISABLED; - usagePingFeaturesLabel.classList.toggle('gl-cursor-not-allowed', !usagePingCheckbox.checked); + servicePingFeaturesLabel.classList.toggle('gl-cursor-not-allowed', !servicePingCheckbox.checked); - usagePingFeaturesCheckbox.disabled = !usagePingCheckbox.checked; + servicePingFeaturesCheckbox.disabled = !servicePingCheckbox.checked; - if (!usagePingCheckbox.checked) { - usagePingFeaturesCheckbox.disabled = true; - usagePingFeaturesCheckbox.checked = false; + if (!servicePingCheckbox.checked) { + servicePingFeaturesCheckbox.disabled = true; + servicePingFeaturesCheckbox.checked = false; } } export default function initSetHelperText() { - const usagePingCheckbox = document.getElementById('application_setting_usage_ping_enabled'); + const servicePingCheckbox = document.getElementById('application_setting_usage_ping_enabled'); - setHelperText(usagePingCheckbox); - usagePingCheckbox.addEventListener('change', () => { - setHelperText(usagePingCheckbox); + setHelperText(servicePingCheckbox); + servicePingCheckbox.addEventListener('change', () => { + setHelperText(servicePingCheckbox); }); } |