Skip to content
Snippets Groups Projects
Commit 08864f42 authored by Markus Opolka's avatar Markus Opolka
Browse files

Add snackbar for caching reload feedback

parent c2ba5483
No related branches found
No related tags found
1 merge request!6Feature Refactor
...@@ -41,6 +41,11 @@ ...@@ -41,6 +41,11 @@
<v-progress-linear indeterminate color="primary"></v-progress-linear> <v-progress-linear indeterminate color="primary"></v-progress-linear>
</v-flex> </v-flex>
<!-- Caching Info -->
<v-snackbar :timeout="timeout" :top="true" :left="true" v-model="snackbar">
Reloaded Document Cache
</v-snackbar>
</v-layout> </v-layout>
</v-container> </v-container>
...@@ -53,7 +58,9 @@ export default { ...@@ -53,7 +58,9 @@ export default {
return { return {
header: 'Letters', header: 'Letters',
letters: null, letters: null,
reloading: false reloading: false,
timeout: 1000,
snackbar: false
} }
}, },
methods: { methods: {
...@@ -61,19 +68,20 @@ export default { ...@@ -61,19 +68,20 @@ export default {
// Trigger Backend to reload cache // Trigger Backend to reload cache
this.reloading = true this.reloading = true
this.$http.get('http://localhost:3000/api/metadata/reload').then(function (data) { this.$http.get('http://localhost:3000/api/metadata/reload').then(function (data) {
this.load() this.load(true)
}) })
}, },
load () { load (snack) {
// Initial load of metadata // Initial load of metadata
this.$http.get('http://localhost:3000/api/metadata/table').then(function (data) { this.$http.get('http://localhost:3000/api/metadata/table').then(function (data) {
this.letters = data.body this.letters = data.body
this.reloading = false this.reloading = false
this.snackbar = snack
}) })
} }
}, },
created () { created () {
this.load() this.load(false)
} }
} }
</script> </script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment