debian-mirror-gitlab/app/assets/javascripts/observability/index.js
2023-01-13 15:02:22 +05:30

28 lines
535 B
JavaScript

import Vue from 'vue';
import VueRouter from 'vue-router';
import ObservabilityApp from './components/observability_app.vue';
Vue.use(VueRouter);
export default () => {
const el = document.getElementById('js-observability-app');
if (!el) return false;
const router = new VueRouter({
mode: 'history',
});
return new Vue({
el,
router,
render(h) {
return h(ObservabilityApp, {
props: {
observabilityIframeSrc: el.dataset.observabilityIframeSrc,
},
});
},
});
};