fix: show response time in chart for upside down mode

When upside down mode is enabled, successful checks are marked as DOWN
but the response time chart was only showing ping for UP status.

This fix checks if the monitor has upside down mode enabled and shows
ping for both UP and DOWN status in that case, while maintaining the
original behavior for normal monitors.

Fixes #6038
This commit is contained in:
Satoshi Dev 2026-01-13 10:54:20 +01:00
parent 7b284c04ed
commit 67b9ff9a2d

View File

@ -353,6 +353,7 @@ export default {
// Render chart using heartbeatList
let lastHeartbeatTime;
const monitorInterval = this.$root.monitorList[this.monitorId]?.interval;
const isUpsideDown = this.$root.monitorList[this.monitorId]?.upsideDown || false;
let pingData = []; // Ping Data for Line Chart, y-axis contains ping time
let downData = []; // Down Data for Bar Chart, y-axis is 1 if target is down (red color), under maintenance (blue color) or pending (orange color), 0 if target is up
let colorData = []; // Color Data for Bar Chart
@ -390,7 +391,7 @@ export default {
pingData.push({
x,
y: beat.status === UP ? beat.ping : null,
y: (beat.status === UP || (beat.status === DOWN && isUpsideDown)) ? beat.ping : null,
});
downData.push({
x,