2020-10-08 11:08:17 -04:00
|
|
|
import Vue from 'vue';
|
|
|
|
import UpdateSharedRunnersForm from './components/shared_runners_form.vue';
|
|
|
|
|
|
|
|
export default (containerId = 'update-shared-runners-form') => {
|
|
|
|
const containerEl = document.getElementById(containerId);
|
|
|
|
|
2021-10-20 20:12:27 -04:00
|
|
|
const {
|
|
|
|
updatePath,
|
|
|
|
sharedRunnersAvailability,
|
|
|
|
parentSharedRunnersAvailability,
|
|
|
|
runnerEnabled,
|
|
|
|
runnerDisabled,
|
|
|
|
runnerAllowOverride,
|
|
|
|
} = containerEl.dataset;
|
|
|
|
|
2020-10-08 11:08:17 -04:00
|
|
|
return new Vue({
|
|
|
|
el: containerEl,
|
2021-10-22 17:09:56 -04:00
|
|
|
provide: {
|
|
|
|
updatePath,
|
|
|
|
sharedRunnersAvailability,
|
|
|
|
parentSharedRunnersAvailability,
|
|
|
|
runnerEnabled,
|
|
|
|
runnerDisabled,
|
|
|
|
runnerAllowOverride,
|
|
|
|
},
|
2020-10-08 11:08:17 -04:00
|
|
|
render(createElement) {
|
2021-10-22 17:09:56 -04:00
|
|
|
return createElement(UpdateSharedRunnersForm);
|
2020-10-08 11:08:17 -04:00
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|