From 00385dc0f84d1143f3926d872e7147c710a92047 Mon Sep 17 00:00:00 2001 From: BluemediaGER Date: Sat, 15 Jan 2022 13:08:31 +0100 Subject: [PATCH] Allow to hide entire groups --- src/App.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/App.vue b/src/App.vue index 628c2c9..1c1fd99 100644 --- a/src/App.vue +++ b/src/App.vue @@ -75,13 +75,18 @@ export default { } axios.get('/api/v1/endpoints/statuses') .then(response => { + this.apiData = response.data; + // Remove hidden groups if defined in config + if (this.config.hiddenGroups) { + this.apiData = this.apiData.filter(endpoint => { + return !this.config.hiddenGroups.includes(endpoint.group); + }); + } // Remove hidden endpoints if defined in config if (this.config.hiddenEndpoints) { - this.apiData = response.data.filter(endpoint => { + this.apiData = this.apiData.filter(endpoint => { return !this.config.hiddenEndpoints.includes(endpoint.name); }); - } else { - this.apiData = response.data; } this.loading = false; })