modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/AlertConditionMessages.java | 60 -------- modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/AlertMessages.java | 70 ++++++++++ modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/description/ControlDescriber.java | 7 - modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions.xhtml | 25 +-- modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/alertDefinitionProperties.xhtml | 10 + modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions.xhtml | 32 ++-- modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listConditions.xhtml | 38 ++--- modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/viewAlert.xhtml | 28 +++- modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java | 3 9 files changed, 153 insertions(+), 120 deletions(-)
New commits: commit f3d2b483a01c8771e106c407f4af8473bb1e61fb Author: Heiko W. Rupp hwr@redhat.com Date: Thu Feb 25 17:11:43 2010 +0100
BZ 535432 suppress 'null' is the condition has no name, which is the case for availability.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java index c21bf21..0f48f9e 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java @@ -907,7 +907,8 @@ public class AlertManagerBean implements AlertManagerLocal, AlertManagerRemote { builder.append(condition.getName()).append(' '); } } else { - builder.append(condition.getName()).append(' '); + if (category.getName()!=null) // this is null for e.g. availability + builder.append(condition.getName()).append(' '); }
// next format the RHS
commit 95ab39239a9d3d2f4081a49c8edcdc51acdacbfc Merge: c8338b8... 3705350... Author: Heiko W. Rupp hwr@redhat.com Date: Thu Feb 25 14:31:21 2010 +0100
Merge branch 'master' into alertPlugin
commit c8338b898b50fbfe86e07d4c25cba30deb9c3139 Merge: a99099e... 4714eb8... Author: Justin Harris jharris@redhat.com Date: Wed Feb 24 12:24:53 2010 -0500
Merge remote branch 'origin/alertPlugin' into bugz
commit a99099ea48d165b4a272949d2fce9e2815a3b061 Author: Justin Harris jharris@redhat.com Date: Wed Feb 24 12:21:04 2010 -0500
Fix for BZ 561900
Adding in length and null value validation for alert definition names.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/AlertConditionMessages.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/AlertConditionMessages.java deleted file mode 100644 index 62a6fc0..0000000 --- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/AlertConditionMessages.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2010 Red Hat, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -package org.rhq.enterprise.gui.alert; - -import java.text.MessageFormat; -import java.util.Map; -import org.jboss.seam.ScopeType; -import org.jboss.seam.annotations.In; -import org.jboss.seam.annotations.Name; -import org.jboss.seam.annotations.Scope; - -@Scope(ScopeType.APPLICATION) -@Name("alertConditionMessages") -public class AlertConditionMessages { - - @In - private Map<String, String> messages; - - public String getThreshold() { - return translate("errors.double", "Threshold"); - } - - public String getPercentRange() { - return translate("errors.range", "Threshold", "0%", "1000%"); - } - - public String getDampeningCount() { - return translate("errors.integer", "Dampening Count"); - } - - public String getDampeningEvaluation() { - return translate("errors.integer", "Dampening Evaluations"); - } - - public String getTimePeriod() { - return translate("errors.integer", "Time Period"); - } - - private String translate(String key, Object... params) { - String message = messages.get(key); - - return MessageFormat.format(message, params); - } -} \ No newline at end of file diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/AlertMessages.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/AlertMessages.java new file mode 100644 index 0000000..79062ef --- /dev/null +++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/AlertMessages.java @@ -0,0 +1,70 @@ +/* + * RHQ Management Platform + * Copyright (C) 2005-2010 Red Hat, Inc. + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +package org.rhq.enterprise.gui.alert; + +import java.text.MessageFormat; +import java.util.Map; +import org.jboss.seam.ScopeType; +import org.jboss.seam.annotations.In; +import org.jboss.seam.annotations.Name; +import org.jboss.seam.annotations.Scope; + +@Scope(ScopeType.APPLICATION) +@Name("alertMessages") +public class AlertMessages { + + @In + private Map<String, String> messages; + + public String getNameRequired() { + String name = translate("alerts.config.DefinitionList.ListHeader.AlertName"); + return translate("errors.required", name); + } + + public String getNameLength() { + String name = translate("alerts.config.DefinitionList.ListHeader.AlertName"); + return translate("errors.maxlength", name); + } + + public String getThreshold() { + return translate("errors.double", "Threshold"); + } + + public String getPercentRange() { + return translate("errors.range", "Threshold", "0%", "1000%"); + } + + public String getDampeningCount() { + return translate("errors.integer", "Dampening Count"); + } + + public String getDampeningEvaluation() { + return translate("errors.integer", "Dampening Evaluations"); + } + + public String getTimePeriod() { + return translate("errors.integer", "Time Period"); + } + + private String translate(String key, Object... params) { + String message = messages.get(key); + + return MessageFormat.format(message, params); + } +} \ No newline at end of file diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/alertDefinitionProperties.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/alertDefinitionProperties.xhtml index 9439c5f..fd8e260 100644 --- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/alertDefinitionProperties.xhtml +++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/alertDefinitionProperties.xhtml @@ -17,7 +17,15 @@
<h:panelGrid columns="2" border="1" cellpadding="5" style="margin: 15px;"> <h:outputLabel for="alertNameInput" value="Name: " /> - <h:inputText id="alertNameInput" value="#{alertDefinition.name}" style="width: 300px;" /> + <h:inputText id="alertNameInput" + value="#{alertDefinition.name}" + style="width: 300px;" + maxlength="100" + required="true" + requiredMessage="#{alertMessages.nameRequired}" + validatorMessage="#{alertMessages.nameLength}"> + <f:validateLength maximum="100" /> + </h:inputText>
<h:outputLabel for="alertDescriptionInput" value="Description: " /> <h:inputTextarea id="alertDescriptionInput" value="#{alertDefinition.description}" style="width: 300px;" /> diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listConditions.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listConditions.xhtml index a5500e4..2000efd 100644 --- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listConditions.xhtml +++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listConditions.xhtml @@ -170,9 +170,9 @@ value="#{alertDefinition.alertDampening.value}" size="4" required="true" - requiredMessage="#{alertConditionMessages.dampeningCount}" - validatorMessage="#{alertConditionMessages.dampeningCount}" - converterMessage="#{alertConditionMessages.dampeningCount}"> + requiredMessage="#{alertMessages.dampeningCount}" + validatorMessage="#{alertMessages.dampeningCount}" + converterMessage="#{alertMessages.dampeningCount}"> <f:validateDoubleRange minimum="0" /> </h:inputText> <h:outputText value=" #{messages['alert.config.props.CB.Content.DampenConsecutiveCount.2']}" /> @@ -184,9 +184,9 @@ value="#{alertDefinition.alertDampening.value}" size="4" required="true" - requiredMessage="#{alertConditionMessages.dampeningCount}" - validatorMessage="#{alertConditionMessages.dampeningCount}" - converterMessage="#{alertConditionMessages.dampeningCount}"> + requiredMessage="#{alertMessages.dampeningCount}" + validatorMessage="#{alertMessages.dampeningCount}" + converterMessage="#{alertMessages.dampeningCount}"> <f:validateLongRange minimum="0" /> </h:inputText> <h:outputText value=" #{messages['alert.config.props.CB.Content.DampenPartialCount.2']} " /> @@ -194,9 +194,9 @@ value="#{alertDefinition.alertDampening.period}" size="4" required="true" - requiredMessage="#{alertConditionMessages.dampeningEvaluation}" - validatorMessage="#{alertConditionMessages.dampeningEvaluation}" - converterMessage="#{alertConditionMessages.dampeningEvaluation}"> + requiredMessage="#{alertMessages.dampeningEvaluation}" + validatorMessage="#{alertMessages.dampeningEvaluation}" + converterMessage="#{alertMessages.dampeningEvaluation}"> <f:validateLongRange minimum="0" /> </h:inputText> <h:outputText value=" #{messages['alert.config.props.CB.Content.DampenPartialCount.3']}" /> @@ -208,9 +208,9 @@ value="#{alertDefinition.alertDampening.value}" size="4" required="true" - requiredMessage="#{alertConditionMessages.dampeningCount}" - validatorMessage="#{alertConditionMessages.dampeningCount}" - converterMessage="#{alertConditionMessages.dampeningCount}"> + requiredMessage="#{alertMessages.dampeningCount}" + validatorMessage="#{alertMessages.dampeningCount}" + converterMessage="#{alertMessages.dampeningCount}"> <f:validateLongRange minimum="0" /> </h:inputText> <h:outputText value=" #{messages['alert.config.props.CB.Content.DampenDurationCount.2']} " /> @@ -218,9 +218,9 @@ value="#{alertDefinition.alertDampening.period}" size="4" required="true" - requiredMessage="#{alertConditionMessages.timePeriod}" - validatorMessage="#{alertConditionMessages.timePeriod}" - converterMessage="#{alertConditionMessages.timePeriod}"> + requiredMessage="#{alertMessages.timePeriod}" + validatorMessage="#{alertMessages.timePeriod}" + converterMessage="#{alertMessages.timePeriod}"> <f:validateLongRange minimum="0" /> </h:inputText> <h:selectOneMenu value="#{alertDefinition.alertDampening.periodUnits}"> @@ -341,8 +341,8 @@ <h:inputText id="metricThresholdAbsolute" value="#{alertConditionsUIBean.threshold}" required="true" - requiredMessage="#{alertConditionMessages.threshold}" - validatorMessage="#{alertConditionMessages.threshold}"> + requiredMessage="#{alertMessages.threshold}" + validatorMessage="#{alertMessages.threshold}"> <f:validateDoubleRange minimum="0.0" /> </h:inputText> <h:outputLabel for="metricThresholdAbsolute" value="#{messages['alert.config.props.CB.Content.AbsoluteValue']}" /> @@ -371,8 +371,8 @@ value="#{alertConditionsUIBean.currentCondition.threshold}" converter="#{metricPercentConverter}" required="true" - requiredMessage="#{alertConditionMessages.percentRange}" - validatorMessage="#{alertConditionMessages.percentRange}"> + requiredMessage="#{alertMessages.percentRange}" + validatorMessage="#{alertMessages.percentRange}"> <f:validateDoubleRange minimum="0.0" maximum="1000.0" /> </h:inputText> <h:outputLabel for="metricBaselinePercent" value=" #{messages['alert.config.props.CB.Content.Percent']} " /> diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/viewAlert.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/viewAlert.xhtml index a987e65..dd349a1 100644 --- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/viewAlert.xhtml +++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/viewAlert.xhtml @@ -77,8 +77,7 @@ </ui:define>
<ui:define name="body"> - <h:messages showDetail="true" - globalOnly="true" + <h:messages showSummary="true" infoClass="InfoBlock" warnClass="WarnBlock" errorClass="ErrorBlock"
commit 4714eb87aeeb6dce6a6ebcb7573bc80dafa3928d Merge: e25997a... 7f4d769... Author: Heiko W. Rupp hwr@redhat.com Date: Wed Feb 24 18:19:46 2010 +0100
Merge branch 'master' into alertPlugin
commit 38fb361e5cdb167bb5a947596586194d941e4221 Author: Justin Harris jharris@redhat.com Date: Wed Feb 24 10:55:35 2010 -0500
Fix for BZ 567375
Changed method of resource id lookup in control describer.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/description/ControlDescriber.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/description/ControlDescriber.java index bcf5d25..ab1bd8a 100644 --- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/description/ControlDescriber.java +++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/description/ControlDescriber.java @@ -18,9 +18,11 @@ */ package org.rhq.enterprise.gui.alert.description;
+import org.jboss.seam.Component; import org.rhq.core.domain.alert.AlertCondition; import org.rhq.core.domain.alert.AlertConditionCategory; import org.rhq.core.domain.operation.OperationDefinition; +import org.rhq.core.domain.resource.ResourceType; import org.rhq.enterprise.server.operation.OperationManagerLocal; import org.rhq.enterprise.server.util.LookupUtil;
@@ -53,12 +55,13 @@ public class ControlDescriber extends AlertConditionDescriber { private OperationDefinition getDefinition(AlertCondition condition) { OperationManagerLocal operationManager = LookupUtil.getOperationManager();
- Integer resourceTypeId = condition.getAlertDefinition().getResource().getResourceType().getId(); + // this is not a seam component, so look it up in the component contexts + ResourceType resourceType = (ResourceType)Component.getInstance("resourceType"); String operationName = condition.getName();
try { return operationManager.getOperationDefinitionByResourceTypeAndName( - resourceTypeId, operationName, false); + resourceType.getId(), operationName, false); } catch (Exception e) { return null; }
commit e25997a61a0e49e38768d20461afffb9d19a554e Merge: 33e3625... 1e8ab54... Author: Heiko W. Rupp hwr@redhat.com Date: Wed Feb 24 16:53:45 2010 +0100
Merge branch 'master' into alertPlugin
commit 33e3625f6e4383d2bf44e832452347fc08241b97 Author: Heiko W. Rupp hwr@redhat.com Date: Wed Feb 24 16:33:43 2010 +0100
Linking fixes for BZ 566896
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions.xhtml index 2e5a565..5768c23 100644 --- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions.xhtml +++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions.xhtml @@ -18,10 +18,10 @@ <ui:param name="pageTitle" value="List Alert Definitions for Group '#{ResourceGroupUIBean.name}'"/> <ui:param name="selectedTabName" value="Alert.Definitions"/> <ui:define name="content"> - + <h:form id="alertDefinitionsListForm"> <input type="hidden" name="groupId" value="${param.groupId}"/> - + <rich:panel styleClass="BlockContent"> <f:facet name="header"> <h:outputText value="Alert Definitions"/> @@ -48,12 +48,12 @@ <f:facet name="PageControlView"> <onc:paginationControl id="GroupAlertDefinitionsList" /> </f:facet> - + rich:column <f:facet name="header"> <onc:allSelect target="selectedAlertDefinitions" /> </f:facet> - + <onc:select name="selectedAlertDefinitions" value="#{item.id}" /> </rich:column>
@@ -63,25 +63,24 @@ <h:outputText styleClass="headerText" value="Name" /> </onc:sortableColumnHeader> </f:facet> - - <h:outputLink value="/alerts/Config.do"> - <f:param name="mode" value="viewRoles"/> + + <h:outputLink value="/rhq/resource/alert/viewAlert.xhtml"> <f:param name="groupId" value="#{param.groupId}"/> <f:param name="ad" value="#{item.id}"/> <h:outputText value="#{item.name}" /> </h:outputLink> </rich:column> - + rich:column <f:facet name="header"> <onc:sortableColumnHeader sort="a.description"> <h:outputText styleClass="headerText" value="Description" /> </onc:sortableColumnHeader> </f:facet> - + <h:outputText value="#{item.description}"/> </rich:column> - + rich:column <f:facet name="header"> <onc:sortableColumnHeader sort="a.ctime"> @@ -93,14 +92,14 @@ <f:converter converterId="UserDateTimeConverter" /> </h:outputText> </rich:column> - + rich:column <f:facet name="header"> <onc:sortableColumnHeader sort="a.enabled"> <h:outputText styleClass="headerText" value="Active" /> </onc:sortableColumnHeader> </f:facet> - + <h:outputText value="#{item.enabled}"/> </rich:column>
@@ -134,7 +133,7 @@ </rich:dataTable>
</h:panelGrid> - + </rich:panel> </h:form>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions.xhtml index 708f559..ef13121 100644 --- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions.xhtml +++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions.xhtml @@ -18,10 +18,10 @@ <ui:param name="pageTitle" value="List Alert Definitions for Resource '#{ResourceUIBean.name}'"/> <ui:param name="selectedTabName" value="Alert.Definitions"/> <ui:define name="content"> - + <h:form id="alertDefinitionsListForm"> <input type="hidden" name="id" value="${param.id}"/> - + <rich:panel styleClass="BlockContent"> <f:facet name="header"> <h:outputText value="Alert Definitions"/> @@ -48,12 +48,12 @@ <f:facet name="PageControlView"> <onc:paginationControl id="AlertDefinitionsList" /> </f:facet> - + rich:column <f:facet name="header"> <onc:allSelect target="selectedAlertDefinitions" /> </f:facet> - + <onc:select name="selectedAlertDefinitions" value="#{item.id}" /> </rich:column>
@@ -63,24 +63,24 @@ <h:outputText styleClass="headerText" value="Name" /> </onc:sortableColumnHeader> </f:facet> - + <h:outputLink value="/rhq/resource/alert/viewAlert.xhtml"> <f:param name="id" value="#{Resource.id}"/> <f:param name="ad" value="#{item.id}"/> <h:outputText value="#{item.name}" /> </h:outputLink> </rich:column> - + rich:column <f:facet name="header"> <onc:sortableColumnHeader sort="a.description"> <h:outputText styleClass="headerText" value="Description" /> </onc:sortableColumnHeader> </f:facet> - + <h:outputText value="#{item.description}"/> </rich:column> - + rich:column <f:facet name="header"> <onc:sortableColumnHeader sort="a.ctime"> @@ -92,14 +92,14 @@ <f:converter converterId="UserDateTimeConverter" /> </h:outputText> </rich:column> - + rich:column <f:facet name="header"> <onc:sortableColumnHeader sort="a.enabled"> <h:outputText styleClass="headerText" value="Active" /> </onc:sortableColumnHeader> </f:facet> - + <h:outputText value="#{item.enabled}"/> </rich:column>
@@ -107,15 +107,13 @@ <f:facet name="header"> <h:outputText styleClass="headerText" value="Parent" /> </f:facet> - - <h:outputLink value="/alerts/Config.do" rendered="#{item.parentId ne 0}"> - <f:param name="mode" value="viewRoles"/> + + <h:outputLink value="http://localhost:7080/rhq/resource/alert/viewAlert.xhtml" rendered="#{item.parentId ne 0}"> <f:param name="type" value="#{item.resource.resourceType.id}"/> - <f:param name="from" value="#{item.id}"/> <f:param name="ad" value="#{item.parentId}"/> <h:outputText value="View Template" /> </h:outputLink> - + <h:outputLink value="/alerts/Config.do" rendered="#{not empty item.groupAlertDefinition}"> <f:param name="mode" value="viewRoles"/> <f:param name="groupId" value="#{item.groupAlertDefinition.resourceGroup.id}"/> @@ -129,7 +127,7 @@ <f:facet name="header"> <h:outputText styleClass="headerText" value="Read Only" /> </f:facet> - + <h:outputText value="N/A" rendered="#{item.parentId eq 0 and empty item.groupAlertDefinition}"/> <h:outputText value="#{item.readOnly}" rendered="#{item.parentId ne 0 or not empty item.groupAlertDefinition}"/> </rich:column> @@ -167,7 +165,7 @@ </rich:dataTable>
</h:panelGrid> - + </rich:panel> </h:form>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/viewAlert.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/viewAlert.xhtml index a987e65..75a1d50 100644 --- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/viewAlert.xhtml +++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/viewAlert.xhtml @@ -19,6 +19,9 @@ <c:when test="#{not empty param.type}"> <c:set var="title" value="Definition for '#{alertDefinition.name}' on resource type '#{ResourceTypeUIBean.name}'"/> </c:when> + <c:when test="#{not empty param.groupId}"> + <c:set var="title" value="Definition for '#{alertDefinition.name}' on group '#{ResourceGroupUIBean.name}'"/> + </c:when> <c:otherwise> <c:set var="title" value="Definition for '#{alertDefinition.name}' on resource '#{alertDefinition.resource.name}'"/> </c:otherwise> @@ -55,18 +58,25 @@ <h:outputText>Alert Definitions</h:outputText> </h:outputLink> <h:outputText> > </h:outputText> - <h:outputLink value="viewAlert.xhtml"> - <f:param name="ad" value="#{alertDefinition.id}" /> - <h:outputText value=" Definition for '#{alertDefinition.name}' "/> - </h:outputLink> <c:choose> <c:when test="#{not empty param.type}"> - <h:outputText> on resource type </h:outputText> + <h:outputText value=" Definition for alert template '#{alertDefinition.name}' "/> + <h:outputText> on Resource Type </h:outputText> <h:outputLink value="/rhq/admin/listAlertTemplates.xhtml?type=${param.type}"> <h:outputText value=" #{ResourceTypeUIBean.name}"/> </h:outputLink> </c:when> + <c:when test="#{not empty param.groupId}"> + <h:outputText> on resource group </h:outputText> + <h:outputLink value="/rhq/group/alert/listGroupAlertDefinitions.xhtml?groupId=${param.groupId}"> + <h:outputText value=" #{ResourceGroupUIBean.name}"/> + </h:outputLink> + </c:when> <c:otherwise> + <h:outputLink value="viewAlert.xhtml"> + <f:param name="ad" value="#{alertDefinition.id}" /> + <h:outputText value=" Definition for '#{alertDefinition.name}' "/> + </h:outputLink> <h:outputText> on resource </h:outputText> <h:outputLink value="/rhq/resource/summary/overview.xhtml"> <f:param name="id" value="#{alertDefinition.resource.id}" /> @@ -196,6 +206,11 @@ <h:outputText value="Back to Alert Definitions for Resource Type '#{ResourceTypeUIBean.name}'"/> </h:outputLink> </c:when> + <c:when test="#{not empty param.groupId}"> + <h:outputLink value="/rhq/group/alert/listGroupAlertDefinitions.xhtml?groupId=${param.groupId}"> + <h:outputText value="Back to Alert Definitions for Resource Group '#{ResourceGroupUIBean.name}'"/> + </h:outputLink> + </c:when> <c:otherwise> <h:outputLink value="/rhq/resource/alert/listAlertDefinitions.xhtml"> <f:param name="id" value="#{alertDefinition.resource.id}"/>
rhq-commits@lists.fedorahosted.org