[icinga-checkins] icinga.org: icinga-web/master: Postgresql fix - patch applied - thanks lazyfrosch (fixes #2978)

git at icinga.org git at icinga.org
Mon Aug 13 16:54:02 CEST 2012


Module: icinga-web
Branch: master
Commit: 7940ba4e4ba89540b9ca77df1a4d2a861578b711
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=7940ba4e4ba89540b9ca77df1a4d2a861578b711

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Aug 13 16:51:20 2012 +0200

Postgresql fix - patch applied - thanks lazyfrosch (fixes #2978)

---

 app/modules/Api/config/views/host.xml    |    4 ++--
 app/modules/Api/config/views/service.xml |    4 ++--
 doc/THANKS                               |    1 +
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/app/modules/Api/config/views/host.xml b/app/modules/Api/config/views/host.xml
index 209a28b..92575a1 100644
--- a/app/modules/Api/config/views/host.xml
+++ b/app/modules/Api/config/views/host.xml
@@ -14,7 +14,7 @@
                 h.alias AS HOST_ALIAS,
                 h.display_name AS HOST_DISPLAY_NAME,
                 hs.current_state AS HOST_CURRENT_STATE,
-                (CASE WHEN hs.last_state_change='0000-00-00 00:00:00' THEN ps.program_start_time ELSE hs.last_state_change END) as DURATION_START,
+                (CASE WHEN hs.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE hs.last_state_change END) as DURATION_START,
                 hs.last_check AS HOST_LAST_CHECK,
                 hs.next_check AS HOST_NEXT_CHECK,
                 ps.program_start_time AS HOST_PROGRAM_START_TIME,
@@ -123,7 +123,7 @@
                 h.display_name AS HOST_DISPLAY_NAME,
                 hs.current_state AS HOST_CURRENT_STATE,
                 hs.process_performance_data AS HOST_PROCESS_PERFORMANCE_DATA,
-                (CASE WHEN hs.last_state_change='0000-00-00 00:00:00' THEN ps.program_start_time ELSE hs.last_state_change END) as DURATION_START,
+                (CASE WHEN hs.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE hs.last_state_change END) as DURATION_START,
                 hs.last_check AS HOST_LAST_CHECK,
                 hs.next_check AS HOST_NEXT_CHECK,
                 ps.program_start_time AS HOST_PROGRAM_START_TIME,
diff --git a/app/modules/Api/config/views/service.xml b/app/modules/Api/config/views/service.xml
index 8815063..0af0fbc 100644
--- a/app/modules/Api/config/views/service.xml
+++ b/app/modules/Api/config/views/service.xml
@@ -18,7 +18,7 @@
                 s.display_name AS SERVICE_DISPLAY_NAME,
                 ss.process_performance_data AS SERVICE_PROCESS_PERFORMANCE_DATA,
                 ss.current_state AS SERVICE_CURRENT_STATE,
-                (CASE WHEN ss.last_state_change='0000-00-00 00:00:00' THEN ps.program_start_time ELSE ss.last_state_change END) as DURATION_START,
+                (CASE WHEN ss.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE ss.last_state_change END) as DURATION_START,
                 ps.program_start_time AS SERVICE_PROGRAM_START_TIME,
                 ss.last_check AS SERVICE_LAST_CHECK,
                 ss.next_check AS SERVICE_NEXT_CHECK,
@@ -149,7 +149,7 @@
                 os.name2 AS SERVICE_NAME,
                 s.display_name AS SERVICE_DISPLAY_NAME,
                 ss.current_state AS SERVICE_CURRENT_STATE,
-                (CASE WHEN ss.last_state_change='0000-00-00 00:00:00' THEN ps.program_start_time ELSE ss.last_state_change END) as DURATION_START,
+                (CASE WHEN ss.last_state_change<='1970-01-01 00:00:00' THEN ps.program_start_time ELSE ss.last_state_change END) as DURATION_START,
                 ss.process_performance_data AS SERVICE_PROCESS_PERFORMANCE_DATA,
                 ss.last_check AS SERVICE_LAST_CHECK,
                 ss.next_check AS SERVICE_NEXT_CHECK,
diff --git a/doc/THANKS b/doc/THANKS
index e67f775..1979b52 100644
--- a/doc/THANKS
+++ b/doc/THANKS
@@ -26,6 +26,7 @@ name, please let us know.
     * Michael Friedrich
     * mopp
     * darkarchon
+    * Markus Frosch
     
 
 * Design stuff





More information about the icinga-checkins mailing list