%!
struct server_spec_type
{
int max_conn;
int cur_conn;
int peak_conn;
};
struct server_spec_stack
{
int req_no_total_stateless;
int req_no_total_group;
int req_no_total_stateful;
int req_no_act_stateless[16];
int req_no_act_group[16];
int req_no_act_stateful[16];
string req_no_timesection[16];
string req_per_min_stateless[16];
string req_per_min_group[16];
string req_per_min_stateful[16];
int resp_time_last;
int resp_time_avg;
int resp_time_min;
int ping_time_last;
boolean operational;
boolean valid;
boolean active;
boolean responding;
int capacity;
boolean capacity_is_fixed;
int load;
int load_static;
};
struct wdisp_host_info_type
{
string name;
string host_name;
string http_port;
string https_port;
string error_text;
boolean has_abap;
boolean has_j2ee;
struct server_spec_stack stack[2];
struct server_spec_type http;
struct server_spec_type https;
};
%>
<%
int host_count, refresh_rate, nr, i;
int tabsel;
string what, browser, group, str, cap, ping_url, groupnam[];
string iconname[3];
struct wdisp_host_info_type wdisp_host_info[];
string token_save_cap, token_unlock_cap;
string token, lastControlID;
int rc, test;
string msg, msg_ok, msg_error, isExtern;
string icon,systemID,systemID_show, tabsel_str;
string alt_ping_abap_url, alt_ping_j2ee_url, tmpString;
boolean show_stat_details;
show_stat_details = __icm_get_form_field ("show_stat_details");
what = anumenc(__icm_get_form_field ("what"));
lastControlID = htmlenc(__icm_get_form_field ("lastControlID"));
systemID = htmlenc(__icm_get_form_field ("systemID"));
if (systemID != "000") {
systemID_show = " (" + systemID + ")";
}
isExtern = __wdisp_is_extern_sid(systemID);
alt_ping_abap_url = "/sap/public/icman/ping";
tmpString = __icm_get_param ("wdisp/ping_abap_url");
if (tmpString != "") {
alt_ping_abap_url = tmpString;
}
alt_ping_j2ee_url = "/favicon.ico";
tmpString = __icm_get_param ("wdisp/ping_java_url");
if (tmpString != "") {
alt_ping_j2ee_url = tmpString;
}
browser = __icm_get_browser_type();
host_count = __wdisp_get_host_info (group, wdisp_host_info, systemID);
tabsel_str = __icm_get_form_field ("tabsel");
if (tabsel_str == "") {
tabsel = 1;
for (nr = 0; nr < host_count; nr++) {
if (wdisp_host_info[nr].has_abap) {
tabsel = 0;
}
}
} else {
tabsel = anumenc(__icm_get_form_field ("tabsel"));
}
if ((tabsel < 0) || (tabsel > 1))
tabsel = 0;
if (tabsel == 0) ping_url = alt_ping_abap_url;
else ping_url = alt_ping_j2ee_url;
if (isExtern == "true") {
ping_url = __icm_get_param ("wdisp/ping_extsrv_url");
}
if (what == "refresh") {
refresh_rate = __icm_get_form_field ("p1");
if (refresh_rate == 10)
iconname[0] = "../public/icons/s_s_okay.gif";
else
iconname[1] = "../public/icons/s_s_okay.gif";
}
else
iconname[2] = "../public/icons/s_s_okay.gif";
%>
Web Dispatcher Monitor
<% if (refresh_rate > 0){ %>
<% } %>
<%
group = "!ALL";
groupnam[0] = "ABAP";
groupnam[1] = "JAVA";
if (isExtern == "true") {
groupnam[1] = "EXTERN";
}
for (nr=0; nr<3;nr++){
iconname[nr] = "../public/icons/s_s_space.gif";
}
if (what == "save_cap" || what == "unlock_cap")
{
if (what == "save_cap") {
token = __icm_get_form_field("token");
for (nr = 0; nr < host_count; nr++) {
str = "edit_cap" + wdisp_host_info[nr].name;
cap = anumenc(__icm_get_form_field (str));
if (cap != "" && wdisp_host_info[nr].stack[tabsel].capacity != cap) {
if (tabsel == 0)
rc = __wdisp_hdl (6, wdisp_host_info[nr].name, cap, wdisp_host_info[nr].stack[1].capacity, token, systemID);
else
rc = __wdisp_hdl (6, wdisp_host_info[nr].name, wdisp_host_info[nr].stack[0].capacity, cap, token, systemID);
}
}
msg_ok = "Capacities saved.";
msg_error = "Error saving capacities";
host_count = __wdisp_get_host_info (group, wdisp_host_info, systemID);
} else if (what == "unlock_cap") {
token = __icm_get_form_field("token");
rc = __wdisp_hdl (9, token, systemID);
msg_ok = "Capacities unlocked.";
msg_error = "Error unlocking capacities";
host_count = __wdisp_get_host_info (group, wdisp_host_info, systemID);
}
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 + ")";
icon = "s_m_erro.gif";
}
%>
Information
<%=msg%>
Back
<%
} else {
for (nr = 0; nr
<%
}
%>
<%
}
%>
<%
if (show_stat_details == 0) {
%>
Show Re quest History
<%
} else {
%>
Hide Re quest History
<%
for (nr = 0; nr < host_count; nr++)
{
%>
<%= wdisp_host_info[nr].name %>
Timeframes
<%
for (i = 0; i<16; i++) {
%>
<%=wdisp_host_info[nr].stack[tabsel].req_no_timesection[i]%>
<%
}
%>
Stateless
total
<%
for (i = 0; i<16; i++) {
%>
<%=wdisp_host_info[nr].stack[tabsel].req_no_act_stateless[i]%>
<%
}
%>
Req/min
<%
for (i = 0; i<16; i++) {
%>
<%=wdisp_host_info[nr].stack[tabsel].req_per_min_stateless[i]%>
<%
}
%>
For Group
total
<%
for (i = 0; i<16; i++) {
%>
<%=wdisp_host_info[nr].stack[tabsel].req_no_act_group[i]%>
<%
}
%>
Req/min
<%
for (i = 0; i<16; i++) {
%>
<%=wdisp_host_info[nr].stack[tabsel].req_per_min_group[i]%>
<%
}
%>
Stateful
total
<%
for (i = 0; i<16; i++) {
%>
<%=wdisp_host_info[nr].stack[tabsel].req_no_act_stateful[i]%>
<%
}
%>
Req/min
<%
for (i = 0; i<16; i++) {
%>
<%=wdisp_host_info[nr].stack[tabsel].req_per_min_stateful[i]%>
<%
}
%>
<%
}
}
%>