chore: lint apply

This commit is contained in:
Bastien Wirtz
2025-11-15 15:47:36 +01:00
parent 8d82c77630
commit d1356c3e6a

View File

@@ -37,7 +37,7 @@ export default {
avgRespTime: NaN,
percentageGood: NaN,
status: false,
statusMessage: false
statusMessage: false,
}),
created() {
const updateInterval = parseInt(this.item.updateInterval, 10) || 0;
@@ -48,13 +48,16 @@ export default {
},
methods: {
fetchStatus: async function () {
this.fetch("/api/v1/endpoints/statuses", { method: "GET", cache: "no-cache" })
this.fetch("/api/v1/endpoints/statuses", {
method: "GET",
cache: "no-cache",
})
.then((response) => {
// Apply filtering by groups, if defined
if (this.item.groups) {
response = response?.filter((job) => {
return this.item.groups.includes(job.group) === true;
})
});
}
// Initialise counts, avg times
@@ -67,7 +70,7 @@ export default {
response.forEach((job) => {
if (job.results[job.results.length - 1].success === true) {
this.up++;
};
}
if (!this.item.hideaverages) {
// Update array of average times
@@ -76,7 +79,7 @@ export default {
job.results.forEach((res) => {
totalduration += parseInt(res.duration, 10) / 1000000;
rescounter++;
})
});
totalrestime += totalduration;
totalresults += rescounter;
@@ -84,8 +87,7 @@ export default {
totalrestime = 0;
totalresults = 1;
}
})
});
// Rest are down
this.down = this.total - this.up;
@@ -114,10 +116,8 @@ export default {
.catch((e) => {
console.error(e);
});
},
},
};
</script>