<%-- 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="java.util.*,java.lang.reflect.*,com.ibm.ws.console.policyconfiguration.form.ServiceClassDetailForm"%> <%@ page import="java.beans.*"%> <%@ page errorPage="/error.jsp"%> <%@ page import="com.ibm.ws.console.core.*"%> <%@ page import="com.ibm.ws.xd.operations.impl.*"%> <%@ 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" %> <%! String getString(String key, org.apache.struts.util.MessageResources msgs, ServletRequest request){ String str = msgs.getMessage(request.getLocale(), key); return str; } %> <% org.apache.struts.util.MessageResources resources = (org.apache.struts.util.MessageResources)application.getAttribute(org.apache.struts.action.Action.MESSAGES_KEY); try { String initVars = "initVars(this);"; String applyClick = initVars + " submitIt()"; %> <% ServiceClassDetailForm scform = (ServiceClassDetailForm)pageContext.findAttribute(formBean); String goalType = scform.getGoalType(); // All enabled if PCT response time boolean valEnabled = true, pctEnabled = true, impEnabled = true, unitsEnabled = true; boolean spvGoalDeltaEnabled = true, spvGoalDeltaUnitEnabled = true; boolean spvTimePeriodEnabled = true, spvTimePeriodUnitEnabled = true; boolean spvGoalDeltaPercentEnabled = true; boolean spvCheckBoxEnabled = true; String spGoalValueDisplay = "display:block"; String spGoalPercentDisplay = "display:block"; String spImportanceDisplay = "display:block"; String spvGoalDeltaDisplay = "display:block"; String spvGoalDeltaPercentDisplay = "display:block"; // D313929: Disable SPV Fields for Queue Time String spvCheckBoxDisplay = "display:block"; String spvTextDisplay = "display:block"; String spvTimePeriodDisplay = "display:block"; // This is used in the change goal type logic String tempOrigTimeInterval = "UNITS_SECONDS"; // this is the default for AVG_RESPONSE_TIME and PCT_RESPONSE_TIME String isDisablePropertyEnabled = XDOperationsViewConfigHelper.getConfigProperty(XDOperationsViewConfigHelper.RESPONSE_TIME_GOALS_DISABLE); isDisablePropertyEnabled = isDisablePropertyEnabled.trim(); if (isDisablePropertyEnabled.equalsIgnoreCase("true")) { valEnabled = false; pctEnabled = false; impEnabled = true; spGoalValueDisplay = "display:none"; spGoalPercentDisplay = "display:none"; spImportanceDisplay = "display:block"; spvGoalDeltaEnabled = false; spvGoalDeltaUnitEnabled = false; spvTimePeriodEnabled = false; spvTimePeriodUnitEnabled = false; spvGoalDeltaPercentEnabled = false; spvCheckBoxEnabled = false; spvCheckBoxDisplay = "display:none"; spvTextDisplay = "display:none"; spvGoalDeltaDisplay = "display:none"; spvGoalDeltaPercentDisplay = "display:none"; spvTimePeriodDisplay = "display:none"; } else if (goalType.equals("GOAL_TYPE_AVG_RESPONSE_TIME")) { pctEnabled = false; spGoalPercentDisplay = "display:none"; spvGoalDeltaPercentEnabled = false; spvGoalDeltaPercentDisplay = "display:none"; tempOrigTimeInterval = scform.getTimeInterval(); } else if (goalType.equals("GOAL_TYPE_QUEUETIME")) { pctEnabled = false; spGoalPercentDisplay = "display:none"; // D328422: Units should not be disabled for Queue Time // unitsEnabled = false; spvGoalDeltaPercentEnabled = false; spvGoalDeltaPercentDisplay = "display:none"; // D313929: Disable SPV Fields for Queue Time spvCheckBoxDisplay = "display:none"; spvTextDisplay = "display:none"; spvGoalDeltaDisplay = "display:none"; spvTimePeriodDisplay = "display:none"; } else if (goalType.equals("GOAL_TYPE_COMPLETIONTIME")){ pctEnabled = false; spGoalPercentDisplay = "display:none"; // D328422: Units should not be disabled for Queue Time // unitsEnabled = false; spvGoalDeltaPercentEnabled = false; spvGoalDeltaPercentDisplay = "display:none"; // D313929: Disable SPV Fields for Queue Time spvCheckBoxDisplay = "display:none"; spvTextDisplay = "display:none"; spvGoalDeltaDisplay = "display:none"; spvTimePeriodDisplay = "display:none"; } else if (goalType.equals("GOAL_TYPE_PCT_RESPONSE_TIME")) { spvGoalDeltaEnabled = false; spvGoalDeltaUnitEnabled = false; spvGoalDeltaDisplay = "display:none"; tempOrigTimeInterval = scform.getTimeInterval(); } else if (!goalType.equals("GOAL_TYPE_PCT_RESPONSE_TIME") && !goalType.equals("GOAL_TYPE_QUEUETIME") && !goalType.equals("GOAL_TYPE_AVG_RESPONSE_TIME") && !goalType.equals("GOAL_TYPE_COMPLETIONTIME") ) { // It's Discretionary, everything disabled valEnabled = false; pctEnabled = false; impEnabled = false; spGoalValueDisplay = "display:none"; spGoalPercentDisplay = "display:none"; spImportanceDisplay = "display:none"; spvGoalDeltaEnabled = false; spvGoalDeltaUnitEnabled = false; spvTimePeriodEnabled = false; spvTimePeriodUnitEnabled = false; spvGoalDeltaPercentEnabled = false; spvCheckBoxEnabled = false; spvCheckBoxDisplay = "display:none"; spvTextDisplay = "display:none"; spvGoalDeltaDisplay = "display:none"; spvGoalDeltaPercentDisplay = "display:none"; spvTimePeriodDisplay = "display:none"; } boolean isReadOnly = (readOnly != null && readOnly.equalsIgnoreCase("true")); %> <% boolean spvCheckBoxChecked = false; // if (!((scform.getGoalDeltaValue() == 0) && (scform.getGoalDeltaPercent() == 0))) { if (scform.isViolationEnabled()) { spvCheckBoxChecked = true; } else { spvGoalDeltaEnabled = false; spvGoalDeltaUnitEnabled = false; spvTimePeriodEnabled = false; spvTimePeriodUnitEnabled = false; spvGoalDeltaPercentEnabled = false; } %> <% } catch (Exception e) { e.printStackTrace(); } %>