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>2023-01-10 18:08:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-10 18:08:33 +0300
commit87f8fdb93cb1e63f8e9cedf7d3d00c8ade70b18c (patch)
treeef90171a1b9ea20324834c747e2644f7561a5a97 /app/assets/javascripts/monitoring
parentfbf183eebe154eea4734f80975dd403f08173398 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/monitoring')
-rw-r--r--app/assets/javascripts/monitoring/requests/index.js5
-rw-r--r--app/assets/javascripts/monitoring/stores/mutations.js4
2 files changed, 5 insertions, 4 deletions
diff --git a/app/assets/javascripts/monitoring/requests/index.js b/app/assets/javascripts/monitoring/requests/index.js
index 7d415ae4d04..29786a79c56 100644
--- a/app/assets/javascripts/monitoring/requests/index.js
+++ b/app/assets/javascripts/monitoring/requests/index.js
@@ -1,8 +1,9 @@
import axios from '~/lib/utils/axios_utils';
import { backOff } from '~/lib/utils/common_utils';
-import statusCodes, {
+import {
HTTP_STATUS_BAD_REQUEST,
HTTP_STATUS_NO_CONTENT,
+ HTTP_STATUS_SERVICE_UNAVAILABLE,
HTTP_STATUS_UNPROCESSABLE_ENTITY,
} from '~/lib/utils/http_status';
import { PROMETHEUS_TIMEOUT } from '../constants';
@@ -39,7 +40,7 @@ export const getPrometheusQueryData = (prometheusEndpoint, params, opts) =>
if (
response.status === HTTP_STATUS_BAD_REQUEST ||
response.status === HTTP_STATUS_UNPROCESSABLE_ENTITY ||
- response.status === statusCodes.SERVICE_UNAVAILABLE
+ response.status === HTTP_STATUS_SERVICE_UNAVAILABLE
) {
const { data } = response;
if (data?.status === 'error' && data?.error) {
diff --git a/app/assets/javascripts/monitoring/stores/mutations.js b/app/assets/javascripts/monitoring/stores/mutations.js
index d79ce6ef80a..5fab292b6df 100644
--- a/app/assets/javascripts/monitoring/stores/mutations.js
+++ b/app/assets/javascripts/monitoring/stores/mutations.js
@@ -1,7 +1,7 @@
import { pick } from 'lodash';
import Vue from 'vue';
import { BACKOFF_TIMEOUT } from '~/lib/utils/common_utils';
-import httpStatusCodes, { HTTP_STATUS_BAD_REQUEST } from '~/lib/utils/http_status';
+import { HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_SERVICE_UNAVAILABLE } from '~/lib/utils/http_status';
import { dashboardEmptyStates, endpointKeys, initialStateKeys, metricStates } from '../constants';
import * as types from './mutation_types';
import { mapToDashboardViewModel, mapPanelToViewModel, normalizeQueryResponseData } from './utils';
@@ -43,7 +43,7 @@ const emptyStateFromError = (error) => {
// Axios error responses
const { response } = error;
- if (response && response.status === httpStatusCodes.SERVICE_UNAVAILABLE) {
+ if (response && response.status === HTTP_STATUS_SERVICE_UNAVAILABLE) {
return metricStates.CONNECTION_FAILED;
} else if (response && response.status === HTTP_STATUS_BAD_REQUEST) {
// Note: "error.response.data.error" may contain Prometheus error information