[icinga-checkins] icinga.org: icinga-core/next: Fix QA problem with " config-option-for-sticky-ack-6237"

git at icinga.org git at icinga.org
Sun Nov 2 21:39:06 CET 2014


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

Author: Carl R. Friend <crfriend at rcn.com>
Date:   Tue Oct 28 19:37:47 2014 -0400

Fix QA problem with "config-option-for-sticky-ack-6237"

This commit fixes a QA-related problem which could make the UI
display confusing things when trying to alter the "Sticky Acknowledgment"
tick-box.

The correct merge sequence for this is to first apply revision 1505fd78
and then immediately apply this one as this one fixes *just* the behaviour
problems.  Just applying this commit will miss infrastructure changes
that were necessary to define the desired behaviours.

---

 cgi/cmd.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cgi/cmd.c b/cgi/cmd.c
index 7368998..56647c1 100644
--- a/cgi/cmd.c
+++ b/cgi/cmd.c
@@ -631,8 +631,8 @@ int process_cgivars(void) {
 			send_notification = TRUE;
 
 		/* we got the acknowledgement type */
-		else if (strcmp(key, "sticky_ack") == 0 || strcmp(key, "set_sticky_acknowledgment") == 0)
-			sticky_ack_set = set_sticky_acknowledgment = TRUE;
+		else if (!strcmp(key, "sticky_ack"))
+			sticky_ack_set = TRUE;
 
 		/* we use the end_time as expire time */
 		else if (!strcmp(key, "use_ack_end_time"))
@@ -1003,7 +1003,7 @@ void print_form_element(int element, int cmd) {
 /*
 		printf("<input type='checkbox' name='sticky_ack' %s></td></tr>\n", (sticky_ack == TRUE) ? "CHECKED" : "");
 */
-		printf("<input type='checkbox' id='sticky_ack_checkbox' name='sticky_ack' onClick=\"if (document.getElementById('sticky_ack_checkbox').checked == true) document.getElementById('sticky_ack_row').style.display = ''; else document.getElementById('sticky_ack_row').style.display = 'none';\" %s></td></tr>\n", (set_sticky_acknowledgment == TRUE) ? "CHECKED" : "");
+		printf("<input type='checkbox' id='sticky_ack_checkbox' name='sticky_ack' %s></td></tr>\n", (set_sticky_acknowledgment == TRUE) ? "CHECKED" : "");
 		break;
 
 	case PRINT_SEND_NOTFICATION:



More information about the icinga-checkins mailing list