[icinga-checkins] icinga.org: icinga-core/master: classic-ui: changed "set_ack_notifications" to "send_ack_notifications" #3467

git at icinga.org git at icinga.org
Wed Jan 2 21:31:48 CET 2013


Module: icinga-core
Branch: master
Commit: 96e766b7be19fbe2ba9c58c5524cfd48a501d320
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=96e766b7be19fbe2ba9c58c5524cfd48a501d320

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Tue Dec 18 16:58:38 2012 +0100

classic-ui: changed "set_ack_notifications" to "send_ack_notifications" #3467

refs: #3467

Changed var name to "send_ack_notifications" and removed code which
isn't needed anymore.

---

 cgi/cgiutils.c           |    6 +++---
 cgi/cmd.c                |   10 ++++------
 cgi/config.c             |   18 +++++++++---------
 sample-config/cgi.cfg.in |    4 ++--
 4 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index f9ebc12..1513249 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -153,7 +153,7 @@ int             refresh_type = JAVASCRIPT_REFRESH;
 int             escape_html_tags = FALSE;
 
 int             persistent_ack_comments = FALSE;
-int		set_ack_notifications = TRUE;
+int		send_ack_notifications = TRUE;
 
 int             use_ssl_authentication = FALSE;
 
@@ -566,8 +566,8 @@ int read_cgi_config_file(char *filename) {
 		else if (!strcmp(var, "persistent_ack_comments"))
 			persistent_ack_comments = (atoi(val) > 0) ? TRUE : FALSE;
 
-		else if (!strcmp(var, "set_ack_notifications"))
-			set_ack_notifications = (atoi(val) > 0) ? TRUE : FALSE;
+		else if (!strcmp(var, "send_ack_notifications"))
+			send_ack_notifications = (atoi(val) > 0) ? TRUE : FALSE;
 
 		else if (!strcmp(var, "default_expiring_acknowledgement_duration"))
 			default_expiring_acknowledgement_duration = atoi(val);
diff --git a/cgi/cmd.c b/cgi/cmd.c
index 8c09dbb..90a9b54 100644
--- a/cgi/cmd.c
+++ b/cgi/cmd.c
@@ -53,7 +53,7 @@ extern int  check_external_commands;
 extern int  use_authentication;
 extern int  lock_author_names;
 extern int  persistent_ack_comments;
-extern int  set_ack_notifications;
+extern int  send_ack_notifications;
 extern int  default_expiring_acknowledgement_duration;
 extern int  set_expire_ack_by_default;
 extern int  default_expiring_disabled_notifications_duration;
@@ -145,7 +145,7 @@ int schedule_delay = 0;				/**< delay for sheduled actions in minutes (Icinga re
 							!not implemented in GUI! */
 int persistent_comment = FALSE;			/**< bool if omment should survive Icinga restart */
 int sticky_ack = TRUE;				/**< bool to disable notifications until recover */
-int send_notification = TRUE;			/**< bool sends a notification if service gets acknowledged */
+int send_notification = FALSE;			/**< bool sends a notification if service gets acknowledged */
 int use_ack_end_time = FALSE;			/**< bool if expire acknowledgement is selected or not */
 int use_disabled_notif_end_time = FALSE;	/**< bool if expire disabled notifications is selected or not */
 int force_check = FALSE;			/**< bool if check should be forced */
@@ -409,7 +409,6 @@ int process_cgivars(void) {
 	int x;
 	int z = 0;
 	int sticky_ack_set = FALSE;		/* default is TRUE */
-	int send_notification_set = FALSE;	/* default is TRUE */
 
 	variables = getcgivars();
 
@@ -610,7 +609,7 @@ int process_cgivars(void) {
 
 		/* we got the notification option for an acknowledgement */
 		else if (!strcmp(variables[x], "send_notification"))
-			send_notification_set = TRUE;
+			send_notification = TRUE;
 
 		/* we got the acknowledgement type */
 		else if (!strcmp(variables[x], "sticky_ack"))
@@ -787,7 +786,6 @@ int process_cgivars(void) {
 	}
 
 	if (command_mode == CMDMODE_COMMIT) {
-		send_notification = send_notification_set;
 		sticky_ack = sticky_ack_set;
 	}
 
@@ -1013,7 +1011,7 @@ void print_form_element(int element, int cmd) {
 		printf("<tr><td class=\"objectDescription descriptionleft\">Send Notification:");
 		print_help_box(help_text);
 		printf("</td><td align=\"left\">");
-		printf("<INPUT TYPE='checkbox' NAME='send_notification' %s></td></tr>\n", (set_ack_notifications == TRUE) ? "CHECKED" : "");
+		printf("<INPUT TYPE='checkbox' NAME='send_notification' %s></td></tr>\n", (send_ack_notifications == TRUE) ? "CHECKED" : "");
 		break;
 
 	case PRINT_PERSISTENT:
diff --git a/cgi/config.c b/cgi/config.c
index 8ace40f..7cee69a 100644
--- a/cgi/config.c
+++ b/cgi/config.c
@@ -106,9 +106,7 @@ extern int color_transparency_index_g;
 extern int color_transparency_index_r;
 extern int cgi_log_rotation_method;
 extern int default_downtime_duration;
-extern int set_ack_notifications;
 extern int default_expiring_acknowledgement_duration;
-extern int set_expire_ack_by_default;
 extern int display_status_totals;
 extern int default_statusmap_layout_method;
 extern int enable_splunk_integration;
@@ -122,6 +120,8 @@ extern int persistent_ack_comments;
 extern int refresh_rate;
 extern int refresh_type;
 extern int result_limit;
+extern int send_ack_notifications;
+extern int set_expire_ack_by_default;
 extern int show_all_services_host_is_authorized_for;
 extern int show_partial_hostgroups;
 extern int show_tac_header;
@@ -227,9 +227,7 @@ int org_color_transparency_index_g;
 int org_color_transparency_index_r;
 int org_cgi_log_rotation_method;
 int org_default_downtime_duration;
-int org_set_ack_notifications;
 int org_default_expiring_acknowledgement_duration;
-int org_set_expire_ack_by_default;
 int org_display_status_totals;
 int org_default_statusmap_layout;
 int org_enable_splunk_integration;
@@ -244,6 +242,8 @@ int org_persistent_ack_comments;
 int org_refresh_rate;
 int org_refresh_type;
 int org_result_limit;
+int org_send_ack_notifications;
+int org_set_expire_ack_by_default;
 int org_show_all_services_host_is_authorized_for;
 int org_show_partial_hostgroups;
 int org_show_tac_header;
@@ -4117,7 +4117,7 @@ void display_cgiconfig(void) {
 	PRINT_CONFIG_LINE_STRING(service_critical_sound, org_service_critical_sound)
 	PRINT_CONFIG_LINE_STRING(service_unknown_sound, org_service_unknown_sound)
 	PRINT_CONFIG_LINE_STRING(service_warning_sound, org_service_warning_sound)
-	PRINT_CONFIG_LINE_INT(set_ack_notifications, org_set_ack_notifications, "bool")
+	PRINT_CONFIG_LINE_INT(send_ack_notifications, org_send_ack_notifications, "bool")
 	PRINT_CONFIG_LINE_INT(set_expire_ack_by_default, org_set_expire_ack_by_default, "bool")
 	PRINT_CONFIG_LINE_INT(show_all_services_host_is_authorized_for, org_show_all_services_host_is_authorized_for, "bool")
 	PRINT_CONFIG_LINE_INT(show_partial_hostgroups, org_show_partial_hostgroups, "bool")
@@ -4526,9 +4526,7 @@ void store_default_settings(void) {
 	org_color_transparency_index_r = color_transparency_index_r;
 	org_cgi_log_rotation_method = org_cgi_log_rotation_method;
 	org_default_downtime_duration = default_downtime_duration;
-	org_set_ack_notifications = set_ack_notifications;
 	org_default_expiring_acknowledgement_duration = default_expiring_acknowledgement_duration;
-	org_set_expire_ack_by_default = set_expire_ack_by_default;
 	org_display_status_totals = display_status_totals;
 	org_default_statusmap_layout = default_statusmap_layout_method;
 	org_enable_splunk_integration = enable_splunk_integration;
@@ -4543,6 +4541,10 @@ void store_default_settings(void) {
 	org_refresh_rate = refresh_rate;
 	org_refresh_type = refresh_type;
 	org_result_limit = result_limit;
+	org_send_ack_notifications = send_ack_notifications;
+	org_set_expire_ack_by_default = set_expire_ack_by_default;
+	org_show_all_services_host_is_authorized_for = show_all_services_host_is_authorized_for;
+	org_show_partial_hostgroups = show_partial_hostgroups;
 	org_show_tac_header = show_tac_header;
 	org_show_tac_header_pending = show_tac_header_pending;
 	org_showlog_current_states = showlog_current_states;
@@ -4555,7 +4557,5 @@ void store_default_settings(void) {
 	org_use_authentication = use_authentication;
 	org_use_logging = use_logging;
 	org_use_ssl_authentication = use_ssl_authentication;
-	org_show_all_services_host_is_authorized_for = show_all_services_host_is_authorized_for;
-	org_show_partial_hostgroups = show_partial_hostgroups;
 	org_use_pending_states = use_pending_states;
 }
diff --git a/sample-config/cgi.cfg.in b/sample-config/cgi.cfg.in
index 9d4c2e6..45018d6 100644
--- a/sample-config/cgi.cfg.in
+++ b/sample-config/cgi.cfg.in
@@ -436,13 +436,13 @@ escape_html_tags=1
 
 
 
-# SET ACK NOTIFICATIONS
+# SEND ACK NOTIFICATIONS
 # This options determines whether the initial state of the
 # checkbox "Send Notifications" when acknowledging a problem.
 # A value of 1 ticks the checkbox and 0 does not.  The default
 # is 1, which will send notifications on acknowledged problems.
 
-set_ack_notifications=1
+send_ack_notifications=1
 
 
 





More information about the icinga-checkins mailing list