<%-- 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"%> <%@ page import="com.ibm.ws.console.taskmanagement.util.*"%> <%@ page import="com.ibm.ws.taskmanagement.util.TaskConstants"%> <%@ 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 { %> <%! String escape(String str){ if (str == null) return str; return str.replaceAll("'", "\\\\'"); } String escapequotes(String str){ if (str == null) return str; return str.replaceAll("\"", " "); } %> <% if (isSubTab == null) { isSubTab = "false"; } String taskTypeHeader = "null"; String taskTypeNonPlanned = "null"; String taskTypeExecuting = "null"; String taskTypeApproval = "null"; String taskTypeManual = "null"; MessageResources taskTypeMessages = (MessageResources) application.getAttribute(Action.MESSAGES_KEY); try { taskTypeNonPlanned = taskTypeMessages.getMessage(request.getLocale(), "task.type.nonplanned"); } catch (Exception e) { } try { taskTypeExecuting = taskTypeMessages.getMessage(request.getLocale(), "task.type.executing"); } catch (Exception e) { } try { taskTypeApproval = taskTypeMessages.getMessage(request.getLocale(), "task.type.approval"); } catch (Exception e) { } try { taskTypeManual = taskTypeMessages.getMessage(request.getLocale(), "task.type.manual"); } catch (Exception e) { } try { taskTypeHeader = taskTypeMessages.getMessage(request.getLocale(), "task.type.header"); } catch (Exception e) { } %> <% String contextType=(String)request.getAttribute("contextType"); String cellname = null; String nodename = null; String token = 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); } pageContext.setAttribute("collectionList_ext",collectionList_ext); %> <% 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()); }%>
<% if (showCheckBoxes.equals ("true")) { %> <bean:message key="select.all.items"/> <bean:message key="deselect.all.items"/> <% } %> <bean:message key="show.filter"/> <bean:message key="clear.filter.value"/>
<% 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; } } %> <% chkcounter = chkcounter + 1; %> <% List states = new ArrayList(); states.add(TaskMgmtConstants.ALL); states.add(TaskMgmtConstants.STATE_NEW); states.add(TaskMgmtConstants.STATE_RENEWED); states.add(TaskMgmtConstants.STATE_SUPPRESSED); states.add(TaskMgmtConstants.STATE_INPROGRESS); //states.add(TaskMgmtConstants.STATE_INPROGRESS_PREVIEW); //states.add(TaskMgmtConstants.STATE_INPROGRESS_COMMIT); //states.add(TaskMgmtConstants.STATE_INPROGRESS_ROLLBACK); //states.add(TaskMgmtConstants.STATE_PREVIEWED); states.add(TaskMgmtConstants.STATE_DENIED); states.add(TaskMgmtConstants.STATE_CLOSED); states.add(TaskMgmtConstants.STATE_FAILED); states.add(TaskMgmtConstants.STATE_EXPIRED); //XD601_M2_LTM1 states.add(TaskMgmtConstants.STATE_SUCCEEDED); states.add(TaskMgmtConstants.STATE_UNKNOWN); List severities = new ArrayList(); severities.add(TaskMgmtConstants.ALL); severities.add(TaskMgmtConstants.SEVERITY_FATAL); severities.add(TaskMgmtConstants.SEVERITY_CRITICAL); severities.add(TaskMgmtConstants.SEVERITY_SEVERE); severities.add(TaskMgmtConstants.SEVERITY_MINOR); severities.add(TaskMgmtConstants.SEVERITY_WARNING); severities.add(TaskMgmtConstants.SEVERITY_HARMLESS); severities.add(TaskMgmtConstants.SEVERITY_INFORMATION); %> <% chkcounter = 0; %> <% if (showCheckBoxes.equals("true")) { if ( ConfigFileHelper.isDeleteable(refId) == true) { String delId = (String)resourceUri + "#" + (String) refId ; %> <% } else { %> <% } } %> <% columnField = (String)cellItem.getColumnField(); %> <% chkcounter = chkcounter + 1; %>
<% if (sortIconLocation.equalsIgnoreCase ("right")) { %> <%=columnName%> <% } if (sortable.equals ("false")) { %> <% } if ((sortable.equals ("true")) && (!columnField.equals("status"))) { 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")) { %> <% if (isSubTab.equals("true")) { %> " ALT="" align="texttop" border="0"/> <% } else {%> " ALT="" align="texttop" border="0"/> <% } } //add refresh.gif after state column to refresh page if (columnField.equals("currentState")) {%> <% 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) { %>   <% } if (cellItem.getLink().length() > 0) { //System.out.println("column has link: columnField=" + columnField + " taskType=" + taskType); String encoding = response.getCharacterEncoding(); if(encoding==null) encoding = "UTF-8"; String hRef = cellItem.getLink() + "&refId=" + URLEncoder.encode(refId,encoding) + "&contextId=" + URLEncoder.encode(contextId,encoding) + "&resourceUri=" + URLEncoder.encode(resourceUri,encoding) + "&perspective=" + URLEncoder.encode(perspective,encoding);%> <% } // end if link if (columnField.equalsIgnoreCase("status")) { 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 , "UTF-8"); } String encodedStatusLink = "/ibm/console/status?text=true&type=" + statusType + queryString; String imageSrcLink = "/ibm/console/status?type=" + statusType + queryString; %> <bean:message key=" TITLE=""> <% } %> <%} else if (columnField.equalsIgnoreCase("currentState")) { if (taskState.equals("closed") || taskState.equals("failed")) { %> <% if (finalStatus.length() > 0) { %> "/>: <%=finalStatusMsg%>', '<%=refId%>');" onmouseout="hideTaskPopup();" onmouseover="displayTaskPopup(': <%=finalStatusMsg%>', '<%=refId%>');"> <% } }%> <% if (taskState.equals("closed") || taskState.equals("failed") || taskState.equals("denied")) { %> <%}%> <%} else if (columnField.equalsIgnoreCase("globalSeverity")) {%> <%} else if (columnField.equalsIgnoreCase("taskId")) { String image = "/ibm/console/com.ibm.ws.console.taskmanagement/images/nonplanned.gif"; if (taskType.equalsIgnoreCase(Byte.toString(TaskConstants.PLANNEDTASK_TYPE_EXECUTING))) { image = "/ibm/console/com.ibm.ws.console.taskmanagement/images/executing.gif"; } else if (taskType.equalsIgnoreCase(Byte.toString(TaskConstants.PLANNEDTASK_TYPE_APPROVAL))) { image = "/ibm/console/com.ibm.ws.console.taskmanagement/images/approval.gif"; } else if (taskType.equalsIgnoreCase(Byte.toString(TaskConstants.PLANNEDTASK_TYPE_MANUAL))) { image = "/ibm/console/com.ibm.ws.console.taskmanagement/images/manual.gif"; }%>
<% String shortMsg = escape(msg); String longMsg = escape(msg); if (msg.length() > 100) shortMsg = msg.substring(0, 100) + " ..."; %> <%=shortMsg%> <%} else if (columnField.equalsIgnoreCase("taskAction")) { %> <% Iterator i_actionList = actionList.iterator(); if (taskState.equals("new") || taskState.equals("renewed") || taskState.equals("suppressed") || taskState.equals("denied") || taskState.equals("previewed") || taskState.equals("inprogresspreview") ) {%> <%}%> <% while (i_actionList.hasNext()) { String curraction = (String) i_actionList.next(); String key = "task.action." + curraction;%> <%} // end while %> <%} else if (cellItem.getTranslate()) { %> <%} else { if (htmlFilter.equalsIgnoreCase("false")) { %> <% } else { %> <% } } %> <% if (cellItem.getLink().length() > 0) { %> <% }else{ %> <% if (!columnField.equalsIgnoreCase("status")) { %>   <% } %> <% } %>
<% } catch (Exception e) {e.printStackTrace(); } %> <% ServletContext servletContext = (ServletContext)pageContext.getServletContext(); MessageResources messages = (MessageResources)servletContext.getAttribute(Action.MESSAGES_KEY); String nonefound = messages.getMessage(request.getLocale(),"Persistence.none"); if (chkcounter == 0) { out.println(""); out.println("
"+nonefound+"
"); } %>