debian-mirror-gitlab/app/assets/javascripts/monitoring/monitoring_bundle.js

23 lines
561 B
JavaScript
Raw Normal View History

2017-09-10 17:25:29 +05:30
import Vue from 'vue';
2018-03-27 19:54:05 +05:30
import { convertPermissionToBoolean } from '~/lib/utils/common_utils';
2018-03-17 18:26:18 +05:30
import Dashboard from './components/dashboard.vue';
2017-08-17 22:00:37 +05:30
2018-03-27 19:54:05 +05:30
export default () => {
const el = document.getElementById('prometheus-graphs');
if (el && el.dataset) {
// eslint-disable-next-line no-new
new Vue({
el,
render(createElement) {
return createElement(Dashboard, {
props: {
...el.dataset,
hasMetrics: convertPermissionToBoolean(el.dataset.hasMetrics),
},
});
},
});
}
};