<%-- IBM Confidential OCO Source Material --%> <%-- 5724-J34 (C) COPYRIGHT International Business Machines Corp. 2011 --%> <%-- 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"%> <%@ page language="java" import="com.ibm.websphere.management.metadata.*,com.ibm.ws.sm.workspace.RepositoryContext,com.ibm.ws.console.core.Constants"%> <%@ taglib uri="/WEB-INF/ibmcommon.tld" prefix="ibmcommon" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> <%@ page import="java.util.*"%> <% String selectedAction = "selectedAction"; String rejectCode = "rejectCode"; String redirectURL = "redirectURL"; String localResourcePath = "localResourcePath"; String selectedSpecifyBy = "selectedSpecifyBy"; String selectedRoutingPolicy = "selectedRoutingPolicy"; if (property.startsWith("default")) { selectedAction = "default"+selectedAction; rejectCode = "default"+rejectCode; redirectURL = "default"+redirectURL; localResourcePath = "default"+localResourcePath; selectedSpecifyBy = "default"+selectedSpecifyBy; selectedRoutingPolicy = "default"+selectedRoutingPolicy; } String selectedActionId = selectedAction + refId; String selectedSpecifyById = selectedSpecifyBy + refId; String selectedRoutingPolicyId = selectedRoutingPolicy + refId; String selectedClusterName = "selectedClusterName" + refId; String selectedCellName = "selectedCellName" + refId; String selectedServerName = "selectedServerName" + refId; String selectedNodeName = "selectedNodeName" + refId; String selectedAppName = "selectedAppName" + refId; String selectedAppEdition = "selectedAppEdition" + refId; String selectedAppModule = "selectedAppModule" + refId; String selectedRemove = "selectedRemove" + refId; String otheraddtarget = "otheraddtarget" + refId; String otherremovetarget = "otherremovetarget" + refId; %> <% String none = "none.text"; String target = null; String actionEdit = "block"; String cellEdit = "none"; String expressionEdit = "none"; String clusterEdit = "none"; String serverEdit = "none"; String moduleEdit= "none"; String rejectEdit = "none"; String redirectEdit = "none"; String localresourceEdit = "none"; String addRemoveEdit = "none"; String specifyFilterClicked = "specifyByFilterClicked"+refId+"('"+rowindex+"', '"+refId+"')"; String cellFilterClicked = "cellFilterClicked"+refId+"('"+rowindex+"', '"+refId+"')"; String appEditionFilterClicked = "appEditionFilterClicked"+refId+"('"+rowindex+"', '"+refId+"')"; String addTarget = "addClicked"+refId+"('"+rowindex+"', '"+refId+"')"; String removeTarget = "removeClicked"+refId+"('"+rowindex+"', '"+refId+"')"; String showActionMethod = "showActionDiv"+refId+"('"+rowindex+"', '"+refId+"')"; String showTargetClusterItemsMethod = "showTargetClusterItemsDiv"+refId+"('"+rowindex+"', '"+refId+"')"; String serverFilterClicked = "serverFilterClicked"+refId+"('"+rowindex+"', '"+refId+"')"; String moduleFilterClicked = "moduleFilterClicked"+refId+"('"+rowindex+"', '"+refId+"')"; // The order should be the same as the RULES_HTTP_ACTIONTYPES in admin.rule's RulesConstants. String actKeyArr[] = {"httprules.routing.label.permit", "httprules.routing.label.reject", "httprules.routing.label.permitsticky", "httprules.routing.label.mm", "httprules.routing.label.stickymm", "httprules.routing.label.redirect", "httprules.routing.label.localresource" }; // The order should be the same as the RULES_HTTP_TARGETCLUSTER_TYPES in admin.rule's RulesConstants. String specKeyArr[] = {"routing.rules.module","routing.rules.cluster","routing.rules.server"}; // The order should be the same as the RULES_HTTP_MULTICLUSTER_ACTIONS in admin.rule's RulesConstants. String polKeyArr[] = {"http.routing.rules.policy.wlor","http.routing.rules.policy.failover","http.routing.rules.policy.weightedroundrobin"}; String charLines = "---------------------------------"; int actKeyArrIndex=0; int specKeyArrIndex=0; int polKeyIndex=0; int defaultLevel=1; System.out.println("httpRoutingRulesLayout: actionType="+actionType); if (actionType.equals("reject")) { actionEdit = "none"; localresourceEdit = "none"; redirectEdit = "none"; rejectEdit = "block"; } else if (actionType.equals("redirect")) { actionEdit = "none"; localresourceEdit = "none"; redirectEdit = "block"; rejectEdit = "none"; } else if (actionType.equals("localResource")) { actionEdit = "none"; localresourceEdit = "block"; redirectEdit = "none"; rejectEdit = "none"; } else { actionEdit = "block"; localresourceEdit = "none"; redirectEdit = "none"; rejectEdit = "none"; } if(tempTarget.equals("cluster")){ //System.out.println("clusterLayout, not setting to block"); cellEdit = "block"; clusterEdit = "block"; addRemoveEdit = "block"; } if(tempTarget.equals("server")){ //System.out.println("serverLayout"); cellEdit = "block"; serverEdit = "block"; addRemoveEdit = "block"; } if(tempTarget.equals("module")){ //System.out.println("moduleLayout"); cellEdit = "block"; moduleEdit = "block"; addRemoveEdit = "block"; } %> <% if (property.startsWith("default")) { //TODO: add this label to NLS file & make this more reusable.%>

<% } %>
<% String value = ((String)dropDownItem).trim(); String key = (String) actKeyArr[actKeyArrIndex]; actKeyArrIndex++; %>

<% String value = ((String)dropDownItem).trim(); String key = (String) specKeyArr[specKeyArrIndex]; specKeyArrIndex++; %>
<% String newStr = refId + "httpRouting"; //default case if(refId.equals("")) { %> <% }else {%> <% } %>

* <% String value = ((String)dropDownItem).trim(); %> <%=value%>

* <% String value = ((String)dropDownItem).trim(); %> <%=value%>

* <% String value = ((String)dropDownItem).trim(); %> <%=value%>

* <% String value = ((String)dropDownItem).trim(); %> <%=value%>

* <% String value = ((String)dropDownItem).trim(); %> <%=value%>

* <% String value = ((String)dropDownItem).trim(); %> <%=value%>

* <% String value = ((String)dropDownItem).trim(); %> <%=value%>

<% String value = ((String)dropDownItem).trim(); %> <%=value%> <%=charLines%>

<% String value = ((String)dropDownItem).trim(); String key = (String)polKeyArr[polKeyIndex]; polKeyIndex++; %>
<% String rejectCodeId = rejectCode + refId; String redirectUrlId = redirectURL + refId; String localResourcePathId = localResourcePath + refId; %>