Commit da8ad0e2 authored by jackie / Andrea Ida Malkah Klaura's avatar jackie / Andrea Ida Malkah Klaura
Browse files

remove Debug.vue component

parent c3966aa5
......@@ -41,7 +41,6 @@ export default {
{ slug: 'emissions', title: 'Emissions' },
{ slug: 'settings', title: 'Settings' },
{ slug: 'credits', title: 'Credits' },
{ slug: 'debug', title: 'Debug' }
],
}
},
......
<template>
<b-container>
<h1>Debugging page</h1>
<p>
This page is only used for debugging purposes and should be removed from
a productive version.
</p>
<p>
Here we go: <b-button
size="lg"
variant="warning"
@click="debug()"
>
Debug now!
</b-button>
</p>
Response headers: <br>
<div style="border: 1px dotted #aaa">
{{ response.headers }}
</div>
Response data: <br>
<div style="border: 1px dotted #aaa">
{{ response.data }}
</div>
</b-container>
</template>
<script>
import axios from 'axios'
function debugErrorRequest (data, headers) {
this.$log.debug('Request headers:')
this.$log.debug(headers)
this.$log.debug('Request data:')
this.$log.debug(data)
return data
}
function debugErrorResponse (data) {
this.$log.debug('Response data:')
this.$log.debug(data)
return data
}
export default {
data () {
return {
response: ''
}
},
methods: {
debug () {
axios.get(process.env.VUE_APP_API_STEERING + 'users/', {
withCredentials: true,
transformRequest: [debugErrorRequest],
transformResponse: [debugErrorResponse]
}).then(response => {
this.response = response
this.$log.debug(response)
}).catch(error => {
this.$log.error(error)
alert('Error: see console for details')
})
}
}
}
</script>
<style scoped>
p {
text-align: left;
}
</style>
......@@ -7,7 +7,6 @@ import Settings from '@/components/Settings'
import ShowManager from '@/components/ShowManager'
import FileManager from '@/components/FileManager'
import EmissionManager from '@/components/EmissionManager'
import Debug from '@/components/Debug'
Vue.use(Router)
......@@ -20,6 +19,5 @@ export default new Router({
{ path: '/help', name: 'help', component: Help },
{ path: '/settings', name: 'settings', component: Settings },
{ path: '/credits', name: 'credits', component: Credits },
{ path: '/debug', name: 'debug', component: Debug }
]
})
Supports Markdown
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