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) {