[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: classic-ui: fixed wrong output from status.cgi with option hostservicedetail #2019

git at icinga.org git at icinga.org
Tue Nov 15 18:58:54 CET 2011


Module: icinga-core
Branch: mfriedrich/core
Commit: 1fc4e4b2e83bd5cc2991b4239ecc163610d0763b
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=1fc4e4b2e83bd5cc2991b4239ecc163610d0763b

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Wed Oct 26 22:10:56 2011 +0200

classic-ui: fixed wrong output from status.cgi with option hostservicedetail #2019

refs: #2019

Thanks to stku

---

 cgi/status.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/cgi/status.c b/cgi/status.c
index af9dd8c..fccad4c 100644
--- a/cgi/status.c
+++ b/cgi/status.c
@@ -655,6 +655,7 @@ int main(void) {
 			show_host_detail();
 		else if (group_style_type == STYLE_HOST_SERVICE_DETAIL) {
 
+			group_style_type = STYLE_HOST_DETAIL;
 			show_host_detail();
 
 			/* only show service problems of Hosts which are
@@ -670,6 +671,7 @@ int main(void) {
 				printf("</td></tr></table>\n");
 			}
 
+			group_style_type = STYLE_SERVICE_DETAIL;
 			show_service_detail();
 		} else
 			show_service_detail();
@@ -5166,7 +5168,7 @@ void grab_statusdata(void) {
 	temp_hostgroup = find_hostgroup(hostgroup_name);
 	temp_servicegroup = find_servicegroup(servicegroup_name);
 
-	if (group_style_type == STYLE_HOST_DETAIL || group_style_type == STYLE_HOST_SERVICE_DETAIL) {
+	if (group_style_type == STYLE_HOST_DETAIL) {
 
 		for (temp_hoststatus = hoststatus_list; temp_hoststatus != NULL; temp_hoststatus = temp_hoststatus->next) {
 
@@ -5207,7 +5209,7 @@ void grab_statusdata(void) {
 
 		}
 	}
-	if (group_style_type != STYLE_HOST_DETAIL || group_style_type == STYLE_HOST_SERVICE_DETAIL) {
+	if (group_style_type != STYLE_HOST_DETAIL) {
 		if (service_filter != NULL)
 			regcomp(&preg, service_filter, 0);
 		if (host_filter != NULL)





More information about the icinga-checkins mailing list