diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-24 00:10:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-24 00:10:24 +0300 |
commit | 5838993b5f3e2d861d9dd7c82dfeea71506b9fc2 (patch) | |
tree | caab6621fb79f06a355f802dc885982f746b544d /app/assets/javascripts/custom_metrics | |
parent | b8d021cb606ac86f41a0ef9dacd133a9677f8414 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/custom_metrics')
-rw-r--r-- | app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue | 6 | ||||
-rw-r--r-- | app/assets/javascripts/custom_metrics/constants.js | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue b/app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue index 6f8455e4bcf..f3fa28dc2f3 100644 --- a/app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue +++ b/app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue @@ -22,7 +22,7 @@ let cancelTokenSource; function backOffRequest(makeRequestCallback) { return backOff((next, stop) => { makeRequestCallback() - .then(resp => { + .then((resp) => { if (resp.status === statusCodes.OK) { stop(resp); } else { @@ -32,7 +32,7 @@ function backOffRequest(makeRequestCallback) { // If the request is cancelled by axios // then consider it as noop so that its not // caught by subsequent catches - .catch(thrown => (axios.isCancel(thrown) ? undefined : stop(thrown))); + .catch((thrown) => (axios.isCancel(thrown) ? undefined : stop(thrown))); }, VALIDATION_REQUEST_TIMEOUT); } @@ -144,7 +144,7 @@ export default { // as well. cancelTokenSource = axiosCancelToken.source(); this.requestValidation(this.query, cancelTokenSource.token) - .then(res => { + .then((res) => { const response = res.data; const { valid, error } = response.query; if (response.success) { diff --git a/app/assets/javascripts/custom_metrics/constants.js b/app/assets/javascripts/custom_metrics/constants.js index 2526445fdf9..cd2ac6d8390 100644 --- a/app/assets/javascripts/custom_metrics/constants.js +++ b/app/assets/javascripts/custom_metrics/constants.js @@ -4,9 +4,9 @@ export const queryTypes = { system: 'system', }; -export const formDataValidator = val => { +export const formDataValidator = (val) => { const fieldNames = Object.keys(val); const requiredFields = ['title', 'query', 'yLabel', 'unit', 'group', 'legend']; - return requiredFields.every(name => fieldNames.includes(name)); + return requiredFields.every((name) => fieldNames.includes(name)); }; |