debian-mirror-gitlab/app/assets/javascripts/runner/runner_details/index.js

24 lines
422 B
JavaScript
Raw Normal View History

2021-04-29 21:17:54 +05:30
import Vue from 'vue';
import RunnerDetailsApp from './runner_details_app.vue';
export const initRunnerDetail = (selector = '#js-runner-detail') => {
const el = document.querySelector(selector);
if (!el) {
return null;
}
const { runnerId } = el.dataset;
return new Vue({
el,
render(h) {
return h(RunnerDetailsApp, {
props: {
runnerId,
},
});
},
});
};