[icinga-checkins] icinga.org: icinga-core/r1.2: change displayed name of hostgroups and servicegroups in extinfo.cgi

git at icinga.org git at icinga.org
Thu Jan 13 15:57:29 CET 2011


Module: icinga-core
Branch: r1.2
Commit: 3f836f7ae860229e7549c58135411d6956f07048
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=3f836f7ae860229e7549c58135411d6956f07048

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Tue Nov 23 21:35:47 2010 +0100

change displayed name of hostgroups and servicegroups in extinfo.cgi

before it was simply groupname, now it display's alias if available

---

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

diff --git a/Changelog b/Changelog
index f3cd208..9f0b067 100644
--- a/Changelog
+++ b/Changelog
@@ -13,6 +13,7 @@ ENHANCEMENTS
 * classic ui: add config expander urls to extinfo.cgi for active checks and eventhandlers (Jochen Bern) #965
 * classic ui: add collapse the display filter part on status.cgi #923
 * classic ui: add tabfriendly titles, enabled by default (Jochen Bern) #975
+* classic ui: change displayed name for hostgroups and servicegroups in extinfo.cgi
 
 * idoutils: add index to table icinga_statehistory for usage in reporting module #957
 
diff --git a/cgi/extinfo.c b/cgi/extinfo.c
index b9baf06..caf012f 100644
--- a/cgi/extinfo.c
+++ b/cgi/extinfo.c
@@ -365,7 +365,7 @@ int main(void){
 						if(found==TRUE)
 							printf(", ");
 
-						printf("<A HREF='%s?hostgroup=%s&style=overview'>%s</A>",STATUS_CGI,url_encode(temp_hostgroup->group_name),temp_hostgroup->group_name);
+						printf("<A HREF='%s?hostgroup=%s&style=overview'>%s</A>",STATUS_CGI,url_encode(temp_hostgroup->group_name),html_encode((temp_hostgroup->alias!=NULL)?temp_hostgroup->alias:temp_hostgroup->group_name,TRUE));
 						found=TRUE;
 						}
 					}
@@ -388,7 +388,7 @@ int main(void){
 						if(found==TRUE)
 							printf(", ");
 
-						printf("<A HREF='%s?servicegroup=%s&style=overview'>%s</A>",STATUS_CGI,url_encode(temp_servicegroup->group_name),temp_servicegroup->group_name);
+						printf("<A HREF='%s?servicegroup=%s&style=overview'>%s</A>",STATUS_CGI,url_encode(temp_servicegroup->group_name),html_encode((temp_servicegroup->alias!=NULL)?temp_servicegroup->alias:temp_servicegroup->group_name,TRUE));
 						found=TRUE;
 					        }
                                         }





More information about the icinga-checkins mailing list