mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
AlertSummary: Format trend change percent value
This commit is contained in:
parent
cc61dc2b01
commit
c67e7c3ef0
@ -205,8 +205,10 @@ class Monitoring_AlertsummaryController extends Controller
|
|||||||
} elseif ($yesterday === $today) {
|
} elseif ($yesterday === $today) {
|
||||||
$out->percent = 0;
|
$out->percent = 0;
|
||||||
} else {
|
} else {
|
||||||
$out->percent = 100 -
|
$out->percent = sprintf(
|
||||||
((100/($yesterday > $today ? $yesterday : $today)) * ($yesterday > $today ? $today : $yesterday));
|
'%.2f',
|
||||||
|
100 - ((100/($yesterday > $today ? $yesterday : $today)) * ($yesterday > $today ? $today : $yesterday))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user