[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: Added Collapse the display filter part on status.cgi #923

git at icinga.org git at icinga.org
Fri Nov 12 10:22:50 CET 2010


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

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Sun Oct 24 19:35:17 2010 +0000

Added Collapse the display filter part on status.cgi #923

Fixes #923

---

 cgi/status.c                  |    7 ++++---
 html/images/icon_collapse.gif |  Bin 0 -> 872 bytes
 html/images/icon_expand.gif   |  Bin 0 -> 877 bytes
 include/cgiutils.h            |    2 ++
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/cgi/status.c b/cgi/status.c
index c6eeb49..59bca92 100644
--- a/cgi/status.c
+++ b/cgi/status.c
@@ -5155,9 +5155,10 @@ void show_filters(void){
 	if(host_properties!=0L || service_properties!=0L || host_status_types!=all_host_status_types || service_status_types!=all_service_status_types){
 
 		printf("<table border=1 class='filter' cellspacing=0 cellpadding=0>\n");
-		printf("<tr><td class='filter'>\n");
-		printf("<table border=0 cellspacing=2 cellpadding=0>\n");
-		printf("<tr><td colspan=2 valign=top align=left CLASS='filterTitle'>Display Filters:</td></tr>");
+		printf("<tr><td valign=top align=left CLASS='filterTitle'>Display Filters: ");
+		printf("<img id='expand_image' src='/icinga/images/icon_expand.gif' border=0 onClick=\"if (document.getElementById('filters').style.display == 'none') { document.getElementById('filters').style.display = ''; document.getElementById('expand_image').src = '%s%s'; } else { document.getElementById('filters').style.display = 'none'; document.getElementById('expand_image').src = '%s%s'; }\">",url_images_path,COLLAPSE_ICON,url_images_path,EXPAND_ICON);
+		printf("</td></tr>");
+		printf("<tr><td><table id='filters' border=0 cellspacing=2 cellpadding=0 style='display:none;'>\n");
 		printf("<tr><td valign=top align=left CLASS='filterName'>Host Status Types:</td>");
 		printf("<td valign=top align=left CLASS='filterValue'>");
 		if(host_status_types==all_host_status_types)
diff --git a/html/images/icon_collapse.gif b/html/images/icon_collapse.gif
new file mode 100644
index 0000000..36bd3bb
Binary files /dev/null and b/html/images/icon_collapse.gif differ
diff --git a/html/images/icon_expand.gif b/html/images/icon_expand.gif
new file mode 100644
index 0000000..cc59e58
Binary files /dev/null and b/html/images/icon_expand.gif differ
diff --git a/include/cgiutils.h b/include/cgiutils.h
index 65ed9f9..6e44b52 100644
--- a/include/cgiutils.h
+++ b/include/cgiutils.h
@@ -158,6 +158,8 @@ extern "C" {
 #define HISTORY_ICON			"history.gif"
 #define CONTACTGROUP_ICON		"contactgroup.gif"
 #define TRENDS_ICON			"trends.gif"
+#define COLLAPSE_ICON			"icon_collapse.gif"
+#define EXPAND_ICON			"icon_expand.gif"
 
 #define DISABLED_ICON			"disabled.gif"
 #define ENABLED_ICON			"enabled.gif"





More information about the icinga-checkins mailing list