diff options
author | Martin Wortschack <mwortschack@gitlab.com> | 2018-09-11 09:50:35 +0300 |
---|---|---|
committer | Martin Wortschack <mwortschack@gitlab.com> | 2018-09-11 09:50:35 +0300 |
commit | b4c7e7225a4c48a8a78344a2de2dd585cfd62027 (patch) | |
tree | 74792f06e256c3ed147bc5dda8ec3df9e390fb05 /app/assets/javascripts/pages | |
parent | a2f7936c74e6c9c4eed7b1c5641f0c43d4ff1375 (diff) |
load usage ping script on admin settings subpage only
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r-- | app/assets/javascripts/pages/admin/application_settings/index.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/index.js | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/app/assets/javascripts/pages/admin/application_settings/index.js b/app/assets/javascripts/pages/admin/application_settings/index.js index 069f8ce55d0..47bd70537f1 100644 --- a/app/assets/javascripts/pages/admin/application_settings/index.js +++ b/app/assets/javascripts/pages/admin/application_settings/index.js @@ -1,13 +1,8 @@ import initSettingsPanels from '~/settings_panels'; import projectSelect from '~/project_select'; -import UsagePingPayload from './usage_ping_payload'; document.addEventListener('DOMContentLoaded', () => { // Initialize expandable settings panels initSettingsPanels(); projectSelect(); - new UsagePingPayload( - document.querySelector('.js-usage-ping-payload-trigger'), - document.querySelector('.js-usage-ping-payload'), - ).init(); }); diff --git a/app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/index.js b/app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/index.js new file mode 100644 index 00000000000..c40503603be --- /dev/null +++ b/app/assets/javascripts/pages/admin/application_settings/metrics_and_profiling/index.js @@ -0,0 +1,8 @@ +import UsagePingPayload from './../usage_ping_payload'; + +document.addEventListener('DOMContentLoaded', () => { + new UsagePingPayload( + document.querySelector('.js-usage-ping-payload-trigger'), + document.querySelector('.js-usage-ping-payload'), + ).init(); +}); |