debian-mirror-gitlab/app/assets/javascripts/observability/index.js
2023-01-12 18:35:48 +00:00

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,
},
});
},
});
};