diff options
author | Constance Okoghenun <cokoghenun@gitlab.com> | 2018-02-16 14:38:50 +0300 |
---|---|---|
committer | Constance Okoghenun <cokoghenun@gitlab.com> | 2018-02-16 14:38:50 +0300 |
commit | 523f1f7cf484bea334c365ca21ab3dd492613b55 (patch) | |
tree | 4a35ead9e47a178cd361adadedb46cded412e612 /app | |
parent | c94f25e16649d74288dd167b8428739b4f7b9b22 (diff) |
Removed prometheus_metrics webpack bundle tag
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/pages/projects/services/edit/index.js | 7 | ||||
-rw-r--r-- | app/assets/javascripts/prometheus_metrics/index.js | 6 | ||||
-rw-r--r-- | app/views/projects/services/prometheus/_show.html.haml | 3 |
3 files changed, 7 insertions, 9 deletions
diff --git a/app/assets/javascripts/pages/projects/services/edit/index.js b/app/assets/javascripts/pages/projects/services/edit/index.js index 434a7e44277..5c73171e62e 100644 --- a/app/assets/javascripts/pages/projects/services/edit/index.js +++ b/app/assets/javascripts/pages/projects/services/edit/index.js @@ -1,6 +1,13 @@ import IntegrationSettingsForm from '~/integrations/integration_settings_form'; +import PrometheusMetrics from '~/prometheus_metrics/prometheus_metrics'; export default () => { + const prometheusSettingsWrapper = document.querySelector('.js-prometheus-metrics-monitoring'); const integrationSettingsForm = new IntegrationSettingsForm('.js-integration-settings-form'); integrationSettingsForm.init(); + + if (prometheusSettingsWrapper) { + const prometheusMetrics = new PrometheusMetrics('.js-prometheus-metrics-monitoring'); + prometheusMetrics.loadActiveMetrics(); + } }; diff --git a/app/assets/javascripts/prometheus_metrics/index.js b/app/assets/javascripts/prometheus_metrics/index.js deleted file mode 100644 index a0c43c5abe1..00000000000 --- a/app/assets/javascripts/prometheus_metrics/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import PrometheusMetrics from './prometheus_metrics'; - -$(() => { - const prometheusMetrics = new PrometheusMetrics('.js-prometheus-metrics-monitoring'); - prometheusMetrics.loadActiveMetrics(); -}); diff --git a/app/views/projects/services/prometheus/_show.html.haml b/app/views/projects/services/prometheus/_show.html.haml index b0cb5ce5e8f..5f38ecd6820 100644 --- a/app/views/projects/services/prometheus/_show.html.haml +++ b/app/views/projects/services/prometheus/_show.html.haml @@ -1,6 +1,3 @@ -- content_for :page_specific_javascripts do - = webpack_bundle_tag('prometheus_metrics') - .row.prepend-top-default.append-bottom-default.prometheus-metrics-monitoring.js-prometheus-metrics-monitoring .col-lg-3 %h4.prepend-top-0 |