summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ci_variable_list/store/mutations.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 21:07:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 21:07:51 +0000
commitd74fcc9b69746c4d9582299c370a95aafe2ac3ac (patch)
tree8230bdf94ff004521422c9986062278dd3bc5b3f /app/assets/javascripts/ci_variable_list/store/mutations.js
parent8a7efa45c38ed3200d173d2c3207a8154e583c16 (diff)
downloadgitlab-ce-d74fcc9b69746c4d9582299c370a95aafe2ac3ac.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ci_variable_list/store/mutations.js')
-rw-r--r--app/assets/javascripts/ci_variable_list/store/mutations.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/assets/javascripts/ci_variable_list/store/mutations.js b/app/assets/javascripts/ci_variable_list/store/mutations.js
index c75eb4a91fd..7ee7d7bdc26 100644
--- a/app/assets/javascripts/ci_variable_list/store/mutations.js
+++ b/app/assets/javascripts/ci_variable_list/store/mutations.js
@@ -83,4 +83,25 @@ export default {
state.variableBeingEdited = null;
state.showInputValue = false;
},
+
+ [types.SET_ENVIRONMENT_SCOPE](state, environment) {
+ if (state.variableBeingEdited) {
+ state.variableBeingEdited.environment_scope = environment;
+ } else {
+ state.variable.environment_scope = environment;
+ }
+ },
+
+ [types.ADD_WILD_CARD_SCOPE](state, environment) {
+ state.environments.push(environment);
+ state.environments.sort();
+ },
+
+ [types.RESET_SELECTED_ENVIRONMENT](state) {
+ state.selectedEnvironment = '';
+ },
+
+ [types.SET_SELECTED_ENVIRONMENT](state, environment) {
+ state.selectedEnvironment = environment;
+ },
};