[icinga-checkins] icinga.org: icinga-web/next: Duration Sorting Broken in Host/ service based views.

git at icinga.org git at icinga.org
Thu Apr 11 10:49:31 CEST 2013


Module: icinga-web
Branch: next
Commit: 70cc283eec37300efae500537764f6ca38ba0df4
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=70cc283eec37300efae500537764f6ca38ba0df4

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Apr 11 10:46:47 2013 +0200

Duration Sorting Broken in Host/service based views.

Fix sorting issues in postgres, patch applied from Thorsten
Fohrer. Thanks for that.

fixes #3572

---

 .../Cronks/data/xml/grid/icinga-host-template.xml  |    2 +-
 .../data/xml/grid/icinga-service-template.xml      |    2 +-
 .../xml/grid/icinga-unhandled-host-problems.xml    |    2 +-
 .../xml/grid/icinga-unhandled-service-problems.xml |    4 ++--
 doc/THANKS                                         |    4 +++-
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/app/modules/Cronks/data/xml/grid/icinga-host-template.xml b/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
index 5b5f27f..2a90309 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
@@ -1061,7 +1061,7 @@
         
         <field name="host_duration">
             <datasource>
-                <parameter name="field">COALESCE(hs.last_state_change,ps.program_start_time)</parameter>
+                <parameter name="field"><![CDATA[(CASE WHEN hs.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE hs.last_state_change END)]]></parameter>
             </datasource>
             
             <display>
diff --git a/app/modules/Cronks/data/xml/grid/icinga-service-template.xml b/app/modules/Cronks/data/xml/grid/icinga-service-template.xml
index ad0c1fe..d6e626c 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-service-template.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-service-template.xml
@@ -882,7 +882,7 @@
         
         <field name="service_duration">
                <datasource>
-                <parameter name="field">COALESCE(ss.last_state_change,ps.program_start_time)</parameter>
+                   <parameter name="field"><![CDATA[(CASE WHEN ss.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE ss.last_state_change END)]]></parameter>
             </datasource>
 
             <display>
diff --git a/app/modules/Cronks/data/xml/grid/icinga-unhandled-host-problems.xml b/app/modules/Cronks/data/xml/grid/icinga-unhandled-host-problems.xml
index 7d1db98..f4da99c 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-unhandled-host-problems.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-unhandled-host-problems.xml
@@ -898,7 +898,7 @@
 
         <field name="host_duration">
             <datasource>
-                <parameter name="field">COALESCE(hs.last_state_change,ps.program_start_time)</parameter>
+                <parameter name="field"><![CDATA[(CASE WHEN hs.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE hs.last_state_change END)]]></parameter>
             </datasource>
 
             <display>
diff --git a/app/modules/Cronks/data/xml/grid/icinga-unhandled-service-problems.xml b/app/modules/Cronks/data/xml/grid/icinga-unhandled-service-problems.xml
index 445b4d1..ad3b4cc 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-unhandled-service-problems.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-unhandled-service-problems.xml
@@ -780,8 +780,8 @@
         </field>
 
         <field name="service_duration">
-               <datasource>
-                <parameter name="field">COALESCE(ss.last_state_change,ps.program_start_time)</parameter>
+            <datasource>
+                   <parameter name="field"><![CDATA[(CASE WHEN ss.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE ss.last_state_change END)]]></parameter>
             </datasource>
 
             <display>
diff --git a/doc/THANKS b/doc/THANKS
index 312dbf6..cef39c6 100644
--- a/doc/THANKS
+++ b/doc/THANKS
@@ -28,11 +28,13 @@ name, please let us know.
     * darkarchon
     * Markus Frosch
     * Philipp Deneu
-    * abraxas 
+    * abraxas
+    * Thorsten Fohrer
 
 * Design stuff
     * Karolina Hein
     * Benjamin Berndt
+    * Amanda Mailer
 
 * Sponsoring
     * Bundesverwaltungsamt, Köln, DE: Sponsored the native reporting integration





More information about the icinga-checkins mailing list