Commit e9f09636 authored by Mike Greiling's avatar Mike Greiling

Merge branch 'winh-remove-vue-resource-from-performance-bar-service' into 'master'

Remove vue-resource from PerformanceBarService

Closes #31360

See merge request gitlab-org/gitlab!16599
parents faf1e351 4ed1ecff
import Vue from 'vue';
import _ from 'underscore';
import axios from '../../lib/utils/axios_utils';
import { parseBoolean } from '~/lib/utils/common_utils';
let vueResourceInterceptor;
export default class PerformanceBarService {
static fetchRequestDetails(peekUrl, requestId) {
return axios.get(peekUrl, { params: { request_id: requestId } });
......@@ -24,16 +20,11 @@ export default class PerformanceBarService {
return response;
};
vueResourceInterceptor = (request, next) => next(interceptor);
Vue.http.interceptors.push(vueResourceInterceptor);
return axios.interceptors.response.use(interceptor);
}
static removeInterceptor(interceptor) {
axios.interceptors.response.eject(interceptor);
Vue.http.interceptors = _.without(Vue.http.interceptors, vueResourceInterceptor);
}
static callbackParams(response, peekUrl) {
......
---
title: Remove vue-resource from PerformanceBarService
merge_request: 32428
author: Lee Tickett
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment