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

index.js « deploy_tokens « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 334c9930f4b63c3dc03c99449a4a7fad384bb657 (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
33
import Vue from 'vue';
import NewDeployToken from './components/new_deploy_token.vue';

export default function initDeployTokens() {
  const el = document.getElementById('js-new-deploy-token');

  if (el == null) return null;

  const {
    createNewTokenPath,
    deployTokensHelpUrl,
    containerRegistryEnabled,
    packagesRegistryEnabled,
    tokenType,
  } = el.dataset;
  return new Vue({
    el,
    components: {
      NewDeployToken,
    },
    render(createElement) {
      return createElement(NewDeployToken, {
        props: {
          createNewTokenPath,
          deployTokensHelpUrl,
          containerRegistryEnabled: containerRegistryEnabled !== undefined,
          packagesRegistryEnabled: packagesRegistryEnabled !== undefined,
          tokenType,
        },
      });
    },
  });
}