diff --git a/ui/src/App.vue b/ui/src/App.vue index 96eade5..a22a9de 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -169,6 +169,24 @@ export default class App extends Vue { }); // Update Calendar Aggregates + this.api_query_simple_list("aggregate/list", (data) => { + let promises = data.map((name: string) => + this.$axios.get(this.$ovdashboard.api_url("aggregate/get/" + name)) + ); + + Promise.all(promises) + .then((responses) => { + this.calendar_data = []; + + for (let i = 0; i < data.length; i++) { + this.calendar_data.push({ + title: data[i], + events: responses[i].data, + }); + } + }) + .catch(this.fail("Calendar Aggregates")); + }); // Update Calendar Config this.api_query_simple_object("calendar/config", (data) => {