<%! /* */ %> <% string appl, browser, what, lvl; string action_back, lastControlID, systemID; string node; int rc, hdlsel, timeout; string token; string msg, msg_ok, msg_error; string icon; appl = __icm_get_system_property ("app_name"); browser = __icm_get_browser_type(); what = anumenc(__icm_get_form_field ("what")); token = __icm_get_form_field ("token"); lastControlID = htmlenc(__icm_get_form_field ("lastControlID")); systemID = htmlenc(__icm_get_form_field ("systemID")); %> Information <% if (what == "reset_trace_file") { action_back = "./show_trace.icp?lastControlID=" + lastControlID; rc = __icm_execute (2, token); msg_ok = "Tracefile successfully truncated"; msg_error = "Error truncating tracefile"; } else if (what == "restart_icm") { action_back = "./monitor.icp?lastControlID=" + lastControlID; rc = __icm_execute (3, token); msg_ok = "Restart of " + appl + " triggered"; msg_error = "Error restarting " + appl; } else if (what == "reinit_icm") { action_back = "./monitor.icp?lastControlID=" + lastControlID; rc = __icm_execute (18, token); msg_ok = "Reload of " + appl + " triggered"; msg_error = "Error reloading " + appl; } else if (what == "shutdown_icm") { action_back = "./monitor.icp?lastControlID=" + lastControlID; rc = __icm_execute (3, token); msg_ok = "Shutdown of " + appl + " triggered"; msg_error = "Error shutting down " + appl; } else if (what == "shutdown_wd") { action_back = "./monitor.icp?lastControlID=" + lastControlID; rc = __icm_execute (15, token); msg_ok = "Shutdown of " + appl + " Watchdog triggered"; msg_error = "Error shutting down " + appl + " Watchdog"; } else if (what == "change_maint") { action_back = "./monitor.icp?lastControlID=" + lastControlID; if (__icm_get_form_field ("p1") == "1") rc = __icm_execute (20, token); else rc = __icm_execute (21, token); msg_ok = "Maintenance Mode changed"; msg_error = "Error changing maintenance mode"; } else if (what == "set_trace_level") { lvl = anumenc(__icm_get_form_field ("p1")); action_back = "./show_trace.icp?lastControlID=" + lastControlID; rc = __icm_execute (1, lvl, token); msg_ok = "Tracelevel changed to: " + htmlenc(lvl); msg_error = "Error setting trace level"; } else if (what == "activate_log") { hdlsel = __icm_get_form_field ("hdlsel"); action_back = "./show_log.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_log_hdl (5,hdlsel, token); msg_ok = "Logging Handler activated"; msg_error = "Error activating Logging Handler"; } else if (what == "deactivate_log") { hdlsel = __icm_get_form_field ("hdlsel"); action_back = "./show_log.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_log_hdl (6,hdlsel, token); msg_ok = "Logging Handler deactivated"; msg_error = "Error deactivating Logging Handler"; } else if (what == "activate_auth") { hdlsel = __icm_get_form_field ("p1"); action_back = "./show_auth.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_auth_hdl (7,hdlsel, token); msg_ok = "Access Handler activated"; msg_error = "Error activating Access Handler"; } else if (what == "deactivate_auth") { hdlsel = __icm_get_form_field ("p1"); action_back = "./show_auth.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_auth_hdl (8,hdlsel, token); msg_ok = "Access Handler deactivated"; msg_error = "Error deactivating Access Handler"; } else if (what == "activate_mod") { hdlsel = __icm_get_form_field ("hdlsel"); action_back = "./show_mod.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_mod_hdl (2, hdlsel, token); msg_ok = "Modification Handler activated"; msg_error = "Error activating Modification Handler"; } else if (what == "deactivate_mod") { hdlsel = __icm_get_form_field ("hdlsel"); action_back = "./show_mod.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_mod_hdl (3,hdlsel, token); msg_ok = "Modification Handler deactivated"; msg_error = "Error deactivating Modification Handler"; } else if (what == "activate_cache") { hdlsel = __icm_get_form_field ("hdlsel"); action_back = "./show_cache.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_cache_hdl (5,hdlsel,token); msg_ok = "Cache Handler activated"; msg_error = "Error activating Cache Handler"; } else if (what == "deactivate_cache") { hdlsel = __icm_get_form_field ("hdlsel"); action_back = "./show_cache.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_cache_hdl (6,hdlsel,token); msg_ok = "Cache Handler deactivated"; msg_error = "Error deactivating Cache Handler"; } else if (what == "reset_hbuf") { action_back = "./show_htab.icp?lastControlID=" + lastControlID; rc = __icm_execute (10, token); msg_ok = "Hostname buffer was reset"; msg_error = "Error resetting hostname buffer"; } else if (what == "reset_peaks") { action_back = "./monitor.icp?lastControlID=" + lastControlID; rc = __icm_execute (16, token); msg_ok = "Peak values were reset"; msg_error = "Error resetting peak values"; } else if (what == "reset_tot") { action_back = "./monitor.icp?lastControlID=" + lastControlID; rc = __icm_execute (17, token); msg_ok = "Total values were reset"; msg_error = "Error resetting total values"; } else if (what == "reload_perm") { hdlsel = __icm_get_form_field ("p1"); action_back = "./show_auth.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_auth_hdl (3,hdlsel, token); msg_ok = "Permission Table reloaded"; msg_error = "Error reloading permission table"; } else if (what == "reload_filt") { hdlsel = __icm_get_form_field ("hdlsel"); action_back = "./show_auth.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_auth_hdl (3,hdlsel, token); msg_ok = "Filter rules reloaded"; msg_error = "Error reloading filter rules"; } else if (what == "inval_cache") { hdlsel = __icm_get_form_field ("hdlsel"); action_back = "./show_cache.icp?hdlsel="+hdlsel + "&lastControlID=" + lastControlID; rc = __icm_cache_hdl (4,hdlsel,token); msg_ok = "Cache was invalidated"; msg_error = "Cache invalidation failed"; } else if (what == "wdisp_purge") { timeout = __icm_get_form_field ("p1"); action_back = "./wdisp_ssl.icp?lastControlID=" + lastControlID; rc = __wdisp_hdl (3, timeout, token); msg_ok = "SSL Table entries purged"; msg_error = "Purge of SSL Entries failed"; } else if (what == "wdisp_session_purge") { timeout = __icm_get_form_field ("p1"); action_back = "./wdisp_session.icp?lastControlID=" + lastControlID; rc = __wdisp_session_hdl (3, timeout, token);; msg_ok = "Session Table entries purged"; msg_error = "Purge of Session Entries failed"; } else if (what == "reload_wdisp_conf") { action_back = "./wdisp_host.icp?lastControlID=" + lastControlID; rc = __icm_execute (9, token); msg_ok = "Reload of configuration triggered"; msg_error = "Configuration reload failed"; } else if (what == "reload_wdisp_group_conf") { action_back = "./wdisp_group.icp?lastControlID=" + lastControlID + "&systemID=" + systemID; rc = __icm_execute (9, token); msg_ok = "Reload of configuration triggered"; msg_error = "Configuration reload failed"; } else if (what == "NodeActivate") { node = nodeenc(__icm_get_form_field ("p1")); action_back = "./wdisp_host.icp?lastControlID=" + lastControlID + "&systemID=" + systemID; rc = __wdisp_hdl (4, node, token, systemID); msg_ok = "Server " + strtok(node, ":") + " activated"; if (rc == -20) msg_error = "Activation of server " + strtok(node, ":") + " failed. Server not reachable"; else msg_error = "Activation of server " + strtok(node, ":") + " failed"; } else if (what == "NodeDeactivate") { node = nodeenc(__icm_get_form_field ("p1")); action_back = "./wdisp_host.icp?lastControlID=" + lastControlID + "&systemID=" + systemID; rc = __wdisp_hdl (5, node, token, systemID); msg_ok = "Server " + strtok(node, ":") + " deactivated"; msg_error = "Deactivation of server " + strtok(node, ":") + " failed."; } else if (what == "PoolReset") { action_back = "./wdisp_host.icp?lastControlID=" + lastControlID + "&systemID=" + systemID; rc = __wdisp_hdl (7, node, token, systemID); msg_ok = "Peak values reset"; msg_error = "Peak value reset failed"; } else if (what == "ResetReqCount") { action_back = "./wdisp_host.icp?lastControlID=" + lastControlID + "&systemID=" + systemID; rc = __wdisp_hdl (8, node, token, systemID); msg_ok = "Request counter reset"; msg_error = "Request counter reset failed"; } else if (what == "icm_filter") { node = anumenc(__icm_get_form_field ("p1")); action_back = "./show_auth.icp?lastControlID=" + lastControlID; if (node == "1") { rc = __icm_set_param ("csi/enable", "1", token); } else { rc = __icm_set_param ("csi/enable", "0", token); } msg_ok = "Filter was modified"; msg_error = "Filter change of server failed"; } else { action_back = "./monitor.icp?lastControlID=" + lastControlID; rc = 1; msg_error = "Illegal operation: " + htmlenc(what); } if (rc == 0) { msg = msg_ok; icon = "s_m_info.gif"; } else if (rc == -11) { msg = "Session timeout. Please retry operation."; icon = "s_m_warn.gif"; } else { msg = msg_error + ": " + __icm_get_error_text(rc) + " (rc=" + rc + ")"; icon = "s_m_erro.gif"; } %>
Information
 
 
<%=msg%>
 
 
Back