[icinga-checkins] icinga.org: icinga-core/mfriedrich/cgis: classic-ui: Fixed clicking an ( action|notes_) url in a row automatically ticks the row for the commands #2809

git at icinga.org git at icinga.org
Sun Aug 19 19:49:39 CEST 2012


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

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Fri Aug 17 21:18:20 2012 +0200

classic-ui: Fixed clicking an (action|notes_)url in a row automatically ticks the row for the commands #2809

refs: #2809

host and service field dosn't select checkbox anymore

---

 Changelog    |    1 +
 cgi/status.c |   28 ++++++++++++++--------------
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/Changelog b/Changelog
index 8a73007..3ce482b 100644
--- a/Changelog
+++ b/Changelog
@@ -67,6 +67,7 @@ FIXES
 
 * classic ui: fix setting send_notification or sticky_ack as GET param has no effect on cmd.cgi acks #2926 - MF
 	** now you can finally disable checkboxes default ticked with these options
+* classic ui: Fixed clicking an (action|notes)url in a row automatically ticks the row for the commands #2809 - RB
 
 * idoutils: set result handle explicitely to NULL after dbi_result_free() to prevent memory free'ing corruption #2612 - MF/GB
 
diff --git a/cgi/status.c b/cgi/status.c
index 1232412..5de14ba 100644
--- a/cgi/status.c
+++ b/cgi/status.c
@@ -2391,7 +2391,7 @@ void show_service_detail(void) {
 
 		if (content_type == HTML_CONTENT) {
 
-			printf("<TR onClick=\"toggle_checkbox('service_%d','tableformservice');\">\n", total_service_entries);
+			printf("<TR>\n");
 
 			/* host name column */
 			if (new_host == TRUE) {
@@ -2613,15 +2613,15 @@ void show_service_detail(void) {
 
 
 			/* the rest of the columns... */
-			printf("<TD CLASS='status%s'>%s</TD>\n", status_class, temp_status->status_string);
-			printf("<TD CLASS='status%s' nowrap>%s</TD>\n", status_bg_class, temp_status->last_check);
-			printf("<TD CLASS='status%s' nowrap>%s</TD>\n", status_bg_class, temp_status->state_duration);
-			printf("<TD CLASS='status%s'>%s</TD>\n", status_bg_class, temp_status->attempts);
-			printf("<TD CLASS='status%s' valign='center'>%s</TD>\n", status_bg_class, temp_status->plugin_output);
+			printf("<TD onClick=\"toggle_checkbox('service_%d','tableformservice');\" CLASS='status%s'>%s</TD>\n", total_service_entries, status_class, temp_status->status_string);
+			printf("<TD onClick=\"toggle_checkbox('service_%d','tableformservice');\" CLASS='status%s' nowrap>%s</TD>\n", total_service_entries, status_bg_class, temp_status->last_check);
+			printf("<TD onClick=\"toggle_checkbox('service_%d','tableformservice');\" CLASS='status%s' nowrap>%s</TD>\n", total_service_entries, status_bg_class, temp_status->state_duration);
+			printf("<TD onClick=\"toggle_checkbox('service_%d','tableformservice');\" CLASS='status%s'>%s</TD>\n", total_service_entries, status_bg_class, temp_status->attempts);
+			printf("<TD onClick=\"toggle_checkbox('service_%d','tableformservice');\" CLASS='status%s' valign='center'>%s</TD>\n", total_service_entries, status_bg_class, temp_status->plugin_output);
 
 			/* Checkbox for service(s) */
 			if (is_authorized_for_read_only(&current_authdata) == FALSE) {
-				printf("<TD CLASS='status%s' nowrap align='center'>", status_bg_class);
+				printf("<TD onClick=\"toggle_checkbox('service_%d','tableformservice');\" CLASS='status%s' nowrap align='center'>", total_service_entries, status_bg_class);
 				printf("<input onClick=\"toggle_checkbox('service_%d','tableformservice');\" type='checkbox' id='service_%d' name='hostservice' value='%s^%s'></TD>\n", total_service_entries, total_service_entries, temp_status->host_name, temp_status->svc_description);
 			}
 
@@ -2969,7 +2969,7 @@ void show_host_detail(void) {
 
 		if (content_type == HTML_CONTENT) {
 
-			printf("<TR onClick=\"toggle_checkbox('host_%d','tableformhost');\">\n", total_host_entries);
+			printf("<TR>\n");
 
 
 			/**** host name column ****/
@@ -3069,15 +3069,15 @@ void show_host_detail(void) {
 			printf("</TD>\n");
 
 			/* the rest of the columns... */
-			printf("<TD CLASS='status%s'>%s</TD>\n", status_class, temp_statusdata->status_string);
-			printf("<TD CLASS='status%s' nowrap>%s</TD>\n", status_bg_class, temp_statusdata->last_check);
-			printf("<TD CLASS='status%s' nowrap>%s</TD>\n", status_bg_class, temp_statusdata->state_duration);
-			printf("<TD CLASS='status%s'>%s</TD>\n", status_bg_class, temp_statusdata->attempts);
-			printf("<TD CLASS='status%s' valign='center'>%s</TD>\n", status_bg_class, temp_statusdata->plugin_output);
+			printf("<TD onClick=\"toggle_checkbox('host_%d','tableformhost');\" CLASS='status%s'>%s</TD>\n", total_host_entries, status_class, temp_statusdata->status_string);
+			printf("<TD onClick=\"toggle_checkbox('host_%d','tableformhost');\" CLASS='status%s' nowrap>%s</TD>\n", total_host_entries, status_bg_class, temp_statusdata->last_check);
+			printf("<TD onClick=\"toggle_checkbox('host_%d','tableformhost');\" CLASS='status%s' nowrap>%s</TD>\n", total_host_entries, status_bg_class, temp_statusdata->state_duration);
+			printf("<TD onClick=\"toggle_checkbox('host_%d','tableformhost');\" CLASS='status%s'>%s</TD>\n", total_host_entries, status_bg_class, temp_statusdata->attempts);
+			printf("<TD onClick=\"toggle_checkbox('host_%d','tableformhost');\" CLASS='status%s' valign='center'>%s</TD>\n", total_host_entries, status_bg_class, temp_statusdata->plugin_output);
 
 			/* Checkbox for host(s) */
 			if (is_authorized_for_read_only(&current_authdata) == FALSE) {
-				printf("<TD CLASS='status%s' nowrap align='center'>", status_bg_class);
+				printf("<TD onClick=\"toggle_checkbox('host_%d','tableformhost');\" CLASS='status%s' nowrap align='center'>", total_host_entries, status_bg_class);
 				printf("<input onClick=\"toggle_checkbox('host_%d','tableformhost');\" type='checkbox' id='host_%d' name='host' value='%s'></TD>\n", total_host_entries, total_host_entries, temp_statusdata->host_name);
 			}
 





More information about the icinga-checkins mailing list