From fbfbe0008ac9afa41da5f30dd3a312904208e367 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 | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/library/Cube/CubeRenderer/HostStatusCubeRenderer.php b/library/Cube/CubeRenderer/HostStatusCubeRenderer.php index 777f41b..65d40b9 100644 --- a/library/Cube/CubeRenderer/HostStatusCubeRenderer.php +++ b/library/Cube/CubeRenderer/HostStatusCubeRenderer.php @@ -131,13 +131,6 @@ protected function getDetailsBaseUrl() protected function getSeveritySortColumns(): Generator { - $columns = ['down', 'unreachable']; - foreach ($columns as $column) { - yield "hosts_unhandled_$column"; - } - - foreach ($columns as $column) { - yield "hosts_$column"; - } + yield from ['hosts_unhandled_down', 'hosts_down']; } }