<%-- IBM Confidential OCO Source Material --%> <%-- 5724-I63, 5724-H88, 5655-N02, 5733-W70 (C) COPYRIGHT International Business Machines Corp. 1997, 2006 --%> <%-- 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 errorPage="/secure/error.jsp" %> <%@ page import="com.ibm.ws.*"%> <%@ page import="com.ibm.wsspi.*"%> <%@ page import="com.ibm.ws.console.core.item.CollectionItem"%> <%@ page import="com.ibm.ws.console.core.selector.*"%> <%@ page import="com.ibm.ws.console.core.ConfigFileHelper"%> <%@ page import="com.ibm.websphere.management.metadata.ManagedObjectMetadataAccessor"%> <%@ page import="com.ibm.websphere.management.metadata.ManagedObjectMetadataAccessorFactory"%> <%@ 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" %> <%@ page import="java.util.*" %> <%@ page import="java.net.*" %> <%@ page import="com.ibm.ws.console.core.ConfigFileHelper" %> <% int chkcounter = 0; try { %> <% if (isSubTab == null) { isSubTab = "false"; } ServletContext servletContext1 = (ServletContext)pageContext.getServletContext(); MessageResources messages = (MessageResources)servletContext1.getAttribute(org.apache.struts.Globals.MESSAGES_KEY); String cellLabel = messages.getMessage(request.getLocale(),"label.cell"); String nodeLabel = messages.getMessage(request.getLocale(),"label.node"); String clusterLabel = messages.getMessage(request.getLocale(),"label.cluster"); String serverLabel = messages.getMessage(request.getLocale(),"label.server"); String encoding = response.getCharacterEncoding(); if(encoding==null) encoding = "UTF-8"; String contextType=(String)request.getAttribute("contextType"); String cellname = null; String nodename = null; java.util.Properties props= null; java.util.ArrayList collectionList_ext = new java.util.ArrayList(); for(int i=0;i0) || (extensions_preferences!=null && extensions_preferences.length>0)){ if(contextId!=null && contextId!="nocontext"){ props = ConfigFileHelper.getNodeMetadataProperties((String)contextId); //213515 } props = ConfigFileHelper.getAdditionalAdaptiveProperties(request, props, formName); } if(extensions!=null && extensions.length>0) { collectionList_ext = CollectionItemSelector.getCollectionItems(extensions,collectionList_ext,props,request,formName); // 299949C } pageContext.setAttribute("collectionList_ext",collectionList_ext); if(columnWidth==null){ columnWidth=new Double(99.0/collectionList_ext.size()).toString()+"%"; } %> <% if(extensions_preferences!=null && extensions_preferences.length>0){ collectionPreferenceList_ext = PreferenceSelector.getPreferences(extensions_preferences,collectionPreferenceList_ext,props); } %> <%-- NOTES: The sorting icons are specified in defaultIconList. The icons are assumed to be located in the images folder. Checkboxes are NOT displayed for all objects whose refIds start with "builtin_" --%> <%@ include file="/secure/layouts/filterSetup.jspf" %> <% session.removeAttribute("preferences"); %> <% for (Iterator i = collectionPreferenceList_ext.iterator(); i.hasNext();) { preferences.add(i.next()); }%> <%@ include file="/secure/layouts/tableControlsLayout.jspf" %> <% if (showCheckBoxes.equals ("true")) { %> <% } %> <% sortable = (String)cellItem.getIsSortable(); columnField = (String)cellItem.getColumnField(); String tmpName = cellItem.getTooltip(); String columnName = translatedText.getMessage(request.getLocale(),tmpName); if (chkcounter == 0) { if (searchFilter.equals("")) { searchFilter = columnField; } } %> <% if (wrapColumnNames.equalsIgnoreCase ("false")) { %> <% chkcounter = chkcounter + 1; %> <%@ include file="/secure/layouts/filterControlsLayout.jspf" %> <% chkcounter = 0; %> <%String contextId_detail = null;%> <%contextId_detail = contextId_new;%> <%String builtIn = null;%> <%builtIn = builtIn_new;%> <% contextId_detail = ConfigFileHelper.encodeContextUri(contextId_detail); if(contextId_detail==null) contextId_detail=contextId; %> <% if (showCheckBoxes.equals("true")) { //Do not display checkbox if it is a builtin resource if(ConfigFileHelper.isDeleteable(refId) == false || (builtIn!=null && builtIn.equalsIgnoreCase("true"))){ %> <%} else { String delId = (String)resourceUri + "#" + (String) refId ; %> <% } %> <% } %> <% columnField = (String)cellItem.getColumnField(); %> <% chkcounter = chkcounter + 1; %>
<% } else { %> <% } %> <% if (sortIconLocation.equalsIgnoreCase ("right")) { %> <%=columnName%> <% } if (sortable.equals ("false")) { %> <% } if ((sortable.equals ("true")) && (!columnField.equals("status")) && (!columnField.equals("stability")) && (!columnField.equals("state"))) { if (columnField.equals (sortedColumn)) { String nextOrder; if (order.equalsIgnoreCase ("ASC")) { nextOrder = "DSC"; } else { nextOrder = "ASC"; } %> <% if (order.equalsIgnoreCase ("ASC")) { %> <bean:message key=" title=""> <% } else if (order.equalsIgnoreCase ("DSC")) { %> <bean:message key=" title=""> <% } else{ %> <% } } else { %> <bean:message key=" title=""> <% } if (sortIconLocation.equalsIgnoreCase ("left")) { %> <% } if (sortable.equals ("false")) { %> <% } } %> <% //add refresh.gif after status column to refresh page if (columnField.equals("status") || columnField.equals("stability") || columnField.equals("cpuUtil") || columnField.equals("state")) { %> <% if (isSubTab.equals("true")) { %> " ALT="" align="texttop" border="0"/> <% } else {%> " ALT="" align="texttop" border="0"/> <% } } if (!filterDisplay.equals("none")) { if (columnField.equals(searchFilter)) { %>
: <%=searchPattern%> <% } } %>
  <% if ( !idColumn.equals("") ) {%> <% if (cellItem.getIcon()!=null && cellItem.getIcon().length() > 0) { %>   <% } Boolean isLink = new Boolean(true); %> <% isLink = tempIsLink; %> <% if (cellItem.getLink().length() > 0 && isLink.booleanValue() == true) { String hRef = cellItem.getLink() + "&refId="+URLEncoder.encode(refId,encoding) + "&contextId=" + URLEncoder.encode(contextId_detail,encoding) + "&resourceUri=" + URLEncoder.encode(resourceUri,encoding) + "&perspective=" + URLEncoder.encode(perspective,encoding); %> <% } if (columnField.equalsIgnoreCase("status")) { String statusservlet = "/ibm/console/status"; if(cellItem.getStatusServlet()!=null) statusservlet = cellItem.getStatusServlet(); if ( statusType.equals("unknown") ) {%> <bean:message key=" TITLE=""> <% } else { %> <% String queryString = ""; Iterator cols = statusCols.iterator(); while (cols.hasNext()) { String col = (String) cols.next();%> <% queryString += "&" + col + "=" + URLEncoder.encode((String)colvar , encoding); } String encodedStatusLink = statusservlet + "?text=true&type=" + statusType + queryString; String imageSrcLink = statusservlet + "?type=" + statusType + queryString; %> <bean:message key=" TITLE=""> <% } %> <% } else if(columnField.equalsIgnoreCase("state")) { String iconPath = "";%> <% if (state.equals("ops.started")) { iconPath = com.ibm.ws.console.xdcore.util.XDCoreConstants.STATUS_LEVEL_STARTED; } else if (state.equals("ops.starting")) { iconPath = com.ibm.ws.console.xdcore.util.XDCoreConstants.STATUS_LEVEL_PARTIALSTART; } else if (state.equals("ops.stopping")) { iconPath = com.ibm.ws.console.xdcore.util.XDCoreConstants.STATUS_LEVEL_STOPPING; } else if (state.equals("ops.stopped")) { iconPath = com.ibm.ws.console.xdcore.util.XDCoreConstants.STATUS_LEVEL_STOPPED; } else if (state.equals("ops.partialstart")) { iconPath = com.ibm.ws.console.xdcore.util.XDCoreConstants.STATUS_LEVEL_PARTIALSTART; } else { // ops.unknown iconPath = com.ibm.ws.console.xdcore.util.XDCoreConstants.STATUS_LEVEL_UNKNOWN; } %> <bean:message key='<%=state%>'/> <% } else if(columnField.equalsIgnoreCase("stability")) { String iconPath = "";%> <% if (stability.equals(com.ibm.ws.console.xdoperations.util.Constants.STABILITY_STABLE)) { iconPath = com.ibm.ws.console.xdcore.util.XDCoreConstants.STABILITY_LEVEL_STABLE; } else if (stability.equals(com.ibm.ws.console.xdoperations.util.Constants.STABILITY_QUESTIONABLE)) { iconPath = com.ibm.ws.console.xdcore.util.XDCoreConstants.STABILITY_LEVEL_QUESTIONABLE; } else if (stability.equals(com.ibm.ws.console.xdoperations.util.Constants.STABILITY_UNSTABLE)) { iconPath = com.ibm.ws.console.xdcore.util.XDCoreConstants.STABILITY_LEVEL_UNSTABLE; } else { iconPath = com.ibm.ws.console.xdcore.util.XDCoreConstants.STABILITY_LEVEL_UNKOWN; } %> <bean:message key='<%=stability%>'/> <% } else if(columnField.equalsIgnoreCase("contextId")){ %> <% String token = null; String theCell = null; String theNode = null; String theCluster = null; String theServer = null; String scope_display = null; StringTokenizer st = new StringTokenizer(contextId_detail,":"); while(st.hasMoreElements()){ token = st.nextToken(); if(token.equals("cells")) theCell = st.nextToken(); else if(token.equals("nodes")) theNode = st.nextToken(); else if(token.equals("clusters")) theCluster = st.nextToken(); else if(token.equals("servers")) theServer = st.nextToken(); } if(theServer!=null) scope_display = nodeLabel+"="+theNode+","+serverLabel+"="+theServer; else if(theNode!=null) scope_display= nodeLabel+"="+theNode; else if(theCluster!=null) scope_display = clusterLabel+"="+theCluster; else scope_display = cellLabel+"="+theCell;%> <%=scope_display%> <% } else if (cellItem.getTranslate()) { %> <% } else { if (htmlFilter.equalsIgnoreCase("false")) { %> <% } else { %> <% } } %> <% if (cellItem.getLink().length() > 0 && isLink.booleanValue() == true) { %> <% }else{ %> <% if (!columnField.equalsIgnoreCase("status") && (!columnField.equals("stability"))) { %>   <% } %> <% } %>
<% } catch (Exception e) { e.printStackTrace(); } %> <% ServletContext servletContext = (ServletContext)pageContext.getServletContext(); MessageResources messages1 = (MessageResources)servletContext.getAttribute(Action.MESSAGES_KEY); String nonefound = messages1.getMessage(request.getLocale(),"Persistence.none"); if (chkcounter == 0) { out.println(""); out.println(""); } %>