gitlab-org--gitlab-foss/app/assets/javascripts/monitoring/monitoring_bundle.js

23 lines
561 B
JavaScript
Raw Normal View History

import Vue from 'vue';
import { convertPermissionToBoolean } from '~/lib/utils/common_utils';
2017-08-30 00:49:29 -04:00
import Dashboard from './components/dashboard.vue';
export default () => {
2018-03-06 02:25:19 -05:00
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),
},
});
},
});
}
};