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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-24 00:10:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-24 00:10:24 +0300
commit5838993b5f3e2d861d9dd7c82dfeea71506b9fc2 (patch)
treecaab6621fb79f06a355f802dc885982f746b544d /app/assets/javascripts/ci_variable_list
parentb8d021cb606ac86f41a0ef9dacd133a9677f8414 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ci_variable_list')
-rw-r--r--app/assets/javascripts/ci_variable_list/ci_variable_list.js16
-rw-r--r--app/assets/javascripts/ci_variable_list/components/ci_environments_dropdown.vue2
-rw-r--r--app/assets/javascripts/ci_variable_list/components/ci_variable_table.vue2
-rw-r--r--app/assets/javascripts/ci_variable_list/store/actions.js8
-rw-r--r--app/assets/javascripts/ci_variable_list/store/getters.js4
-rw-r--r--app/assets/javascripts/ci_variable_list/store/utils.js8
6 files changed, 20 insertions, 20 deletions
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 53ef0f7098a..aa4d311527e 100644
--- a/app/assets/javascripts/ci_variable_list/ci_variable_list.js
+++ b/app/assets/javascripts/ci_variable_list/ci_variable_list.js
@@ -81,17 +81,17 @@ export default class VariableList {
this.initRow(rowEl);
});
- this.$container.on('click', '.js-row-remove-button', e => {
+ this.$container.on('click', '.js-row-remove-button', (e) => {
e.preventDefault();
this.removeRow($(e.currentTarget).closest('.js-row'));
});
const inputSelector = Object.keys(this.inputMap)
- .map(name => this.inputMap[name].selector)
+ .map((name) => this.inputMap[name].selector)
.join(',');
// Remove any empty rows except the last row
- this.$container.on('blur', inputSelector, e => {
+ this.$container.on('blur', inputSelector, (e) => {
const $row = $(e.currentTarget).closest('.js-row');
if ($row.is(':not(:last-child)') && !this.checkIfRowTouched($row)) {
@@ -99,7 +99,7 @@ export default class VariableList {
}
});
- this.$container.on('input trigger-change', inputSelector, e => {
+ this.$container.on('input trigger-change', inputSelector, (e) => {
// Always make sure there is an empty last row
const $lastRow = this.$container.find('.js-row').last();
@@ -149,7 +149,7 @@ export default class VariableList {
$rowClone.removeAttr('data-is-persisted');
// Reset the inputs to their defaults
- Object.keys(this.inputMap).forEach(name => {
+ Object.keys(this.inputMap).forEach((name) => {
const entry = this.inputMap[name];
$rowClone.find(entry.selector).val(entry.default);
});
@@ -184,7 +184,7 @@ export default class VariableList {
}
checkIfRowTouched($row) {
- return Object.keys(this.inputMap).some(name => {
+ return Object.keys(this.inputMap).some((name) => {
// Row should not qualify as touched if only switches have been touched
if (['protected', 'masked'].includes(name)) return false;
@@ -225,9 +225,9 @@ export default class VariableList {
// a blank variable and run into validation problems.
const validRows = this.$container.find('.js-row').toArray().slice(0, -1);
- return validRows.map(rowEl => {
+ return validRows.map((rowEl) => {
const resultant = {};
- Object.keys(this.inputMap).forEach(name => {
+ Object.keys(this.inputMap).forEach((name) => {
const entry = this.inputMap[name];
const $input = $(rowEl).find(entry.selector);
if ($input.length) {
diff --git a/app/assets/javascripts/ci_variable_list/components/ci_environments_dropdown.vue b/app/assets/javascripts/ci_variable_list/components/ci_environments_dropdown.vue
index 83e9717041f..104d6672015 100644
--- a/app/assets/javascripts/ci_variable_list/components/ci_environments_dropdown.vue
+++ b/app/assets/javascripts/ci_variable_list/components/ci_environments_dropdown.vue
@@ -33,7 +33,7 @@ export default {
},
filteredResults() {
const lowerCasedSearchTerm = this.searchTerm.toLowerCase();
- return this.joinedEnvironments.filter(resultString =>
+ return this.joinedEnvironments.filter((resultString) =>
resultString.toLowerCase().includes(lowerCasedSearchTerm),
);
},
diff --git a/app/assets/javascripts/ci_variable_list/components/ci_variable_table.vue b/app/assets/javascripts/ci_variable_list/components/ci_variable_table.vue
index 07278bb442c..47b2745af08 100644
--- a/app/assets/javascripts/ci_variable_list/components/ci_variable_table.vue
+++ b/app/assets/javascripts/ci_variable_list/components/ci_variable_table.vue
@@ -69,7 +69,7 @@ export default {
},
fields() {
if (this.isGroup) {
- return this.$options.fields.filter(field => field.key !== 'environment_scope');
+ return this.$options.fields.filter((field) => field.key !== 'environment_scope');
}
return this.$options.fields;
},
diff --git a/app/assets/javascripts/ci_variable_list/store/actions.js b/app/assets/javascripts/ci_variable_list/store/actions.js
index e3e9dac0a79..ac595fa0045 100644
--- a/app/assets/javascripts/ci_variable_list/store/actions.js
+++ b/app/assets/javascripts/ci_variable_list/store/actions.js
@@ -47,7 +47,7 @@ export const addVariable = ({ state, dispatch }) => {
dispatch('receiveAddVariableSuccess');
dispatch('fetchVariables');
})
- .catch(error => {
+ .catch((error) => {
createFlash(error.response.data[0]);
dispatch('receiveAddVariableError', error);
});
@@ -77,7 +77,7 @@ export const updateVariable = ({ state, dispatch }) => {
dispatch('receiveUpdateVariableSuccess');
dispatch('fetchVariables');
})
- .catch(error => {
+ .catch((error) => {
createFlash(error.response.data[0]);
dispatch('receiveUpdateVariableError', error);
});
@@ -132,7 +132,7 @@ export const deleteVariable = ({ dispatch, state }) => {
dispatch('receiveDeleteVariableSuccess');
dispatch('fetchVariables');
})
- .catch(error => {
+ .catch((error) => {
createFlash(error.response.data[0]);
dispatch('receiveDeleteVariableError', error);
});
@@ -150,7 +150,7 @@ export const fetchEnvironments = ({ dispatch, state }) => {
dispatch('requestEnvironments');
return Api.environments(state.projectId)
- .then(res => {
+ .then((res) => {
dispatch('receiveEnvironmentsSuccess', prepareEnvironments(res.data));
})
.catch(() => {
diff --git a/app/assets/javascripts/ci_variable_list/store/getters.js b/app/assets/javascripts/ci_variable_list/store/getters.js
index 619ad54cad6..6570f455541 100644
--- a/app/assets/javascripts/ci_variable_list/store/getters.js
+++ b/app/assets/javascripts/ci_variable_list/store/getters.js
@@ -1,6 +1,6 @@
import { uniq } from 'lodash';
-export const joinedEnvironments = state => {
- const scopesFromVariables = (state.variables || []).map(variable => variable.environment_scope);
+export const joinedEnvironments = (state) => {
+ const scopesFromVariables = (state.variables || []).map((variable) => variable.environment_scope);
return uniq(state.environments.concat(scopesFromVariables)).sort();
};
diff --git a/app/assets/javascripts/ci_variable_list/store/utils.js b/app/assets/javascripts/ci_variable_list/store/utils.js
index f04530359e7..d9ca460a8e1 100644
--- a/app/assets/javascripts/ci_variable_list/store/utils.js
+++ b/app/assets/javascripts/ci_variable_list/store/utils.js
@@ -1,12 +1,12 @@
import { cloneDeep } from 'lodash';
import { displayText, types } from '../constants';
-const variableTypeHandler = type =>
+const variableTypeHandler = (type) =>
type === displayText.variableText ? types.variableType : types.fileType;
-export const prepareDataForDisplay = variables => {
+export const prepareDataForDisplay = (variables) => {
const variablesToDisplay = [];
- variables.forEach(variable => {
+ variables.forEach((variable) => {
const variableCopy = variable;
if (variableCopy.variable_type === types.variableType) {
variableCopy.variable_type = displayText.variableText;
@@ -42,4 +42,4 @@ export const prepareDataForApi = (variable, destroy = false) => {
return variableCopy;
};
-export const prepareEnvironments = environments => environments.map(e => e.name);
+export const prepareEnvironments = (environments) => environments.map((e) => e.name);