java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml | 9 java/code/src/com/redhat/rhn/domain/server/ManagedServerGroup.java | 11 + java/code/src/com/redhat/rhn/frontend/action/groups/GroupDetailAction.java | 61 +++++ java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 42 ++++ java/code/src/com/redhat/rhn/manager/system/ServerGroupManager.java | 18 + java/code/webapp/WEB-INF/nav/system_group_detail.xml | 3 java/code/webapp/WEB-INF/pages/admin/assignedgroups.jsp | 2 java/code/webapp/WEB-INF/pages/common/fragments/activationkeys/groups.jspf | 2 java/code/webapp/WEB-INF/pages/common/fragments/systems/group_listdisplay.jspf | 2 java/code/webapp/WEB-INF/pages/common/fragments/systems/groups.jspf | 2 java/code/webapp/WEB-INF/pages/common/fragments/yourrhn/systemGroups.jsp | 4 java/code/webapp/WEB-INF/pages/groups/detail.jsp | 104 ++++++++++ java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp | 2 java/code/webapp/WEB-INF/struts-config.xml | 9 spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf | 6 web/html/network/systems/groups/apply_errata_confirm.pxt | 2 web/html/network/systems/groups/details.pxt | 91 -------- web/html/network/systems/groups/edit_properties.pxt | 2 web/html/network/systems/ssm/groups/index.pxt | 2 web/include/nav/system_group_detail.xml | 3 web/modules/sniglets/Sniglets/ListView/SystemGroupList.pm | 2 21 files changed, 267 insertions(+), 112 deletions(-)
New commits: commit 2bf6908e42067aeab8d75eb31195deb471d9ecb9 Author: Jan Dobes jdobes@redhat.com Date: Thu Dec 5 11:29:06 2013 +0100
system group details - linking + cleanup
diff --git a/java/code/webapp/WEB-INF/nav/system_group_detail.xml b/java/code/webapp/WEB-INF/nav/system_group_detail.xml index 2bba613..7671f0a 100644 --- a/java/code/webapp/WEB-INF/nav/system_group_detail.xml +++ b/java/code/webapp/WEB-INF/nav/system_group_detail.xml @@ -1,8 +1,7 @@ <?xml version="1.0"?> <rhn-navi-tree label="system_group_detail" invisible="1" formvar="sgid" title-depth="1"> <rhn-tab name="Details"> - <rhn-tab-url>/network/systems/groups/details.pxt</rhn-tab-url> - <rhn-tab-url>/network/systems/groups/delete_confirm.pxt</rhn-tab-url> + <rhn-tab-url>/rhn/groups/GroupDetail.do</rhn-tab-url> </rhn-tab> <rhn-tab name="Systems"> <rhn-tab-url>/rhn/groups/ListRemoveSystems.do</rhn-tab-url> diff --git a/java/code/webapp/WEB-INF/pages/admin/assignedgroups.jsp b/java/code/webapp/WEB-INF/pages/admin/assignedgroups.jsp index ba5045c..a319d5a 100644 --- a/java/code/webapp/WEB-INF/pages/admin/assignedgroups.jsp +++ b/java/code/webapp/WEB-INF/pages/admin/assignedgroups.jsp @@ -35,7 +35,7 @@ headerkey="assignedgroups.jsp.group" sortattr="name">
- <c:out value="<a href="/network/systems/groups/details.pxt?sgid=${current.id}">${current.name}</a>" escapeXml="false" /> + <c:out value="<a href="/rhn/groups/GroupDetail.do?sgid=${current.id}">${current.name}</a>" escapeXml="false" /> </rl:column>
<rl:column sortable="true" diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/activationkeys/groups.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/activationkeys/groups.jspf index 20b192c..32c5b07 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/activationkeys/groups.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/activationkeys/groups.jspf @@ -44,7 +44,7 @@ filterattr="name"> <c:choose> <c:when test = "${not empty requestScope.accessMap[current.id]}"> - <a href="/network/systems/groups/details.pxt?sgid=${current.id}">${current.name}</a> + <a href="/rhn/groups/GroupDetail.do?sgid=${current.id}">${current.name}</a> </c:when> <c:otherwise> ${current.name} diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/group_listdisplay.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/group_listdisplay.jspf index a583eee..befbbd5 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/group_listdisplay.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/group_listdisplay.jspf @@ -54,7 +54,7 @@ bound="false" headerkey="grouplist.jsp.name" sortattr="name"> - <c:out value="<a href="/network/systems/groups/details.pxt?sgid=${current.id}">" escapeXml="false" /> + <c:out value="<a href="/rhn/groups/GroupDetail.do?sgid=${current.id}">" escapeXml="false" /> <c:out value="${current.name}" escapeXml="true" /> <c:out value="</a>" escapeXml="false" /> </rl:column> diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/groups.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/groups.jspf index b7b9648..1fb250f 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/groups.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/groups.jspf @@ -53,7 +53,7 @@ bound="false" headerkey="grouplist.jsp.name" sortattr="name" defaultsort="asc" filterattr="name" styleclass="${nameStyle}"> - <a href="/network/systems/groups/details.pxt?sgid=${current.id}">${current.name}</a> + <a href="/rhn/groups/GroupDetail.do?sgid=${current.id}">${current.name}</a> </rl:column> </rl:list>
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/yourrhn/systemGroups.jsp b/java/code/webapp/WEB-INF/pages/common/fragments/yourrhn/systemGroups.jsp index 5e49ea5..7b8c1c6 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/yourrhn/systemGroups.jsp +++ b/java/code/webapp/WEB-INF/pages/common/fragments/yourrhn/systemGroups.jsp @@ -33,12 +33,12 @@ <%@ include file="/WEB-INF/pages/common/fragments/systems/monitoring_status_groups.jspf" %>
<rl:column headerkey="yourrhn.jsp.systemgroups"> - <a href="/network/systems/groups/details.pxt?sgid=${current.id}"> + <a href="/rhn/groups/GroupDetail.do?sgid=${current.id}"> <c:out value="${current.name}"/></a> </rl:column>
<rl:column headerkey="grouplist.jsp.systems"> - <a href="/network/systems/groups/details.pxt?sgid=${current.id}"> + <a href="/rhn/groups/GroupDetail.do?sgid=${current.id}"> <c:out value="${current.serverCount}"/></a> </rl:column>
diff --git a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp index ee16ba7..2cb4a91 100644 --- a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp +++ b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp @@ -137,7 +137,7 @@ <tr class="list-row-odd" id = "systemGroupsRow"> <c:set var ="key" value="System Groups"/> <c:set var ="items_list" value="${requestScope.systems.systemGroups}"/> - <c:set var ="href" value="/network/systems/groups/details.pxt?sgid="/> + <c:set var ="href" value="/rhn/groups/GroupDetail.do?sgid="/> <%@ include file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf" %> </tr> <tr> diff --git a/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf b/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf index fe5c465..de4a5f4 100644 --- a/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf +++ b/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf @@ -127,12 +127,6 @@ PerlConfigRequire PXT/Apache24Config.pm PerlAuthenHandler PXT::ApacheAuth require acl org_entitlement(sw_mgr_enterprise)
- <Files details.pxt> - AuthType Basic - AuthName "RHN System Group Admin Area" - require acl user_has_access_to_servergroup() - </Files> - <Files admin_list.pxt> AuthType Basic AuthName "RHN System Group Admin Area" diff --git a/web/html/network/systems/groups/apply_errata_confirm.pxt b/web/html/network/systems/groups/apply_errata_confirm.pxt index 7a92ca3..2b58446 100644 --- a/web/html/network/systems/groups/apply_errata_confirm.pxt +++ b/web/html/network/systems/groups/apply_errata_confirm.pxt @@ -31,7 +31,7 @@
<column name="Entitlement" label="entitlement_level" width="15%" align="center" />
- <action name="Apply Errata" label="confirm_errata_application" url="/network/systems/groups/details.pxt" /> + <action name="Apply Errata" label="confirm_errata_application" url="/rhn/groups/GroupDetail.do" /> </rhn-listview>
</grail-canvas-template> diff --git a/web/html/network/systems/groups/details.pxt b/web/html/network/systems/groups/details.pxt deleted file mode 100644 index a79a200..0000000 --- a/web/html/network/systems/groups/details.pxt +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<pxt-passthrough> - <pxt-use class="Grail::Frame" /> - <pxt-use class="Sniglets::Users" /> - <pxt-use class="Sniglets::ServerGroup" /> - <pxt-use class="Sniglets::Lists" /> - <pxt-use class="Sniglets::Navi" /> - <pxt-use class="Sniglets::HTML" /> - - <grail-canvas-template base="/templates/c.pxt" mode="main_canvas"> - -<pxt-include file="/network/components/system_groups/sgdc_header.pxi" /> - -<rhn-admin-server-group-edit-form> - -<div class="row-0"> -<div class="col-md-6"> -<div class="panel panel-default"> - -<div class="panel-heading"> -<h2>Group Updates</h2> - -<rhn-system-group-status-interface> -<div class="system-status">{icon} <span class="{status_class}">{status_str}</span> {message}</div> -</rhn-system-group-status-interface> - - -<br /> -</div> -<pxt-form method="POST" action="/rhn/groups/ListRemoveSystems.do"> - -<div class="panel-body"> -<table class="table"> - <tr> - <th>Admins:</th> - <td> -{admin_count}<br /> - -<rhn-require acl="user_role(system_group_admin)"> -<br /> -<pxt-formvar> -<a href="/network/systems/groups/admin_list.pxt?sgid={formvar:sgid}">Edit group administrators</a> -</pxt-formvar> -</rhn-require> -</td> - </tr> - <tr> - <th>Systems:</th> - <td>{systems_area}</td> - </tr> -</table> -</div> -</pxt-form> -</div> -</div> - -<div class="col-md-6"> -<div class="panel panel-default"> -<div class="panel-heading"> - <h2>System Group Properties</h2> -</div> - <div class="panel-body"> - <table class="table"> - <tr> - <th>Name:</th> - <td>{name}</td> - </tr> - - <tr> - <th valign="top">Description:</th> - <td>{description}</td> - </tr> - </table> - </div> - - - -<rhn-require acl="user_role(system_group_admin)"> -<br /> -<pxt-formvar> -<div align="center"><a href="edit_properties.pxt?sgid={formvar:sgid}">Edit Group Properties</a></div> -</pxt-formvar> -</rhn-require> -</div> -</div> -</div> -</rhn-admin-server-group-edit-form> - - </grail-canvas-template> -</pxt-passthrough> - diff --git a/web/html/network/systems/groups/edit_properties.pxt b/web/html/network/systems/groups/edit_properties.pxt index 27b8c3f..a2a8df1 100644 --- a/web/html/network/systems/groups/edit_properties.pxt +++ b/web/html/network/systems/groups/edit_properties.pxt @@ -43,7 +43,7 @@
{admin_server_group_formvars} <pxt-formvar> - <input type="hidden" name="redirect_to" value="/network/systems/groups/details.pxt?sgid={formvar:sgid}" /> + <input type="hidden" name="redirect_to" value="/rhn/groups/GroupDetail.do?sgid={formvar:sgid}" /> </pxt-formvar> </rhn-admin-server-group-edit-form>
diff --git a/web/html/network/systems/ssm/groups/index.pxt b/web/html/network/systems/ssm/groups/index.pxt index 84eb854..d193526 100644 --- a/web/html/network/systems/ssm/groups/index.pxt +++ b/web/html/network/systems/ssm/groups/index.pxt @@ -32,7 +32,7 @@ <var name="sgid" /> </formvars> <column name="System Group" label="group_name" width="55%"> - <url>/network/systems/groups/details.pxt?sgid={column:id}</url> + <url>/rhn/groups/GroupDetail.do?sgid={column:id}</url> </column> <column name="Add" label="add_to_group_radio" width="15%" align="center" /> <column name="Remove" label="remove_from_group_radio" width="15%" align="center" /> diff --git a/web/include/nav/system_group_detail.xml b/web/include/nav/system_group_detail.xml index 2bba613..7671f0a 100644 --- a/web/include/nav/system_group_detail.xml +++ b/web/include/nav/system_group_detail.xml @@ -1,8 +1,7 @@ <?xml version="1.0"?> <rhn-navi-tree label="system_group_detail" invisible="1" formvar="sgid" title-depth="1"> <rhn-tab name="Details"> - <rhn-tab-url>/network/systems/groups/details.pxt</rhn-tab-url> - <rhn-tab-url>/network/systems/groups/delete_confirm.pxt</rhn-tab-url> + <rhn-tab-url>/rhn/groups/GroupDetail.do</rhn-tab-url> </rhn-tab> <rhn-tab name="Systems"> <rhn-tab-url>/rhn/groups/ListRemoveSystems.do</rhn-tab-url> diff --git a/web/modules/sniglets/Sniglets/ListView/SystemGroupList.pm b/web/modules/sniglets/Sniglets/ListView/SystemGroupList.pm index 1a68166..bfdaa6a 100644 --- a/web/modules/sniglets/Sniglets/ListView/SystemGroupList.pm +++ b/web/modules/sniglets/Sniglets/ListView/SystemGroupList.pm @@ -153,7 +153,7 @@ sub comparison_to_snapshot_provider { foreach my $group_name (sort {uc $a cmp uc $b} keys %all_groups) {
my $group = $all_groups{$group_name}; - my $url = PXT::HTML->link('/network/systems/groups/details.pxt?sgid=' . $group->{ID}, + my $url = PXT::HTML->link('/rhn/groups/GroupDetail.do?sgid=' . $group->{ID}, $group_name, );
commit 826ac169a222415099094ceec5d56bfd536c31e0 Author: Jan Dobes jdobes@redhat.com Date: Thu Dec 5 11:43:37 2013 +0100
converting system group details page to java
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml index bbe1f20..53b3b51 100644 --- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml +++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml @@ -132,4 +132,13 @@ ORDER BY UPPER(SG.name), SG.id </query> </mode>
+<mode name="group_errata_counts"> + <query params="sgid, org_id"> +SELECT SECURITY_ERRATA as se, BUG_ERRATA as be, ENHANCEMENT_ERRATA as ee + FROM rhnServerGroupOverview + WHERE org_id = :org_id + AND group_id = :sgid + </query> +</mode> + </datasource_modes> diff --git a/java/code/src/com/redhat/rhn/domain/server/ManagedServerGroup.java b/java/code/src/com/redhat/rhn/domain/server/ManagedServerGroup.java index 5b8bac9..4a08796 100644 --- a/java/code/src/com/redhat/rhn/domain/server/ManagedServerGroup.java +++ b/java/code/src/com/redhat/rhn/domain/server/ManagedServerGroup.java @@ -60,4 +60,15 @@ public class ManagedServerGroup extends ServerGroup { protected void setAssociatedAdmins(Set newUsers) { this.associatedAdmins = newUsers; } + + /** + * returns count of associated users for this group + * without permission check (we need this count for + * displaying to associated users which aren't system group + * admins - not the same thing!) + * @return count of associated users + */ + public int getAssociatedAdminsCount() { + return getAssociatedAdmins().size(); + } } diff --git a/java/code/src/com/redhat/rhn/frontend/action/groups/GroupDetailAction.java b/java/code/src/com/redhat/rhn/frontend/action/groups/GroupDetailAction.java new file mode 100644 index 0000000..5039105 --- /dev/null +++ b/java/code/src/com/redhat/rhn/frontend/action/groups/GroupDetailAction.java @@ -0,0 +1,61 @@ +/** + * 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.groups; + +import java.util.HashMap; + +import com.redhat.rhn.domain.server.ManagedServerGroup; +import com.redhat.rhn.domain.user.User; +import com.redhat.rhn.frontend.struts.RequestContext; +import com.redhat.rhn.frontend.struts.RhnAction; +import com.redhat.rhn.frontend.struts.RhnHelper; +import com.redhat.rhn.manager.system.ServerGroupManager; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + + +/** + * GroupDetailAction + * @version $Rev$ + */ +public class GroupDetailAction extends RhnAction { + + /** {@inheritDoc} */ + @Override + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + RequestContext rctx = new RequestContext(request); + + User user = rctx.getLoggedInUser(); + ManagedServerGroup sg = rctx.lookupAndBindServerGroup(); + HashMap errataCounts = + (HashMap) ServerGroupManager.getInstance().errataCounts(user, sg); + + request.setAttribute("id", sg.getId()); + request.setAttribute("errata_counts", errataCounts); + request.setAttribute("admin_count", sg.getAssociatedAdminsCount()); + request.setAttribute("system_count", sg.getCurrentMembers()); + request.setAttribute("name", sg.getName()); + request.setAttribute("description", sg.getDescription()); + + return mapping.findForward(RhnHelper.DEFAULT_FORWARD); + } +} 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 d5e9872..3a04505 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 @@ -5261,6 +5261,48 @@ value for this entitlement, excluding the default organization's consumption.</s <trans-unit id="systemgroup.systems.remove"> <source>Remove Systems</source> </trans-unit> + <trans-unit id="systemgroup.details.status"> + <source>System Group Status</source> + </trans-unit> + <trans-unit id="systemgroup.details.updates"> + <source>Updates:</source> + </trans-unit> + <trans-unit id="systemgroup.details.criticalupdates"> + <source>critical updates available</source> + </trans-unit> + <trans-unit id="systemgroup.details.someupdates"> + <source>updates available</source> + </trans-unit> + <trans-unit id="systemgroup.details.noupdates"> + <source>No applicable errata</source> + </trans-unit> + <trans-unit id="systemgroup.details.none"> + <source>(none)</source> + </trans-unit> + <trans-unit id="systemgroup.details.properties"> + <source>System Group Properties</source> + </trans-unit> + <trans-unit id="systemgroup.details.editproperties"> + <source>Edit These Properties</source> + </trans-unit> + <trans-unit id="systemgroup.details.admins"> + <source>Admins:</source> + </trans-unit> + <trans-unit id="systemgroup.details.manageadmins"> + <source>Edit group administrators</source> + </trans-unit> + <trans-unit id="systemgroup.details.systems"> + <source>Systems:</source> + </trans-unit> + <trans-unit id="systemgroup.details.name"> + <source>Name:</source> + </trans-unit> + <trans-unit id="systemgroup.details.description"> + <source>Description:</source> + </trans-unit> + <trans-unit id="systemgroup.details.admincount"> + <source>group administrator(s)</source> + </trans-unit> </group> <group> <context-group name="ctx"> diff --git a/java/code/src/com/redhat/rhn/manager/system/ServerGroupManager.java b/java/code/src/com/redhat/rhn/manager/system/ServerGroupManager.java index 2cf59cd..10262fb 100644 --- a/java/code/src/com/redhat/rhn/manager/system/ServerGroupManager.java +++ b/java/code/src/com/redhat/rhn/manager/system/ServerGroupManager.java @@ -14,6 +14,7 @@ */ package com.redhat.rhn.manager.system;
+import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import com.redhat.rhn.common.hibernate.LookupException; @@ -424,4 +425,21 @@ public class ServerGroupManager { public List<Long> listInactiveServers(ServerGroup sg, Long threshold) { return ServerGroupFactory.listInactiveServerIds(sg, threshold); } + + /** + * Returns counts of applicable errata to given server group. + * @param user the user to get org from + * @param group the server group object to get counts + * @return map with counts of security, bugfix and enhancement errata + */ + public Map errataCounts(User user, ServerGroup group) { + SelectMode m = ModeFactory.getMode("SystemGroup_queries", "group_errata_counts"); + Map params = new HashMap(); + params.put("org_id", user.getOrg().getId()); + params.put("sgid", group.getId()); + + DataResult result = m.execute(params); + + return (Map) result.get(0); + } } diff --git a/java/code/webapp/WEB-INF/pages/groups/detail.jsp b/java/code/webapp/WEB-INF/pages/groups/detail.jsp new file mode 100644 index 0000000..1064e6f --- /dev/null +++ b/java/code/webapp/WEB-INF/pages/groups/detail.jsp @@ -0,0 +1,104 @@ +<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> +<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> +<%@ taglib uri="http://rhn.redhat.com/tags/list" prefix="rl" %> +<html> +<head> + <meta name="page-decorator" content="none" /> +</head> +<body> + +<%@ include file="/WEB-INF/pages/common/fragments/groups/header.jspf" %> + +<div class="row-0"> +<div class="col-md-6"> +<div class="panel panel-default"> + +<div class="panel-heading"> + <h3><bean:message key="systemgroup.details.status"/></h3> +</div> + +<div class="panel-body"> +<table class="table"> + <tr> + <th><bean:message key="systemgroup.details.updates"/></th> + <td> + <div class="system-status"> + <c:if test="${errata_counts['se'] > 0}"> + <i class="fa fa-exclamation-circle fa-1-5x text-danger"></i> + <span class="system-status-critical-updates"><bean:message key="systemgroup.details.criticalupdates"/></span> + <a class="btn btn-danger" href="/network/systems/groups/errata_list.pxt?sgid=${id}">${errata_counts['se']} <i class="fa fa-arrow-right"></i></a> + </c:if> + <c:if test="${(errata_counts['se'] == 0) && ((errata_counts['be'] > 0) || (errata_counts['ee'] > 0))}"> + <i class="fa fa-exclamation-triangle fa-1-5x text-warning"></i> + <span class="system-status-updates"><bean:message key="systemgroup.details.someupdates"/></span> + <a class="btn btn-warning" href="/network/systems/groups/errata_list.pxt?sgid=${id}"><i class="fa fa-arrow-right"></i></a> + </c:if> + <c:if test="${(errata_counts['se'] == 0) && (errata_counts['be'] == 0) && (errata_counts['ee'] == 0)}"> + <i class="fa fa-check-circle fa-1-5x text-success"></i> + <span class="system-status-up-to-date"><bean:message key="systemgroup.details.noupdates"/></span> + </c:if> + </div> + </td> + </tr> + <tr> + <th><bean:message key="systemgroup.details.admins"/></th> + <td> + <c:if test="${admin_count > 0}"> + ${admin_count} <bean:message key="systemgroup.details.admincount"/> + </c:if> + <c:if test="${admin_count == 0}"> + <span class="no-details"><bean:message key="systemgroup.details.none"/></span> + </c:if> + <br /> + + <rhn:require acl="user_role(org_admin) or user_role(system_group_admin)"> + <br /> + <a href="/network/systems/groups/admin_list.pxt?sgid=${id}"><bean:message key="systemgroup.details.manageadmins"/></a> + </rhn:require> + </td> + </tr> + <tr> + <th><bean:message key="systemgroup.details.systems"/></th> + <td> + <c:if test="${system_count > 0}"> + <a class="btn btn-info" href="/rhn/groups/ListRemoveSystems.do?sgid=${id}">${system_count} <i class="fa fa-arrow-right"></i></a> + </c:if> + <c:if test="${system_count == 0}"> + <span class="no-details"><bean:message key="systemgroup.details.none"/></span> + </c:if> + </td> + </tr> +</table> +</div> +</div> +</div> + +<div class="col-md-6"> +<div class="panel panel-default"> +<div class="panel-heading"> + <h3><bean:message key="systemgroup.details.properties"/> + <rhn:require acl="user_role(org_admin) or user_role(system_group_admin)"> + (<a href="/network/systems/groups/edit_properties.pxt?sgid=${id}"><bean:message key="systemgroup.details.editproperties"/></a>) + </rhn:require></h3> +</div> + +<div class="panel-body"> +<table class="table"> + <tr> + <th><bean:message key="systemgroup.details.name"/></th> + <td>${name}</td> + </tr> + <tr> + <th valign="top"><bean:message key="systemgroup.details.description"/></th> + <td>${description}</td> + </tr> +</table> +</div> +</div> +</div> +</div> + +</body> +</html> diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml index f5f3637..48e51ee 100644 --- a/java/code/webapp/WEB-INF/struts-config.xml +++ b/java/code/webapp/WEB-INF/struts-config.xml @@ -3881,6 +3881,15 @@ </action>
+ <action path="/groups/GroupDetail" + scope="request" + type="com.redhat.rhn.frontend.action.groups.GroupDetailAction" + className="com.redhat.rhn.frontend.struts.RhnActionMapping"> + <set-property property="postRequiredIfSubmitted" value="true" /> + <forward name="default" + path="/WEB-INF/pages/groups/detail.jsp" /> + </action> + <action path="/groups/ListRemoveSystems" scope="request" type="com.redhat.rhn.frontend.action.groups.ListRemoveSystemsAction"
spacewalk-commits@lists.fedorahosted.org