From 5838993b5f3e2d861d9dd7c82dfeea71506b9fc2 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 23 Dec 2020 21:10:24 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../custom_metrics/components/custom_metrics_form_fields.vue | 6 +++--- app/assets/javascripts/custom_metrics/constants.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/assets/javascripts/custom_metrics') 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)); }; -- cgit v1.2.3