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

29 lines
628 B
JavaScript

import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import JobArtifactsTable from './components/job_artifacts_table.vue';
Vue.use(VueApollo);
const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(),
});
export const initArtifactsTable = () => {
const el = document.querySelector('#js-artifact-management');
if (!el) {
return false;
}
const { projectPath } = el.dataset;
return new Vue({
el,
apolloProvider,
provide: {
projectPath,
},
render: (createElement) => createElement(JobArtifactsTable),
});
};