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

25 lines
653 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-18 00:54:41 +05:30
import Dashboard from 'ee_else_ce/monitoring/components/dashboard.vue';
2017-08-17 22:00:37 +05:30
2019-05-18 00:54:41 +05:30
export default (props = {}) => {
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),
2019-05-18 00:54:41 +05:30
showTimeWindowDropdown: gon.features.metricsTimeWindow,
...props,
2018-03-27 19:54:05 +05:30
},
});
},
});
}
};