gitlab-org--gitlab-foss/app/assets/javascripts/operation_settings/index.js
Adriel Santiago 57f6be00bc Handle external dashboard form submission
Connect frontend UI with backend api for external dashboard link
2019-06-04 17:55:52 +00:00

23 lines
535 B
JavaScript

import Vue from 'vue';
import store from './store';
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,
store: store(el.dataset),
render(createElement) {
return createElement(ExternalDashboardForm);
},
});
};