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

index.js « ci_variable_list « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2b4a56a4e6dc27328594bbdee4824eb8db975287 (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
import Vue from 'vue';
import CiVariableSettings from './components/ci_variable_settings.vue';
import createStore from './store';
import { parseBoolean } from '~/lib/utils/common_utils';

export default () => {
  const el = document.getElementById('js-ci-project-variables');
  const { endpoint, projectId, group, maskableRegex, protectedByDefault } = el.dataset;
  const isGroup = parseBoolean(group);
  const isProtectedByDefault = parseBoolean(protectedByDefault);

  const store = createStore({
    endpoint,
    projectId,
    isGroup,
    maskableRegex,
    isProtectedByDefault,
  });

  return new Vue({
    el,
    store,
    render(createElement) {
      return createElement(CiVariableSettings);
    },
  });
};