1
0
Fork 0
mirror of https://github.com/bastienwirtz/homer.git synced 2026-01-22 18:06:11 +00:00

Add optional filtering on groups

This commit is contained in:
M 2025-05-26 15:09:49 +02:00 committed by Bastien Wirtz
parent 8a598dbdc0
commit d19724b896

View file

@ -42,6 +42,11 @@ export default {
this.api = await this.fetch("/api/v1/endpoints/statuses", { method: "GET", cache: "no-cache" }).catch((e) => {
console.error(e);
});
if (this.item.groups) {
this.api = this.api?.filter((job) => {
return this.item.groups.includes(job.group) === true;
})
}
},
countUp: function() {
if (!this.api) {