[icinga-checkins] icinga.org: icinga-core/mfriedrich/ido: claasic-ui: Added a refresh button to tac.cgi in header mode #3164

git at icinga.org git at icinga.org
Wed Oct 3 01:14:54 CEST 2012


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

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Wed Sep 26 22:12:33 2012 +0200

claasic-ui: Added a refresh button to tac.cgi in header mode #3164

refs: #3164

should do it for now. We can still place it somewhere else if needed

---

 Changelog |    1 +
 cgi/tac.c |    9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/Changelog b/Changelog
index c8a4285..025cac6 100644
--- a/Changelog
+++ b/Changelog
@@ -50,6 +50,7 @@ ENHANCEMENTS
 * classic ui: Cleaned up "linkBox" in all cgi's #3154 - RB
 * classic ui: add command to delete host downtime and all associated service downtimes (extinfo.cgi, status.cgi command drop down) - RD/MF
 * classic ui: Added config option to convert login username to lower case #3171 - AH
+* classic ui: Added a refresh button to tac.cgi in header mode #3164 - RB
 
 * idoutils: do not pass host and port if not set in the config, letting mysql|pgsql drivers autoselect the socket #2698 - MF
 * idoutils: fix mismatched types for uint casts in bulkops (oracle) #2646 - TD
diff --git a/cgi/tac.c b/cgi/tac.c
index fc10f33..621f8d3 100644
--- a/cgi/tac.c
+++ b/cgi/tac.c
@@ -70,6 +70,7 @@ extern int show_tac_header;
 extern int show_tac_header_pending;
 extern int embedded;
 extern int refresh;
+extern int refresh_type;
 extern int display_header;
 extern int daemon_check;
 extern int tac_header;
@@ -1216,7 +1217,7 @@ void display_tac_overview(void) {
 
 		printf("<tr>\n");
 		printf("<td nowrap='nowrap'><img src='%s%s' alt='Hosts' width='16' height='16' align='right' /></td>\n", url_images_path, TAC_HEADER_HOST_ICON);
-		printf("<td><table width='92%%' border='0'>\n");
+		printf("<td><table width='95%%' border='0'>\n");
 
 		/* 1. Row Hosts */
 		printf("<tr>\n");
@@ -1307,6 +1308,12 @@ void display_tac_overview(void) {
 		printf("</div>\n");
 		printf("</td>\n");
 
+		if (refresh_type == JAVASCRIPT_REFRESH) {
+			printf("<td nowrap align=center>\n");
+			printf("       <a href='#' onClick='icinga_do_refresh(); return false;'><img src='%s%s' border=0 style='margin-bottom:-2px;'></a>\n", url_images_path, RELOAD_ICON);
+			printf("</td>\n");
+		}
+
 		printf("</tr>\n");
 		printf("</table></td>\n");
 		printf("</tr>\n");





More information about the icinga-checkins mailing list