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

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

30 lines
628 B
JavaScript
Raw Normal View History

2023-01-13 00:05:48 +05:30
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),
});
};