Add a new dashboard page.

This commit is contained in:
Jorge Gonzalez 2019-08-26 18:15:41 +02:00 committed by Ludovic Fernandez
parent 89150e1164
commit fd24b1898e
133 changed files with 17303 additions and 11112 deletions

26
webui/src/boot/_init.js Normal file
View file

@ -0,0 +1,26 @@
import { APP } from '../_helpers/APP'
import errors from '../_helpers/Errors'
export default async ({ Vue }) => {
// Router
// ----------------------------------------------
APP.router.beforeEach(async (to, from, next) => {
// Set APP
APP.routeTo = to
APP.routeFrom = from
next()
})
// Api (axios)
// ----------------------------------------------
APP.api.interceptors.request.use((config) => {
console.log('interceptors -> config', config)
// config.headers['Accept'] = '*/*'
return config
})
APP.api.interceptors.response.use((response) => {
console.log('interceptors -> response', response)
return response
}, errors.handleResponse)
}