diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 11:33:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 11:33:21 +0000 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /app/assets/javascripts/ci_variable_list/index.js | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) | |
download | gitlab-ce-7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0.tar.gz |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'app/assets/javascripts/ci_variable_list/index.js')
-rw-r--r-- | app/assets/javascripts/ci_variable_list/index.js | 62 |
1 files changed, 4 insertions, 58 deletions
diff --git a/app/assets/javascripts/ci_variable_list/index.js b/app/assets/javascripts/ci_variable_list/index.js index 1b69da9e086..174a59aba42 100644 --- a/app/assets/javascripts/ci_variable_list/index.js +++ b/app/assets/javascripts/ci_variable_list/index.js @@ -5,9 +5,7 @@ import { parseBoolean } from '~/lib/utils/common_utils'; import CiAdminVariables from './components/ci_admin_variables.vue'; import CiGroupVariables from './components/ci_group_variables.vue'; import CiProjectVariables from './components/ci_project_variables.vue'; -import LegacyCiVariableSettings from './components/legacy_ci_variable_settings.vue'; import { cacheConfig, resolvers } from './graphql/settings'; -import createStore from './store'; const mountCiVariableListApp = (containerEl) => { const { @@ -76,62 +74,10 @@ const mountCiVariableListApp = (containerEl) => { }); }; -const mountLegacyCiVariableListApp = (containerEl) => { - const { - endpoint, - projectId, - isGroup, - isProject, - maskableRegex, - protectedByDefault, - awsLogoSvgPath, - awsTipDeployLink, - awsTipCommandsLink, - awsTipLearnLink, - containsVariableReferenceLink, - protectedEnvironmentVariablesLink, - maskedEnvironmentVariablesLink, - environmentScopeLink, - } = containerEl.dataset; - - const parsedIsProject = parseBoolean(isProject); - const parsedIsGroup = parseBoolean(isGroup); - const isProtectedByDefault = parseBoolean(protectedByDefault); - - const store = createStore({ - endpoint, - projectId, - isGroup: parsedIsGroup, - isProject: parsedIsProject, - maskableRegex, - isProtectedByDefault, - awsLogoSvgPath, - awsTipDeployLink, - awsTipCommandsLink, - awsTipLearnLink, - containsVariableReferenceLink, - protectedEnvironmentVariablesLink, - maskedEnvironmentVariablesLink, - environmentScopeLink, - }); - - return new Vue({ - el: containerEl, - store, - render(createElement) { - return createElement(LegacyCiVariableSettings); - }, - }); -}; - -export default (containerId = 'js-ci-project-variables') => { +export default (containerId = 'js-ci-variables') => { const el = document.getElementById(containerId); - if (el) { - if (gon.features?.ciVariableSettingsGraphql) { - mountCiVariableListApp(el); - } else { - mountLegacyCiVariableListApp(el); - } - } + if (!el) return; + + mountCiVariableListApp(el); }; |