From cb0b10c93d15b911b74c497ea5fa325e26932a65 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 25 Mar 2024 10:51:00 +0100 Subject: [PATCH] SeveritySort: Remove undefined column `hosts(_unhandled)_unreachable` Icingadb-web no longer has the unreachable state and the `Hoststatesummary` columns `hosts_unreachable_handled` and `hosts_unreachable_unhandled` are removed. (see: https://github.com/Icinga/icingadb-web/pull/803). The unreachable column is merged as the following: * hosts_down_handled = (down && (handled || ! reachable) * hosts_down_unhandled = (down && ! handled && reachable) --- library/Cube/CubeRenderer/HostStatusCubeRenderer.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/library/Cube/CubeRenderer/HostStatusCubeRenderer.php b/library/Cube/CubeRenderer/HostStatusCubeRenderer.php index 777f41b..cf1f461 100644 --- a/library/Cube/CubeRenderer/HostStatusCubeRenderer.php +++ b/library/Cube/CubeRenderer/HostStatusCubeRenderer.php @@ -131,13 +131,9 @@ protected function getDetailsBaseUrl() protected function getSeveritySortColumns(): Generator { - $columns = ['down', 'unreachable']; + $columns = ['hosts_unhandled_down', 'hosts_down']; foreach ($columns as $column) { - yield "hosts_unhandled_$column"; - } - - foreach ($columns as $column) { - yield "hosts_$column"; + yield $column; } } }