summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/custom_metrics
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/custom_metrics
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
downloadgitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/custom_metrics')
-rw-r--r--app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue6
-rw-r--r--app/assets/javascripts/custom_metrics/constants.js4
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));
};