debian-mirror-gitlab/app/assets/javascripts/group_settings/mount_shared_runners.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
890 B
JavaScript
Raw Normal View History

2021-01-03 14:25:43 +05:30
import Vue from 'vue';
2023-07-09 08:55:56 +05:30
import { parseBoolean } from '~/lib/utils/common_utils';
2021-01-03 14:25:43 +05:30
import UpdateSharedRunnersForm from './components/shared_runners_form.vue';
export default (containerId = 'update-shared-runners-form') => {
const containerEl = document.getElementById(containerId);
2021-12-11 22:18:48 +05:30
const {
2022-08-27 11:52:29 +05:30
groupId,
2023-07-09 08:55:56 +05:30
groupName,
groupIsEmpty,
2022-07-16 23:28:13 +05:30
sharedRunnersSetting,
parentSharedRunnersSetting,
runnerEnabledValue,
runnerDisabledValue,
runnerAllowOverrideValue,
2021-12-11 22:18:48 +05:30
} = containerEl.dataset;
2021-01-03 14:25:43 +05:30
return new Vue({
el: containerEl,
2021-12-11 22:18:48 +05:30
provide: {
2022-08-27 11:52:29 +05:30
groupId,
2023-07-09 08:55:56 +05:30
groupName,
groupIsEmpty: parseBoolean(groupIsEmpty),
2022-07-16 23:28:13 +05:30
sharedRunnersSetting,
parentSharedRunnersSetting,
runnerEnabledValue,
runnerDisabledValue,
runnerAllowOverrideValue,
2021-12-11 22:18:48 +05:30
},
2021-01-03 14:25:43 +05:30
render(createElement) {
2021-12-11 22:18:48 +05:30
return createElement(UpdateSharedRunnersForm);
2021-01-03 14:25:43 +05:30
},
});
};