debian-mirror-gitlab/app/assets/javascripts/artifacts_settings/index.js

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

33 lines
758 B
JavaScript
Raw Normal View History

2021-03-08 18:12:59 +05:30
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import KeepLatestArtifactCheckbox from '~/artifacts_settings/keep_latest_artifact_checkbox.vue';
2021-03-11 19:13:27 +05:30
import createDefaultClient from '~/lib/graphql';
2021-03-08 18:12:59 +05:30
Vue.use(VueApollo);
const apolloProvider = new VueApollo({
2021-12-11 22:18:48 +05:30
defaultClient: createDefaultClient(),
2021-03-08 18:12:59 +05:30
});
export default (containerId = 'js-artifacts-settings-app') => {
const containerEl = document.getElementById(containerId);
if (!containerEl) {
return false;
}
const { fullPath, helpPagePath } = containerEl.dataset;
return new Vue({
el: containerEl,
apolloProvider,
provide: {
fullPath,
helpPagePath,
},
render(createElement) {
return createElement(KeepLatestArtifactCheckbox);
},
});
};