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

23 lines
533 B
JavaScript
Raw Normal View History

2017-09-10 17:25:29 +05:30
import Vue from 'vue';
2019-02-15 15:39:39 +05:30
import { parseBoolean } from '~/lib/utils/common_utils';
2019-05-30 16:15:17 +05:30
import Dashboard from './components/dashboard.vue';
2017-08-17 22:00:37 +05:30
2019-05-30 16:15:17 +05:30
export default () => {
2018-03-27 19:54:05 +05:30
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,
2019-02-15 15:39:39 +05:30
hasMetrics: parseBoolean(el.dataset.hasMetrics),
2018-03-27 19:54:05 +05:30
},
});
},
});
}
};