mirror of
https://github.com/BluemediaGER/fancy-gatus.git
synced 2024-11-08 09:35:28 +01:00
Allow to hide entire groups
This commit is contained in:
parent
0d93346bd6
commit
00385dc0f8
11
src/App.vue
11
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;
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue