[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: changed naming of cgi config options for showlog_current_state(s) and showlog_current_state(s) #899

git at icinga.org git at icinga.org
Wed Nov 24 08:38:48 CET 2010


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

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Fri Nov 12 21:01:21 2010 +0100

changed naming of cgi config options for showlog_current_state(s) and showlog_current_state(s) #899

Fixes #899

---

 Changelog                |    1 +
 cgi/cgiutils.c           |   12 ++++++------
 cgi/showlog.c            |    8 ++++----
 sample-config/cgi.cfg.in |    8 ++++----
 4 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/Changelog b/Changelog
index 9c92d99..8e56334 100644
--- a/Changelog
+++ b/Changelog
@@ -32,6 +32,7 @@ FIXES
 * classic ui: fix config expander printing [SP] instead of [WS] (Jochen Bern) #965
 * classic ui: fix status totals - incoherence between displayed list and values #993
 * classic ui: fix deleting host comments won't work #994
+* classic ui: changed naming of cgi config options for showlog_current_state(s) and showlog_current_state(s) #899
 
 * install: fix LD_LIBRARY_PATH export on non bash in idoutils init script (Alexander Skwar) #936
 * install: add log2ido for adding archived logs onto socket/rdbms #926
diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index 5e72b1c..7b1848a 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -128,8 +128,8 @@ int		color_transparency_index_b=255;
 
 int		status_show_long_plugin_output=FALSE;
 int		tac_show_only_hard_state=FALSE;
-int		showlog_initial_state=TRUE;
-int		showlog_current_state=TRUE;
+int		showlog_initial_states=TRUE;
+int		showlog_current_states=TRUE;
 int		tab_friendly_titles=FALSE;
 
 extern hostgroup       *hostgroup_list;
@@ -493,11 +493,11 @@ int read_cgi_config_file(char *filename){
 		else if(!strcmp(var,"tac_show_only_hard_state"))
 			tac_show_only_hard_state=(atoi(val)>0)?TRUE:FALSE;
 
-		else if(!strcmp(var,"showlog_initial_state"))
-			showlog_initial_state=(atoi(val)>0)?TRUE:FALSE;
+		else if(!strcmp(var,"showlog_initial_state") || !strcmp(var,"showlog_initial_states"))
+			showlog_initial_states=(atoi(val)>0)?TRUE:FALSE;
 
-		else if(!strcmp(var,"showlog_current_state"))
-			showlog_current_state=(atoi(val)>0)?TRUE:FALSE;
+		else if(!strcmp(var,"showlog_current_state") || !strcmp(var,"showlog_current_states"))
+			showlog_current_states=(atoi(val)>0)?TRUE:FALSE;
 
 		else if(!strcmp(var,"tab_friendly_titles"))
 			tab_friendly_titles=(atoi(val)>0)?TRUE:FALSE;
diff --git a/cgi/showlog.c b/cgi/showlog.c
index f42ee13..fb81ea4 100644
--- a/cgi/showlog.c
+++ b/cgi/showlog.c
@@ -38,8 +38,8 @@ extern char   url_js_path[MAX_FILENAME_LENGTH];
 
 extern int    log_rotation_method;
 extern int    enable_splunk_integration;
-extern int    showlog_initial_state;
-extern int    showlog_current_state;
+extern int    showlog_initial_states;
+extern int    showlog_current_states;
 
 int display_type=DISPLAY_HOSTS;
 int show_all_hosts=TRUE;
@@ -315,11 +315,11 @@ int display_log(void){
 
 			strip(input);
 
-			if ( showlog_initial_state==FALSE && (strstr(input,"INITIAL SERVICE STATE:") || strstr(input,"INITIAL HOST STATE:"))){
+			if ( showlog_initial_states==FALSE && (strstr(input,"INITIAL SERVICE STATE:") || strstr(input,"INITIAL HOST STATE:"))){
 				continue;
 			}
 
-			if ( showlog_current_state==FALSE && (strstr(input,"CURRENT SERVICE STATE:") || strstr(input,"CURRENT HOST STATE:"))){
+			if ( showlog_current_states==FALSE && (strstr(input,"CURRENT SERVICE STATE:") || strstr(input,"CURRENT HOST STATE:"))){
 				continue;
 			}
 
diff --git a/sample-config/cgi.cfg.in b/sample-config/cgi.cfg.in
index 7319990..299c032 100644
--- a/sample-config/cgi.cfg.in
+++ b/sample-config/cgi.cfg.in
@@ -372,25 +372,25 @@ tac_show_only_hard_state=0
 
 
 
-# SHOW INITIAL STATE IN SHOWLOG OPTION
+# SHOW INITIAL STATES IN SHOWLOG OPTION
 # This options allows you to specify if initial states
 # of hosts and services should be shown in showlog.cgi
 # Note: This Option only works if the option
 # "log_initial_states" in icinga.cfg is set to 1.
 # By default it's enabled. Default is 1.
 
-#showlog_initial_state=1
+#showlog_initial_states=1
 
 
 
-# SHOW CURRENT STATE IN SHOWLOG OPTION
+# SHOW CURRENT STATES IN SHOWLOG OPTION
 # This options allows you to specify if current states
 # of hosts and services should be shown in showlog.cgi
 # Note: This Option only works if the option
 # "log_current_states" in icinga.cfg is set to 1.
 # By default it's enabled. Default is 1.
 
-#showlog_current_state=1
+#showlog_current_states=1
 
 
 





More information about the icinga-checkins mailing list