debian-mirror-gitlab/app/assets/javascripts/operation_settings/index.js
2019-07-31 17:26:46 +00:00

26 lines
567 B
JavaScript

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,
},
});
},
});
};