summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/projects/services/edit/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pages/projects/services/edit/index.js')
-rw-r--r--app/assets/javascripts/pages/projects/services/edit/index.js20
1 files changed, 9 insertions, 11 deletions
diff --git a/app/assets/javascripts/pages/projects/services/edit/index.js b/app/assets/javascripts/pages/projects/services/edit/index.js
index 8e603c5c1a2..03ffc323fc0 100644
--- a/app/assets/javascripts/pages/projects/services/edit/index.js
+++ b/app/assets/javascripts/pages/projects/services/edit/index.js
@@ -2,16 +2,14 @@ import IntegrationSettingsForm from '~/integrations/integration_settings_form';
import PrometheusAlerts from '~/prometheus_alerts';
import CustomMetrics from '~/prometheus_metrics/custom_metrics';
-document.addEventListener('DOMContentLoaded', () => {
- const integrationSettingsForm = new IntegrationSettingsForm('.js-integration-settings-form');
- integrationSettingsForm.init();
+const integrationSettingsForm = new IntegrationSettingsForm('.js-integration-settings-form');
+integrationSettingsForm.init();
- const prometheusSettingsSelector = '.js-prometheus-metrics-monitoring';
- const prometheusSettingsWrapper = document.querySelector(prometheusSettingsSelector);
- if (prometheusSettingsWrapper) {
- const customMetrics = new CustomMetrics(prometheusSettingsSelector);
- customMetrics.init();
- }
+const prometheusSettingsSelector = '.js-prometheus-metrics-monitoring';
+const prometheusSettingsWrapper = document.querySelector(prometheusSettingsSelector);
+if (prometheusSettingsWrapper) {
+ const customMetrics = new CustomMetrics(prometheusSettingsSelector);
+ customMetrics.init();
+}
- PrometheusAlerts();
-});
+PrometheusAlerts();