Package: icingadb-web
Version: 1.0.2-1
Severity: important
Tags: patch, upstream
Control: fixed -1 1.1.1-1

Hi,

Thank you for maintaining the Nagios/Icinga stack in Debian!

The sorting of issues got changed in Bookworm, and makes it really
confusing to spot new problems in the webUI. Upstream fixed this issue
in 1.1.0 (and 1.1.1), but that was unfortunately too late for Bookworm.

Raising the issue as important since it change the behavior
significantly, in the hope the pretty trivial patches could make it to
an upcoming point release.

Please find attached the proposed patches cherry-picked from upstream,
also available in the following merge request.

https://salsa.debian.org/nagios-team/icingadb-web/-/merge_requests/1

Thanks in advance for considering,

Regards,
-- 
David Prévot
Marseille (37 rue Guibal, Pôle Média, 13003) / Paris / Montréal
http://evolix.com | mastodon.evolix.org/@evolix | http://blog.evolix.com
From: raviks789 <[email protected]>
Date: Fri, 19 May 2023 14:10:27 +0200
Subject: Severity sort must also sort objects by `last_state_change` in
 descending

Origin: upstream, https://github.com/Icinga/icingadb-web/commit/acc11a395ddd9eb1c06591ab4ea108f75addf9f7
Bug: https://github.com/Icinga/icingadb-web/issues/676
---
 application/controllers/HostsController.php    |  8 ++++----
 application/controllers/ServicesController.php | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/application/controllers/HostsController.php b/application/controllers/HostsController.php
index eaf804a..3623ff7 100644
--- a/application/controllers/HostsController.php
+++ b/application/controllers/HostsController.php
@@ -54,10 +54,10 @@ class HostsController extends Controller
         $sortControl = $this->createSortControl(
             $hosts,
             [
-                'host.display_name'                 => t('Name'),
-                'host.state.severity desc'          => t('Severity'),
-                'host.state.soft_state'             => t('Current State'),
-                'host.state.last_state_change desc' => t('Last State Change')
+                'host.display_name'                                          => t('Name'),
+                'host.state.severity desc,host.state.last_state_change desc' => t('Severity'),
+                'host.state.soft_state'                                      => t('Current State'),
+                'host.state.last_state_change desc'                          => t('Last State Change')
             ]
         );
         $viewModeSwitcher = $this->createViewModeSwitcher($paginationControl, $limitControl);
diff --git a/application/controllers/ServicesController.php b/application/controllers/ServicesController.php
index 9ee9474..842638b 100644
--- a/application/controllers/ServicesController.php
+++ b/application/controllers/ServicesController.php
@@ -63,11 +63,11 @@ class ServicesController extends Controller
         $sortControl = $this->createSortControl(
             $services,
             [
-                'service.display_name'                 => t('Name'),
-                'service.state.severity desc'          => t('Severity'),
-                'service.state.soft_state'             => t('Current State'),
-                'service.state.last_state_change desc' => t('Last State Change'),
-                'host.display_name'                    => t('Host')
+                'service.display_name'                                             => t('Name'),
+                'service.state.severity desc,service.state.last_state_change desc' => t('Severity'),
+                'service.state.soft_state'                                         => t('Current State'),
+                'service.state.last_state_change desc'                             => t('Last State Change'),
+                'host.display_name'                                                => t('Host')
             ]
         );
         $viewModeSwitcher = $this->createViewModeSwitcher($paginationControl, $limitControl);
From: Johannes Meyer <[email protected]>
Date: Wed, 25 Oct 2023 09:07:29 +0200
Subject: host/services: Make sure severity sort orders the same as anywhere
 else

fixes #915

Origin: upstream, https://github.com/Icinga/icingadb-web/commit/c503f1438273d046428db537e46b787ff6f6d073
Bug: https://github.com/Icinga/icingadb-web/issues/915
---
 application/controllers/HostController.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/application/controllers/HostController.php b/application/controllers/HostController.php
index ae5944d..1604799 100644
--- a/application/controllers/HostController.php
+++ b/application/controllers/HostController.php
@@ -204,10 +204,10 @@ class HostController extends Controller
         $sortControl = $this->createSortControl(
             $services,
             [
-                'service.display_name'                    => t('Name'),
-                'service.state.severity desc'             => t('Severity'),
-                'service.state.soft_state'                => t('Current State'),
-                'service.state.last_state_change desc'    => t('Last State Change')
+                'service.display_name' => t('Name'),
+                'service.state.severity desc,service.state.last_state_change desc' => t('Severity'),
+                'service.state.soft_state' => t('Current State'),
+                'service.state.last_state_change desc' => t('Last State Change')
             ]
         );
 

Reply via email to