Commit 9972f59f authored by Filipa Lacerda's avatar Filipa Lacerda

Use single source of truth for vue_resource_interceptor

parent 037b4fe9
......@@ -13,7 +13,7 @@
//= require ./components/board
//= require ./components/board_sidebar
//= require ./components/new_list_dropdown
//= require ./vue_resource_interceptor
//= require vue_shared/vue_resource_interceptor
$(() => {
const $boardApp = document.getElementById('board-app');
......
/* eslint-disable func-names, prefer-arrow-callback, no-unused-vars */
/* global Vue */
Vue.http.interceptors.push((request, next) => {
Vue.activeResources = Vue.activeResources ? Vue.activeResources + 1 : 1;
next(function (response) {
Vue.activeResources -= 1;
});
});
......@@ -2,7 +2,7 @@
/*= require vue_shared/components/commit */
/*= require vue_pagination/index */
/*= require vue-resource
/*= require boards/vue_resource_interceptor */
/*= require vue_shared/vue_resource_interceptor */
/*= require ./status.js.es6 */
/*= require ./store.js.es6 */
/*= require ./pipeline_url.js.es6 */
......
......@@ -19,10 +19,13 @@
props: {
/**
* Stores the Pipelines to render.
* Object used to store the Pipelines to render.
* It's passed as a prop to allow different stores to use this Component.
* Different API calls can result in different responses, using a custom
* store allows us to use the same pipeline component.
*
* Note: All provided stores need to have a `storePipelines` method.
* Find a better way to do this.
*/
store: {
type: Object,
......
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