Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « artifacts « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e0b2ab2bf47f14246bbaa297ce844c4adc97f7a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import { parseBoolean } from '~/lib/utils/common_utils';
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, canDestroyArtifacts, artifactsManagementFeedbackImagePath } = el.dataset;

  return new Vue({
    el,
    apolloProvider,
    provide: {
      projectPath,
      canDestroyArtifacts: parseBoolean(canDestroyArtifacts),
      artifactsManagementFeedbackImagePath,
    },
    render: (createElement) => createElement(JobArtifactsTable),
  });
};