[icinga-checkins] icinga.org: icinga-core/r1.5: classic ui: deactivated fancy dropdown menu in status.cgi

git at icinga.org git at icinga.org
Sun Jul 24 00:36:26 CEST 2011


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

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Mon Jul 11 14:54:59 2011 +0200

classic ui: deactivated fancy dropdown menu in status.cgi
and activated force_check for cmd reschedule

* seems like the dropdown menu triggers a memory leak in IE6/7

---

 cgi/cgiutils.c |    2 +-
 cgi/status.c   |   22 ++++++++++------------
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index 4be34e0..0b7a67d 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -1062,7 +1062,7 @@ void document_header(int cgi_id, int use_stylesheet){
 	if(cgi_id == STATUS_CGI_ID) {
 		/* Set everything in a form, so checkboxes can be searched after and checked. */
 		printf("<form name='tableform' id='tableform' action='%s' method='POST'>\n",CMD_CGI);
-		printf("<input type=hidden name=hiddenforcefield><input type=hidden name=hiddencmdfield><input type=hidden name=buttonValidChoice><input type=hidden name=buttonCheckboxChecked>\n");
+		printf("<input type=hidden name=hiddenforcefield><input type=hidden name=hiddencmdfield><input type=hidden name=buttonValidChoice><input type=hidden name=buttonCheckboxChecked><input type=hidden name=force_check>\n");
 	}
 
 	if(cgi_id == STATUS_CGI_ID || cgi_id == CMD_CGI_ID) {
diff --git a/cgi/status.c b/cgi/status.c
index ebaf0cf..ea136ab 100644
--- a/cgi/status.c
+++ b/cgi/status.c
@@ -5840,7 +5840,8 @@ void show_servicecommand_table(void){
 		/* A new div for the command table */
 		printf("<DIV CLASS='serviceTotalsCommands'>Commands for checked services</DIV>\n");
 		/* DropDown menu */
-		printf("<select style='display:none;width:400px' name='cmd_typ' id='cmd_typ' onchange='showValue(this.value,%d,%d)' CLASS='DropDown'>",CMD_SCHEDULE_HOST_CHECK,CMD_SCHEDULE_SVC_CHECK);
+//		printf("<select style='display:none;width:400px' name='cmd_typ' id='cmd_typ' onchange='showValue(this.value,%d,%d)' CLASS='DropDown'>",CMD_SCHEDULE_HOST_CHECK,CMD_SCHEDULE_SVC_CHECK);
+		printf("<select name='cmd_typ' id='cmd_typ' onchange='showValue(this.value,%d,%d)' CLASS='DropDown'>",CMD_SCHEDULE_HOST_CHECK,CMD_SCHEDULE_SVC_CHECK);
 			printf("<option value='nothing'>Select command</option>");
 			printf("<option value='%d' title='%s%s' >Add a Comment to Checked Service(s)</option>",CMD_ADD_SVC_COMMENT,url_images_path,COMMENT_ICON);
 			printf("<option value='%d' title='%s%s'>Disable Active Checks Of Checked Service(s)</option>",CMD_DISABLE_SVC_CHECK,url_images_path,DISABLED_ICON);
@@ -5865,16 +5866,14 @@ void show_servicecommand_table(void){
 		printf("</select>");
 
 		/* Print out the activator for the dropdown (which must be between the body tags */
-		printf("<script language='javascript'>\n");
+/*		printf("<script language='javascript'>\n");
 		printf("$(document).ready(function() { \n");
-		printf("try { \n oHandler = $(\".DropDown\").msDropDown({visibleRows:25}).data(\"dd\");\n");
-		printf("oHandler.visible(true);\n");
-		printf("$(\"#ver\").html($.msDropDown.version);\n");
+		printf("try { \n$(\".DropDown\").msDropDown({visibleRows:25}).data(\"dd\").visible(true);\n");
 		printf("} catch(e) {\n");
 		printf("alert(\"Error: \"+e.message);\n}\n");
 		printf("});\n");
 		printf("</script>\n");
-
+*/
 		printf("<br><br><b><input type='submit' name='CommandButton' value='Submit' class='serviceTotalsCommands' disabled='disabled'></b>\n");
 	}
 }
@@ -5885,7 +5884,8 @@ void show_hostcommand_table(void){
 		/* A new div for the command table */
 		printf("<DIV CLASS='hostTotalsCommands'>Commands for checked host(s)</DIV>\n");
 		/* DropDown menu */
-		printf("<select style='display:none;width:400px' name='cmd_typ' id='cmd_typ' onchange='showValue(this.value,%d,%d)' CLASS='DropDown'>",CMD_SCHEDULE_HOST_CHECK,CMD_SCHEDULE_SVC_CHECK);
+//		printf("<select style='display:none;width:400px' name='cmd_typ' id='cmd_typ' onchange='showValue(this.value,%d,%d)' CLASS='DropDown'>",CMD_SCHEDULE_HOST_CHECK,CMD_SCHEDULE_SVC_CHECK);
+		printf("<select name='cmd_typ' id='cmd_typ' onchange='showValue(this.value,%d,%d)' CLASS='DropDown'>",CMD_SCHEDULE_HOST_CHECK,CMD_SCHEDULE_SVC_CHECK);
 			printf("<option value='nothing'>Select command</option>");
 			printf("<option value='%d' title='%s%s' >Add a Comment to Checked Host(s)</option>",CMD_ADD_HOST_COMMENT,url_images_path,COMMENT_ICON);
 			printf("<option value='%d' title='%s%s' >Disable Active Checks Of Checked Host(s)</option>",CMD_DISABLE_HOST_CHECK,url_images_path,DISABLED_ICON);
@@ -5916,16 +5916,14 @@ void show_hostcommand_table(void){
 		printf("</select>");
 
 		/* Print out the activator for the dropdown (which must be between the body tags */
-		printf("<script language='javascript'>\n");
+/*		printf("<script language='javascript'>\n");
 		printf("$(document).ready(function() { \n");
-		printf("try { \n oHandler = $(\".DropDown\").msDropDown({visibleRows:25}).data(\"dd\");\n");
-		printf("oHandler.visible(true);\n");
-		printf("$(\"#ver\").html($.msDropDown.version);\n");
+		printf("try { \n$(\".DropDown\").msDropDown({visibleRows:25}).data(\"dd\").visible(true);\n");
 		printf("} catch(e) {\n");
 		printf("alert(\"Error: \"+e.message);\n}\n");
 		printf("});\n");
 		printf("</script>\n");
-
+*/
 		printf("<br><br><b><input type='submit' name='CommandButton' value='Submit' class='hostsTotalsCommands' disabled='disabled'></b>\n");
 	}
 }





More information about the icinga-checkins mailing list