Commit 08864f42 authored by Markus Opolka's avatar Markus Opolka
Browse files

Add snackbar for caching reload feedback

parent c2ba5483
......@@ -41,6 +41,11 @@
<v-progress-linear indeterminate color="primary"></v-progress-linear>
</v-flex>
<!-- Caching Info -->
<v-snackbar :timeout="timeout" :top="true" :left="true" v-model="snackbar">
Reloaded Document Cache
</v-snackbar>
</v-layout>
</v-container>
......@@ -53,7 +58,9 @@ export default {
return {
header: 'Letters',
letters: null,
reloading: false
reloading: false,
timeout: 1000,
snackbar: false
}
},
methods: {
......@@ -61,19 +68,20 @@ export default {
// Trigger Backend to reload cache
this.reloading = true
this.$http.get('http://localhost:3000/api/metadata/reload').then(function (data) {
this.load()
this.load(true)
})
},
load () {
load (snack) {
// Initial load of metadata
this.$http.get('http://localhost:3000/api/metadata/table').then(function (data) {
this.letters = data.body
this.reloading = false
this.snackbar = snack
})
}
},
created () {
this.load()
this.load(false)
}
}
</script>
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