[icinga-checkins] icinga.org: icinga-core/rbartels/cgi-current: changed print_generic_error() function to support csv output #1270

git at icinga.org git at icinga.org
Mon Mar 7 22:56:53 CET 2011


Module: icinga-core
Branch: rbartels/cgi-current
Commit: fd5e25bb828e33ad68a9d1afda70a9ae4fb3c511
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=fd5e25bb828e33ad68a9d1afda70a9ae4fb3c511

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Mon Mar  7 22:56:27 2011 +0100

changed print_generic_error() function to support csv output #1270

fixes #1270

---

 Changelog      |    1 +
 cgi/cgiutils.c |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/Changelog b/Changelog
index c204f3b..c211bec 100644
--- a/Changelog
+++ b/Changelog
@@ -9,6 +9,7 @@ ENHANCEMENTS
 * classic ui: Adding some more icons to showlog.cgi #1239
 * classic ui: adding entry time of comments in tooltip's in status.cgi #1244
 * classic ui: Searching in the Icinga Logfile #516
+* classic ui: changed print_generic_error() function to support csv output #1270
 
 FIXES
 * core: fix flexible downtime on service hard state change doesn't get triggered/activated #1128
diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index 1a8936c..7eca011 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -2149,6 +2149,11 @@ void print_generic_error_message(char *title, char *text, int returnlevels) {
 			printf("<br>%s",text);
 
 		printf("</p>\n");
+	} else if(content_type==CSV_CONTENT) {
+		if(title!=NULL && title[0]!='\x0')
+			printf("ERROR: %s\n",title);
+		if(text!=NULL && text[0]!='\x0')
+			printf("ERROR: %s\n",text);
 	} else {
 		printf("<BR><DIV align='center'><DIV CLASS='errorBox'>\n");
 		printf("<DIV CLASS='errorMessage'><table cellspacing=0 cellpadding=0 border=0><tr><td width=55><img src=\"%s%s\" border=0></td>",url_images_path,CMD_STOP_ICON);





More information about the icinga-checkins mailing list