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

git at icinga.org git at icinga.org
Tue Nov 23 21:42:18 CET 2010


Module: icinga-core
Branch: rbartels/1.3
Commit: 92e2a320de031b34b8bcc0c35deb990c04e02017
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=92e2a320de031b34b8bcc0c35deb990c04e02017

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 8e56334..9e6c36b 100644
--- a/Changelog
+++ b/Changelog
@@ -11,6 +11,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