diff options
author | Adriel Santiago <asantiago@gitlab.com> | 2019-05-07 14:47:09 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2019-05-07 14:47:09 +0000 |
commit | 3565ee2ed66bd064ab6bef96ab43c0be43f75e49 (patch) | |
tree | 8a636b3d3eea34911e84979f93bc111ee1a7d984 /app/assets/javascripts/operation_settings/index.js | |
parent | 4ebfcd3b8fa69d7b0ccd2b826a517a18fad07eea (diff) | |
download | gitlab-ce-3565ee2ed66bd064ab6bef96ab43c0be43f75e49.tar.gz |
Add external dashboard link
Add settings for linking to external dashboard from
metrics dashboard
Diffstat (limited to 'app/assets/javascripts/operation_settings/index.js')
-rw-r--r-- | app/assets/javascripts/operation_settings/index.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/assets/javascripts/operation_settings/index.js b/app/assets/javascripts/operation_settings/index.js new file mode 100644 index 00000000000..1171f3ece9f --- /dev/null +++ b/app/assets/javascripts/operation_settings/index.js @@ -0,0 +1,26 @@ +import Vue from 'vue'; +import ExternalDashboardForm from './components/external_dashboard.vue'; + +export default () => { + /** + * This check can be removed when we remove + * the :grafana_dashboard_link feature flag + */ + if (!gon.features.grafanaDashboardLink) { + return null; + } + + const el = document.querySelector('.js-operation-settings'); + + return new Vue({ + el, + render(createElement) { + return createElement(ExternalDashboardForm, { + props: { + ...el.dataset, + expanded: false, + }, + }); + }, + }); +}; |