%-- IBM Confidential OCO Source Material --%>
<%-- 5724-J34 (C) COPYRIGHT International Business Machines Corp. 2004,2005 --%>
<%-- The source code for this program is not published or otherwise divested --%>
<%-- of its trade secrets, irrespective of what has been deposited with the --%>
<%-- U.S. Copyright Office. --%>
<%@ page language="java" import="org.apache.struts.util.MessageResources,org.apache.struts.action.Action"%>
<%@ page import="java.util.*"%>
<%@ page import="com.ibm.ws.console.xdoperations.chart.ChartCollectionForm"%>
<%@ page import="com.ibm.ws.console.xdoperations.chart.ChartDetailForm"%>
<%@ page import="com.ibm.ws.console.xdoperations.prefs.PreferencesDetailForm"%>
<%@ page import="com.ibm.ws.console.xdoperations.prefs.PropertyGroupDetailForm"%>
<%@ page import="com.ibm.ws.console.xdoperations.util.Constants"%>
<%@ page import="com.ibm.ws.console.xdoperations.util.PreferencesUtil"%>
<%@ page errorPage="/secure/error.jsp"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/ibmcommon.tld" prefix="ibmcommon"%>
<%
//System.out.println("dashboardLayout.jsp:entry");
PreferencesDetailForm prefsDetailForm = (PreferencesDetailForm) session.getAttribute("PreferencesDetailForm");
PropertyGroupDetailForm propGroupDetailForm = prefsDetailForm.getPropertyGroup();
MessageResources messages = MessageResources.getMessageResources("com.ibm.ws.console.core.resources.ConsoleAppResources");
String pleaseWait = messages.getMessage(request.getLocale(),"trace.tree.pleaseWaitLabel");
pleaseWait.replaceAll("'", "\\\\'");
ChartCollectionForm collectionForm = (ChartCollectionForm)request.getSession().getAttribute(Constants.CHART_COLLECTION_FORM_KEY);
//System.out.println("dashboardLayout.jsp:collectionForm: "+collectionForm);
String enableRefresh = collectionForm.getEnableAutoRefresh();
String refreshInterval = collectionForm.getRefreshInterval();
int chartsPerRow = Integer.parseInt(PreferencesUtil.getPropertyValue(propGroupDetailForm, Constants.PREFS_DASHBOARD_CHARTS_PER_ROW));
String displaySummaryCharts = PreferencesUtil.getPropertyValue(propGroupDetailForm, Constants.PREFS_DASHBOARD_DISPLAY_SUMMARY_CHARTS);
String displayChartGroupCharts = PreferencesUtil.getPropertyValue(propGroupDetailForm, Constants.PREFS_DASHBOARD_DISPLAY_CHART_GROUP);
String chartGroup = PreferencesUtil.getPropertyValue(propGroupDetailForm, Constants.PREFS_DEFAULT_CHART_GROUP);
//System.out.println("dashboardLayout.jsp:chartsPerRow: "+chartsPerRow);
Hashtable targets = collectionForm.getTargets();
//System.out.println("dashboardLayout.jsp:targets: "+targets);
Hashtable tabTable = collectionForm.getTabTable();
//System.out.println("dashboardLayout.jsp:tabTable: "+tabTable);
Set targetKeys = targets.keySet();
%>
<%
int count = 0;
int chartGroupCount = 1;
for (Iterator i_targetKeys = targetKeys.iterator(); i_targetKeys.hasNext();) {
String target = (String)i_targetKeys.next();
//System.out.println("dashboardLayout.jsp:target: "+target);
ArrayList tabList = (ArrayList)tabTable.get(target);
for (int k=0; k<% }
ChartDetailForm detailForm = (ChartDetailForm) tabList.get(k);
//System.out.println("dashboardLayout.jsp:detailForm: "+detailForm.getRefId());
StringTokenizer st = new StringTokenizer(target, "*");
String contextType = st.nextToken();
//System.out.println("dashboardLayout.jsp:contextType: "+contextType);
if ( (contextType.contains("Summary") && displaySummaryCharts.equals("true"))
|| (chartGroup != null && !chartGroup.equals("") && chartGroup.equals(detailForm.getChartGroup()) && displayChartGroupCharts.equals("true"))) {
//System.out.println("dashboardLayout.jsp:trying to get a chart");
request.setAttribute("chartLite", "true");
request.setAttribute("dashboard", "true");
request.setAttribute("contextType", contextType);
request.setAttribute("refId", detailForm.getRefId());
String label = "nav.app.summary";
String isLabelNLSKey = "false";
if (chartGroup != null && !chartGroup.equals("") && chartGroup.equals(detailForm.getChartGroup()) && displayChartGroupCharts.equals("true")) {
label = chartGroup +" "+chartGroupCount++;
isLabelNLSKey = "false";
} else {
isLabelNLSKey = "true";
if (contextType.contains("Application"))
label = "nav.app.summary";
else if (contextType.contains("Deployment"))
label = "nav.dt.summary";
else if (contextType.contains("Service"))
label = "nav.sp.summary";
}
%>
| <%
if (count%chartsPerRow == 3) { %>
<% }
count++;
}
}
}
%>