debian-mirror-gitlab/app/assets/javascripts/pages/projects/services/edit/index.js

20 lines
847 B
JavaScript
Raw Normal View History

2018-03-27 19:54:05 +05:30
import IntegrationSettingsForm from '~/integrations/integration_settings_form';
2020-04-22 19:07:51 +05:30
import CustomMetrics from '~/prometheus_metrics/custom_metrics';
import PrometheusAlerts from '~/prometheus_alerts';
2020-03-13 15:44:24 +05:30
import initAlertsSettings from '~/alerts_service_settings';
2018-03-27 19:54:05 +05:30
document.addEventListener('DOMContentLoaded', () => {
const integrationSettingsForm = new IntegrationSettingsForm('.js-integration-settings-form');
integrationSettingsForm.init();
2020-04-22 19:07:51 +05:30
const prometheusSettingsSelector = '.js-prometheus-metrics-monitoring';
const prometheusSettingsWrapper = document.querySelector(prometheusSettingsSelector);
2018-03-27 19:54:05 +05:30
if (prometheusSettingsWrapper) {
2020-04-22 19:07:51 +05:30
const customMetrics = new CustomMetrics(prometheusSettingsSelector);
customMetrics.init();
2018-03-27 19:54:05 +05:30
}
2020-03-13 15:44:24 +05:30
2020-04-22 19:07:51 +05:30
PrometheusAlerts();
2020-03-13 15:44:24 +05:30
initAlertsSettings(document.querySelector('.js-alerts-service-settings'));
2018-03-27 19:54:05 +05:30
});