java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
| 8
java/code/src/com/redhat/rhn/domain/channel/ChannelFamily.java
| 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgNameFilter.java
| 42 -
java/code/src/com/redhat/rhn/frontend/action/multiorg/SoftwareEntitlementSubscriptionsAction.java
| 234 ++++++----
java/code/src/com/redhat/rhn/frontend/dto/ChannelOverview.java
| 28 -
java/code/src/com/redhat/rhn/frontend/dto/OrgSoftwareEntitlementDto.java
| 128 +++++
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
| 19
java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
| 67 +-
java/code/webapp/WEB-INF/pages/admin/multiorg/orgsoftwaresubs.jsp
| 4
java/code/webapp/WEB-INF/pages/admin/multiorg/softwareentitlements.jsp
| 2
java/code/webapp/WEB-INF/pages/admin/multiorg/softwareentitlementsubs.jsp
| 166 +++++--
web/html/javascript/multiorg-entitlements.js
| 163 ------
12 files changed, 483 insertions(+), 380 deletions(-)
New commits:
commit 5eb0be32bb6841accafaafcb3f7b27aa4f26708e
Author: Partha Aji <paji(a)redhat.com>
Date: Wed Jun 23 20:25:05 2010 -0400
Added flex magic to ChannelFamily -> Orgs page
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
index 8e4b073..6d5c259 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
@@ -380,7 +380,9 @@ ORDER by cfo.name DESC
<mode name="channel_entitlement"
class="com.redhat.rhn.frontend.dto.ChannelOverview">
<query params="org_id, entitlement_id">
-SELECT CFO.id, CFO.name, CFO.label, CFO.current_members, CFO.max_members,
CFO.has_subscription, CFO.url
+SELECT CFO.id, CFO.name, CFO.label, CFO.current_members, CFO.max_members,
+CFO.fve_current_members as current_flex, CFO.fve_max_members as max_flex,
+ CFO.has_subscription, CFO.url
FROM rhnChannelFamilyOverview CFO
WHERE CFO.org_id = :org_id
AND CFO.id = :entitlement_id
@@ -390,7 +392,9 @@ SELECT CFO.id, CFO.name, CFO.label, CFO.current_members,
CFO.max_members, CFO.ha
<mode name="channel_entitlement_for_all_orgs"
class="com.redhat.rhn.frontend.dto.ChannelOverview">
<query params="entitlement_id">
-SELECT CFO.id, CFO.org_id, CFO.name, CFO.label, CFO.current_members, CFO.max_members,
CFO.has_subscription, CFO.url
+SELECT CFO.id, CFO.org_id, CFO.name, CFO.label, CFO.current_members, CFO.max_members,
+ CFO.fve_current_members as current_flex, CFO.fve_max_members as max_flex,
+ CFO.has_subscription, CFO.url
FROM rhnChannelFamilyOverview CFO
WHERE CFO.id = :entitlement_id
AND CFO.org_id in (SELECT ID FROM WEB_CUSTOMER)
diff --git a/java/code/src/com/redhat/rhn/domain/channel/ChannelFamily.java
b/java/code/src/com/redhat/rhn/domain/channel/ChannelFamily.java
index 9a032ac..adfbd69 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ChannelFamily.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/ChannelFamily.java
@@ -246,7 +246,7 @@ public class ChannelFamily extends BaseDomainHelper {
*/
private PrivateChannelFamily getAllocation(Org orgIn) {
for (PrivateChannelFamily alloc : getPrivateChannelFamilies()) {
- if (orgIn.equals(alloc.getOrg())) {
+ if (orgIn.getId().equals(alloc.getOrg().getId())) {
return alloc;
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgNameFilter.java
b/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgNameFilter.java
deleted file mode 100644
index 79bc10b..0000000
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgNameFilter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- *
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.action.multiorg;
-
-import com.redhat.rhn.common.localization.LocalizationService;
-import com.redhat.rhn.frontend.taglibs.list.BaseListFilter;
-
-import java.util.Locale;
-import java.util.Map;
-
-
-/**
- * SoftwareEntitlementsFilter
- * @version $Rev$
- */
-public class OrgNameFilter extends BaseListFilter {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void processMap(Map map, Locale userLocale) {
- LocalizationService ls =
- LocalizationService.getInstance();
- String filterBy = ls.getMessage("softwareEntitlementSubs.filterBy",
- userLocale);
- map.put(filterBy, "orgName");
- }
-
-}
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/multiorg/SoftwareEntitlementSubscriptionsAction.java
b/java/code/src/com/redhat/rhn/frontend/action/multiorg/SoftwareEntitlementSubscriptionsAction.java
index b5841ab..206b7d1 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/multiorg/SoftwareEntitlementSubscriptionsAction.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/multiorg/SoftwareEntitlementSubscriptionsAction.java
@@ -14,20 +14,6 @@
*/
package com.redhat.rhn.frontend.action.multiorg;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.apache.struts.action.ActionErrors;
-import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionForward;
-import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.DynaActionForm;
-
import com.redhat.rhn.common.validator.ValidatorError;
import com.redhat.rhn.domain.channel.ChannelFamily;
import com.redhat.rhn.domain.channel.ChannelFamilyFactory;
@@ -39,19 +25,45 @@ import com.redhat.rhn.frontend.dto.OrgSoftwareEntitlementDto;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
import com.redhat.rhn.frontend.struts.RhnValidationHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
import com.redhat.rhn.manager.channel.ChannelManager;
import com.redhat.rhn.manager.org.OrgManager;
import com.redhat.rhn.manager.org.UpdateOrgSoftwareEntitlementsCommand;
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.DynaActionForm;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
/**
* SoftwareEntitlementSubscriptionsAction
* @version $Rev$
*/
-public class SoftwareEntitlementSubscriptionsAction extends RhnAction {
+public class SoftwareEntitlementSubscriptionsAction extends RhnAction implements Listable
{
private static Logger log = Logger.getLogger(
SoftwareEntitlementSubscriptionsAction.class);
+ private static final String ORGS = "orgs";
+
+ private static String makeLabel(HttpServletRequest request) {
+ RequestContext ctx = new RequestContext(request);
+ Long cfid = ctx.getParamAsLong("cfid");
+ return "SoftwareEntitlementSubscriptionsAction" + cfid;
+ }
+
/** {@inheritDoc} */
public ActionForward execute(ActionMapping mapping,
@@ -65,26 +77,36 @@ public class SoftwareEntitlementSubscriptionsAction extends RhnAction
{
Long cfid = ctx.getParamAsLong("cfid");
ChannelFamily channelFamily = ChannelFamilyFactory.lookupById(cfid);
-
+
// custom channel, redirect to entitlement page
Long max = channelFamily.getMaxMembers(OrgFactory.getSatelliteOrg());
if (max == null) {
return mapping.findForward("unlimited");
}
- ActionForward retval = getStrutsDelegate().forwardParam(mapping.findForward(
- "default"), "cfid", cfid.toString());
+ Map params = new HashMap();
+ params.put("cfid", cfid);
+ ListHelper helper = new ListHelper(this, request, params);
+ helper.execute();
+ ActionForward retval = mapping.findForward("default");
if (isSubmitted(dynaForm)) {
+
+ Map <String, String> subsMap = (Map <String, String>)
+ request.getSession().getAttribute(makeLabel(request));
+ for (String id : subsMap.keySet()) {
+ if (request.getParameter(id) != null) {
+ subsMap.put(id, request.getParameter(id));
+ }
+ }
+
String orgClickedStr = request.getParameter("orgClicked");
- String newCountStr = request.getParameter("newCount_" +
orgClickedStr);
-
- if (newCountStr != null && !StringUtils.isEmpty(newCountStr)) {
+ if (!StringUtils.isBlank(orgClickedStr)) {
Long orgId = Long.parseLong(orgClickedStr);
Org org = OrgFactory.lookupById(orgId);
ActionErrors ae = updateSubscriptions(org, dynaForm, request,
- channelFamily, newCountStr);
+ channelFamily, subsMap);
if (ae != null && ae.size() > 0) {
getStrutsDelegate().saveMessages(request, ae);
@@ -101,7 +123,21 @@ public class SoftwareEntitlementSubscriptionsAction extends RhnAction
{
log.debug("Ignoring form submit (likely a page change)");
}
}
-
+ else {
+ Map<String, String> subsMap = new HashMap<String, String>();
+ List <OrgSoftwareEntitlementDto> subs = helper.getDataSet();
+ for (OrgSoftwareEntitlementDto sub : subs) {
+ if (sub.getMaxPossibleAllocation() > 0) {
+ subsMap.put(sub.getKey(), sub.getMaxMembers().toString());
+ }
+ if (sub.getMaxPossibleFlexAllocation() > 0) {
+ subsMap.put(sub.getFlexKey(), sub.getMaxFlex().toString());
+ }
+ }
+ request.getSession().setAttribute(makeLabel(request), subsMap);
+ }
+ request.setAttribute(ORGS,
+ request.getSession().getAttribute(makeLabel(request)));
setupFormValues(request, user, cfid, channelFamily);
return retval;
@@ -110,10 +146,8 @@ public class SoftwareEntitlementSubscriptionsAction extends RhnAction
{
private void setupFormValues(HttpServletRequest request, User user,
Long cfid, ChannelFamily channelFamily) {
Org satelliteOrg = OrgFactory.getSatelliteOrg();
-
setupOrgEntitlementUsageList(request, user, satelliteOrg, channelFamily);
setupEntitlementUsageTotals(request, cfid, satelliteOrg, user);
-
request.setAttribute("channelFamily", channelFamily);
}
@@ -122,28 +156,13 @@ public class SoftwareEntitlementSubscriptionsAction extends
RhnAction {
*/
private void setupOrgEntitlementUsageList(HttpServletRequest request,
User user, Org satelliteOrg, ChannelFamily cf) {
-
- List<OrgSoftwareEntitlementDto> entitlementUsage =
- ChannelManager.listEntitlementsForAllOrgsWithEmptyOrgs(cf,
user);
-
- for (Iterator <OrgSoftwareEntitlementDto> itr =
- entitlementUsage.iterator(); itr.hasNext();) {
- OrgSoftwareEntitlementDto dto = itr.next();
- if (satelliteOrg.equals(dto.getOrg())) {
- itr.remove();
- }
- }
-
ChannelOverview satelliteOrgOverview = ChannelManager.getEntitlement(
satelliteOrg.getId(), cf.getId());
if (satelliteOrgOverview == null) {
log.error("Default org does not appear to have been allocated
entitlement:" +
cf.getId());
}
- request.setAttribute("pageList", entitlementUsage);
- request.setAttribute("parentUrl", request.getRequestURI());
request.setAttribute("satelliteOrgOverview", satelliteOrgOverview);
-
}
private void setupEntitlementUsageTotals(HttpServletRequest request,
@@ -151,79 +170,131 @@ public class SoftwareEntitlementSubscriptionsAction extends
RhnAction {
List<ChannelOverview> channelOverviews =
ChannelManager.getEntitlementForAllOrgs(cfid);
- Long entitlementsMaxMembers = new Long(0);
- Long entitlementsCurrentMembers = new Long(0);
+ Long maxMembers = new Long(0);
+ Long currMembers = new Long(0);
Long entitlementRatio = new Long(0);
Long orgRatio = new Long(0);
Long entitledOrgs = new Long(0);
+ boolean regularAvailable = false;
+
+
+ long currFlex = 0;
+ long maxFlex = 0;
+ long flexEntRatio = 0;
+ long flexOrgRatio = 0;
+ long flexEntitledOrgs = 0;
+ boolean flexAvailable = false;
+
// don't include default org
Long orgCount = OrgManager.getTotalOrgCount(user) - 1;
-
for (ChannelOverview co : channelOverviews) {
if (co.getOrgId().equals(satelliteOrg.getId())) {
+ flexAvailable = co.getFreeFlex() > 0;
+ regularAvailable = co.getFreeMembers() > 0;
continue;
}
- entitlementsCurrentMembers += co.getCurrentMembers();
-
- entitlementsMaxMembers += co.getMaxMembers();
+
+ currMembers += co.getCurrentMembers();
+ maxMembers += co.getMaxMembers();
+ currFlex += co.getCurrentFlex();
+ maxFlex += co.getMaxFlex();
+
if (co.getMaxMembers() > 0) {
// manually count rather then use list size since max mem can be 0
entitledOrgs++;
+ regularAvailable = true;
}
+
+ if (co.getMaxFlex() > 0) {
+ flexAvailable = true;
+ flexEntitledOrgs++;
+ }
}
try {
- entitlementRatio = entitlementsCurrentMembers * 100 /
entitlementsMaxMembers;
+ if (maxMembers > 0) {
+ entitlementRatio = currMembers * 100 / maxMembers;
+ }
+ if (maxFlex > 0) {
+ flexEntRatio = currFlex * 100 / maxFlex;
+ }
+ if (orgCount > 0) {
+ orgRatio = entitledOrgs * 100 / orgCount;
+ flexOrgRatio = flexEntitledOrgs * 100 / orgCount;
+ }
+
}
catch (Exception e) {
//default to 0
}
- try {
- orgRatio = entitledOrgs * 100 / orgCount;
- }
- catch (Exception e) {
- //default to 0
- }
request.setAttribute("orgCount", orgCount);
request.setAttribute("entitledOrgs", entitledOrgs);
- request.setAttribute("maxMem", entitlementsMaxMembers);
- request.setAttribute("curMem", entitlementsCurrentMembers);
+ request.setAttribute("maxMem", maxMembers);
+ request.setAttribute("curMem", currMembers);
request.setAttribute("entRatio", entitlementRatio);
request.setAttribute("orgRatio", orgRatio);
+ if (regularAvailable) {
+ request.setAttribute("regularAvailable", Boolean.TRUE);
+ }
+
+
+ request.setAttribute("flexEntitledOrgs", flexEntitledOrgs);
+ request.setAttribute("maxFlex", maxFlex);
+ request.setAttribute("curFlex", currFlex);
+ request.setAttribute("flexEntRatio", flexEntRatio);
+ request.setAttribute("flexOrgRatio", flexOrgRatio);
+ if (flexAvailable) {
+ request.setAttribute("flexAvailable", Boolean.TRUE);
+ }
}
private ActionErrors updateSubscriptions(Org org, DynaActionForm dynaForm,
- HttpServletRequest request, ChannelFamily channelFamily, String newCountStr)
{
+ HttpServletRequest request, ChannelFamily channelFamily,
+ Map<String, String> subsMap) {
ActionErrors ae = new ActionErrors();
- Long newCount = null;
- try {
- newCount = Long.parseLong(newCountStr.trim());
+ long regCount = 0;
+ long flexCount = 0;
+
+ if (subsMap.containsKey(OrgSoftwareEntitlementDto.makeFlexKey(org.getId()))) {
+ try {
+ String flexValue = subsMap.get(
+ OrgSoftwareEntitlementDto.makeFlexKey(org.getId()));
+ flexCount = Long.parseLong(flexValue.trim());
+ }
+ catch (NumberFormatException e) {
+ ValidatorError error = new ValidatorError(
+ "softwareEntitlementSubs.invalidInput");
+ ae.add(RhnValidationHelper.validatorErrorToActionErrors(error));
+ }
}
- catch (NumberFormatException e) {
- ValidatorError error = new ValidatorError(
- "softwareEntitlementSubs.invalidInput");
- ae.add(RhnValidationHelper.validatorErrorToActionErrors(error));
- return ae;
+
+ if (subsMap.containsKey(OrgSoftwareEntitlementDto.makeKey(org.getId()))) {
+ try {
+ String value = subsMap.get(
+ OrgSoftwareEntitlementDto.makeKey(org.getId()));
+ regCount = Long.parseLong(value.trim());
+ }
+ catch (NumberFormatException e) {
+ ValidatorError error = new ValidatorError(
+ "softwareEntitlementSubs.invalidInput");
+ ae.add(RhnValidationHelper.validatorErrorToActionErrors(error));
+ }
}
- if (newCount < 0) {
- ValidatorError error = new ValidatorError(
- "softwareEntitlementSubs.invalidInput");
- ae.add(RhnValidationHelper.validatorErrorToActionErrors(error));
+ if (ae.size() > 0) {
return ae;
}
-
if (org.getId().equals(OrgFactory.getSatelliteOrg().getId())) {
createErrorMessage(request, "org.entitlements.system.defaultorg",
null);
return null;
}
-
+
UpdateOrgSoftwareEntitlementsCommand updateCmd = null;
try {
updateCmd = new
UpdateOrgSoftwareEntitlementsCommand(channelFamily.getLabel(),
- org, newCount, 0L);
+ org, regCount, flexCount);
}
catch (IllegalArgumentException e) {
ValidatorError error = new ValidatorError(
@@ -242,4 +313,25 @@ public class SoftwareEntitlementSubscriptionsAction extends RhnAction
{
}
+ /**
+ * {@inheritDoc}
+ */
+ public List getResult(RequestContext contextIn) {
+ ChannelFamily cf = ChannelFamilyFactory.
+ lookupById(contextIn.getParamAsLong("cfid"));
+ List<OrgSoftwareEntitlementDto> entitlementUsage =
+ ChannelManager.listEntitlementsForAllOrgsWithEmptyOrgs(cf,
+
contextIn.getLoggedInUser());
+ Org satelliteOrg = OrgFactory.getSatelliteOrg();
+
+ for (Iterator <OrgSoftwareEntitlementDto> itr =
+ entitlementUsage.iterator(); itr.hasNext();) {
+ OrgSoftwareEntitlementDto dto = itr.next();
+ if (satelliteOrg.equals(dto.getOrg())) {
+ itr.remove();
+ }
+ }
+ return entitlementUsage;
+ }
+
}
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/ChannelOverview.java
b/java/code/src/com/redhat/rhn/frontend/dto/ChannelOverview.java
index 53d8d36..1ffd4aa 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/ChannelOverview.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/ChannelOverview.java
@@ -33,6 +33,11 @@ public class ChannelOverview extends BaseDto implements Comparable {
private Long currentFlex;
private Long maxFlex;
private Long subscribeCount;
+ private Long hasSubscription;
+ private String url;
+ private Long relevantPackages;
+ private Long originalId;
+ private List<PackageDto> packages = new ArrayList<PackageDto>();
/**
@@ -88,14 +93,17 @@ public class ChannelOverview extends BaseDto implements Comparable {
this.maxFlex = maxFlexIn;
}
-
-
- private Long hasSubscription;
- private String url;
- private Long relevantPackages;
- private Long originalId;
- private List<PackageDto> packages = new ArrayList<PackageDto>();
-
+ /**
+ * @return Returns the free flex members.
+ */
+ public Long getFreeFlex() {
+ // Looks like the schema sadly allows this to be null:
+ Long max = maxFlex;
+ if (max == null || max == 0) {
+ return 0L;
+ }
+ return max - currentFlex;
+ }
/**
* @return Returns the originalId.
@@ -146,8 +154,8 @@ public class ChannelOverview extends BaseDto implements Comparable {
public Long getFreeMembers() {
// Looks like the schema sadly allows this to be null:
Long max = maxMembers;
- if (max == null) {
- max = new Long(0);
+ if (max == null || max == 0) {
+ return 0L;
}
return max - currentMembers;
}
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/OrgSoftwareEntitlementDto.java
b/java/code/src/com/redhat/rhn/frontend/dto/OrgSoftwareEntitlementDto.java
index 114e066..768993f 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/OrgSoftwareEntitlementDto.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/OrgSoftwareEntitlementDto.java
@@ -28,23 +28,42 @@ public class OrgSoftwareEntitlementDto {
private Long currentMembers;
private Long maxMembers;
private Long maxPossibleAllocation;
+ private Long currentFlex;
+ private Long maxFlex;
+ private Long maxPossibleFlexAllocation;
/**
- * Constructor
- * @param orgIn Org
- * @param currentMembersIn Current member count
- * @param maxMembersIn Current max member count
- * @param maxPossibleAllocationIn Maximum possible allocation
+ * @param orgIn The org to set.
*/
- public OrgSoftwareEntitlementDto(Org orgIn, Long currentMembersIn, Long maxMembersIn,
- Long maxPossibleAllocationIn) {
-
this.org = orgIn;
- this.currentMembers = currentMembersIn;
- this.maxMembers = maxMembersIn;
- this.maxPossibleAllocation = maxPossibleAllocationIn;
+ public void setOrg(Org orgIn) {
+ org = orgIn;
}
+
/**
+ * @param currentMembersIn The currentMembers to set.
+ */
+ public void setCurrentMembers(Long currentMembersIn) {
+ currentMembers = currentMembersIn;
+ }
+
+
+ /**
+ * @param maxMembersIn The maxMembers to set.
+ */
+ public void setMaxMembers(Long maxMembersIn) {
+ maxMembers = maxMembersIn;
+ }
+
+
+ /**
+ * @param maxPossibleAllocationIn The maxPossibleAllocation to set.
+ */
+ public void setMaxPossibleAllocation(Long maxPossibleAllocationIn) {
+ maxPossibleAllocation = maxPossibleAllocationIn;
+ }
+
+ /**
* @return The org in question.
*/
public Org getOrg() {
@@ -93,6 +112,93 @@ public class OrgSoftwareEntitlementDto {
* @return Max possible allocation.
*/
public Long getMaxPossibleAllocation() {
+ if (maxPossibleAllocation == null) {
+ return 0L;
+ }
return maxPossibleAllocation;
}
+
+
+ /**
+ * @return Returns the currentFlex.
+ */
+ public Long getCurrentFlex() {
+ return currentFlex;
+ }
+
+
+ /**
+ * @param currentFlexIn The currentFlex to set.
+ */
+ public void setCurrentFlex(Long currentFlexIn) {
+ currentFlex = currentFlexIn;
+ }
+
+
+ /**
+ * @return Returns the maxFlex.
+ */
+ public Long getMaxFlex() {
+ return maxFlex;
+ }
+
+
+ /**
+ * @param maxFlexIn The maxFlex to set.
+ */
+ public void setMaxFlex(Long maxFlexIn) {
+ maxFlex = maxFlexIn;
+ }
+
+
+ /**
+ * @return Returns the maxPossibleFlexAllocation.
+ */
+ public Long getMaxPossibleFlexAllocation() {
+ if (maxPossibleFlexAllocation == null) {
+ return 0L;
+ }
+ return maxPossibleFlexAllocation;
+ }
+
+
+ /**
+ * @param maxPossibleFlexAllocationIn The maxPossibleFlexAllocation to set.
+ */
+ public void setMaxPossibleFlexAllocation(Long maxPossibleFlexAllocationIn) {
+ maxPossibleFlexAllocation = maxPossibleFlexAllocationIn;
+ }
+
+
+ /**
+ * @return the key
+ */
+ public String getKey() {
+ return makeKey(getOrg().getId());
+ }
+
+ /**
+ * @return the key
+ */
+ public String getFlexKey() {
+ return makeFlexKey(getOrg().getId());
+ }
+
+
+ /**
+ * @param id the id of the channel family
+ * @return the key
+ */
+ public static String makeKey(Long id) {
+ return String.valueOf(id);
+ }
+
+
+ /**
+ * @param id the id of the channel family
+ * @return the key
+ */
+ public static String makeFlexKey(Long id) {
+ return id + "-flex";
+ }
}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 8c59f44..559206f 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -4701,12 +4701,18 @@ deducted from the default organization.</source>
<context
context-type="sourcefile">/rhn/admin/multiorg/SoftwareEntitlementSubscriptions</context>
</context-group>
</trans-unit>
- <trans-unit id="softwareEntitlementSubs.systemWideCounts.header">
-<source>System-Wide Entitlement Counts</source>
+ <trans-unit
id="softwareEntitlementSubs.systemWideCounts.header.regular">
+<source>System-Wide Regular Entitlement Counts</source>
<context-group name="ctx">
<context
context-type="sourcefile">/rhn/admin/multiorg/SoftwareEntitlementSubscriptions</context>
</context-group>
</trans-unit>
+ <trans-unit
id="softwareEntitlementSubs.systemWideCounts.header.flex">
+<source>System-Wide Flex Entitlement Counts</source>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/admin/multiorg/SoftwareEntitlementSubscriptions</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="softwareEntitlementSubs.submit">
<source>Update</source>
<context-group name="ctx">
@@ -4725,14 +4731,15 @@ deducted from the default organization.</source>
<context
context-type="sourcefile">/rhn/admin/multiorg/SoftwareEntitlementSubscriptions</context>
</context-group>
</trans-unit>
- <trans-unit id="softwareEntitlementSubs.totaltip">
-<source><strong>Tip:</strong> 'Total' refers to
the total available entitlements to the organizations (excluding the default
@@PRODUCT_NAME@@ organization) on this @@PRODUCT_NAME@@. It is not equal to the total
available in the @@PRODUCT_NAME@@ certificate.</source>
+
+ <trans-unit id="softwareEntitlementSubs.Used/Alloted">
+<source>'Alloted' refers to the total available entitlements to the
organizations (excluding the default @@PRODUCT_NAME@@ organization) on this
@@PRODUCT_NAME@@. It is not equal to the total available in the @@PRODUCT_NAME@@
certificate.</source>
<context-group name="ctx">
<context
context-type="sourcefile">/rhn/admin/multiorg/SoftwareEntitlementSubscriptions</context>
</context-group>
</trans-unit>
<trans-unit
id="softwareEntitlementSubs.systemWideCounts.totaltip">
-<source><strong>Tip:</strong> This total corresponds to
your @@PRODUCT_NAME@@ certificate's
+<source> This total corresponds to your @@PRODUCT_NAME@@ certificate's
value for this entitlement, excluding the default organization's
consumption.</source>
<context-group name="ctx">
<context
context-type="sourcefile">/rhn/admin/multiorg/SoftwareEntitlementSubscriptions</context>
@@ -4744,12 +4751,14 @@ value for this entitlement, excluding the default
organization's consumption.</s
<context
context-type="sourcefile">/rhn/admin/multiorg/SoftwareEntitlementSubscriptions</context>
</context-group>
</trans-unit>
+
<trans-unit
id="softwareEntitlementSubs.systemWideCounts.orgUsage">
<source>Organization Usage</source>
<context-group name="ctx">
<context
context-type="sourcefile">/rhn/admin/multiorg/SoftwareEntitlementSubscriptions</context>
</context-group>
</trans-unit>
+
<trans-unit
id="softwareEntitlementSubs.systemWideCounts.entUsageData">
<source>{0} of {1} ({2}%)</source>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
index c773824..1e30559 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
@@ -325,8 +325,8 @@ public class ChannelManager extends BaseManager {
// Create a mapping of org ID's to the channel overview returned, we'll
need this
// when iterating the list of all orgs shortly:
- Map<Long, ChannelOverview> orgEntitlementUsage =
- new HashMap<Long, ChannelOverview>();
+ Map<Long, ChannelOverview> orgEntitlementUsage = new
+ HashMap<Long, ChannelOverview>();
for (ChannelOverview o : entitlementUsage) {
orgEntitlementUsage.put(o.getOrgId(), o);
}
@@ -344,24 +344,42 @@ public class ChannelManager extends BaseManager {
for (Org org : allOrgs) {
if (orgEntitlementUsage.containsKey(org.getId())) {
ChannelOverview co = orgEntitlementUsage.get(org.getId());
- if (co.getMaxMembers() == 0) {
+ if (co.getMaxMembers() == 0 && co.getMaxFlex() == 0) {
continue;
}
- Long maxPossibleAllocation = null;
- if (co.getMaxMembers() != null &&
- satelliteOrgOverview.getFreeMembers() != null) {
- maxPossibleAllocation = co.getMaxMembers() +
- satelliteOrgOverview.getFreeMembers();
- }
- OrgSoftwareEntitlementDto seDto = new OrgSoftwareEntitlementDto(org,
- co.getCurrentMembers(), co.getMaxMembers(), maxPossibleAllocation);
- ret.add(seDto);
+ ret.add(makeOrgSoftwareEntitlement(co, org, satelliteOrgOverview));
}
}
return ret;
}
+
+ private static OrgSoftwareEntitlementDto makeOrgSoftwareEntitlement(
+ ChannelOverview co,
+ Org org,
+ ChannelOverview satelliteOrgOverview) {
+ OrgSoftwareEntitlementDto seDto = new OrgSoftwareEntitlementDto();
+ seDto.setOrg(org);
+ seDto.setCurrentMembers(co.getCurrentMembers());
+ seDto.setMaxMembers(co.getMaxMembers());
+ if (co.getMaxMembers() != null &&
+ satelliteOrgOverview.getFreeMembers() != null) {
+ seDto.setMaxPossibleAllocation(co.getMaxMembers() +
+ satelliteOrgOverview.getFreeMembers());
+ }
+
+ seDto.setCurrentFlex(co.getCurrentFlex());
+ seDto.setMaxFlex(co.getMaxFlex());
+
+ if (co.getMaxFlex() != null &&
+ satelliteOrgOverview.getFreeFlex() != null) {
+ seDto.setMaxPossibleFlexAllocation(co.getMaxFlex() +
+ satelliteOrgOverview.getFreeFlex());
+ }
+ return seDto;
+ }
+
/**
* Given a channel family, this method returns entitlement information on a per org
* basis. This call will return all organizations, even if it does not have any
@@ -399,28 +417,23 @@ public class ChannelManager extends BaseManager {
List<Org> allOrgs = OrgManager.allOrgs(user);
for (Org org : allOrgs) {
- Long maxPossibleAllocation = null;
-
if (orgEntitlementUsage.containsKey(org.getId())) {
ChannelOverview co = orgEntitlementUsage.get(org.getId());
-
- if (co.getMaxMembers() != null &&
- satelliteOrgOverview.getFreeMembers() != null) {
- maxPossibleAllocation = co.getMaxMembers() +
- satelliteOrgOverview.getFreeMembers();
- }
- OrgSoftwareEntitlementDto seDto = new OrgSoftwareEntitlementDto(org,
- co.getCurrentMembers(), co.getMaxMembers(), maxPossibleAllocation);
- ret.add(seDto);
+ ret.add(makeOrgSoftwareEntitlement(co, org, satelliteOrgOverview));
}
else {
- maxPossibleAllocation = satelliteOrgOverview.getFreeMembers();
- OrgSoftwareEntitlementDto seDto =
- new OrgSoftwareEntitlementDto(org, 0L, 0L, maxPossibleAllocation);
+ OrgSoftwareEntitlementDto seDto = new OrgSoftwareEntitlementDto();
+ seDto.setOrg(org);
+ seDto.setCurrentMembers(0L);
+ seDto.setMaxMembers(0L);
+ seDto.setMaxPossibleAllocation(satelliteOrgOverview.getFreeMembers());
+ seDto.setCurrentFlex(0L);
+ seDto.setMaxFlex(0L);
+ seDto.setMaxPossibleFlexAllocation(satelliteOrgOverview.getFreeFlex());
ret.add(seDto);
}
+
}
-
return ret;
}
diff --git a/java/code/webapp/WEB-INF/pages/admin/multiorg/softwareentitlementsubs.jsp
b/java/code/webapp/WEB-INF/pages/admin/multiorg/softwareentitlementsubs.jsp
index c24736a..791f922 100644
--- a/java/code/webapp/WEB-INF/pages/admin/multiorg/softwareentitlementsubs.jsp
+++ b/java/code/webapp/WEB-INF/pages/admin/multiorg/softwareentitlementsubs.jsp
@@ -7,10 +7,9 @@
<html:html xhtml="true">
<head>
-<script src="/javascript/multiorg-entitlements.js"
type="text/javascript"> </script>
</head>
-<body onload="onLoadStuff(4);">
+<body>
<rhn:toolbar base="h1" img="/img/rhn-icon-channels.gif"
miscUrl="${url}"
miscAcl="user_role(org_admin)"
@@ -34,68 +33,111 @@
<html:hidden property="cfid" value="${channelFamily.id}"/>
<html:hidden property="orgClicked" value="0"/>
- <rl:list dataset="pageList"
- width="100%"
- name="pageList"
- filter="com.redhat.rhn.frontend.action.multiorg.OrgNameFilter"
+ <rl:list
styleclass="list"
styleId="multiorg-entitlement-listview"
alphabarcolumn="orgName"
emptykey="softwareEntitlementSubs.noOrgsFound">
- <rl:column bound="false"
- sortable="false"
+ <rl:column
+ filterattr="orgName"
headerkey="softwareEntitlementSubs.column.orgName"
styleclass="first-column">
- <a
href="/rhn/admin/multiorg/OrgDetails.do?oid=${current.org.id}">
+ <a
href="/rhn/admin/multiorg/OrgDetails.do?oid=${current.org.id}"
tabindex="-1">
${current.orgName}
</a>
</rl:column>
-
- <rl:column bound="true"
- sortable="false"
- headerkey="softwareEntitlementSubs.column.total"
- attr="maxMembersDisplay"/>
-
- <rl:column bound="true"
- sortable="false"
- headerkey="softwareEntitlementSubs.column.currentMembers"
- attr="currentMembers"/>
-
- <rl:column bound="false"
- sortable="false"
- headerkey="softwareEntitlementSubs.column.proposedTotal"
- styleclass="last-column"
- attr="maxMembers">
-
- <c:choose>
- <c:when test="${current.maxMembers != null}">
- <div id="id${current.org.id}">
- <html:text property="newCount_${current.org.id}"
size="5" value="${current.maxMembers}"
+ <c:if test="${not empty requestScope.regularAvailable}">
+ <rl:column
+ headertext="${rhn:localize('Regular Usage')} <br/>
(${rhn:localize('Used/Alloted')})*"
+ >
+ <c:choose>
+ <c:when test="${empty current.maxMembers or current.maxMembers ==
0}">
+ <bean:message key="None Allocated"/>
+ </c:when>
+ <c:otherwise>
+ ${current.currentMembers}/${current.maxMembers}
+ </c:otherwise>
+ </c:choose>
+ </rl:column>
+
+ <rl:column
+ headerkey="Regular Proposed Total">
+ <c:choose>
+ <c:when test = "${current.maxPossibleAllocation == 0}">
+ <bean:message key="No Entitlements Available"/>
+ </c:when>
+ <c:otherwise>
+ <div id="id${current.key}">
+ <html:text property="${current.key}" size="10"
value="${requestScope.orgs[current.key]}"
onkeydown="return blockEnter(event)"
-
onclick="rowHash['id${current.org.id}'].toggleVisibility();"/>
- <html:submit onclick="this.form.orgClicked.value =
'${current.org.id}';">
- <bean:message
key="softwareEntitlementSubs.submit"/>
- </html:submit>
+ />
<br/>
- <div class="small-text"
id="id${current.org.id}-tooltip">
+ <div class="small-text"
id="id${current.key}-tooltip">
<bean:message
key="softwareEntitlementSubs.possibleValues"
arg0="0"
arg1="${current.maxMembers +
satelliteOrgOverview.freeMembers}"/>
</div>
</div>
- </c:when>
- </c:choose>
-
+ </c:otherwise>
+ </c:choose>
+ </rl:column>
+ </c:if>
+ <c:if test="${not empty requestScope.flexAvailable}">
+ <rl:column
+ headertext="${rhn:localize('Flex Usage')} <br/>
(${rhn:localize('Used/Alloted')})*"
+ >
+ <c:choose>
+ <c:when test="${empty current.maxFlex or current.maxFlex ==
0}">
+ <bean:message key="None Allocated"/>
+ </c:when>
+ <c:otherwise>
+ ${current.currentFlex}/${current.maxFlex}
+ </c:otherwise>
+ </c:choose>
+ </rl:column>
+
+ <rl:column
+ headerkey="Flex Proposed Total">
+ <c:choose>
+ <c:when test = "${current.maxPossibleFlexAllocation == 0}">
+ <bean:message key="No Entitlements Available"/>
+ </c:when>
+ <c:otherwise>
+ <div id="id${current.flexKey}">
+ <html:text property="${current.flexKey}"
size="10" value="${requestScope.orgs[current.flexKey]}"
+ onkeydown="return blockEnter(event)"
+ />
+ <br/>
+ <div class="small-text"
id="id${current.flexKey}-tooltip">
+ <bean:message
key="softwareEntitlementSubs.possibleValues"
+ arg0="0"
+ arg1="${current.maxFlex +
satelliteOrgOverview.freeFlex}"/>
+ </div>
+ </div>
+ </c:otherwise>
+ </c:choose>
+ </rl:column>
+ </c:if>
+
+ <rl:column
+ headerkey="emptyspace.jsp"
+ styleclass="last-column"
+ >
+ <c:if test = "${current.maxPossibleAllocation > 0 ||
current.maxPossibleFlexAllocation > 0}">
+ <html:submit onclick="this.form.orgClicked.value =
'${current.org.id}';">
+ <bean:message
key="softwareEntitlementSubs.submit"/>
+ </html:submit>
+ </c:if>
+
</rl:column>
</rl:list>
</rl:listset>
</p>
- <span class="small-text">
- <bean:message key="softwareEntitlementSubs.totaltip"/>
- </span>
-<h2><bean:message
key="softwareEntitlementSubs.systemWideCounts.header"/></h2>
+<rhn:tooltip key="softwareEntitlementSubs.Used/Alloted"/>
+<c:if test="${not empty requestScope.regularAvailable}">
+<h2><bean:message
key="softwareEntitlementSubs.systemWideCounts.header.regular"/></h2>
<table class="details">
<tr>
@@ -105,8 +147,7 @@
<td>
${maxMem}
<p/>
- <span class="small-text">
- <bean:message
key="softwareEntitlementSubs.systemWideCounts.totaltip"/></em>
+ <rhn:tooltip
key="softwareEntitlementSubs.systemWideCounts.totaltip"/>
</span>
</td>
</tr>
@@ -127,9 +168,44 @@
<bean:message
key="softwareEntitlementSubs.systemWideCounts.orgUsageData"
arg0="${entitledOrgs}" arg1="${orgCount}"
arg2="${orgRatio}" />
</td>
- </tr>
+ </tr>
</table>
+</c:if>
+<c:if test="${not empty requestScope.flexAvailable}">
+<h2><bean:message
key="softwareEntitlementSubs.systemWideCounts.header.flex"/></h2>
+<table class="details">
+ <tr>
+ <th>
+ <strong><bean:message
key="softwareEntitlementSubs.systemWideCounts.total"/>:</strong>
+ </th>
+ <td>
+ ${maxFlex}
+ <p/>
+ <rhn:tooltip
key="softwareEntitlementSubs.systemWideCounts.totaltip"/>
+ </td>
+ </tr>
+
+ <tr>
+ <th>
+ <strong><bean:message
key="softwareEntitlementSubs.systemWideCounts.entUsage"/>:</strong>
+ </th>
+ <td>
+ <bean:message
key="softwareEntitlementSubs.systemWideCounts.entUsageData"
+ arg0="${curFlex}" arg1="${maxFlex}"
arg2="${flexEntRatio}" />
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <strong><bean:message
key="softwareEntitlementSubs.systemWideCounts.orgUsage"/>:</strong>
+ </th>
+ <td>
+ <bean:message
key="softwareEntitlementSubs.systemWideCounts.orgUsageData"
+ arg0="${flexEntitledOrgs}" arg1="${orgCount}"
arg2="${flexOrgRatio}" />
+ </td>
+ </tr>
+</table>
+</c:if>
</body>
</html:html>
diff --git a/web/html/javascript/multiorg-entitlements.js
b/web/html/javascript/multiorg-entitlements.js
deleted file mode 100644
index a54ee17..0000000
--- a/web/html/javascript/multiorg-entitlements.js
+++ /dev/null
@@ -1,163 +0,0 @@
-var rowHash = new Array();
-var browserType;
-var columnsPerRow;
-
-// tip of the Red Hat to Mar Orlygsson for this little IE detection script
-var is_ie/*@cc_on = {
- quirksmode : (document.compatMode=="BackCompat"),
- version : parseFloat(navigator.appVersion.match(/MSIE (.+?);/)[1])
-}@*/;
-browserType = is_ie;
-
-function onLoadStuff(columns) {
- var channelTable = document.getElementById('multiorg-entitlement-listview');
- createParentRows(channelTable, rowHash);
- reuniteChildrenWithParents(channelTable, rowHash);
- hideAllRows();
-}
-
-function createParentRows(channelTable, rowHash) {
- for (var i = 0; i < channelTable.rows.length; i++) {
- tableRowNode = channelTable.rows[i];
-
- var rowParentDiv = getRowParentDiv(tableRowNode);
- if (rowParentDiv) {
- tableRowNode = rowParentDiv;
- if (!tableRowNode.id) { continue; }
- id = tableRowNode.id;
- var toolTip = findRowToolTip(id);
- if (!toolTip) { continue; }
- rowHash[id] = new Row(rowParentDiv, toolTip);
- }
- }
- return;
-}
-
-function Row(parentDiv, toolTip) {
- this.parentDiv = parentDiv;
- this.children = parentDiv.children;
- this.toolTip = toolTip;
- this.isHidden = 1; // 1 = hidden; 0 = visible. all rows are hidden by default
-
- // Row object methods below!
- this.toggleVisibility = function() {
- hideAllRows();
- this.show();
- return;
- }
-
- this.hide = function hide() {
- this.toolTip.style.visibility = 'hidden';
- this.isHidden = 1;
- return;
- }
-
- this.show = function show() {
- this.toolTip.style.visibility = 'visible';
- this.isHidden = 0;
- return;
- }
-}
-
-/* return 0 if not a parent, if a parent of a parent, return the node for the parent div
*/
-function getRowParentDiv(node) {
- /* make sure it's a tr */
- var trNodeInLowercase = getNodeTagName(node);
- var tdNode = null;
- var divNode = null;
-
- if (trNodeInLowercase != 'tr') { return 0; }
-
- /* now, iterate through the tds */
- for (var j = 0; j < node.childNodes.length; j++) {
- tdNode = node.childNodes[j];
- if (getNodeTagName(tdNode) != 'td') { continue; }
- if (tdNode.childNodes.length >= 3) {
- for (var k = 0; tdNode.childNodes[k]; k++) {
- divNode = tdNode.childNodes[k];
- if (getNodeTagName(divNode) != 'div') { continue; }
- if (divNode.id.indexOf('id')) { return 0; }
- return divNode;
- }
- }
- }
-}
-
-function findRowToolTip(id) {
- var toolTipId = id + '-tooltip';
- return document.getElementById(toolTipId);
-}
-
-function hideAllRows() {
- var row;
- for (var i in rowHash) {
- row = rowHash[i];
- if (!row) { continue; }
- if (!rowHash[i].toolTip) { continue; }
- row.hide();
- }
- return;
-}
-
-function showAllRows() {
- var row;
- for (var i in rowHash) {
- row = rowHash[i];
- if (!row) { continue; }
- if (!rowHash[i].toolTip) { continue; }
- row.show();
- }
- return;
-}
-
-
-
-
-// called from clicking the show/hide button on individual rows in the page
-function toggleRowVisibility(id) {
- if (!rowHash[id]) { return; }
- if (!rowHash[id].hasChildren) { return; }
- rowHash[id].toggleVisibility();
- return;
-}
-
-function reuniteChildrenWithParents(channelTable, rowHash) {
- var parentNode;
- var childId;
- var tableChildRowNode;
- for (var i = 0; i < channelTable.rows.length; i++) {
- tableChildRowNode = channelTable.rows[i];
- // when we find a parent, set it as parent for the children after it
- if (getRowParentDiv(tableChildRowNode) && tableChildRowNode.id) {
- parentNode = tableChildRowNode;
- continue;
- }
- if (!parentNode) { continue; }
-
- // it its not a child node we bail here
- if (!isChildRowNode(tableChildRowNode)) { continue; }
- // FIXME: chceck child id against parent id
- if (!rowHash[parentNode.id]) { continue; }
- for (var j = 0; j < tableChildRowNode.cells.length; j++) {
- rowHash[parentNode.id].cells.push(tableChildRowNode.cells[j]);
- rowHash[parentNode.id].hasChildren = 1;
- }
- }
- return;
-}
-
-function getNodeTagName(node) {
- var tagName;
- var nodeId;
- tagName = new String(node.tagName);
- return tagName.toLowerCase();
-}
-
-function isChildRowNode(node) {
- var nodeInLowercase = getNodeTagName(node);
- var nodeId;
- if (nodeInLowercase != 'tr') { return 0; }
- nodeId = node.id;
- if (nodeId.indexOf('child')) { return 0; }
- return 1;
-}
commit 8b6d0d2f82e0b4040fc960b993b82a81d2d8f2f8
Author: Partha Aji <paji(a)redhat.com>
Date: Wed Jun 23 14:16:54 2010 -0400
Added alphabar columns for the mutli org pages
diff --git a/java/code/webapp/WEB-INF/pages/admin/multiorg/orgsoftwaresubs.jsp
b/java/code/webapp/WEB-INF/pages/admin/multiorg/orgsoftwaresubs.jsp
index 29fb8f4..7aeebdc 100644
--- a/java/code/webapp/WEB-INF/pages/admin/multiorg/orgsoftwaresubs.jsp
+++ b/java/code/webapp/WEB-INF/pages/admin/multiorg/orgsoftwaresubs.jsp
@@ -45,8 +45,8 @@
<rhn:submitted/>
<input type="hidden" name="oid"
value="${param.oid}"/>
- <rl:list
- width="100%"
+ <rl:list
+ alphabarcolumn="name"
styleclass="list"
emptykey="orgsoftwaresubs.jsp.nochannelfams">
diff --git a/java/code/webapp/WEB-INF/pages/admin/multiorg/softwareentitlements.jsp
b/java/code/webapp/WEB-INF/pages/admin/multiorg/softwareentitlements.jsp
index a11c4e1..367b72c 100644
--- a/java/code/webapp/WEB-INF/pages/admin/multiorg/softwareentitlements.jsp
+++ b/java/code/webapp/WEB-INF/pages/admin/multiorg/softwareentitlements.jsp
@@ -36,7 +36,7 @@
<rl:listset name="entitlementSet">
- <rl:list
+ <rl:list alphabarcolumn="name"
styleclass="list"
emptykey="softwareentitlements.noentitlements">