summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2018-02-09 13:09:33 -0600
committerEric Eastwood <contact@ericeastwood.com>2018-02-14 14:48:26 -0600
commitc6b2ff8a21470cb59e3512b2f27f1c926e17ae6f (patch)
tree9da3d3186b88abf4b618b0cf94c3a3deab462998 /app
parentdbb934c8e2b5d138721f9d89afcf8ebbf814bed2 (diff)
downloadgitlab-ce-c6b2ff8a21470cb59e3512b2f27f1c926e17ae6f.tar.gz
Hide CI secret variable values on save42929-hide-new-variable-values
See https://gitlab.com/gitlab-org/gitlab-ce/issues/42928
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/ci_variable_list/ajax_variable_list.js1
-rw-r--r--app/assets/javascripts/ci_variable_list/ci_variable_list.js4
2 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/ci_variable_list/ajax_variable_list.js b/app/assets/javascripts/ci_variable_list/ajax_variable_list.js
index 76f93e5c6bd..b33adff609f 100644
--- a/app/assets/javascripts/ci_variable_list/ajax_variable_list.js
+++ b/app/assets/javascripts/ci_variable_list/ajax_variable_list.js
@@ -75,6 +75,7 @@ export default class AjaxVariableList {
if (res.status === statusCodes.OK && res.data) {
this.updateRowsWithPersistedVariables(res.data.variables);
+ this.variableList.hideValues();
} else if (res.status === statusCodes.BAD_REQUEST) {
// Validation failed
this.errorBox.innerHTML = generateErrorBoxContent(res.data);
diff --git a/app/assets/javascripts/ci_variable_list/ci_variable_list.js b/app/assets/javascripts/ci_variable_list/ci_variable_list.js
index d91789c2192..3f2ff4002c2 100644
--- a/app/assets/javascripts/ci_variable_list/ci_variable_list.js
+++ b/app/assets/javascripts/ci_variable_list/ci_variable_list.js
@@ -178,6 +178,10 @@ export default class VariableList {
this.$container.find('.js-row-remove-button').attr('disabled', !isEnabled);
}
+ hideValues() {
+ this.secretValues.updateDom(false);
+ }
+
getAllData() {
// Ignore the last empty row because we don't want to try persist
// a blank variable and run into validation problems.