[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: add author to comment tooltips in status.cgi #1691

git at icinga.org git at icinga.org
Tue Jul 12 08:51:53 CEST 2011


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

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Tue Jul  5 21:56:28 2011 +0200

add author to comment tooltips in status.cgi #1691

refs: #1691

---

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

diff --git a/Changelog b/Changelog
index 86cc11a..5903b67 100644
--- a/Changelog
+++ b/Changelog
@@ -15,6 +15,7 @@ ENHANCEMENTS
 * classic ui: Changed tac.cgi to distinct between active, passive and disabled properly #1120
 * classic ui: Add log entries to json output of avail.cgi #1659
 * classic ui: add host urgency sort order in status.cgi (Jochen Bern) #1452
+* classic ui: add author to comment tooltips in status.cgi #1691
 
 * install: add --with-p1-file-dir allowing custom location (default is now $libdir instead of $bindir) #1569
 	** only when embedded perl is enabled
diff --git a/cgi/status.c b/cgi/status.c
index ba4211c..ebaf0cf 100644
--- a/cgi/status.c
+++ b/cgi/status.c
@@ -5954,7 +5954,7 @@ void print_comment_icon(char *host_name, char *svc_description) {
 	/* but who wouldn't like to have these fancy tooltips ;-) */
 	if(TRUE){
 		printf(" onMouseOver=\"return tooltip('<table border=0 width=100%% height=100%% cellpadding=3>");
-		printf("<tr style=font-weight:bold;><td width=10%% nowrap>Type         </td><td width=12%%>Time</td><td>Comment</td></tr>");
+		printf("<tr style=font-weight:bold;><td width=10%% nowrap>Type         </td><td width=12%%>Time</td><td>Author / Comment</td></tr>");
 		for(temp_comment=get_first_comment_by_host(host_name);temp_comment!=NULL;temp_comment=get_next_comment_by_host(host_name,temp_comment)){
 			if((svc_description==NULL && temp_comment->comment_type==HOST_COMMENT) || \
 			   (svc_description!=NULL && temp_comment->comment_type==SERVICE_COMMENT && !strcmp(temp_comment->service_description,svc_description))) {
@@ -6022,7 +6022,7 @@ void print_comment_icon(char *host_name, char *svc_description) {
 				saved_escape_html_tags_var=escape_html_tags;
 				escape_html_tags=TRUE;
 
-				printf("<tr><td nowrap>%s</td><td nowrap>%s</td><td>%s</td></tr>",comment_entry_type,entry_time,html_encode(escaped_output_string,TRUE));
+				printf("<tr><td nowrap>%s</td><td nowrap>%s</td><td><span style=font-weight:bold;>%s</span><br>%s</td></tr>",comment_entry_type,entry_time,html_encode(temp_comment->author,TRUE),html_encode(escaped_output_string,TRUE));
 
 				escape_html_tags=saved_escape_html_tags_var;
 





More information about the icinga-checkins mailing list