java/code/src/com/redhat/rhn/frontend/taglibs/IconTag.java | 62 ++++------
java/code/webapp/WEB-INF/includes/legends/errata-legend.jsp | 6
java/code/webapp/WEB-INF/includes/legends/probes-list-legend.jsp | 10 -
java/code/webapp/WEB-INF/includes/legends/system-group-legend.jsp | 6
java/code/webapp/WEB-INF/includes/legends/system-legend.jsp | 24 +--
java/code/webapp/WEB-INF/includes/legends/yourrhn-legend.jsp | 26 ++--
java/code/webapp/WEB-INF/pages/common/fragments/systems/group_listdisplay.jspf | 2
java/code/webapp/WEB-INF/pages/common/fragments/yourrhn/systemGroups.jsp | 2
java/code/webapp/WEB-INF/pages/groups/detail.jsp | 6
java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp | 6
10 files changed, 72 insertions(+), 78 deletions(-)
New commits:
commit 14fea5fcdec801ecb3dcebe24b2d08288e21207d
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Tue Dec 10 13:10:14 2013 +0100
bootstrap tuning: use new icon tag
diff --git a/java/code/webapp/WEB-INF/includes/legends/errata-legend.jsp b/java/code/webapp/WEB-INF/includes/legends/errata-legend.jsp
index 21c65a9..21a8ab4 100644
--- a/java/code/webapp/WEB-INF/includes/legends/errata-legend.jsp
+++ b/java/code/webapp/WEB-INF/includes/legends/errata-legend.jsp
@@ -3,8 +3,8 @@
<div class="sideleg">
<h4><bean:message key="errata-legend.jsp.title"/></h4>
<ul>
- <li><i class="fa fa-shield fa-1-5x"></i><bean:message key="errata-legend.jsp.security"/></li>
- <li><i class="fa fa-bug fa-1-5x"></i><bean:message key="errata-legend.jsp.bugfix"/></li>
- <li><i class="fa fa-1-5x spacewalk-icon-enhancement"></i><bean:message key="errata-legend.jsp.enhancement"/></li>
+ <li><rhn:icon type="errata-security" /><bean:message key="errata-legend.jsp.security"/></li>
+ <li><rhn:icon type="errata-bugfix" /><bean:message key="errata-legend.jsp.bugfix"/></li>
+ <li><rhn:icon type="errata-enhancement" /><bean:message key="errata-legend.jsp.enhancement"/></li>
</ul>
</div>
diff --git a/java/code/webapp/WEB-INF/includes/legends/probes-list-legend.jsp b/java/code/webapp/WEB-INF/includes/legends/probes-list-legend.jsp
index 6425102..f7b3fff 100644
--- a/java/code/webapp/WEB-INF/includes/legends/probes-list-legend.jsp
+++ b/java/code/webapp/WEB-INF/includes/legends/probes-list-legend.jsp
@@ -3,19 +3,19 @@
<div class="sideleg">
<h4><bean:message key="probes-list-legend.jsp.title"/></h4>
<ul>
- <li><i class="fa fa-1-5x spacewalk-icon-health text-success"></i>
+ <li><rhn:icon type="monitoring-ok" />
<bean:message key="probes-list-legend.jsp.ok"/>
</li>
- <li><i class="fa fa-1-5x spacewalk-icon-health text-warning"></i>
+ <li><rhn:icon type="monitoring-warn" />
<bean:message key="probes-list-legend.jsp.warning"/>
</li>
- <li><i class="fa fa-1-5x spacewalk-icon-health text-danger"></i>
+ <li><rhn:icon type="monitoring-crit" />
<bean:message key="probes-list-legend.jsp.critical"/>
</li>
- <li><i class="fa fa-1-5x spacewalk-icon-health-unknown"></i>
+ <li><rhn:icon type="monitoring-unknown" />
<bean:message key="probes-list-legend.jsp.unknown"/>
</li>
- <li><i class="fa fa-1-5x spacewalk-icon-health-pending"></i>
+ <li><rhn:icon type="monitoring-pending" />
<bean:message key="probes-list-legend.jsp.pending"/>
</li>
</ul>
diff --git a/java/code/webapp/WEB-INF/includes/legends/system-group-legend.jsp b/java/code/webapp/WEB-INF/includes/legends/system-group-legend.jsp
index 4930bf0..be4d95d 100644
--- a/java/code/webapp/WEB-INF/includes/legends/system-group-legend.jsp
+++ b/java/code/webapp/WEB-INF/includes/legends/system-group-legend.jsp
@@ -3,8 +3,8 @@
<div class="sideleg">
<h4><bean:message key="system-group-legend.jsp.title"/></h4>
<ul>
- <li><i class="fa fa-check-circle fa-1-5x text-success"></i><bean:message key="system-group-legend.jsp.fully"/></li>
- <li><i class="fa fa-exclamation-circle fa-1-5x text-danger"></i><bean:message key="system-group-legend.jsp.updates"/></li>
- <li><i class="fa fa-exclamation-triangle fa-1-5x text-warning"></i><bean:message key="system-group-legend.jsp.critical"/></li>
+ <li><rhn:icon type="system-ok" /><bean:message key="system-group-legend.jsp.fully"/></li>
+ <li><rhn:icon type="system-crit"><bean:message key="system-group-legend.jsp.updates"/></li>
+ <li><rhn:icon type="system-warn"><bean:message key="system-group-legend.jsp.critical"/></li>
</ul>
</div>
diff --git a/java/code/webapp/WEB-INF/includes/legends/system-legend.jsp b/java/code/webapp/WEB-INF/includes/legends/system-legend.jsp
index 4738a39..4715244 100644
--- a/java/code/webapp/WEB-INF/includes/legends/system-legend.jsp
+++ b/java/code/webapp/WEB-INF/includes/legends/system-legend.jsp
@@ -4,23 +4,23 @@
<div class="sideleg">
<h4><bean:message key="system-legend.jsp.title"/></h4>
<ul>
- <li><i class="fa fa-check-circle fa-1-5x text-success"></i><bean:message key="system-legend.jsp.fully"/></li>
- <li><i class="fa fa-exclamation-circle fa-1-5x text-danger"></i><bean:message key="system-legend.jsp.critical"/></li>
- <li><i class="fa fa-exclamation-triangle fa-1-5x text-warning"></i><bean:message key="system-legend.jsp.updates"/></li>
- <li><i class="fa fa-1-5x spacewalk-icon-unknown-system"></i><bean:message key="system-legend.jsp.notcheckingin"/></li>
+ <li><rhn:icon type="system-ok" /><bean:message key="system-legend.jsp.fully"/></li>
+ <li><rhn:icon type="system-crit" /><bean:message key="system-legend.jsp.critical"/></li>
+ <li><rhn:icon type="system-warn" /><bean:message key="system-legend.jsp.updates"/></li>
+ <li><rhn:icon type="system-unknown" /><bean:message key="system-legend.jsp.notcheckingin"/></li>
<rhn:require acl="org_entitlement(sw_mgr_enterprise)">
- <li><i class="fa fa-1-5x spacewalk-icon-locked-system"></i><bean:message key="system-legend.jsp.locked"/></li>
+ <li><rhn:icon type="system-locked" /><bean:message key="system-legend.jsp.locked"/></li>
</rhn:require>
<rhn:require acl="org_entitlement(rhn_provisioning)">
- <li><i class="fa fa-rocket fa-1-5x"></i><bean:message key="system-legend.jsp.kickstarting"/></li>
+ <li><rhn:icon type="system-kickstarting" /><bean:message key="system-legend.jsp.kickstarting"/></li>
</rhn:require>
- <li><i class="fa fa-clock-o fa-1-5x"></i><bean:message key="system-legend.jsp.pending"/></li>
- <li><i class="fa fa-1-5x spacewalk-icon-Unentitled"></i><bean:message key="system-legend.jsp.unentitled"/></li>
+ <li><rhn:icon type="actions-pending" /><bean:message key="system-legend.jsp.pending"/></li>
+ <li><rhn:icon type="system-unentitled" /><bean:message key="system-legend.jsp.unentitled"/></li>
<rhn:require acl="org_entitlement(rhn_monitor)">
- <li><i class="fa fa-1-5x spacewalk-icon-monitoring-status"></i><bean:message key="system-legend.jsp.monitoring"/></li>
+ <li><rhn:icon type="monitoring-status" /><bean:message key="system-legend.jsp.monitoring"/></li>
</rhn:require>
- <li><i class="fa fa-1-5x spacewalk-icon-virtual-host"></i><bean:message key="systemlist.jsp.virthost"/></li>
- <li><i class="fa fa-1-5x spacewalk-icon-virtual-guest"></i><bean:message key="systemlist.jsp.virtguest"/></li>
- <li><i class="fa fa-desktop fa-1-5x"></i><bean:message key="systemlist.jsp.nonvirt"/></li>
+ <li><rhn:icon type="system-virt-host" /><bean:message key="systemlist.jsp.virthost"/></li>
+ <li><rhn:icon type="system-virt-guest" /><bean:message key="systemlist.jsp.virtguest"/></li>
+ <li><rhn:icon type="system-physical" /><bean:message key="systemlist.jsp.nonvirt"/></li>
</ul>
</div>
diff --git a/java/code/webapp/WEB-INF/includes/legends/yourrhn-legend.jsp b/java/code/webapp/WEB-INF/includes/legends/yourrhn-legend.jsp
index b2ef929..bba804f 100644
--- a/java/code/webapp/WEB-INF/includes/legends/yourrhn-legend.jsp
+++ b/java/code/webapp/WEB-INF/includes/legends/yourrhn-legend.jsp
@@ -4,24 +4,24 @@
<div class="sideleg">
<h4><bean:message key="yourrhn-legend.jsp.title" /></h4>
<ul>
- <li><i class="fa fa-check-circle fa-1-5x text-success"></i><bean:message key="system-legend.jsp.fully" /></li>
- <li><i class="fa fa-exclamation-circle fa-1-5x text-danger"></i><bean:message key="system-legend.jsp.critical" /></li>
- <li><i class="fa fa-exclamation-triangle fa-1-5x text-warning"></i><bean:message key="system-legend.jsp.updates" /></li>
- <li><i class="fa fa-1-5x spacewalk-icon-unknown-system"></i><bean:message key="system-legend.jsp.notcheckingin" /></li>
+ <li><rhn:icon type="system-ok" /><bean:message key="system-legend.jsp.fully" /></li>
+ <li><rhn:icon type="system-crit" /><bean:message key="system-legend.jsp.critical" /></li>
+ <li><rhn:icon type="system-warn" /><bean:message key="system-legend.jsp.updates" /></li>
+ <li><rhn:icon type="system-unknown" /><bean:message key="system-legend.jsp.notcheckingin" /></li>
<rhn:require acl="org_entitlement(sw_mgr_enterprise)">
- <li><i class="fa fa-1-5x spacewalk-icon-locked-system"></i><bean:message key="system-legend.jsp.locked" /></li>
+ <li><rhn:icon type="system-locked" /><bean:message key="system-legend.jsp.locked" /></li>
</rhn:require>
<rhn:require acl="org_entitlement(rhn_provisioning)">
- <li><i class="fa fa-rocket fa-1-5x"></i><bean:message key="system-legend.jsp.kickstarting" /></li>
+ <li><rhn:icon type="system-kickstarting" /><bean:message key="system-legend.jsp.kickstarting" /></li>
</rhn:require>
- <li><i class="fa fa-clock-o fa-1-5x"></i><bean:message key="system-legend.jsp.pending" /></li>
- <li><i class="fa fa-times-circle-o fa-1-5x text-danger"></i><bean:message key="yourrhn-legend.jsp.failedactions" /></li>
- <li><i class="fa fa-check-circle-o fa-1-5x text-success"></i><bean:message key="yourrhn-legend.jsp.completedactions" /></li>
+ <li><rhn:icon type="actions-pending" /><bean:message key="system-legend.jsp.pending" /></li>
+ <li><rhn:icon type="actions-failed" /><bean:message key="yourrhn-legend.jsp.failedactions" /></li>
+ <li><rhn:icon type="actions-ok" /><bean:message key="yourrhn-legend.jsp.completedactions" /></li>
<rhn:require acl="show_monitoring();" mixins="com.redhat.rhn.common.security.acl.MonitoringAclHandler">
- <li><i class="fa fa-1-5x spacewalk-icon-monitoring-status"></i><bean:message key="system-legend.jsp.monitoring" /></li>
+ <li><rhn:icon type="monitoring-status" /><bean:message key="system-legend.jsp.monitoring" /></li>
</rhn:require>
- <li><i class="fa fa-shield fa-1-5x"></i><bean:message key="errata-legend.jsp.security" /></li>
- <li><i class="fa fa-bug fa-1-5x"></i><bean:message key="errata-legend.jsp.bugfix" /></li>
- <li><i class="fa fa-1-5x spacewalk-icon-enhancement"></i><bean:message key="errata-legend.jsp.enhancement" /></li>
+ <li><rhn:icon type="errata-security" /><bean:message key="errata-legend.jsp.security" /></li>
+ <li><rhn:icon type="errata-bugfix" /><bean:message key="errata-legend.jsp.bugfix" /></li>
+ <li><rhn:icon type="errata-enhance" /><bean:message key="errata-legend.jsp.enhancement" /></li>
</ul>
</div>
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 befbbd5..76dc5df 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
@@ -38,7 +38,7 @@
<i class="fa fa-warning text-warning" title="<bean:message key='grouplist.jsp.updates'/>"></i>
</c:when>
<c:otherwise>
- <i class="fa fa-check-circle fa-1-5x text-success" title="<bean:message key='grouplist.jsp.noerrata'/>"></i>
+ <rhn:icon type="system-ok" title="<bean:message key='grouplist.jsp.noerrata'/>" />
</c:otherwise>
</c:choose>
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 7b8c1c6..5dcd19b 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
@@ -24,7 +24,7 @@
<i class="fa fa-exclamation-circle fa-1-5x text-warning" title="<bean:message key='grouplist.jsp.updates'/>"></i>
</c:when>
<c:otherwise>
- <i class="fa fa-check-circle fa-1-5x text-success" title="<bean:message key='grouplist.jsp.noerrata'/>"></i>
+ <rhn:icon type="system-ok" title="<bean:message key='grouplist.jsp.noerrata'/>" />
</c:otherwise>
</c:choose>
</a>
diff --git a/java/code/webapp/WEB-INF/pages/groups/detail.jsp b/java/code/webapp/WEB-INF/pages/groups/detail.jsp
index 5b68d73..8816d20 100644
--- a/java/code/webapp/WEB-INF/pages/groups/detail.jsp
+++ b/java/code/webapp/WEB-INF/pages/groups/detail.jsp
@@ -26,17 +26,17 @@
<td>
<div class="system-status">
<c:if test="${errata_counts['se'] > 0}">
- <i class="fa fa-exclamation-circle fa-1-5x text-danger"></i>
+ <rhn:icon type="system-crit" />
<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>
+ <rhn:icon type="system-warn" />
<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>
+ <rhn:icon type="system-ok" />
<span class="system-status-up-to-date"><bean:message key="systemgroup.details.noupdates"/></span>
</c:if>
</div>
diff --git a/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp b/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp
index 20d03d6..2133762 100644
--- a/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp
@@ -27,10 +27,10 @@
<c:when test="${hasUpdates}">
<c:choose>
<c:when test="${criticalErrataCount > 0}">
- <i class="fa fa-exclamation-circle fa-1-5x text-danger"></i>
+ <rhn:icon type="system-crit" />
</c:when>
<c:otherwise>
- <i class="fa fa-exclamation-triangle fa-1-5x text-warning"></i>
+ <rhn:icon type="system-warn" />
</c:otherwise>
</c:choose>
@@ -48,7 +48,7 @@
</c:when>
<c:otherwise>
- <i class="fa fa-check-circle fa-1-5x text-success"></i> <bean:message key="sdc.details.overview.updated"/>
+ <rhn:icon type="system-ok" /> <bean:message key="sdc.details.overview.updated"/>
</c:otherwise>
</c:choose>
commit 5fd6cbb8d924412daa9513c2f030e072afc86a7a
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Tue Dec 10 13:08:47 2013 +0100
use static code for icons map in IconTag + typo and documentation fix
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/IconTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/IconTag.java
index b513c08..64bd363 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/IconTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/IconTag.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2009--2013 Red Hat, Inc.
+ * Copyright (c) 2013 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
@@ -26,9 +26,7 @@ import javax.servlet.jsp.tagext.TagSupport;
/**
* Tag to easy display the icons
* <pre>
- * <rhn:icon type="$type">
- * <c:out escapeXml="false" value="${message}" />
- * </rhn:messages>
+ * <rhn:icon type="$type" title="$title"/>
* </pre>
* @version $Rev$
*/
@@ -38,6 +36,32 @@ public class IconTag extends TagSupport {
private String title;
private static Map<String, String> icons;
+ static {
+ icons = new HashMap<String, String>();
+ icons.put("system-ok", "fa fa-check-circle fa-1-5x text-success");
+ icons.put("system-crit", "fa fa-exclamation-circle fa-1-5x text-danger");
+ icons.put("system-warn", "fa fa-exclamation-triangle fa-1-5x text-warning");
+ icons.put("system-unknown", "fa fa-1-5x spacewalk-icon-unknown-system");
+ icons.put("system-locked", "fa fa-1-5x spacewalk-icon-locked-system");
+ icons.put("system-kickstarting", "fa fa-rocket fa-1-5x");
+ icons.put("system-unentitled", "fa fa-1-5x spacewalk-icon-Unentitled");
+ icons.put("system-virt-host", "fa fa-1-5x spacewalk-icon-virtual-host");
+ icons.put("system-virt-guest", "fa fa-1-5x spacewalk-icon-virtual-guest");
+ icons.put("system-physical", "fa fa-desktop fa-1-5x");
+ icons.put("actions-pending", "fa fa-clock-o fa-1-5x");
+ icons.put("actions-ok", "fa fa-check-circle-o fa-1-5x text-success");
+ icons.put("actions-failed", "fa fa-times-circle-o fa-1-5x text-danger");
+ icons.put("errata-security", "fa fa-shield fa-1-5x");
+ icons.put("errata-bugfix", "fa fa-bug fa-1-5x");
+ icons.put("errata-enhance", "fa fa-1-5x spacewalk-icon-enhancement");
+ icons.put("monitoring-status", "fa fa-1-5x spacewalk-icon-monitoring-status");
+ icons.put("monitoring-ok", "fa fa-1-5x spacewalk-icon-health text-success");
+ icons.put("monitoring-warn", "fa fa-1-5x spacewalk-icon-health text-warning");
+ icons.put("monitoring-crit", "fa fa-1-5x spacewalk-icon-health text-danger");
+ icons.put("monitoring-unknown", "fa fa-1-5x spacewalk-icon-health-unknown");
+ icons.put("monitoring-pending", "fa fa-1-5x spacewalk-icon-health-pending");
+ }
+
/**
* Constructor for Icon tag.
*/
@@ -79,41 +103,11 @@ public class IconTag extends TagSupport {
return title;
}
- private void setUpSingleton() {
- if (icons == null) {
- icons = new HashMap<String, String>();
- icons.put("system-ok", "fa fa-check-circle fa-1-5x text-success");
- icons.put("system-crit", "fa fa-exclamation-circle fa-1-5x text-danger");
- icons.put("system-warn", "fa fa-exclamation-triangle fa-1-5x text-warning");
- icons.put("system-unknown", "fa fa-1-5x spacewalk-icon-unknown-system");
- icons.put("system-locked", "fa fa-1-5x spacewalk-icon-locked-system");
- icons.put("system-kickstarting", "fa fa-rocket fa-1-5x");
- icons.put("system-unentitled", "fa fa-1-5x spacewalk-icon-Unentitled");
- icons.put("system-virt-host", "fa fa-1-5x spacewalk-icon-virtual-host");
- icons.put("system-virt-guest", "fa fa-1-5x spacewalk-icon-virtual-guest");
- icons.put("system-physical", "fa fa-desktop fa-1-5x");
- icons.put("actions-pending", "fa fa-clock-o fa-1-5x");
- icons.put("actions-ok", "fa fa-check-circle-o fa-1-5x text-success");
- icons.put("action-failed", "fa fa-times-circle-o fa-1-5x text-danger");
- icons.put("errata-security", "fa fa-shield fa-1-5x");
- icons.put("errata-bugfix", "fa fa-bug fa-1-5x");
- icons.put("errata-enhance", "fa fa-1-5x spacewalk-icon-enhancement");
- icons.put("monitoring-status", "fa fa-1-5x spacewalk-icon-monitoring-status");
- icons.put("monitoring-ok", "fa fa-1-5x spacewalk-icon-health text-success");
- icons.put("monitoring-warn", "fa fa-1-5x spacewalk-icon-health text-warning");
- icons.put("monitoring-crit", "fa fa-1-5x spacewalk-icon-health text-danger");
- icons.put("monitoring-unknown", "fa fa-1-5x spacewalk-icon-health-unknown");
- icons.put("monitoring-pending", "fa fa-1-5x spacewalk-icon-health-pending");
- }
- }
-
/** {@inheritDoc}
* @throws JspException
*/
public int doStartTag() throws JspException {
- setUpSingleton();
-
if (!icons.containsKey(type)) {
throw new IllegalArgumentException("Unknown icon type: \"" + type + "\".");
}