[rhq] 2 commits - modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java | 59 --
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/cluster-plain-navigation.xml | 211 +++++++
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml | 1
modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/affinityGroupAgents-plain.xhtml | 288 +++++++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/affinityGroupServers-plain.xhtml | 290 +++++++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listAffinityGroups-plain.xhtml | 113 +++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listAgents-plain.xhtml | 138 ++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listPartitionEvents-plain.xhtml | 162 +++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listServers-plain.xhtml | 168 +++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewAffinityGroup-plain.xhtml | 291 ++++++++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewAgent-plain.xhtml | 203 ++++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewPartitionEvent-plain.xhtml | 130 ++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewServer-plain.xhtml | 206 +++++++
13 files changed, 2215 insertions(+), 45 deletions(-)
New commits:
commit 805562e28f654ad90f65c93e16ce2644707af6c3
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 12:38:14 2010 -0400
implement "plain" scheme using iframed-facelets for unimplemented administration > cluster section
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
index 469fda4..dc1bb5c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
@@ -249,15 +249,14 @@ public class AdministrationView extends HLayout implements BookmarkableView {
} else if ("Cluster".equals(section)) {
String url = null;
if ("Servers".equals(page)) {
- url = "/rhq/ha/listServers.xhtml";
+ url = "/rhq/ha/listServers-plain.xhtml";
} else if ("Agents".equals(page)) {
- url = "/rhq/ha/listAgents.xhtml";
+ url = "/rhq/ha/listAgents-plain.xhtml";
} else if ("Affinity Groups".equals(page)) {
- url = "/rhq/ha/listAffinityGroups.xhtml";
+ url = "/rhq/ha/listAffinityGroups-plain.xhtml";
} else if ("Partition Events".equals(page)) {
- url = "/rhq/ha/listPartitionEvents.xhtml";
+ url = "/rhq/ha/listPartitionEvents-plain.xhtml";
}
- url = addQueryStringParam(url, "nomenu=true");
content = new FullHTMLPane(url);
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/cluster-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/cluster-plain-navigation.xml
new file mode 100644
index 0000000..b51e6b2
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/cluster-plain-navigation.xml
@@ -0,0 +1,211 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- Server View/Edit -->
+ <navigation-rule>
+ <from-view-id>/rhq/ha/viewServer-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/ha/viewServer-plain.xhtml?mode=view&serverId=#{param.serverId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>edit</from-outcome>
+ <to-view-id>/rhq/ha/viewServer-plain.xhtml?mode=edit&serverId=#{param.serverId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/ha/viewServer-plain.xhtml?mode=view&serverId=#{param.serverId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Server List -->
+ <navigation-rule>
+ <from-view-id>/rhq/ha/listServers-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/ha/listServers-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/ha/listServers-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Agent View -->
+ <navigation-rule>
+ <from-view-id>/rhq/ha/viewAgent-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/ha/viewAgent-plain.xhtml?mode=view&agentId=#{param.agentId}&serverId=#{param.serverId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- AffinityGroup View/Edit -->
+ <navigation-rule>
+ <from-view-id>/rhq/ha/viewAffinityGroup-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>createSuccess</from-outcome>
+ <to-view-id>/rhq/ha/viewAffinityGroup-plain.xhtml?mode=view&affinityGroupId=#{ViewAffinityGroupDetailsUIBean.affinityGroup.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancelCreate</from-outcome>
+ <to-view-id>/rhq/ha/listAffinityGroups-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createFailure</from-outcome>
+ <to-view-id>/rhq/ha/viewAffinityGroup-plain.xhtml?mode=create</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/ha/viewAffinityGroup-plain.xhtml?mode=view&affinityGroupId=#{param.affinityGroupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>edit</from-outcome>
+ <to-view-id>/rhq/ha/viewAffinityGroup-plain.xhtml?mode=edit&affinityGroupId=#{param.affinityGroupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>addAgentToAffinityGroup</from-outcome>
+ <to-view-id>/rhq/ha/affinityGroupAgents-plain.xhtml?affinityGroupId=#{param.affinityGroupId}&mode=#{param.mode}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>editServers</from-outcome>
+ <to-view-id>/rhq/ha/affinityGroupServers-plain.xhtml?affinityGroupId=#{param.affinityGroupId}&mode=#{param.mode}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/ha/viewAffinityGroup-plain.xhtml?mode=view&affinityGroupId=#{param.affinityGroupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- AffinityGroup List -->
+ <navigation-rule>
+ <from-view-id>/rhq/ha/listAffinityGroups-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/ha/listAffinityGroups-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>create</from-outcome>
+ <to-view-id>/rhq/ha/viewAffinityGroup-plain.xhtml?mode=create</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/ha/listAffinityGroups-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Agent add/remove from group -->
+ <navigation-rule>
+ <from-view-id>/rhq/ha/affinityGroupAgents-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>successOrFailure</from-outcome>
+ <to-view-id>/rhq/ha/affinityGroupAgents-plain.xhtml?affinityGroupId=#{param.affinityGroupId}&mode=#{param.mode}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/ha/affinityGroupAgents-plain.xhtml?affinityGroupId=#{param.affinityGroupId}&mode=#{param.mode}</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Server add/remove from group -->
+ <navigation-rule>
+ <from-view-id>/rhq/ha/affinityGroupServers-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>successOrFailure</from-outcome>
+ <to-view-id>/rhq/ha/affinityGroupServers-plain.xhtml?affinityGroupId=#{param.affinityGroupId}&mode=#{param.mode}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/ha/affinityGroupServers-plain.xhtml?affinityGroupId=#{param.affinityGroupId}&mode=#{param.mode}</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- List PartitionEvents -->
+ <navigation-rule>
+ <from-view-id>/rhq/ha/listPartitionEvents-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/ha/listPartitionEvents-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/ha/listPartitionEvents-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- View PartitionEventDetails -->
+ <navigation-rule>
+ <from-view-id>/rhq/ha/viewPartitionEvent-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/ha/viewPartitionEvent-plain.xhtml?eventId=#{param.eventId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/ha/viewPartitionEvent-plain.xhtml?eventId=#{param.eventId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
index 1bcfe79..87580b6 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
@@ -163,6 +163,7 @@
/WEB-INF/jsf-navigation/test-navigation.xml,
/WEB-INF/jsf-navigation/alert-plain-navigation.xml,
+ /WEB-INF/jsf-navigation/cluster-plain-navigation.xml,
/WEB-INF/jsf-navigation/content-plain-navigation.xml,
/WEB-INF/jsf-navigation/events-plain-navigation.xml,
/WEB-INF/jsf-navigation/operation-plain-navigation.xml,
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/affinityGroupAgents-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/affinityGroupAgents-plain.xhtml
new file mode 100644
index 0000000..1943479
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/affinityGroupAgents-plain.xhtml
@@ -0,0 +1,288 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:param name="affinityGroupDetails" value="#{ViewAffinityGroupDetailsUIBean.affinityGroup}" />
+ <ui:param name="mode" value="#{param.mode}" />
+
+ <h:form id="subscribedAgentsForm">
+ <input type="hidden" name="affinityGroupId" value="#{param.affinityGroupId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Agents in this group"/>
+ </f:facet>
+
+ <ui:param name="subscribedAgentsDataModel" value="#{AffinityGroupSubscribedAgentsUIBean.dataModel}"/>
+ <rich:dataTable id="subscribedAgentsDataTable"
+ rows="#{PageControl.AffinityGroupSubscribedAgents.pageSize}"
+ value="#{subscribedAgentsDataModel}"
+ var="agentItem"
+ width="100%"
+ columnsWidth="1%, 15%, 10%, 10%, 10%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="AffinityGroupSubscribedAgents" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedAgentsToUnsubscribe" />
+ </f:facet>
+
+ <onc:select name="selectedAgentsToUnsubscribe" value="#{agentItem.id}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.id">
+ <h:outputText styleClass="headerText" value="ID" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.name">
+ <h:outputText styleClass="headerText" value="Agent Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewAgent-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="agentId" value="#{agentItem.id}"/>
+ <h:outputText value="#{agentItem.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.address">
+ <h:outputText styleClass="headerText" value="Bind Address" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.address}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.port">
+ <h:outputText styleClass="headerText" value="Bind Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.port}"/>
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.agentToken">
+ <h:outputText styleClass="headerText" value="Token" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.agentToken}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.lastAvailabilityReport">
+ <h:outputText styleClass="headerText" value="Last Availability Report" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.lastAvailabilityReport}">
+ <f:convertDateTime pattern="M/d/yy, h:mm:ss aa, zzz" timeZone="#{ServerInfoUIBean.timeZone}"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.status}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <!-- colspan 8:5 for the debug 'id' column -->
+ <rich:column colspan="#{param.debug ? 8 : 5}" width="100%">
+
+ <onc:selectCommandButton action="#{AffinityGroupSubscribedAgentsUIBean.unsubscribeAgents}"
+ value="REMOVE FROM GROUP" styleClass="on-pager-button buttonsmall"
+ target="selectedAgentsToUnsubscribe"/>
+
+ <ui:param name="paginationDataTableName" value="subscribedAgentsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{subscribedAgentsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AffinityGroupSubscribedAgents}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ <h:form id="unsubscribedAgentsForm">
+ <input type="hidden" name="affinityGroupId" value="#{param.affinityGroupId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Agents not part of an affinity group"/>
+ </f:facet>
+
+ <ui:param name="unsubscribedAgentsDataModel" value="#{AffinityGroupUnsubscribedAgentsUIBean.dataModel}"/>
+ <rich:dataTable id="unsubscribedAgentsDataTable"
+ rows="#{PageControl.AffinityGroupUnsubscribedAgents.pageSize}"
+ value="#{unsubscribedAgentsDataModel}"
+ var="agentItem"
+ width="100%"
+ columnsWidth="1%, 15%, 10%, 10%, 10%"
+ headerClass="tableRowHeader"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="AffinityGroupUnsubscribedAgents" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedAgentsToSubscribe" />
+ </f:facet>
+
+ <onc:select name="selectedAgentsToSubscribe" value="#{agentItem.id}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.id">
+ <h:outputText styleClass="headerText" value="ID" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.name">
+ <h:outputText styleClass="headerText" value="Agent Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewAgent-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="agentId" value="#{agentItem.id}"/>
+ <h:outputText value="#{agentItem.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.address">
+ <h:outputText styleClass="headerText" value="Bind Address" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.address}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.port">
+ <h:outputText styleClass="headerText" value="Bind Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.port}"/>
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.agentToken">
+ <h:outputText styleClass="headerText" value="Token" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.agentToken}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.lastAvailabilityReport">
+ <h:outputText styleClass="headerText" value="Last Availability Report" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.lastAvailabilityReport}">
+ <f:convertDateTime pattern="M/d/yy, h:mm:ss aa, zzz" timeZone="#{ServerInfoUIBean.timeZone}"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.status}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <!-- colspan 8:5 for the debug 'id' column -->
+ <rich:column colspan="#{param.debug ? 8 : 5}" width="100%">
+
+ <onc:selectCommandButton action="#{AffinityGroupUnsubscribedAgentsUIBean.subscribeAgents}"
+ value="ADD TO GROUP" styleClass="on-pager-button buttonsmall"
+ target="selectedAgentsToSubscribe"/>
+
+ <ui:param name="paginationDataTableName" value="unsubscribedAgentsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{unsubscribedAgentsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AffinityGroupUnsubscribedAgents}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ <h:outputLink value="viewAffinityGroup-plain.xhtml">
+ <h:outputText value="Return to Affinity Group"/>
+ <f:param name="affinityGroupId" value="#{param.affinityGroupId}"/>
+ <f:param name="mode" value="#{param.mode}"/>
+ </h:outputLink>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/affinityGroupServers-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/affinityGroupServers-plain.xhtml
new file mode 100644
index 0000000..79b86d7
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/affinityGroupServers-plain.xhtml
@@ -0,0 +1,290 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:param name="affinityGroupDetails" value="#{ViewAffinityGroupDetailsUIBean.affinityGroup}" />
+ <ui:param name="mode" value="#{param.mode}" />
+
+ <h:form id="subscribedServersForm">
+ <input type="hidden" name="affinityGroupId" value="#{param.affinityGroupId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Server Members"/>
+ </f:facet>
+
+ <ui:param name="subscribedServersDataModel" value="#{AffinityGroupSubscribedServersUIBean.dataModel}"/>
+ <rich:dataTable id="subscribedServersDataTable"
+ rows="#{PageControl.AffinityGroupSubscribedServers.pageSize}"
+ value="#{subscribedServersDataModel}"
+ var="serverItem"
+ width="100%"
+ columnsWidth="1%, 15%, 10%, 10%, 8%, 8%, 15%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="AffinityGroupSubscribedServers" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedServersToUnsubscribe" />
+ </f:facet>
+
+ <onc:select name="selectedServersToUnsubscribe" value="#{serverItem.id}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.id">
+ <h:outputText styleClass="headerText" value="ID" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.name">
+ <h:outputText styleClass="headerText" value="Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewServer-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="serverId" value="#{serverItem.id}"/>
+ <h:outputText value="#{serverItem.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.operationMode">
+ <h:outputText styleClass="headerText" value="Mode" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.operationMode}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.address">
+ <h:outputText styleClass="headerText" value="Endpoint Address" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.address}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.port">
+ <h:outputText styleClass="headerText" value="HTTP Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.port}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.securePort">
+ <h:outputText styleClass="headerText" value="Secure HTTPS Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.securePort}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.ctime">
+ <h:outputText styleClass="headerText" value="Last Update Time" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.ctime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <!-- colspan 8:7 for the debug 'id' column -->
+ <rich:column colspan="#{param.debug ? 8 : 7}" width="100%">
+
+ <onc:selectCommandButton action="#{AffinityGroupSubscribedServersUIBean.unsubscribeServers}"
+ value="REMOVE FROM GROUP" styleClass="on-pager-button buttonsmall"
+ target="selectedServersToUnsubscribe"/>
+
+ <ui:param name="paginationDataTableName" value="subscribedServersDataTable"/>
+ <ui:param name="paginationDataModel" value="#{subscribedServersDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AffinityGroupSubscribedServers}"/>
+ <ui:include src="../resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+
+ </h:form>
+
+ <h:form id="unsubscribedServersForm">
+ <input type="hidden" name="affinityGroupId" value="#{param.affinityGroupId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Server Members"/>
+ </f:facet>
+
+ <ui:param name="unsubscribedServersDataModel" value="#{AffinityGroupUnsubscribedServersUIBean.dataModel}"/>
+ <rich:dataTable id="unsubscribedServersDataTable"
+ rows="#{PageControl.AffinityGroupUnsubscribedServers.pageSize}"
+ value="#{unsubscribedServersDataModel}"
+ var="serverItem"
+ width="100%"
+ columnsWidth="1%, 15%, 10%, 10%, 8%, 8%, 15%"
+ headerClass="tableRowHeader"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="AffinityGroupUnsubscribedServers" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedServersToSubscribe" />
+ </f:facet>
+
+ <onc:select name="selectedServersToSubscribe" value="#{serverItem.id}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.id">
+ <h:outputText styleClass="headerText" value="ID" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.name">
+ <h:outputText styleClass="headerText" value="Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewServer-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="serverId" value="#{serverItem.id}"/>
+ <h:outputText value="#{serverItem.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.operationMode">
+ <h:outputText styleClass="headerText" value="Mode" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.operationMode}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.address">
+ <h:outputText styleClass="headerText" value="Endpoint Address" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.address}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.port">
+ <h:outputText styleClass="headerText" value="HTTP Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.port}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.securePort">
+ <h:outputText styleClass="headerText" value="Secure HTTPS Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.securePort}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.ctime">
+ <h:outputText styleClass="headerText" value="Last Update Time" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.ctime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <!-- colspan 8:7 for the debug 'id' column -->
+ <rich:column colspan="#{param.debug ? 8 : 7}" width="100%">
+
+ <onc:selectCommandButton action="#{AffinityGroupUnsubscribedServersUIBean.subscribeServers}"
+ value="ADD TO GROUP" styleClass="on-pager-button buttonsmall"
+ target="selectedServersToSubscribe"/>
+
+ <ui:param name="paginationDataTableName" value="unsubscribedServersDataTable"/>
+ <ui:param name="paginationDataModel" value="#{unsubscribedServersDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AffinityGroupUnsubscribedServers}"/>
+ <ui:include src="../resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+
+ </h:form>
+
+ <h:outputLink value="viewAffinityGroup-plain.xhtml">
+ <h:outputText value="Return to Affinity Group"/>
+ <f:param name="affinityGroupId" value="#{param.affinityGroupId}"/>
+ <f:param name="mode" value="#{param.mode}"/>
+ </h:outputLink>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listAffinityGroups-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listAffinityGroups-plain.xhtml
new file mode 100644
index 0000000..3756548
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listAffinityGroups-plain.xhtml
@@ -0,0 +1,113 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="affinityGroupsForm">
+ <input type="hidden" name="affinityGroupId" value="#{param.affinityGroupId}"/>
+
+ <rich:panel styleClass="BlockContent">
+
+ <ui:param name="affinityGroupsDataModel" value="#{ListAffinityGroupsUIBean.dataModel}"/>
+ <rich:dataTable id="affinityGroupsDataTable"
+ rows="#{PageControl.ListAffinityGroups.pageSize}"
+ value="#{affinityGroupsDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 15%, 10%, 10%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ListAffinityGroups" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedAffinityGroups" />
+ </f:facet>
+
+ <onc:select name="selectedAffinityGroups" value="#{item.affinityGroup.id}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="ag.id">
+ <h:outputText styleClass="headerText" value="ID" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.affinityGroup.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="ag.name">
+ <h:outputText styleClass="headerText" value="Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewAffinityGroup-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="affinityGroupId" value="#{item.affinityGroup.id}"/>
+ <h:outputText value="#{item.affinityGroup.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Agent Count" />
+ </f:facet>
+
+ <h:outputText value="#{item.agentCount}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Server Count" />
+ </f:facet>
+
+ <h:outputText value="#{item.serverCount}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <!-- colspan 5:4 for the debug 'id' column -->
+ <rich:column colspan="#{param.debug ? 5 : 4}" width="100%">
+ <h:commandButton action="#{ListAffinityGroupsUIBean.createNewAffinityGroup}"
+ value="CREATE NEW"
+ styleClass="on-pager-button buttonsmall"
+ rendered="${GlobalPermissionsUIBean.inventory}" />
+
+ <onc:selectCommandButton action="#{ListAffinityGroupsUIBean.deleteSelectedAffinityGroups}"
+ value="REMOVE SELECTED" target="selectedAffinityGroups"
+ styleClass="on-pager-button buttonsmall"
+ rendered="${GlobalPermissionsUIBean.inventory}" />
+
+ <ui:param name="paginationDataTableName" value="affinityGroupsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{affinityGroupsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ListAffinityGroups}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listAgents-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listAgents-plain.xhtml
new file mode 100644
index 0000000..e085d20
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listAgents-plain.xhtml
@@ -0,0 +1,138 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="AgentsListForm">
+
+ <rich:panel styleClass="BlockContent">
+
+ <ui:param name="agentsDataModel" value="#{ListAgentsUIBean.dataModel}"/>
+ <rich:dataTable id="agentsDataTable"
+ rows="#{PageControl.AgentsList.pageSize}"
+ value="#{agentsDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="15%, 15%, 10%, 10%, 10%, 10%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="AgentsList" />
+ </f:facet>
+
+ <rich:column rendered="false">
+ <f:facet name="header">
+ <onc:allSelect target="selectedAgents" />
+ </f:facet>
+
+ <onc:select name="selectedAgents" value="#{item.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.name">
+ <h:outputText styleClass="headerText" value="Agent Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewAgent-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="serverId" value="#{item.server.id}"/>
+ <f:param name="agentId" value="#{item.id}"/>
+ <h:outputText value="#{item.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.server.name">
+ <h:outputText styleClass="headerText" value="Connected Server" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewServer-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="serverId" value="#{item.server.id}"/>
+ <h:outputText value="#{item.server.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.address">
+ <h:outputText styleClass="headerText" value="Agent Bind Address" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.address}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.port">
+ <h:outputText styleClass="headerText" value="Agent Bind Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.port}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.lastAvailabilityReport">
+ <h:outputText styleClass="headerText" value="Last Availability Report" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.lastAvailabilityReport}">
+ <f:convertDateTime pattern="M/d/yy, h:mm:ss aa, zzz" timeZone="#{ServerInfoUIBean.timeZone}"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.affinityGroup">
+ <h:outputText styleClass="headerText" value="Affinity Group" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewAffinityGroup-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="affinityGroupId" value="#{item.affinityGroup.id}"/>
+ <h:outputText value="#{item.affinityGroup.name}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <!-- colspan 9:6 for the debug 'id' column -->
+ <rich:column colspan="6" width="100%">
+ <ui:param name="paginationDataTableName" value="agentsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{agentsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AgentsList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listPartitionEvents-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listPartitionEvents-plain.xhtml
new file mode 100644
index 0000000..29dfc51
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listPartitionEvents-plain.xhtml
@@ -0,0 +1,162 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="partitionEventsForm">
+
+ <rich:panel styleClass="BlockContent">
+
+ <h:panelGrid columns="4" cellspacing="3">
+ <h:outputLabel for="typeFilter" value="Type Filter: " />
+ <h:selectOneMenu id="typeFilter" value="#{ListPartitionEventsUIBean.typeFilter}"
+ style="width: 300px;">
+ <a4j:support event="onchange" reRender="partitionEventsDataTable, partitionEventsDataTableScroller"/>
+
+ <f:selectItems value="#{ListPartitionEventsUIBean.typeSelectItems}"/>
+ </h:selectOneMenu>
+ <rich:spacer/>
+ <rich:spacer/>
+
+ <h:outputLabel for="executionStatusFilter" value="Execution Status Filter: " />
+ <h:selectOneMenu id="executionStatusFilter" value="#{ListPartitionEventsUIBean.executionStatusFilter}"
+ style="width: 300px;">
+ <a4j:support event="onchange" reRender="partitionEventsDataTable, partitionEventsDataTableScroller"/>
+
+ <f:selectItems value="#{ListPartitionEventsUIBean.executionStatusSelectItems}"/>
+ </h:selectOneMenu>
+ <rich:spacer/>
+ <rich:spacer/>
+
+ <h:outputLabel for="detailsFilter" value="Details Filter: " />
+ <h:inputText id="detailsFilter" value="#{ListPartitionEventsUIBean.detailsFilter}"
+ onkeypress="return ignoreEnterKey(event);"
+ style="width: 300px;"/>
+ <a4j:commandButton value="GO" reRender="partitionEventsDataTable, partitionEventsDataTableScroller"
+ styleClass="buttonmed">
+ <s:defaultAction />
+ </a4j:commandButton>
+ <rich:spacer/>
+ </h:panelGrid>
+
+ <br/>
+
+ <ui:param name="partitionEventsDataModel" value="#{ListPartitionEventsUIBean.dataModel}"/>
+ <rich:dataTable id="partitionEventsDataTable"
+ rows="#{PageControl.ListPartitionEventsView.pageSize}"
+ value="#{partitionEventsDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 25%, 20%, 30% 10% 15%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ListPartitionEventsView" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedEvents" />
+ </f:facet>
+
+ <onc:select name="selectedEvents" value="#{item.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="pe.ctime">
+ <h:outputText styleClass="headerText" value="Execution Time" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.ctime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="pe.eventType">
+ <h:outputText styleClass="headerText" value="Type" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewPartitionEvent-plain.xhtml">
+ <f:param name="eventId" value="#{item.id}"/>
+ <h:outputText value="#{item.eventType}" />
+ </h:outputLink>
+
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="pe.eventDetail">
+ <h:outputText styleClass="headerText" value="Details" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.eventDetail}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="pe.subjectName">
+ <h:outputText styleClass="headerText" value="Initiated By" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.subjectName}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="pe.executionStatus">
+ <h:outputText styleClass="headerText" value="Execution Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.executionStatus}" />
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6" width="100%">
+ <onc:selectCommandButton action="#{ListPartitionEventsUIBean.removeSelectedEvents}"
+ value="REMOVE SELECTED" target="selectedEvents" styleClass="on-pager-button buttonsmall"
+ rendered="${GlobalPermissionsUIBean.inventory}" />
+ <h:commandButton action="#{ListPartitionEventsUIBean.purgeAllEvents}"
+ value="PURGE ALL" styleClass="on-pager-button buttonsmall"
+ rendered="${GlobalPermissionsUIBean.inventory}" />
+ <h:commandButton action="#{ListPartitionEventsUIBean.repartition}"
+ value="FORCE REPARTITION" styleClass="on-pager-button buttonsmall"
+ rendered="${GlobalPermissionsUIBean.inventory}" />
+
+ <ui:param name="paginationDataTableName" value="partitionEventsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{partitionEventsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ListPartitionEventsView}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listServers-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listServers-plain.xhtml
new file mode 100644
index 0000000..d3ddce8
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/listServers-plain.xhtml
@@ -0,0 +1,168 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="serversListForm">
+
+ <rich:panel styleClass="BlockContent">
+
+ <ui:param name="serversDataModel" value="#{ListServersUIBean.dataModel}"/>
+ <rich:dataTable id="serversDataTable"
+ rows="#{PageControl.ServersList.pageSize}"
+ value="#{serversDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 15%, 10%, 10%, 10%, 10%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ServersList" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedServers" />
+ </f:facet>
+
+ <onc:select name="selectedServers" value="#{item.server.id}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.id">
+ <h:outputText styleClass="headerText" value="ID" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.name">
+ <h:outputText styleClass="headerText" value="Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewServer-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="serverId" value="#{item.server.id}"/>
+ <h:outputText value="#{item.server.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.operationMode">
+ <h:outputText styleClass="headerText" value="Mode" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.operationMode}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.address">
+ <h:outputText styleClass="headerText" value="Endpoint Address" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.address}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.port">
+ <h:outputText styleClass="headerText" value="Nonsecure Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.port}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.securePort">
+ <h:outputText styleClass="headerText" value="Secure Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.securePort}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.mtime">
+ <h:outputText styleClass="headerText" value="Last Update Time" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.mtime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.affinityGroup">
+ <h:outputText styleClass="headerText" value="Affinity Group" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewAffinityGroup-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="affinityGroupId" value="#{item.server.affinityGroup.id}"/>
+ <h:outputText value="#{item.server.affinityGroup.name}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Agent Count" />
+ </f:facet>
+
+ <h:outputText value="#{item.agentCount}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <!-- colspan 10:9 for the debug 'id' column -->
+ <rich:column colspan="#{param.debug ? 10 : 9}" width="100%">
+ <onc:selectCommandButton action="#{ListServersUIBean.setSelectedServersModeNormal}"
+ value="SET NORMAL" target="selectedServers" styleClass="on-pager-button buttonsmall"/>
+ <onc:selectCommandButton action="#{ListServersUIBean.setSelectedServersModeMaintenance}"
+ value="SET MAINTENANCE" target="selectedServers" styleClass="on-pager-button buttonsmall"/>
+ <onc:selectCommandButton action="#{ListServersUIBean.removeSelectedServers}"
+ value="REMOVE SELECTED" target="selectedServers" styleClass="on-pager-button buttonsmall"/>
+
+ <ui:param name="paginationDataTableName" value="serversDataTable"/>
+ <ui:param name="paginationDataModel" value="#{serversDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ServersList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewAffinityGroup-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewAffinityGroup-plain.xhtml
new file mode 100644
index 0000000..968f4d8
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewAffinityGroup-plain.xhtml
@@ -0,0 +1,291 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:param name="affinityGroupDetails" value="#{ViewAffinityGroupDetailsUIBean.affinityGroup}" />
+ <ui:param name="mode" value="#{param.mode}" />
+
+ <h:form id="affinityGroupDetailsForm">
+ <input type="hidden" name="affinityGroupId" value="#{param.affinityGroupId}" />
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">Affinity Group Details</f:facet>
+ <table>
+ <tr>
+ <td align="right"><b>Name:</b></td>
+ <td align="left">
+ <h:outputText rendered="#{mode eq 'view'}" value="#{affinityGroupDetails.name}" />
+ <h:inputText rendered="#{mode eq 'edit' || mode eq 'create'}" value="#{affinityGroupDetails.name}" />
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+
+ <h:panelGrid columns="2" styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton rendered="#{mode eq 'view'}"
+ value="EDIT" action="#{ViewAffinityGroupDetailsUIBean.edit}"
+ alt="Edit" styleClass="buttonmed" id="editButton"/>
+ <h:commandButton rendered="#{mode eq 'edit'}"
+ value="SAVE" action="#{ViewAffinityGroupDetailsUIBean.save}"
+ alt="Save" styleClass="buttonmed" id="saveButton"/>
+ <h:commandButton rendered="#{mode eq 'edit'}"
+ value="CANCEL" action="#{ViewAffinityGroupDetailsUIBean.cancelEdit}" immediate="true"
+ alt="Cancel" styleClass="buttonmed" id="cancelEditButton"/>
+ <h:commandButton rendered="#{mode eq 'create'}"
+ value="CREATE" action="#{ViewAffinityGroupDetailsUIBean.createNew}"
+ alt="Create" styleClass="buttonmed" id="createButton"/>
+ <h:commandButton rendered="#{mode eq 'create'}"
+ value="CANCEL" action="#{ViewAffinityGroupDetailsUIBean.cancelCreate}" immediate="true"
+ alt="Cancel" styleClass="buttonmed" id="cancelCreateButton"/>
+ </h:panelGrid>
+ </h:form>
+
+ <h:form id="agentsForm" rendered="#{mode eq 'view'}">
+ <input type="hidden" name="affinityGroupId" value="#{param.affinityGroupId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Agent Members"/>
+ </f:facet>
+
+ <ui:param name="agentsDataModel" value="#{ViewAffinityGroupAgentMembersUIBean.dataModel}"/>
+ <rich:dataTable id="agentsDataTable"
+ rows="#{PageControl.AffinityGroupAgentMembersView.pageSize}"
+ value="#{agentsDataModel}"
+ var="agentItem"
+ width="100%"
+ columnsWidth="15%, 10%, 10%, 10%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="AffinityGroupAgentMembersView" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.name">
+ <h:outputText styleClass="headerText" value="Agent Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewAgent-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="agentId" value="#{agentItem.id}"/>
+ <h:outputText value="#{agentItem.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.address">
+ <h:outputText styleClass="headerText" value="Bind Address" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.address}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.port">
+ <h:outputText styleClass="headerText" value="Bind Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.port}"/>
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.agentToken">
+ <h:outputText styleClass="headerText" value="Token" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.agentToken}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.lastAvailabilityReport">
+ <h:outputText styleClass="headerText" value="Last Availability Report" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.lastAvailabilityReport}">
+ <f:convertDateTime pattern="M/d/yy, h:mm:ss aa, zzz" timeZone="#{ServerInfoUIBean.timeZone}"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{agentItem.status}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <!-- colspan 8:5 for the debug 'id' column -->
+ <rich:column colspan="#{param.debug ? 7 : 4}" width="100%">
+
+ <h:commandButton action="#{ViewAffinityGroupAgentMembersUIBean.addAgentToAffinityGroup}"
+ value="EDIT GROUP AGENTS" styleClass="on-pager-button buttonsmall"/>
+
+ <ui:param name="paginationDataTableName" value="agentsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{agentsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AffinityGroupAgentMembersView}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ <h:form id="serversForm" rendered="#{mode eq 'view'}">
+ <input type="hidden" name="affinityGroupId" value="#{param.affinityGroupId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Server Members"/>
+ </f:facet>
+
+ <ui:param name="serversDataModel" value="#{ViewAffinityGroupServerMembersUIBean.dataModel}"/>
+ <rich:dataTable id="serversDataTable"
+ rows="#{PageControl.AffinityGroupServerMembersView.pageSize}"
+ value="#{serversDataModel}"
+ var="serverItem"
+ width="100%"
+ columnsWidth="15%, 10%, 10%, 8%, 8%, 15%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="AffinityGroupServerMembersView" />
+ </f:facet>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.id">
+ <h:outputText styleClass="headerText" value="ID" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.name">
+ <h:outputText styleClass="headerText" value="Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewServer-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="serverId" value="#{serverItem.id}"/>
+ <h:outputText value="#{serverItem.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.operationMode">
+ <h:outputText styleClass="headerText" value="Mode" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.operationMode}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.address">
+ <h:outputText styleClass="headerText" value="Endpoint Address" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.address}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.port">
+ <h:outputText styleClass="headerText" value="HTTP Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.port}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.securePort">
+ <h:outputText styleClass="headerText" value="Secure HTTPS Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.securePort}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="s.ctime">
+ <h:outputText styleClass="headerText" value="Last Update Time" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{serverItem.ctime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <!-- colspan 8:7 for the debug 'id' column -->
+ <rich:column colspan="6" width="100%">
+
+ <h:commandButton action="#{ViewAffinityGroupServerMembersUIBean.editServers}"
+ value="EDIT GROUP SERVERS" styleClass="on-pager-button buttonsmall"/>
+
+ <ui:param name="paginationDataTableName" value="serversDataTable"/>
+ <ui:param name="paginationDataModel" value="#{serversDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AffinityGroupServerMembersView}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewAgent-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewAgent-plain.xhtml
new file mode 100644
index 0000000..ba854ac
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewAgent-plain.xhtml
@@ -0,0 +1,203 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:param name="agentDetails" value="#{ViewAgentUIBean.agent}" />
+ <ui:param name="mode" value="#{param.mode}" />
+
+ <h:form id="agentDetailsForm">
+ <input type="hidden" name="serverId" value="#{param.serverId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">Agent Details</f:facet>
+ <table>
+ <tr>
+ <td align="right"><b>Agent Name:</b></td>
+ <td align="left">
+ <h:outputText rendered="#{mode eq 'view'}" value="#{agentDetails.name}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Address:</b></td>
+ <td align="left">
+ <h:outputText rendered="#{mode eq 'view'}" value="#{agentDetails.address}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Port:</b></td>
+ <td align="left">
+ <h:outputText rendered="#{mode eq 'view'}" value="#{agentDetails.port}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Token:</b></td>
+ <td align="left">
+ <h:outputText rendered="#{mode eq 'view'}" value="#{agentDetails.agentToken}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Last Availability Report Date:</b></td>
+ <td align="left">
+ <h:outputText rendered="#{mode eq 'view'}" value="#{agentDetails.lastAvailabilityReport}">
+ <f:convertDateTime pattern="M/d/yy, h:mm:ss aa, zzz" timeZone="#{ServerInfoUIBean.timeZone}"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Affinity Group:</b></td>
+ <td align="left">
+ <h:outputLink rendered="#{mode eq 'view'}" value="viewAffinityGroup-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="affinityGroupId" value="#{agentDetails.affinityGroup.id}"/>
+ <h:outputText rendered="#{mode eq 'view'}" value="#{agentDetails.affinityGroup.name}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Current Server:</b></td>
+ <td align="left">
+ <h:outputLink rendered="#{mode eq 'view'}" value="viewServer-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="serverId" value="#{agentDetails.server.id}"/>
+ <h:outputText value="#{agentDetails.server.name}" />
+ </h:outputLink>
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+
+ </h:form>
+
+
+
+ <h:form id="failoverListForm" rendered="#{mode eq 'view'}">
+ <input type="hidden" name="agentId" value="#{param.agentId}"/>
+ <input type="hidden" name="serverId" value="#{param.serverId}"/>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Agent Failover List"/>
+ </f:facet>
+
+ <ui:param name="failoverListDataModel" value="#{ViewAgentUIBean.dataModel}"/>
+ <rich:dataTable id="failoverListDataTable"
+ rows="#{PageControl.AgentFailoverListView.pageSize}"
+ value="#{failoverListDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="20%, 16%, 16%, 16%, 16%, 16%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="AgentFailoverListView" />
+ </f:facet>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="fld.id">
+ <h:outputText styleClass="headerText" value="ID" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="fld.server.name">
+ <h:outputText styleClass="headerText" value="Server Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewServer-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="serverId" value="#{item.server.id}"/>
+ <h:outputText value="#{item.server.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="fld.server.operationMode">
+ <h:outputText styleClass="headerText" value="Mode" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.operationMode}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="fld.server.address">
+ <h:outputText styleClass="headerText" value="Endpoint Address" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.address}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="fld.server.port">
+ <h:outputText styleClass="headerText" value="HTTP Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.port}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="fld.server.securePort">
+ <h:outputText styleClass="headerText" value="Secure HTTPS Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.securePort}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="fld.server.mtime">
+ <h:outputText styleClass="headerText" value="Last Update Time" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.server.mtime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="#{param.debug ? 7 : 6}" width="100%">
+ <ui:param name="paginationDataTableName" value="failoverListDataTable"/>
+ <ui:param name="paginationDataModel" value="#{failoverListDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AgentFailoverListView}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewPartitionEvent-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewPartitionEvent-plain.xhtml
new file mode 100644
index 0000000..65def3a
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewPartitionEvent-plain.xhtml
@@ -0,0 +1,130 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="partitionEventForm">
+ <input type="hidden" name="eventId" value="#{param.eventId}"/>
+
+ <ui:param name="eventDetails" value="#{ViewPartitionEventUIBean.partitionEvent}" />
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Event Details"/>
+ </f:facet>
+ <table>
+ <tr>
+ <td align="right"><b>Event Execution Time:</b></td>
+ <td align="left">
+ <h:outputText value="#{eventDetails.ctime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Event Type:</b></td>
+ <td align="left">
+ <h:outputText value="#{eventDetails.eventType}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Event Details:</b></td>
+ <td align="left">
+ <h:outputText value="#{eventDetails.eventDetail}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Initiated By:</b></td>
+ <td align="left">
+ <h:outputText value="#{eventDetails.subjectName}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Execution Status:</b></td>
+ <td align="left">
+ <h:outputText value="#{eventDetails.executionStatus}"/>
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Agent Assignments"/>
+ </f:facet>
+
+ <ui:param name="partitionEventDataModel" value="#{ViewPartitionEventUIBean.dataModel}"/>
+
+ <h:outputText value="No agents were reassigned as a result of this partition event"
+ rendered="#{partitionEventDataModel.rowCount eq 0}"/>
+
+ <rich:dataTable rendered="#{partitionEventDataModel.rowCount gt 0}"
+ id="partitionEventDataTable"
+ rows="#{PageControl.PartitionEventsDetailsView.pageSize}"
+ value="#{partitionEventDataModel}"
+ var="item"
+ width="50%"
+ columnsWidth="50%, 50%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="PartitionEventsDetailsView" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="ped.agentName">
+ <h:outputText styleClass="headerText" value="Agent Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.agentName}"/>
+
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="ped.serverName">
+ <h:outputText styleClass="headerText" value="Server Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.serverName}"/>
+
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="2" width="100%">
+ <ui:param name="paginationDataTableName" value="partitionEventDataTable"/>
+ <ui:param name="paginationDataModel" value="#{partitionEventDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.PartitionEventsDetailsView}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ <h:outputLink value="listPartitionEvents-plain.xhtml">
+ <h:outputText value="Return to Partition Events List"/>
+ </h:outputLink>
+
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewServer-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewServer-plain.xhtml
new file mode 100644
index 0000000..f3b94ab
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/ha/viewServer-plain.xhtml
@@ -0,0 +1,206 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:param name="serverDetails" value="#{ViewServerUIBean.server}" />
+ <ui:param name="mode" value="#{param.mode}" />
+
+ <h:form id="serverDetailsForm">
+ <input type="hidden" name="serverId" value="#{param.serverId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">Server Details</f:facet>
+ <table>
+ <tr>
+ <td align="right"><b>Server Name:</b></td>
+ <td align="left">
+ <h:outputText value="#{serverDetails.name}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Address:</b></td>
+ <td align="left">
+ <h:outputText rendered="#{mode eq 'view'}" value="#{serverDetails.address}"/>
+ <h:inputText rendered="#{mode eq 'edit'}" value="#{serverDetails.address}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Port:</b></td>
+ <td align="left">
+ <h:outputText rendered="#{mode eq 'view'}" value="#{serverDetails.port}"/>
+ <h:inputText rendered="#{mode eq 'edit'}" value="#{serverDetails.port}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Secure Port:</b></td>
+ <td align="left">
+ <h:outputText rendered="#{mode eq 'view'}" value="#{serverDetails.securePort}"/>
+ <h:inputText rendered="#{mode eq 'edit'}" value="#{serverDetails.securePort}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Operation Mode:</b></td>
+ <td align="left">
+ <h:outputText value="#{serverDetails.operationMode}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Affinity Group:</b></td>
+ <td align="left">
+ <h:outputText value="#{serverDetails.affinityGroup.name}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Installation Date:</b></td>
+ <td align="left">
+ <h:outputText value="#{serverDetails.ctime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right"><b>Last Update Time:</b></td>
+ <td align="left">
+ <h:outputText value="#{serverDetails.mtime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+
+ <h:panelGrid columns="2" styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton rendered="#{mode eq 'view'}"
+ value="EDIT" action="#{ViewServerUIBean.edit}"
+ alt="Edit" styleClass="buttonmed" id="editButton"/>
+ <h:commandButton rendered="#{mode eq 'edit'}"
+ value="SAVE" action="#{ViewServerUIBean.save}"
+ alt="Save" styleClass="buttonmed" id="saveButton"/>
+ <h:commandButton rendered="#{mode eq 'edit'}"
+ value="CANCEL" action="#{ViewServerUIBean.cancel}" immediate="true"
+ alt="Cancel" styleClass="buttonmed" id="cancelButton"/>
+ </h:panelGrid>
+ </h:form>
+
+ <h:form id="connectedAgentsForm" rendered="#{mode eq 'view'}">
+ <input type="hidden" name="serverId" value="#{param.serverId}"/>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Connected Agents"/>
+ </f:facet>
+
+ <ui:param name="connectedAgentsDataModel" value="#{ViewServerUIBean.dataModel}"/>
+ <rich:dataTable id="connectedAgentsDataTable"
+ rows="#{PageControl.ServerConnectedAgentsView.pageSize}"
+ value="#{connectedAgentsDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 15%, 10%, 10%, 10%, 10%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ServerConnectedAgentsView" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedAgents" />
+ </f:facet>
+
+ <onc:select name="selectedAgents" value="#{item.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.name">
+ <h:outputText styleClass="headerText" value="Agent Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="viewAgent-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="agentId" value="#{item.id}"/>
+ <f:param name="serverId" value="#{param.serverId}"/>
+ <h:outputText value="#{item.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.address">
+ <h:outputText styleClass="headerText" value="Bind Address" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.address}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.port">
+ <h:outputText styleClass="headerText" value="Bind Port" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.port}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.lastAvailabilityReport">
+ <h:outputText styleClass="headerText" value="Last Availability Report" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.lastAvailabilityReport}">
+ <f:convertDateTime pattern="M/d/yy, h:mm:ss aa, zzz" timeZone="#{ServerInfoUIBean.timeZone}"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Affinity Group" />
+ </f:facet>
+
+ <h:outputLink value="viewAffinityGroup-plain.xhtml">
+ <f:param name="mode" value="view"/>
+ <f:param name="affinityGroupId" value="#{item.affinityGroup.id}"/>
+ <h:outputText value="#{item.affinityGroup.name}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <!-- colspan 9:6 for the debug 'id' column -->
+ <rich:column colspan="6" width="100%">
+ <ui:param name="paginationDataTableName" value="connectedAgentsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{connectedAgentsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ServerConnectedAgentsView}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit 9c6f7cd5ed5a619166ba67faf7042f59899c1677
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 12:37:25 2010 -0400
reformat, cosmetic
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
index 6eead0b..469fda4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/AdministrationView.java
@@ -49,11 +49,9 @@ public class AdministrationView extends HLayout implements BookmarkableView {
public static final String VIEW_PATH = "Administration";
-
private ViewId currentSectionViewId;
private ViewId currentPageViewId;
-
private SectionStack sectionStack;
private Canvas contentCanvas;
@@ -76,14 +74,12 @@ public class AdministrationView extends HLayout implements BookmarkableView {
sectionStack.setWidth(250);
sectionStack.setHeight100();
-
treeGrids.put("Security", buildSecuritySection());
treeGrids.put("Configuration", buildSystemConfigurationSection());
treeGrids.put("Cluster", buildManagementClusterSection());
treeGrids.put("Reports", buildReportsSection());
treeGrids.put("Security", buildSecuritySection());
-
for (final String name : treeGrids.keySet()) {
TreeGrid grid = treeGrids.get(name);
@@ -93,7 +89,6 @@ public class AdministrationView extends HLayout implements BookmarkableView {
}
});
-
SectionStackSection section = new SectionStackSection(name);
section.setExpanded(true);
section.addItem(grid);
@@ -101,23 +96,20 @@ public class AdministrationView extends HLayout implements BookmarkableView {
sectionStack.addSection(section);
}
-
addMember(sectionStack);
addMember(contentCanvas);
}
-
private HTMLFlow defaultView() {
- String contents = "<h1>Administration</h1>\n" +
- "From this section, the RHQ global settings can be administered. This includes configuring \n" +
- "<a href=\"\">Security</a>, setting up <a href=\"\">Plugins</a> and other stuff.";
+ String contents = "<h1>Administration</h1>\n"
+ + "From this section, the RHQ global settings can be administered. This includes configuring \n"
+ + "<a href=\"\">Security</a>, setting up <a href=\"\">Plugins</a> and other stuff.";
HTMLFlow flow = new HTMLFlow(contents);
flow.setPadding(20);
return flow;
}
-
private TreeGrid buildSecuritySection() {
final TreeGrid securityTreeGrid = new TreeGrid();
@@ -136,19 +128,14 @@ public class AdministrationView extends HLayout implements BookmarkableView {
final TreeNode remoteAgentInstall = new TreeNode("Remote Agent Install");
remoteAgentInstall.setIcon("global/Agent_16.png");
-
- tree.setRoot(new TreeNode("security",
- manageUsersNode,
- manageRolesNode,
- discoveryQueue,
- remoteAgentInstall));
+
+ tree.setRoot(new TreeNode("security", manageUsersNode, manageRolesNode, discoveryQueue, remoteAgentInstall));
securityTreeGrid.setData(tree);
return securityTreeGrid;
}
-
private TreeGrid buildManagementClusterSection() {
final TreeGrid mgmtClusterTreeGrid = new TreeGrid();
@@ -161,18 +148,14 @@ public class AdministrationView extends HLayout implements BookmarkableView {
final TreeNode manageAffinityGroupsNode = new TreeNode("Affinity Groups");
final TreeNode managePartitionEventsNode = new TreeNode("Partition Events");
- tree.setRoot(new TreeNode("clustering",
- manageServersNode,
- manageAgentsNode,
- manageAffinityGroupsNode,
- managePartitionEventsNode));
+ tree.setRoot(new TreeNode("clustering", manageServersNode, manageAgentsNode, manageAffinityGroupsNode,
+ managePartitionEventsNode));
mgmtClusterTreeGrid.setData(tree);
return mgmtClusterTreeGrid;
}
-
private TreeGrid buildSystemConfigurationSection() {
final TreeGrid systemConfigTreeGrid = new TreeGrid();
@@ -186,15 +169,14 @@ public class AdministrationView extends HLayout implements BookmarkableView {
final TreeNode manageLicense = new TreeNode("License");
final TreeNode managePlugins = new TreeNode("Plugins");
- tree.setRoot(new TreeNode("System Configuration",
- manageSettings, manageTemplates, manageDownloads, manageLicense, managePlugins));
+ tree.setRoot(new TreeNode("System Configuration", manageSettings, manageTemplates, manageDownloads,
+ manageLicense, managePlugins));
systemConfigTreeGrid.setData(tree);
return systemConfigTreeGrid;
}
-
private TreeGrid buildReportsSection() {
final TreeGrid reportsTreeGrid = new TreeGrid();
@@ -212,7 +194,6 @@ public class AdministrationView extends HLayout implements BookmarkableView {
return reportsTreeGrid;
}
-
public void setContent(Canvas newContent) {
if (contentCanvas.getChildren().length > 0)
@@ -222,7 +203,6 @@ public class AdministrationView extends HLayout implements BookmarkableView {
contentCanvas.markForRedraw();
}
-
private void renderContentView(ViewPath viewPath) {
currentSectionViewId = viewPath.getCurrent();
@@ -231,7 +211,6 @@ public class AdministrationView extends HLayout implements BookmarkableView {
String section = currentSectionViewId.getPath();
String page = currentPageViewId.getPath();
-
Canvas content = null;
if ("Reports".equals(section)) {
@@ -239,7 +218,6 @@ public class AdministrationView extends HLayout implements BookmarkableView {
content = new FullHTMLPane("/rhq/admin/report/resourceInstallReport-body.xhtml");
}
-
} else if ("Security".equals(section)) {
if ("Manage Users".equals(page)) {
@@ -268,7 +246,6 @@ public class AdministrationView extends HLayout implements BookmarkableView {
url = addQueryStringParam(url, "nomenu=true");
content = new FullHTMLPane(url);
-
} else if ("Cluster".equals(section)) {
String url = null;
if ("Servers".equals(page)) {
@@ -284,30 +261,24 @@ public class AdministrationView extends HLayout implements BookmarkableView {
content = new FullHTMLPane(url);
}
-
for (String name : treeGrids.keySet()) {
TreeGrid treeGrid = treeGrids.get(name);
if (name.equals(section)) {
-// treeGrid.setSelectedPaths(page);
+ // treeGrid.setSelectedPaths(page);
} else {
treeGrid.deselectAllRecords();
}
}
-
-
setContent(content);
-
if (content instanceof BookmarkableView) {
((BookmarkableView) content).renderView(viewPath.next().next());
}
-
}
-
public void renderView(ViewPath viewPath) {
if (!viewPath.isCurrent(currentSectionViewId) || !viewPath.isNext(currentPageViewId)) {
@@ -320,7 +291,6 @@ public class AdministrationView extends HLayout implements BookmarkableView {
}
}
-
}
private static String addQueryStringParam(String url, String param) {
13 years, 10 months
[rhq] modules/enterprise
by ips
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 0d845ab5f35094598072d401ced32debc832812a
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Aug 12 11:53:17 2010 -0400
minor improvements
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java
index 0015742..56f84b6 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java
@@ -267,10 +267,10 @@ public class ResourceSummaryView extends EnhancedDynamicForm implements Resource
setValue("name", resource.getName());
setValue("description", resource.getDescription());
setValue("location", resource.getLocation());
- setValue("version", resource.getVersion());
- setValue("parent", resource.getParentResource() == null ? null :
- ("<a href=\"#Resource/" + resource.getParentResource().getId() + "\">" +
- resource.getParentResource().getName() + "</a>"));
-
+ setValue("version", (resource.getVersion() != null) ? resource.getVersion() : "<i>none</i>");
+ Resource parentResource = resource.getParentResource();
+ setValue("parent", parentResource != null ?
+ ("<a href=\"#Resource/" + parentResource.getId() + "\">" +
+ parentResource.getName() + "</a>") : "<i>none</i>");
}
}
13 years, 10 months
[rhq] 2 commits - modules/core modules/enterprise
by ips
modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceComposite.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/FullHTMLPane.java | 7
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/EnhancedDynamicForm.java | 156 +++++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/TogglableTextItem.java | 61 +++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/ValueUpdatedHandler.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java | 10
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGroupGWTService.java | 7
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java | 19 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/OverviewView.java | 164 +++++++---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/InventoryView.java | 9
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSelectListener.java | 11
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java | 126 ++-----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceView.java | 81 ++--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/ResourceAlertHistoryView.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java | 12
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceOverviewView.java | 38 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java | 159 +++++++--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java | 35 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java | 12
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 64 +++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java | 10
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java | 20 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java | 38 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerLocal.java | 8
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerRemote.java | 20 +
25 files changed, 821 insertions(+), 264 deletions(-)
New commits:
commit aad7ce9eabe9d79aeb035bd17f98f2ef8ffa7410
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Aug 12 11:26:01 2010 -0400
fix logic that determines which resource tabs are enabled
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 68d92d5..1be470e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -202,46 +202,34 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
ResourcePermission permissions = this.resourceComposite.getResourcePermission();
ResourceFacets facets = this.resourceComposite.getResourceFacets();
- // TODO (ips): No perms should be needed to view Monitoring and Alerts tabs.
+ // Summary, Monitoring, Inventory, and Alerts tabs are always enabled.
- if (permissions.isMeasure()) {
- topTabSet.enableTab(monitoringTab);
- } else {
- topTabSet.disableTab(monitoringTab);
- }
+ monitoringTab.setSubTabEnabled("Call Time", facets.isCallTime());
- if (facets.isOperation() && permissions.isControl()) {
+ if (facets.isOperation()) {
topTabSet.enableTab(operationsTab);
} else {
topTabSet.disableTab(operationsTab);
}
- if (permissions.isAlert()) {
- topTabSet.enableTab(alertsTab);
- } else {
- topTabSet.disableTab(alertsTab);
- }
-
- if (!facets.isConfiguration() && permissions.isConfigureRead()) {
+ if (facets.isConfiguration() && permissions.isConfigureRead()) {
topTabSet.enableTab(configurationTab);
} else {
topTabSet.disableTab(configurationTab);
}
- if (facets.isEvent() && permissions.isMeasure()) {
+ if (facets.isEvent()) {
topTabSet.enableTab(eventsTab);
} else {
topTabSet.disableTab(eventsTab);
}
- if (facets.isContent() && permissions.isContent()) {
+ if (facets.isContent()) {
topTabSet.enableTab(contentTab);
} else {
topTabSet.disableTab(contentTab);
}
- // only enable "Call Time" sub-tab for those that implement it
- monitoringTab.setSubTabEnabled("Call Time", facets.isCallTime());
if (topTabSet.getSelectedTab().getDisabled()) {
topTabSet.selectTab(0);
commit d00cabef04eb1ae458a9dcf4b1f217e6d4c7b76e
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Aug 12 11:06:03 2010 -0400
add new EnhancedDynamicForm GWT component that supports fields that can be toggled back and forth between view and edit mode; add support for setting name, description, and location fields on both Resources and groups
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceComposite.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceComposite.java
index 96745a8..8b6f809 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceComposite.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceComposite.java
@@ -119,6 +119,10 @@ public class ResourceComposite implements Serializable {
return resourcePermission;
}
+ public void setResourcePermission(ResourcePermission resourcePermission) {
+ this.resourcePermission = resourcePermission;
+ }
+
@XmlTransient
public ResourceFacets getResourceFacets() {
return resourceFacets;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/FullHTMLPane.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/FullHTMLPane.java
index 3e8f61a..50ed0ae 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/FullHTMLPane.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/FullHTMLPane.java
@@ -26,10 +26,15 @@ import com.smartgwt.client.widgets.HTMLPane;
*/
public class FullHTMLPane extends HTMLPane {
- public FullHTMLPane(String url) {
+ public FullHTMLPane() {
setWidth100();
setHeight100();
setContentsType(ContentsType.PAGE);
+ }
+
+ public FullHTMLPane(String url) {
+ this();
setContentsURL(url);
}
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/EnhancedDynamicForm.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/EnhancedDynamicForm.java
new file mode 100644
index 0000000..02185e7
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/EnhancedDynamicForm.java
@@ -0,0 +1,156 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.components.form;
+
+import com.google.gwt.core.client.JavaScriptObject;
+import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.FormItemIfFunction;
+import com.smartgwt.client.widgets.form.fields.FormItem;
+import com.smartgwt.client.widgets.form.fields.FormItemIcon;
+import com.smartgwt.client.widgets.form.fields.StaticTextItem;
+import com.smartgwt.client.widgets.form.fields.TextItem;
+import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
+import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
+import com.smartgwt.client.widgets.form.fields.events.IconClickEvent;
+import com.smartgwt.client.widgets.form.fields.events.IconClickHandler;
+import com.smartgwt.client.widgets.form.fields.events.KeyPressEvent;
+import com.smartgwt.client.widgets.form.fields.events.KeyPressHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * TODO
+ *
+ * @author Ian Springer
+ */
+public class EnhancedDynamicForm extends DynamicForm {
+ public EnhancedDynamicForm(JavaScriptObject jsObj) {
+ super(jsObj);
+ }
+
+ public EnhancedDynamicForm() {
+ super();
+ }
+
+ @Override
+ protected void onDraw() {
+ super.onDraw();
+ setNumCols(4);
+ setColWidths("25%", "25%", "25%", "25%");
+ setWrapItemTitles(false);
+ setWidth("90%");
+ }
+
+ @Override
+ public void setItems(FormItem... items) {
+ List<FormItem> itemsList = new ArrayList<FormItem>();
+ List<String> togglableTextItemNames = new ArrayList<String>();
+ for (FormItem item : items) {
+ if (item instanceof TogglableTextItem) {
+ final TogglableTextItem togglableTextItem = (TogglableTextItem) item;
+ togglableTextItemNames.add(togglableTextItem.getName());
+
+ final StaticTextItem staticTextItem =
+ new StaticTextItem(getStaticTextItemName(togglableTextItem.getName()),
+ togglableTextItem.getTitle());
+ staticTextItem.setAttribute("editing", false);
+
+ FormItemIcon editIcon = new FormItemIcon();
+ editIcon.setName("Edit");
+ editIcon.setSrc("[SKIN]/actions/edit.png");
+ staticTextItem.setIcons(editIcon);
+ staticTextItem.setShowIcons(true);
+
+ staticTextItem.addIconClickHandler(new IconClickHandler() {
+ public void onIconClick(IconClickEvent iconClickEvent) {
+ if ("Edit".equals(iconClickEvent.getIcon().getName())) {
+ staticTextItem.setAttribute("editing", true);
+ markForRedraw();
+ }
+ }
+ });
+ staticTextItem.setShowIfCondition(new FormItemIfFunction() {
+ public boolean execute(FormItem formItem, Object o, DynamicForm dynamicForm) {
+ boolean editing = staticTextItem.getAttributeAsBoolean("editing");
+ return !editing;
+ }
+ });
+ staticTextItem.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
+ public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent clickEvent) {
+ staticTextItem.setAttribute("editing", true);
+ markForRedraw();
+ }
+ });
+ staticTextItem.setRedrawOnChange(true);
+ itemsList.add(staticTextItem);
+
+ togglableTextItem.addKeyPressHandler(new KeyPressHandler() {
+ public void onKeyPress(KeyPressEvent keyPressEvent) {
+ if (keyPressEvent.getKeyName().equals("Enter")) {
+ updateValue(staticTextItem, togglableTextItem);
+ }
+ }
+ });
+ togglableTextItem.addBlurHandler(new BlurHandler() {
+ public void onBlur(BlurEvent blurEvent) {
+ updateValue(staticTextItem, togglableTextItem);
+ }
+ });
+ togglableTextItem.setShowIfCondition(new FormItemIfFunction() {
+ public boolean execute(FormItem formItem, Object o, DynamicForm dynamicForm) {
+ boolean editing = staticTextItem.getAttributeAsBoolean("editing");
+ return editing;
+ }
+ });
+ itemsList.add(togglableTextItem);
+ } else {
+ itemsList.add(item);
+ }
+ }
+
+ super.setItems((FormItem[]) itemsList.toArray(new FormItem[itemsList.size()]));
+
+ // SmartGWT annoyingly barfs if getValue() is called on a form item before it's been added to a form, so
+ // we wait until after we've added all of the items to the form to set the values of the static items we
+ // added, because only at that point can we grab the values of the corresponding togglable items.
+ for (String name : togglableTextItemNames) {
+ String value = getValueAsString(name);
+ setValue(getStaticTextItemName(name), value);
+ }
+ }
+
+ private String getStaticTextItemName(String togglableTextItemName) {
+ return "static" + togglableTextItemName;
+ }
+
+ private void updateValue(StaticTextItem staticTextItem, TogglableTextItem textItem) {
+ String value = (String) textItem.getValue();
+ staticTextItem.setValue(value);
+ staticTextItem.setAttribute("editing", false);
+ for (ValueUpdatedHandler handler : textItem.getValueUpdatedHandlers()) {
+ handler.onValueUpdated(value);
+ }
+ markForRedraw();
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/TogglableTextItem.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/TogglableTextItem.java
new file mode 100644
index 0000000..399cb7e
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/TogglableTextItem.java
@@ -0,0 +1,61 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.components.form;
+
+import com.google.gwt.core.client.JavaScriptObject;
+import com.smartgwt.client.widgets.form.fields.TextItem;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * TODO
+ *
+ * @author Ian Springer
+ */
+public class TogglableTextItem extends TextItem {
+ List<ValueUpdatedHandler> valueUpdatedHandlers = new ArrayList<ValueUpdatedHandler>();
+
+ public TogglableTextItem() {
+ }
+
+ public TogglableTextItem(JavaScriptObject jsObj) {
+ super(jsObj);
+ }
+
+ public TogglableTextItem(String name) {
+ super(name);
+ }
+
+ public TogglableTextItem(String name, String title) {
+ super(name, title);
+ }
+
+ public void addValueUpdatedHandler(ValueUpdatedHandler handler) {
+ this.valueUpdatedHandlers.add(handler);
+ }
+
+ public List<ValueUpdatedHandler> getValueUpdatedHandlers() {
+ return valueUpdatedHandlers;
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/ValueUpdatedHandler.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/ValueUpdatedHandler.java
new file mode 100644
index 0000000..ac35115
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/ValueUpdatedHandler.java
@@ -0,0 +1,8 @@
+package org.rhq.enterprise.gui.coregui.client.components.form;
+
+/**
+ * @author Ian Springer
+ */
+public interface ValueUpdatedHandler {
+ void onValueUpdated(String newValue);
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java
index e7857cd..53741a9 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGWTService.java
@@ -29,6 +29,7 @@ import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.resource.InventoryStatus;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
@@ -39,6 +40,8 @@ public interface ResourceGWTService extends RemoteService {
PageList<Resource> findResourcesByCriteria(ResourceCriteria criteria);
+ PageList<ResourceComposite> findResourceCompositesByCriteria(ResourceCriteria criteria);
+
List<Resource> getResourceLineage(int resourceId);
List<Resource> getResourceLineageAndSiblings(int resourceId);
@@ -61,4 +64,11 @@ public interface ResourceGWTService extends RemoteService {
void ignoreResources(Integer[] resourceIds);
void unignoreResources(Integer[] resourceIds);
+
+ void updateResourceName(int resourceId, String name);
+
+ void updateResourceDescription(int resourceId, String description);
+
+ void updateResourceLocation(int resourceId, String location);
+
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGroupGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGroupGWTService.java
index 5644554..9134199 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGroupGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGroupGWTService.java
@@ -45,4 +45,11 @@ public interface ResourceGroupGWTService extends RemoteService {
ResourceGroup createResourceGroup(ResourceGroup group, int[] resourceIds);
void deleteResourceGroup(int groupId);
+
+ void updateResourceGroupName(int groupId, String name);
+
+ void updateResourceGroupDescription(int groupId, String description);
+
+ void updateResourceGroupLocation(int groupId, String location);
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 7ce294f..51c225a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -246,13 +246,17 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
}
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
- // Switch tabs directly, rather than letting the history framework do it, to avoid redrawing the outer views.
- selectTab(tabSelectedEvent.getId(), tabSelectedEvent.getSubTabId());
- String tabPath = "/" + tabSelectedEvent.getId() + "/" + tabSelectedEvent.getSubTabId();
- String path = "ResourceGroup/" + this.groupComposite.getResourceGroup().getId() + tabPath;
+ if (this.groupComposite == null) {
+ History.fireCurrentHistoryState();
+ } else {
+ // Switch tabs directly, rather than letting the history framework do it, to avoid redrawing the outer views.
+ selectTab(tabSelectedEvent.getId(), tabSelectedEvent.getSubTabId());
+ String tabPath = "/" + tabSelectedEvent.getId() + "/" + tabSelectedEvent.getSubTabId();
+ String path = "ResourceGroup/" + this.groupComposite.getResourceGroup().getId() + tabPath;
- // But still add an item to the history, specifying false to tell it not to fire an event.
- History.newItem(path, false);
+ // But still add an item to the history, specifying false to tell it not to fire an event.
+ History.newItem(path, false);
+ }
}
public void renderView(ViewPath viewPath) {
@@ -282,4 +286,5 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
tab.getLayout().selectTab(subtabName);
}
}
-}
\ No newline at end of file
+}
+
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/OverviewView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/OverviewView.java
index 57ecbcd..e9078cd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/OverviewView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/OverviewView.java
@@ -18,11 +18,10 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.inventory;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.widgets.HTMLFlow;
-import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.FormItem;
-import com.smartgwt.client.widgets.form.fields.SpacerItem;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
@@ -30,16 +29,25 @@ import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.group.GroupDefinition;
import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.components.form.EnhancedDynamicForm;
+import org.rhq.enterprise.gui.coregui.client.components.form.TogglableTextItem;
+import org.rhq.enterprise.gui.coregui.client.components.form.ValueUpdatedHandler;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGroupGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import java.util.ArrayList;
import java.util.Date;
+import java.util.List;
/**
- * The group Inventory>Overview tab.
+ * The group Inventory>Overview subtab.
*
* @author Ian Springer
*/
public class OverviewView extends VLayout {
+ private ResourceGroupGWTServiceAsync resourceGroupService = GWTServiceLookup.getResourceGroupService();
private ResourceGroupComposite groupComposite;
public OverviewView(ResourceGroupComposite groupComposite) {
@@ -51,31 +59,55 @@ public class OverviewView extends VLayout {
protected void onInit() {
super.onInit();
- ResourceGroup group = this.groupComposite.getResourceGroup();
+ final ResourceGroup group = this.groupComposite.getResourceGroup();
HLayout spacer = new HLayout();
spacer.setHeight(15);
addMember(spacer);
- DynamicForm generalPropsForm = new DynamicForm();
- generalPropsForm.setNumCols(4);
- generalPropsForm.setColWidths("25%", "25%", "25%", "25%");
- generalPropsForm.setWrapItemTitles(false);
- setWidth("90%");
+ final EnhancedDynamicForm generalPropsForm = new EnhancedDynamicForm();
- ArrayList<FormItem> formItems = new ArrayList<FormItem>();
- ArrayList<String> itemIds = new ArrayList<String>();
+ List<FormItem> formItems = new ArrayList<FormItem>();
+ // TODO: Uncomment the below header if we decide to add other stuff to this page besides the general props.
//HeaderItem headerItem = new HeaderItem("header", "General Properties");
//headerItem.setValue("General Properties");
- //formItems.add(headerItem);
+ //formItems.add(headerItem);
- StaticTextItem nameItem = new StaticTextItem("nameItem", "Name");
+ boolean dynamic = (group.getGroupDefinition() != null);
+
+ final FormItem nameItem = (dynamic) ? new StaticTextItem() : new TogglableTextItem();
+ nameItem.setName("name");
+ nameItem.setTitle("Name");
nameItem.setValue(group.getName());
+ if (nameItem instanceof TogglableTextItem) {
+ final TogglableTextItem togglableNameItem = (TogglableTextItem) nameItem;
+ togglableNameItem.addValueUpdatedHandler(new ValueUpdatedHandler() {
+ public void onValueUpdated(final String newName) {
+ final String oldName = group.getName();
+ OverviewView.this.resourceGroupService.updateResourceGroupName(group.getId(),
+ newName, new AsyncCallback<Void>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to change name of Resource group with id "
+ + group.getId()
+ + " from \"" + oldName + "\" to \"" + newName + "\".", caught);
+ // We failed to update it on the Server, so change back the form item to the original value.
+ nameItem.setValue(oldName);
+ }
+
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(new Message("Name of Resource group with id "
+ + group.getId() + " was changed from \""
+ + oldName + "\" to \"" + newName + "\".", Message.Severity.Info));
+ group.setName(newName);
+ }
+ });
+ }
+ });
+ }
formItems.add(nameItem);
- itemIds.add(nameItem.getName());
- StaticTextItem typeItem = new StaticTextItem("typeItem", "Member Type");
+ StaticTextItem typeItem = new StaticTextItem("memberType", "Member Type");
ResourceType type = group.getResourceType();
if (type != null) {
typeItem.setTooltip("Plugin: " + type.getPlugin() + "\n<br>" + "Type: " + type.getName());
@@ -84,56 +116,106 @@ public class OverviewView extends VLayout {
typeItem.setValue("<i>Mixed</i>");
}
formItems.add(typeItem);
- itemIds.add(typeItem.getName());
- StaticTextItem countItem = new StaticTextItem("countItem", "Member Count");
+ StaticTextItem countItem = new StaticTextItem("memberCount", "Member Count");
long memberCount = this.groupComposite.getImplicitUp() + this.groupComposite.getImplicitDown();
countItem.setValue(memberCount);
formItems.add(countItem);
- itemIds.add(countItem.getName());
- StaticTextItem descriptionItem = new StaticTextItem("descriptionItem", "Description");
- String description = group.getDescription();
- descriptionItem.setValue((description != null) ? description : "<i>none</i>");
+ final FormItem descriptionItem = (dynamic) ? new StaticTextItem() : new TogglableTextItem();
+ descriptionItem.setName("description");
+ descriptionItem.setTitle("Description");
+ descriptionItem.setValue(group.getDescription());
+ if (descriptionItem instanceof TogglableTextItem) {
+ final TogglableTextItem togglableDescriptionItem = (TogglableTextItem) descriptionItem;
+ togglableDescriptionItem.addValueUpdatedHandler(new ValueUpdatedHandler() {
+ public void onValueUpdated(final String newDescription) {
+ final String oldDescription = group.getDescription();
+ OverviewView.this.resourceGroupService.updateResourceGroupDescription(group.getId(),
+ newDescription, new AsyncCallback<Void>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to change description of Resource group with id "
+ + group.getId()
+ + " from \"" + oldDescription + "\" to \"" + newDescription + "\".", caught);
+ // We failed to update it on the Server, so change back the form item to the original value.
+ descriptionItem.setValue(oldDescription);
+ }
+
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(new Message("Description of Resource group with id "
+ + group.getId() + " was changed from \""
+ + oldDescription + "\" to \"" + newDescription + "\".", Message.Severity.Info));
+ group.setDescription(newDescription);
+ }
+ });
+ }
+ });
+ }
formItems.add(descriptionItem);
- itemIds.add(descriptionItem.getName());
- StaticTextItem dynamicItem = new StaticTextItem("dynamicItem", "Dynamic?");
- dynamicItem.setValue((group.getGroupDefinition() != null) ? "yes" : "no");
+ final FormItem locationItem = (dynamic) ? new StaticTextItem() : new TogglableTextItem();
+ locationItem.setName("location");
+ locationItem.setTitle("Location");
+ locationItem.setValue(group.getLocation());
+ if (locationItem instanceof TogglableTextItem) {
+ final TogglableTextItem togglableLocationItem = (TogglableTextItem) locationItem;
+ togglableLocationItem.addValueUpdatedHandler(new ValueUpdatedHandler() {
+ public void onValueUpdated(final String newLocation) {
+ final String oldLocation = group.getLocation();
+ OverviewView.this.resourceGroupService.updateResourceGroupLocation(group.getId(),
+ newLocation, new AsyncCallback<Void>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to change location of Resource group with id "
+ + group.getId()
+ + " from \"" + oldLocation + "\" to \"" + newLocation + "\".", caught);
+ // We failed to update it on the Server, so change back the form item to the original value.
+ locationItem.setValue(oldLocation);
+ }
+
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(new Message("Location of Resource group with id "
+ + group.getId() + " was changed from \""
+ + oldLocation + "\" to \"" + newLocation + "\".", Message.Severity.Info));
+ group.setLocation(newLocation);
+ }
+ });
+ }
+ });
+ }
+ formItems.add(locationItem);
+
+ StaticTextItem dynamicItem = new StaticTextItem("dynamic", "Dynamic?");
+ dynamicItem.setValue(dynamic ? "yes" : "no");
formItems.add(dynamicItem);
- itemIds.add(dynamicItem.getName());
- StaticTextItem recursiveItem = new StaticTextItem("recursiveItem", "Recursive?");
+ StaticTextItem recursiveItem = new StaticTextItem("recursive", "Recursive?");
recursiveItem.setValue((group.isRecursive()) ? "yes" : "no");
formItems.add(recursiveItem);
- itemIds.add(recursiveItem.getName());
- StaticTextItem createdItem = new StaticTextItem("createdItem", "Created");
+ StaticTextItem createdItem = new StaticTextItem("created", "Created");
createdItem.setValue(new Date(group.getCtime()));
formItems.add(createdItem);
- itemIds.add(createdItem.getName());
- StaticTextItem lastModifiedItem = new StaticTextItem("lastModifiedItem", "Last Modified");
+ StaticTextItem lastModifiedItem = new StaticTextItem("lastModified", "Last Modified");
lastModifiedItem.setValue(new Date(group.getMtime()));
formItems.add(lastModifiedItem);
- itemIds.add(lastModifiedItem.getName());
- StaticTextItem lastModifiedByItem = new StaticTextItem("lastModifiedByItem", "Last Modified By");
+ StaticTextItem lastModifiedByItem = new StaticTextItem("lastModifiedBy", "Last Modified By");
lastModifiedByItem.setValue(group.getModifiedBy());
formItems.add(lastModifiedByItem);
- itemIds.add(lastModifiedByItem.getName());
-
- StaticTextItem groupDefinitionItem = new StaticTextItem("groupDefinitionItem", "Group Definition");
- GroupDefinition groupDefinition = group.getGroupDefinition();
- // TODO (ips): Make this a link to the group def.
- groupDefinitionItem.setValue((groupDefinition != null) ? groupDefinition.getName() : "<i>none</i>");
- formItems.add(groupDefinitionItem);
- itemIds.add(groupDefinitionItem.getName());
+
+ if (dynamic) {
+ StaticTextItem groupDefinitionItem = new StaticTextItem("groupDefinition", "Group Definition");
+ GroupDefinition groupDefinition = group.getGroupDefinition();
+ // TODO (ips): Make this a link to the group def.
+ groupDefinitionItem.setValue(groupDefinition.getName());
+ formItems.add(groupDefinitionItem);
+ }
generalPropsForm.setItems(formItems.toArray(new FormItem[formItems.size()]));
addMember(generalPropsForm);
- if (groupDefinition != null) {
+ if (dynamic) {
spacer = new HLayout();
spacer.setHeight(10);
addMember(spacer);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/InventoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/InventoryView.java
index 2e2617e..70c5445 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/InventoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/InventoryView.java
@@ -34,8 +34,8 @@ import com.smartgwt.client.widgets.tree.TreeGrid;
import com.smartgwt.client.widgets.tree.TreeNode;
import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceCategory;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.ViewId;
@@ -50,7 +50,6 @@ public class InventoryView extends HLayout implements BookmarkableView {
public static final String VIEW_PATH = "Inventory";
-
private ViewId currentSectionViewId;
private ViewId currentPageViewId;
@@ -58,9 +57,9 @@ public class InventoryView extends HLayout implements BookmarkableView {
private Canvas currentContent;
private LinkedHashMap<String, TreeGrid> treeGrids = new LinkedHashMap<String, TreeGrid>();
-
private SectionStack sectionStack;
+
@Override
protected void onInit() {
super.onInit();
@@ -110,9 +109,9 @@ public class InventoryView extends HLayout implements BookmarkableView {
private ResourceSearchView buildResourceSearchView() {
ResourceSearchView searchView = new ResourceSearchView();
searchView.addResourceSelectedListener(new ResourceSelectListener() {
- public void onResourceSelected(Resource resource) {
+ public void onResourceSelected(ResourceComposite resourceComposite) {
//CoreGUI.setContent(new ResourceView(resource));
- CoreGUI.goTo("Resource/" + resource.getId());
+ CoreGUI.goTo("Resource/" + resourceComposite.getResource().getId());
}
});
return searchView;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSelectListener.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSelectListener.java
index e64f27b..21806ab 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSelectListener.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSelectListener.java
@@ -18,12 +18,19 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.resource;
-import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
/**
* @author Greg Hinkle
*/
public interface ResourceSelectListener {
- void onResourceSelected(Resource resource);
+ /**
+ * An event handler that is called then the user selects a Resource.
+ *
+ * @param resourceComposite a Resource composite for the Resource that was just selected by the user; the Resource
+ * wrapped by the composite's ResourceType will be mostly fetched.
+ */
+ void onResourceSelected(ResourceComposite resourceComposite);
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 92d74eb..68d92d5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -18,19 +18,13 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail;
-import java.util.EnumSet;
-import java.util.Set;
-
import com.google.gwt.user.client.History;
-import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Side;
import com.smartgwt.client.widgets.layout.VLayout;
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.core.domain.measurement.DataType;
-import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
+import org.rhq.core.domain.resource.composite.ResourceFacets;
import org.rhq.core.domain.resource.composite.ResourcePermission;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
@@ -40,7 +34,6 @@ import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTab;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedEvent;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedHandler;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSet;
-import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSearchView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSelectListener;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.configuration.ConfigurationHistoryView;
@@ -48,10 +41,9 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.configura
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.inventory.PluginConfigurationEditView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.GraphListView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.overview.ResourceOverviewView;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
/**
- * Right panel of the resource view.
+ * Right panel of the Resource view.
*
* @author Greg Hinkle
*/
@@ -60,9 +52,7 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
private static final String DEFAULT_TAB_NAME = "Summary";
- private Resource resource;
- private ResourcePermission permissions;
- private ResourceType type;
+ private ResourceComposite resourceComposite;
private TwoLevelTab summaryTab;
private TwoLevelTab monitoringTab;
@@ -77,9 +67,6 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
private ResourceTitleBar titleBar;
- public void setResource(Resource resource) {
- this.resource = resource;
- }
@Override
protected void onDraw() {
@@ -134,13 +121,14 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
// CoreGUI.addBreadCrumb(getPlace());
}
- public void onResourceSelected(Resource resource) {
+ public void onResourceSelected(ResourceComposite resourceComposite) {
- this.resource = resource;
+ this.resourceComposite = resourceComposite;
- titleBar.setResource(resource);
+ final Resource resource = this.resourceComposite.getResource();
+ this.titleBar.setResource(resource);
- summaryTab.updateSubTab("Overview", new ResourceOverviewView(resource));
+ summaryTab.updateSubTab("Overview", new ResourceOverviewView(this.resourceComposite));
summaryTab.updateSubTab("Timeline", new FullHTMLPane("/rhq/resource/summary/timeline-plain.xhtml?id="
+ resource.getId()));
@@ -204,80 +192,56 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
// topTabSet.setSelectedTab(selectedTab);
- updateTabStatus();
+ completeTabUpdate();
}
- private void updateTabStatus() {
- // Go and get the type with all needed metadata
- // and then get the permissions for this resource
-
- ResourceTypeRepository.Cache.getInstance().getResourceTypes(
- resource.getResourceType().getId(),
- EnumSet.of(ResourceTypeRepository.MetadataType.content, ResourceTypeRepository.MetadataType.operations,
- ResourceTypeRepository.MetadataType.events,
- ResourceTypeRepository.MetadataType.resourceConfigurationDefinition,
- ResourceTypeRepository.MetadataType.measurements), new ResourceTypeRepository.TypeLoadedCallback() {
- public void onTypesLoaded(ResourceType type) {
-
- ResourceDetailView.this.type = type;
-
- GWTServiceLookup.getAuthorizationService().getImplicitResourcePermissions(
- ResourceDetailView.this.resource.getId(), new AsyncCallback<Set<Permission>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load resource permissions", caught);
- }
-
- public void onSuccess(Set<Permission> result) {
- ResourceDetailView.this.permissions = new ResourcePermission(result);
- completeTabUpdate();
- }
- });
- }
- });
- }
private void completeTabUpdate() {
- if (!permissions.isMeasure()) {
- topTabSet.disableTab(monitoringTab);
- } else {
+ ResourcePermission permissions = this.resourceComposite.getResourcePermission();
+ ResourceFacets facets = this.resourceComposite.getResourceFacets();
+
+ // TODO (ips): No perms should be needed to view Monitoring and Alerts tabs.
+
+ if (permissions.isMeasure()) {
topTabSet.enableTab(monitoringTab);
+ } else {
+ topTabSet.disableTab(monitoringTab);
}
- if (type.getOperationDefinitions() == null || type.getOperationDefinitions().isEmpty()
- || !permissions.isControl()) {
- topTabSet.disableTab(operationsTab);
- } else {
+ if (facets.isOperation() && permissions.isControl()) {
topTabSet.enableTab(operationsTab);
+ } else {
+ topTabSet.disableTab(operationsTab);
}
- if (!permissions.isAlert()) {
- topTabSet.disableTab(alertsTab);
- } else {
+ if (permissions.isAlert()) {
topTabSet.enableTab(alertsTab);
+ } else {
+ topTabSet.disableTab(alertsTab);
}
- if (type.getResourceConfigurationDefinition() == null || !permissions.isConfigureRead()) {
- topTabSet.disableTab(configurationTab);
- } else {
+ if (!facets.isConfiguration() && permissions.isConfigureRead()) {
topTabSet.enableTab(configurationTab);
+ } else {
+ topTabSet.disableTab(configurationTab);
}
- if (type.getEventDefinitions() == null || type.getEventDefinitions().isEmpty() || !permissions.isMeasure()) {
+ if (facets.isEvent() && permissions.isMeasure()) {
topTabSet.enableTab(eventsTab);
} else {
- topTabSet.enableTab(eventsTab);
+ topTabSet.disableTab(eventsTab);
}
- if (type.getPackageTypes() == null || type.getPackageTypes().isEmpty() || !permissions.isContent()) {
- topTabSet.disableTab(contentTab);
- } else {
+ if (facets.isContent() && permissions.isContent()) {
topTabSet.enableTab(contentTab);
+ } else {
+ topTabSet.disableTab(contentTab);
}
// only enable "Call Time" sub-tab for those that implement it
- monitoringTab.setSubTabEnabled("Call Time", implementsCallTime(type));
+ monitoringTab.setSubTabEnabled("Call Time", facets.isCallTime());
if (topTabSet.getSelectedTab().getDisabled()) {
topTabSet.selectTab(0);
@@ -286,25 +250,22 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
topTabSet.markForRedraw();
}
- private boolean implementsCallTime(ResourceType type) {
- for (MeasurementDefinition definition : type.getMetricDefinitions()) {
- if (definition.getDataType() == DataType.CALLTIME) {
- return true;
- }
- }
- return false;
- }
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
- // Switch tabs directly, rather than letting the history framework do it, to avoid redrawing the outer views.
- selectTab(tabSelectedEvent.getId(), tabSelectedEvent.getSubTabId());
- String tabPath = "/" + tabSelectedEvent.getId() + "/" + tabSelectedEvent.getSubTabId();
- String path = "Resource/" + this.resource.getId() + tabPath;
+ if (this.resourceComposite == null) {
+ History.fireCurrentHistoryState();
+ } else {
+ // Switch tabs directly, rather than letting the history framework do it, to avoid redrawing the outer views.
+ selectTab(tabSelectedEvent.getId(), tabSelectedEvent.getSubTabId());
+ String tabPath = "/" + tabSelectedEvent.getId() + "/" + tabSelectedEvent.getSubTabId();
+ String path = "Resource/" + this.resourceComposite.getResource().getId() + tabPath;
- // But still add an item to the history, specifying false to tell it not to fire an event.
- History.newItem(path, false);
+ // But still add an item to the history, specifying false to tell it not to fire an event.
+ History.newItem(path, false);
+ }
}
+
public void renderView(ViewPath viewPath) {
// e.g. #Resource/10010/Inventory/Overview
String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
@@ -312,6 +273,7 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
selectTab(tabName, subTabName);
}
+
public void selectTab(String tabName, String subtabName) {
if (tabName == null) {
tabName = DEFAULT_TAB_NAME;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceView.java
index f7b5c6e..39e748f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceView.java
@@ -24,6 +24,8 @@ import com.smartgwt.client.widgets.layout.HLayout;
import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
@@ -32,8 +34,11 @@ import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.InventoryView;
+import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
+import java.util.EnumSet;
+
/**
* @author Greg Hinkle
*/
@@ -41,7 +46,7 @@ public class ResourceView extends HLayout implements BookmarkableView {
private Canvas contentCanvas;
- private Resource currentResource;
+ private ResourceComposite currentResource;
//private Resource resourcePlatform;
private ResourceTreeView treeView;
@@ -61,60 +66,70 @@ public class ResourceView extends HLayout implements BookmarkableView {
setWidth100();
setHeight100();
-
treeView = new ResourceTreeView();
addMember(treeView);
contentCanvas = new Canvas();
addMember(contentCanvas);
-
// created above
// detailView = new ResourceDetailView();
treeView.addResourceSelectListener(detailView);
-
setContent(detailView);
-
}
+
public void setSelectedResource(final int resourceId, final ViewPath view) {
- Resource resource = this.treeView.getResource(resourceId);
- if (resource != null) {
- setSelectedResource(resource, view);
- } else {
- ResourceCriteria criteria = new ResourceCriteria();
- criteria.addFilterId(resourceId);
- criteria.fetchTags(true);
- //criteria.fetchParentResource(true);
- resourceService.findResourcesByCriteria(criteria, new AsyncCallback<PageList<Resource>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getMessageCenter().notify(new Message("Resource with id [" + resourceId +
- "] does not exist or is not accessible.", Message.Severity.Warning));
-
- CoreGUI.goTo(InventoryView.VIEW_PATH);
+ ResourceCriteria criteria = new ResourceCriteria();
+ criteria.addFilterId(resourceId);
+ criteria.fetchTags(true);
+ //criteria.fetchParentResource(true);
+ resourceService.findResourceCompositesByCriteria(criteria, new AsyncCallback<PageList<ResourceComposite>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getMessageCenter().notify(new Message("Resource with id [" + resourceId +
+ "] does not exist or is not accessible.", Message.Severity.Warning));
+
+ CoreGUI.goTo(InventoryView.VIEW_PATH);
+ }
+
+ public void onSuccess(PageList<ResourceComposite> result) {
+ if (result.isEmpty()) {
+ //noinspection ThrowableInstanceNeverThrown
+ onFailure(new Exception("Resource with id [" + resourceId + "] does not exist."));
+ } else {
+ final ResourceComposite resourceComposite = result.get(0);
+ loadResourceType(resourceComposite, view);
}
+ }
+ });
+ }
+
- public void onSuccess(PageList<Resource> result) {
- if (result.isEmpty()) {
- //noinspection ThrowableInstanceNeverThrown
- onFailure(new Exception("Resource with id [" + resourceId + "] does not exist."));
- } else {
- Resource resource = result.get(0);
- setSelectedResource(resource, view);
- }
+ private void loadResourceType(final ResourceComposite resourceComposite, final ViewPath view) {
+ final Resource resource = resourceComposite.getResource();
+ ResourceTypeRepository.Cache.getInstance().getResourceTypes(
+ resource.getResourceType().getId(),
+ EnumSet.of(ResourceTypeRepository.MetadataType.content, ResourceTypeRepository.MetadataType.operations,
+ ResourceTypeRepository.MetadataType.events,
+ ResourceTypeRepository.MetadataType.resourceConfigurationDefinition),
+ new ResourceTypeRepository.TypeLoadedCallback() {
+ public void onTypesLoaded(ResourceType type) {
+ resource.setResourceType(type);
+ completeSetSelectedResource(resourceComposite, view);
}
});
- }
}
- private void setSelectedResource(Resource resource, ViewPath viewPath) {
- this.currentResource = resource;
- this.treeView.setSelectedResource(resource, viewPath.getCurrent());
- this.detailView.onResourceSelected(resource);
+
+ private void completeSetSelectedResource(ResourceComposite resourceComposite, ViewPath viewPath) {
+ this.currentResource = resourceComposite;
+ this.treeView.setSelectedResource(resourceComposite.getResource(), viewPath.getCurrent());
+ this.detailView.onResourceSelected(resourceComposite);
}
+
public void setContent(Canvas newContent) {
if (contentCanvas.getChildren().length > 0)
contentCanvas.getChildren()[0].destroy();
@@ -132,7 +147,7 @@ public class ResourceView extends HLayout implements BookmarkableView {
Integer resourceId = Integer.parseInt(viewPath.getCurrent().getPath());
- if (currentResource == null || currentResource.getId() != resourceId) {
+ if (currentResource == null || currentResource.getResource().getId() != resourceId) {
// The previous history item did not already point to this Resource.
setSelectedResource(resourceId, viewPath);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/ResourceAlertHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/ResourceAlertHistoryView.java
index cfa77c0..32c0f44 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/ResourceAlertHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/ResourceAlertHistoryView.java
@@ -25,6 +25,8 @@ package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.alert;
import com.smartgwt.client.data.Criteria;
import org.rhq.core.domain.criteria.AlertCriteria;
import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
+import org.rhq.core.domain.resource.composite.ResourcePermission;
import org.rhq.enterprise.gui.coregui.client.alert.AlertsView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSelectListener;
@@ -39,8 +41,8 @@ public class ResourceAlertHistoryView extends AlertsView
super(createCriteria(resourceId), EXCLUDED_FIELD_NAMES);
}
- public void onResourceSelected(Resource resource) {
- refresh(createCriteria(resource.getId()));
+ public void onResourceSelected(ResourceComposite resourceComposite) {
+ refresh(createCriteria(resourceComposite.getResource().getId()));
}
private static Criteria createCriteria(int resourceId) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java
index d77e08b..770c43b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/GraphListView.java
@@ -24,6 +24,7 @@ import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.components.measurement.MeasurementRangeEditor;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
@@ -32,7 +33,6 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTyp
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Overflow;
-import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.layout.VLayout;
@@ -48,12 +48,9 @@ import java.util.List;
*/
public class GraphListView extends VLayout implements ResourceSelectListener {
-
private Resource resource;
private Label loadingLabel = new Label("Loading...");
- public GraphListView() {
- }
public GraphListView(Resource resource) {
this.resource = resource;
@@ -83,7 +80,6 @@ public class GraphListView extends VLayout implements ResourceSelectListener {
private void buildGraphs() {
-
ResourceTypeRepository.Cache.getInstance().getResourceTypes(
resource.getResourceType().getId(), EnumSet.of(ResourceTypeRepository.MetadataType.measurements),
new ResourceTypeRepository.TypeLoadedCallback() {
@@ -139,18 +135,18 @@ public class GraphListView extends VLayout implements ResourceSelectListener {
);
}
+
private void buildGraph(MeasurementDefinition def, List<MeasurementDataNumericHighLowComposite> data) {
SmallGraphView graph = new SmallGraphView(resource.getId(), def, data);
graph.setWidth("95%");
graph.setHeight(220);
addMember(graph);
-
}
- public void onResourceSelected(Resource resource) {
- this.resource = resource;
+ public void onResourceSelected(ResourceComposite resourceComposite) {
+ this.resource = resourceComposite.getResource();
buildGraphs();
markForRedraw();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceOverviewView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceOverviewView.java
index bb01526..92cd3ff 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceOverviewView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceOverviewView.java
@@ -20,36 +20,42 @@ package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.overview
import com.smartgwt.client.widgets.layout.VLayout;
-import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.enterprise.gui.coregui.client.components.FullHTMLPane;
-import org.rhq.enterprise.gui.coregui.client.components.SimpleCollapsiblePanel;
+import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSelectListener;
/**
* @author Greg Hinkle
*/
-public class ResourceOverviewView extends VLayout {
+public class ResourceOverviewView extends VLayout implements ResourceSelectListener {
+ private ResourceSummaryView summaryView;
+ private FullHTMLPane summaryPane;
+ private ResourceComposite resourceComposite;
- private Resource resource;
-
-
- public ResourceOverviewView(Resource resource) {
- this.resource = resource;
+ public ResourceOverviewView(ResourceComposite resourceComposite) {
+ this.resourceComposite = resourceComposite;
}
-
@Override
protected void onDraw() {
super.onDraw();
- ResourceSummaryView summaryView = new ResourceSummaryView();
- summaryView.onResourceSelected(resource);
-
- addMember(summaryView);
+ this.summaryView = new ResourceSummaryView();
+ addMember(this.summaryView);
+ this.summaryPane = new FullHTMLPane();
+ addMember(this.summaryPane);
- FullHTMLPane summaryPane = new FullHTMLPane("/rhq/resource/summary/overview-plain.xhtml?id=" + resource.getId());
- addMember(summaryPane);
-
+ if (this.resourceComposite != null) {
+ onResourceSelected(this.resourceComposite);
+ }
+ }
+ @Override
+ public void onResourceSelected(ResourceComposite resourceComposite) {
+ this.resourceComposite = resourceComposite;
+ this.summaryView.onResourceSelected(resourceComposite);
+ this.summaryPane.setContentsURL("/rhq/resource/summary/overview-plain.xhtml?id="
+ + resourceComposite.getResource().getId());
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java
index 6f1228c..0015742 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java
@@ -26,7 +26,6 @@ import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.util.SC;
-import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.FormItem;
import com.smartgwt.client.widgets.form.fields.HeaderItem;
import com.smartgwt.client.widgets.form.fields.SpacerItem;
@@ -38,59 +37,64 @@ import org.rhq.core.domain.measurement.MeasurementDataTrait;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.components.form.EnhancedDynamicForm;
+import org.rhq.enterprise.gui.coregui.client.components.form.TogglableTextItem;
+import org.rhq.enterprise.gui.coregui.client.components.form.ValueUpdatedHandler;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSelectListener;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* @author Greg Hinkle
*/
-public class ResourceSummaryView extends DynamicForm implements ResourceSelectListener {
+public class ResourceSummaryView extends EnhancedDynamicForm implements ResourceSelectListener {
- private Resource resource;
+ private ResourceGWTServiceAsync resourceService = GWTServiceLookup.getResourceService();
+ private ResourceComposite resourceComposite;
@Override
protected void onDraw() {
super.onDraw();
- setNumCols(4);
- setWrapItemTitles(false);
setLeft("10%");
setWidth("80%");
}
- public void onResourceSelected(Resource resource) {
+ public void onResourceSelected(ResourceComposite resourceComposite) {
- this.resource = resource;
+ this.resourceComposite = resourceComposite;
+ Resource resource = resourceComposite.getResource();
+ // Load metric defs.
ResourceTypeRepository.Cache.getInstance().getResourceTypes(resource.getResourceType().getId(),
EnumSet.of(ResourceTypeRepository.MetadataType.measurements),
new ResourceTypeRepository.TypeLoadedCallback() {
public void onTypesLoaded(ResourceType type) {
try {
buildForm(type);
- loadValues();
+ loadTraitValues();
} catch (Exception e) {
SC.say("Form load failure");
e.printStackTrace();
}
}
});
-
-
- markForRedraw();
}
- private void loadValues() {
+ private void loadTraitValues() {
+ final Resource resource = resourceComposite.getResource();
GWTServiceLookup.getMeasurementDataService().findCurrentTraitsForResource(
resource.getId(),
DisplayType.SUMMARY,
new AsyncCallback<List<MeasurementDataTrait>>() {
public void onFailure(Throwable caught) {
- SC.say("Failed to load traits");
- CoreGUI.getErrorHandler().handleError("Failed to load traits information for resource",caught);
+ CoreGUI.getErrorHandler().handleError("Failed to load traits for " + resource + ".",
+ caught);
}
public void onSuccess(List<MeasurementDataTrait> result) {
@@ -111,7 +115,7 @@ public class ResourceSummaryView extends DynamicForm implements ResourceSelectLi
}
private void buildForm(ResourceType type) {
- ArrayList<MeasurementDefinition> traits = new ArrayList<MeasurementDefinition>();
+ List<MeasurementDefinition> traits = new ArrayList<MeasurementDefinition>();
for (MeasurementDefinition measurement : type.getMetricDefinitions()) {
if (measurement.getDataType() == DataType.TRAIT && measurement.getDisplayType() == DisplayType.SUMMARY) {
@@ -125,39 +129,122 @@ public class ResourceSummaryView extends DynamicForm implements ResourceSelectLi
}
});
-
- ArrayList<FormItem> formItems = new ArrayList<FormItem>();
- ArrayList<String> itemIds = new ArrayList<String>();
+ List<FormItem> formItems = new ArrayList<FormItem>();
HeaderItem headerItem = new HeaderItem("header", "Summary");
headerItem.setValue("Summary");
formItems.add(headerItem);
- StaticTextItem typeItem = new StaticTextItem("typeItem", "Type");
+ StaticTextItem typeItem = new StaticTextItem("type", "Type");
typeItem.setTooltip("Plugin: " + type.getPlugin() + "\n<br>" + "Type: " + type.getName());
typeItem.setValue(type.getName() + " (" + type.getPlugin() + ")");
formItems.add(typeItem);
- itemIds.add(typeItem.getName());
- StaticTextItem descriptionItem = new StaticTextItem("descriptionItem", "Description");
+ final Resource resource = this.resourceComposite.getResource();
+ boolean modifiable = this.resourceComposite.getResourcePermission().isInventory();
+
+ final FormItem nameItem = (modifiable) ? new TogglableTextItem() : new StaticTextItem();
+ nameItem.setName("name");
+ nameItem.setTitle("Name");
+ nameItem.setValue(resource.getName());
+ if (nameItem instanceof TogglableTextItem) {
+ TogglableTextItem togglableNameItem = (TogglableTextItem) nameItem;
+ togglableNameItem.addValueUpdatedHandler(new ValueUpdatedHandler() {
+ public void onValueUpdated(final String newName) {
+ final String oldName = resource.getName();
+ ResourceSummaryView.this.resourceService.updateResourceName(resource.getId(),
+ newName, new AsyncCallback<Void>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to change name of Resource with id "
+ + resource.getId()
+ + " from \"" + oldName + "\" to \"" + newName + "\".", caught);
+ // We failed to update it on the Server, so change back the form item to the original value.
+ nameItem.setValue(oldName);
+ }
+
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(new Message("Name of Resource with id "
+ + resource.getId() + " was changed from \""
+ + oldName + "\" to \"" + newName + "\".", Message.Severity.Info));
+ resource.setName(newName);
+ }
+ });
+ }
+ });
+ }
+ formItems.add(nameItem);
+
+ final FormItem descriptionItem = (modifiable) ? new TogglableTextItem() : new StaticTextItem();
+ descriptionItem.setName("description");
+ descriptionItem.setTitle("Description");
descriptionItem.setValue(resource.getDescription());
+ if (descriptionItem instanceof TogglableTextItem) {
+ TogglableTextItem togglableDescriptionItem = (TogglableTextItem) descriptionItem;
+ togglableDescriptionItem.addValueUpdatedHandler(new ValueUpdatedHandler() {
+ public void onValueUpdated(final String newDescription) {
+ final String oldDescription = resource.getDescription();
+ ResourceSummaryView.this.resourceService.updateResourceDescription(resource.getId(),
+ newDescription, new AsyncCallback<Void>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to change description of Resource with id "
+ + resource.getId()
+ + " from \"" + oldDescription + "\" to \"" + newDescription + "\".", caught);
+ // We failed to update it on the Server, so change back the form item to the original value.
+ descriptionItem.setValue(oldDescription);
+ }
+
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(new Message("Description of Resource with id "
+ + resource.getId() + " was changed from \""
+ + oldDescription + "\" to \"" + newDescription + "\".", Message.Severity.Info));
+ resource.setDescription(newDescription);
+ }
+ });
+ }
+ });
+ }
formItems.add(descriptionItem);
- itemIds.add(descriptionItem.getName());
- StaticTextItem versionItem = new StaticTextItem("versionItem", "Version");
- formItems.add(versionItem);
- itemIds.add(versionItem.getName());
+ final FormItem locationItem = (modifiable) ? new TogglableTextItem() : new StaticTextItem();
+ locationItem.setName("location");
+ locationItem.setTitle("Location");
+ locationItem.setValue(resource.getLocation());
+ if (locationItem instanceof TogglableTextItem) {
+ TogglableTextItem togglableNameItem = (TogglableTextItem) locationItem;
+ togglableNameItem.addValueUpdatedHandler(new ValueUpdatedHandler() {
+ public void onValueUpdated(final String newLocation) {
+ final String oldLocation = resource.getLocation();
+ ResourceSummaryView.this.resourceService.updateResourceLocation(resource.getId(),
+ newLocation, new AsyncCallback<Void>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to change location of Resource with id "
+ + resource.getId()
+ + " from \"" + oldLocation + "\" to \"" + newLocation + "\".", caught);
+ // We failed to update it on the Server, so change back the form item to the original value.
+ locationItem.setValue(oldLocation);
+ }
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(new Message("Location of Resource with id "
+ + resource.getId() + " was changed from \""
+ + oldLocation + "\" to \"" + newLocation + "\".", Message.Severity.Info));
+ resource.setLocation(newLocation);
+ }
+ });
+ }
+ });
+ }
+ formItems.add(locationItem);
- StaticTextItem parentItem = new StaticTextItem("parentItem", "Parent");
- formItems.add(parentItem);
- itemIds.add(parentItem.getName());
+ StaticTextItem versionItem = new StaticTextItem("version", "Version");
+ formItems.add(versionItem);
- for (MeasurementDefinition trait : traits) {
+ StaticTextItem parentItem = new StaticTextItem("parent", "Parent");
+ formItems.add(parentItem);
+ for (MeasurementDefinition trait : traits) {
String id = trait.getDisplayName().replaceAll("\\.", "_").replaceAll(" ", "__");
- itemIds.add(id);
StaticTextItem item = new StaticTextItem(id, trait.getDisplayName());
item.setTooltip(trait.getDescription());
@@ -176,14 +263,14 @@ public class ResourceSummaryView extends DynamicForm implements ResourceSelectLi
formItems.add(new SpacerItem());
setItems(formItems.toArray(new FormItem[formItems.size()]));
-
- setValue("typeItem", type.getName() + " (" + type.getPlugin() + ")");
- setValue("descriptionItem", resource.getDescription());
- setValue("versionItem", resource.getVersion());
- setValue("parentItem", resource.getParentResource() == null ? null :
+ setValue("type", type.getName() + " (" + type.getPlugin() + ")");
+ setValue("name", resource.getName());
+ setValue("description", resource.getDescription());
+ setValue("location", resource.getLocation());
+ setValue("version", resource.getVersion());
+ setValue("parent", resource.getParentResource() == null ? null :
("<a href=\"#Resource/" + resource.getParentResource().getId() + "\">" +
resource.getParentResource().getName() + "</a>"));
-
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java
index 7cd7fdd..56d91bd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGWTServiceImpl.java
@@ -18,6 +18,7 @@
*/
package org.rhq.enterprise.gui.coregui.server.gwt;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.HashSet;
@@ -35,6 +36,7 @@ import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.resource.InventoryStatus;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTService;
@@ -109,15 +111,27 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl implements Re
public PageList<Resource> findResourcesByCriteria(ResourceCriteria criteria) {
try {
PageList<Resource> result = resourceManager.findResourcesByCriteria(getSessionSubject(), criteria);
- for (Resource resource : result) {
- resource.setAgent(null);
- }
ObjectFilter.filterFieldsInCollection(result, importantFieldsSet);
- return SerialUtility.prepare(result, "ResourceService.findResourceByCriteria");
+ return SerialUtility.prepare(result, "ResourceService.findResourcesByCriteria");
} catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ }
+
+ public PageList<ResourceComposite> findResourceCompositesByCriteria(ResourceCriteria criteria) {
+ try {
+ PageList<ResourceComposite> result = resourceManager.findResourceCompositesByCriteria(getSessionSubject(),
+ criteria);
+ List<Resource> resources = new ArrayList<Resource>(result.size());
+
+ ObjectFilter.filterFieldsInCollection(resources, importantFieldsSet);
+
+ return SerialUtility.prepare(result, "ResourceService.findResourceCompositesByCriteria");
+ } catch (Exception e) {
+ e.printStackTrace();
throw new RuntimeException(e);
}
}
@@ -199,4 +213,15 @@ public class ResourceGWTServiceImpl extends AbstractGWTServiceImpl implements Re
discoveryBoss.unignoreResources(getSessionSubject(), resourceIds);
}
+ public void updateResourceName(int resourceId, String name) {
+ resourceManager.updateResourceName(getSessionSubject(), resourceId, name);
+ }
+
+ public void updateResourceDescription(int resourceId, String description) {
+ resourceManager.updateResourceDescription(getSessionSubject(), resourceId, description);
+ }
+
+ public void updateResourceLocation(int resourceId, String location) {
+ resourceManager.updateResourceLocation(getSessionSubject(), resourceId, location);
+ }
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
index 67326c1..d4dd777 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
@@ -74,4 +74,16 @@ public class ResourceGroupGWTServiceImpl extends AbstractGWTServiceImpl implemen
throw new RuntimeException(e.getMessage());
}
}
+
+ public void updateResourceGroupName(int groupId, String name) {
+ groupManager.updateResourceGroupName(getSessionSubject(), groupId, name);
+ }
+
+ public void updateResourceGroupDescription(int groupId, String description) {
+ groupManager.updateResourceGroupDescription(getSessionSubject(), groupId, description);
+ }
+
+ public void updateResourceGroupLocation(int groupId, String location) {
+ groupManager.updateResourceGroupLocation(getSessionSubject(), groupId, location);
+ }
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index 3dfc87f..4804a73 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -27,6 +27,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
+import java.util.Set;
import javax.ejb.EJB;
import javax.ejb.Stateless;
@@ -93,6 +94,7 @@ import org.rhq.core.domain.resource.composite.ResourceHealthComposite;
import org.rhq.core.domain.resource.composite.ResourceIdFlyWeight;
import org.rhq.core.domain.resource.composite.ResourceInstallCount;
import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
+import org.rhq.core.domain.resource.composite.ResourcePermission;
import org.rhq.core.domain.resource.composite.ResourceWithAvailability;
import org.rhq.core.domain.resource.flyweight.FlyweightCache;
import org.rhq.core.domain.resource.flyweight.ResourceFlyweight;
@@ -864,7 +866,8 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
*
* @param user
* @param category Limit the search to a given {@link ResourceCategory}
- * @param type Limit the search to to a given {@link ResourceType}
+ * @param typeName Limit the search to to {@link ResourceType}(s) with the given name
+ * @param pluginName Limit the search to the plugin with the given name
* @param parentResource Limit the search to children of a given parent resource
* @param searchString
* @param pageControl
@@ -2040,9 +2043,7 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
// lineage is a getXXX (not findXXX) because it logically returns a single object, but modeled as a list here
public @XmlJavaTypeAdapter(value = ResourceListAdapter.class)
List<Resource> findResourceLineage(Subject subject, int resourceId) {
- List<Resource> result = null;
-
- result = getResourceLineage(resourceId);
+ List<Resource> result = getResourceLineage(resourceId);
for (Resource resource : result) {
if (!authorizationManager.canViewResource(subject, resource.getId())) {
@@ -2069,19 +2070,21 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
}
public PageList<ResourceComposite> findResourceCompositesByCriteria(Subject subject, ResourceCriteria criteria) {
- PageList<Resource> intermediate = findResourcesByCriteria(subject, criteria);
+ PageList<Resource> resources = findResourcesByCriteria(subject, criteria);
List<ResourceComposite> results = new ArrayList<ResourceComposite>();
- for (Resource next : intermediate) {
- AvailabilityType availType = next.getCurrentAvailability().getAvailabilityType();
- Resource parent = next.getParentResource();
- ResourceComposite composite = new ResourceComposite(next, parent, availType);
- composite.setResourceFacets(typeManager.getResourceFacets(next.getResourceType().getId()));
- // TODO: jmarques: need to set resource permissions here, or alter criteria projection to include it
+ for (Resource resource : resources) {
+ AvailabilityType availType = resource.getCurrentAvailability().getAvailabilityType();
+ Resource parent = resource.getParentResource();
+ ResourceComposite composite = new ResourceComposite(resource, parent, availType);
+ composite.setResourceFacets(typeManager.getResourceFacets(resource.getResourceType().getId()));
+ Set<Permission> permissions = authorizationManager.getImplicitResourcePermissions(subject, resource.getId());
+ composite.setResourcePermission(new ResourcePermission(permissions));
+ // TODO: jmarques: Alter criteria projection to include permissions.
results.add(composite);
}
- return new PageList<ResourceComposite>(results, (int) intermediate.getTotalSize(), intermediate
+ return new PageList<ResourceComposite>(results, resources.getTotalSize(), resources
.getPageControl());
}
@@ -2152,4 +2155,39 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
DisambiguationUpdateStrategy updateStrategy) {
return Disambiguator.disambiguate(results, updateStrategy, extractor, entityManager);
}
+
+ public void updateResourceName(Subject subject, int resourceId, String name) {
+ if (name == null) {
+ throw new IllegalArgumentException("Resource name cannot be null.");
+ }
+ Resource resource = getResourceToBeModified(subject, resourceId);
+ resource.setName(name);
+ resource.setMtime(System.currentTimeMillis());
+ }
+
+ public void updateResourceDescription(Subject subject, int resourceId, String description) {
+ Resource resource = getResourceToBeModified(subject, resourceId);
+ resource.setDescription(description);
+ resource.setMtime(System.currentTimeMillis());
+ }
+
+ public void updateResourceLocation(Subject subject, int resourceId, String location) {
+ Resource resource = getResourceToBeModified(subject, resourceId);
+ resource.setLocation(location);
+ resource.setMtime(System.currentTimeMillis());
+ }
+
+ private Resource getResourceToBeModified(Subject subject, int resourceId) {
+ Resource resource = entityManager.find(Resource.class, resourceId);
+
+ if (resource == null) {
+ throw new ResourceNotFoundException(resourceId);
+ }
+
+ if (!authorizationManager.hasResourcePermission(subject, Permission.MODIFY_RESOURCE, resourceId)) {
+ throw new PermissionException("User [" + subject + "] does not have permission to modify Resource with id ["
+ + resourceId + "].");
+ }
+ return resource;
+ }
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
index 327c439..3dd1fcb 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -429,7 +429,7 @@ public interface ResourceManagerLocal {
* order (for example, if a given resource is actually a child of one of the other given resources, this method
* ensures the uninventory occurs properly).
*
- * @param user the user performing the uninventory action
+ * @param subject the user performing the uninventory action
* @param resourceIds the ID of the resource to be deleted
*
* @return the list of all resources that were deleted - in effect, this will contain <code>resourceIds</code> and
@@ -455,4 +455,10 @@ public interface ResourceManagerLocal {
*/
<T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, IntExtractor<? super T> resourceIdExtractor,
DisambiguationUpdateStrategy updateStrategy);
+
+ void updateResourceName(Subject subject, int resourceId, String name);
+
+ void updateResourceDescription(Subject subject, int resourceId, String description);
+
+ void updateResourceLocation(Subject subject, int resourceId, String location);
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java
index d633909..2eb9d62 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerRemote.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -43,7 +43,6 @@ import org.rhq.enterprise.server.system.ServerVersion;
* @author Jay Shaughnessy
* @author Simeon Pinder
*/
-
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@WebService(targetNamespace = ServerVersion.namespace)
@Remote
@@ -139,4 +138,21 @@ public interface ResourceManagerRemote {
@WebParam(name = "subject") Subject subject, //
@WebParam(name = "resourceId") int resourceId);
+ @WebMethod
+ void updateResourceName( //
+ @WebParam(name = "subject") Subject subject, //
+ @WebParam(name = "resourceId") int resourceId, //
+ @WebParam(name = "name") String name);
+
+ @WebMethod
+ void updateResourceDescription( //
+ @WebParam(name = "subject") Subject subject, //
+ @WebParam(name = "resourceId") int resourceId, //
+ @WebParam(name = "description") String description);
+
+ @WebMethod
+ void updateResourceLocation( //
+ @WebParam(name = "subject") Subject subject, //
+ @WebParam(name = "resourceId") int resourceId, //
+ @WebParam(name = "location") String location);
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java
index b2ed76e..987015b 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -90,6 +90,7 @@ import org.rhq.enterprise.server.jaxb.adapter.ResourceGroupAdapter;
import org.rhq.enterprise.server.operation.GroupOperationSchedule;
import org.rhq.enterprise.server.operation.OperationManagerLocal;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
+import org.rhq.enterprise.server.resource.ResourceNotFoundException;
import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
import org.rhq.enterprise.server.util.CriteriaQueryRunner;
@@ -1424,4 +1425,39 @@ public class ResourceGroupManagerBean implements ResourceGroupManagerLocal, Reso
}
}
+ public void updateResourceGroupName(Subject subject, int groupId, String name) {
+ if (name == null) {
+ throw new IllegalArgumentException("Group name cannot be null.");
+ }
+ ResourceGroup group = getResourceGroupToBeModified(subject, groupId);
+ group.setName(name);
+ group.setMtime(System.currentTimeMillis());
+ }
+
+ public void updateResourceGroupDescription(Subject subject, int groupId, String description) {
+ ResourceGroup group = getResourceGroupToBeModified(subject, groupId);
+ group.setDescription(description);
+ group.setMtime(System.currentTimeMillis());
+ }
+
+ public void updateResourceGroupLocation(Subject subject, int groupId, String location) {
+ ResourceGroup group = getResourceGroupToBeModified(subject, groupId);
+ group.setDescription(location);
+ group.setMtime(System.currentTimeMillis());
+ }
+
+ private ResourceGroup getResourceGroupToBeModified(Subject subject, int groupId) {
+ ResourceGroup group = entityManager.find(ResourceGroup.class, groupId);
+
+ if (group == null) {
+ throw new ResourceGroupNotFoundException(groupId);
+ }
+
+ if (!authorizationManager.hasGroupPermission(subject, Permission.MODIFY_RESOURCE, groupId)) {
+ throw new PermissionException("User [" + subject + "] does not have permission to modify Resource group with id ["
+ + groupId + "].");
+ }
+ return group;
+ }
+
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerLocal.java
index 5975099..8ed40b6 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerLocal.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -138,4 +138,10 @@ public interface ResourceGroupManagerLocal {
ResourceGroup updateResourceGroup(Subject subject, ResourceGroup group);
PageList<ResourceGroup> findResourceGroupsByCriteria(Subject subject, ResourceGroupCriteria criteria);
+
+ void updateResourceGroupName(Subject subject, int groupId, String name);
+
+ void updateResourceGroupDescription(Subject subject, int groupId, String description);
+
+ void updateResourceGroupLocation(Subject subject, int groupId, String location);
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerRemote.java
index f285fb5..8907ea9 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerRemote.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerRemote.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -96,4 +96,22 @@ public interface ResourceGroupManagerRemote {
PageList<ResourceGroup> findResourceGroupsByCriteria( //
@WebParam(name = "subject") Subject subject, //
@WebParam(name = "criteria") ResourceGroupCriteria criteria);
+
+ @WebMethod
+ void updateResourceGroupName( //
+ @WebParam(name = "subject") Subject subject, //
+ @WebParam(name = "groupId") int groupId, //
+ @WebParam(name = "name") String name);
+
+ @WebMethod
+ void updateResourceGroupDescription( //
+ @WebParam(name = "subject") Subject subject, //
+ @WebParam(name = "groupId") int groupId, //
+ @WebParam(name = "description") String description);
+
+ @WebMethod
+ void updateResourceGroupLocation( //
+ @WebParam(name = "subject") Subject subject, //
+ @WebParam(name = "groupId") int groupId, //
+ @WebParam(name = "location") String location);
}
13 years, 10 months
[rhq] modules/core
by mazz
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 36c35567dbd5482c3878af2e7fef96b68fb81fad
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Aug 12 11:22:31 2010 -0400
remove AS keyword - Oracle doesn't like it.
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index f36ad4a..07b448b 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3152,7 +3152,7 @@
<schema-addColumn table="RHQ_RESOURCE_GROUP" column="MODIFIED_BY_VARCHAR" columnType="VARCHAR2" precision="100"/>
<schema-directSQL>
<statement desc="RESOURCE_GROUP: Populate the tmp modifiedBy column with existing user names or null if user does not exist">
- UPDATE RHQ_RESOURCE_GROUP AS g SET MODIFIED_BY_VARCHAR = (SELECT NAME FROM RHQ_SUBJECT WHERE ID = g.MODIFIED_BY)
+ UPDATE RHQ_RESOURCE_GROUP g SET MODIFIED_BY_VARCHAR = (SELECT NAME FROM RHQ_SUBJECT WHERE ID = g.MODIFIED_BY)
</statement>
<statement desc="RESOURCE_GROUP: Make unknown usernames as rhqadmin in tmp modifiedBy column">
UPDATE RHQ_RESOURCE_GROUP SET MODIFIED_BY_VARCHAR = 'rhqadmin' WHERE MODIFIED_BY_VARCHAR IS NULL
@@ -3172,7 +3172,7 @@
<schema-addColumn table="RHQ_RESOURCE" column="MODIFIED_BY_VARCHAR" columnType="VARCHAR2" precision="100"/>
<schema-directSQL>
<statement desc="RESOURCE: Populate the tmp modifiedBy column with existing user names or null if user does not exist">
- UPDATE RHQ_RESOURCE AS r SET MODIFIED_BY_VARCHAR = (SELECT NAME FROM RHQ_SUBJECT WHERE ID = r.MODIFIED_BY)
+ UPDATE RHQ_RESOURCE r SET MODIFIED_BY_VARCHAR = (SELECT NAME FROM RHQ_SUBJECT WHERE ID = r.MODIFIED_BY)
</statement>
<statement desc="RESOURCE: Make unknown usernames as rhqadmin in tmp modifiedBy column">
UPDATE RHQ_RESOURCE SET MODIFIED_BY_VARCHAR = 'rhqadmin' WHERE MODIFIED_BY_VARCHAR IS NULL
13 years, 10 months
[rhq] Branch 'code-smell' - 37 commits - modules/core modules/enterprise pom.xml
by lkrejci
modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceFacets.java | 38
modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/composite/ResourceGroupComposite.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java | 21
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java | 56 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java | 13
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTabSet.java | 17
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/wizard/WizardView.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGroupGWTService.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java | 83 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupsDataSource.java | 20
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java | 195 ++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java | 81 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java | 38
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/OverviewView.java | 139 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateStep.java | 39
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateWizard.java | 13
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupMembersStep.java | 11
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceDatasource.java | 33
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java | 225 ++--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceView.java | 13
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java | 57 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java | 79 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java | 44
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java | 46
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java | 7
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java | 15
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java | 22
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/alert-plain-navigation.xml | 60 +
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/configuration-plain-navigation.xml | 45
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/events-plain-navigation.xml | 26
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/inventory-navigation.xml | 15
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml | 15
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-plain-navigation.xml | 88 +
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/operation-plain-navigation.xml | 119 ++
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/alert-plain-navigation.xml | 183 +++
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/content-plain-navigation.xml | 491 ++++++++++
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/events-plain-navigation.xml | 26
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/measurement-plain-navigation.xml | 73 +
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/operation-plain-navigation.xml | 89 +
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml | 12
modules/enterprise/gui/portal-war/src/main/webapp/index.html | 18
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/events/history-plain.xhtml | 23
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/graphs.xhtml | 26
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml | 158 +++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/tables-plain.xhtml | 46
modules/enterprise/gui/portal-war/src/main/webapp/rhq/entity/layout/main-plain.xhtml | 39
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml | 126 ++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertHistory-plain.xhtml | 177 +++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/addSimple-plain.xhtml | 45
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/editCurrent-plain.xhtml | 69 +
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/history-plain.xhtml | 281 +++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/viewCurrent-plain.xhtml | 55 +
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/events/history-plain.xhtml | 19
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/main-plain.xhtml | 64 +
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/graphs-plain.xhtml | 19
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/response-plain.xhtml | 15
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/schedules-plain.xhtml | 153 +++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/tables-plain.xhtml | 128 ++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistory-plain.xhtml | 293 +++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml | 232 ++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml | 118 ++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleNew-plain.xhtml | 173 +++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationSchedules-plain.xhtml | 106 ++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/view-results-map-plain.xhtml | 41
modules/enterprise/gui/portal-war/src/main/webapp/rhq/layout/main-plain-layout.xhtml | 310 ++++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions-plain.xhtml | 161 +++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertHistory-plain.xhtml | 210 ++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/deploy-plain.xhtml | 27
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-plain.xhtml | 23
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/installed_package_details-plain.xhtml | 27
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml | 33
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/view-plain.xhtml | 37
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/events/history-plain.xhtml | 20
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/include/pagination-plain.xhtml | 112 ++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/layout/main-plain.xhtml | 17
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/availabilityHistory-plain.xhtml | 31
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/response-plain.xhtml | 14
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/schedules-plain.xhtml | 38
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/tables-plain.xhtml | 19
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/traits-plain.xhtml | 27
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistory-plain.xhtml | 270 +++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml | 122 ++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationScheduleDetails-plain.xhtml | 73 +
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationSchedules-plain.xhtml | 104 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java | 10
modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml | 4
pom.xml | 2
90 files changed, 5875 insertions(+), 807 deletions(-)
New commits:
commit b9f07c09436a548434acfd6855662d54d33bf866
Merge: c8fb8b3... 910702a...
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Aug 12 15:30:40 2010 +0200
Merge branch 'master' into code-smell
commit c8fb8b3652d6b32e880b52913dd2280ab157eb57
Merge: 2638f27... f1365e5...
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Aug 12 15:18:05 2010 +0200
Merge branch 'code-smell' of ssh://git.fedorahosted.org/git/rhq/rhq into code-smell
commit 910702a4e6da5c6c7cd223f9ad7de12eac8d156c
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:10:30 2010 -0400
we don't support content at the group-level, so delete those commented-out sub-tab references
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 4a5f363..7ce294f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -149,13 +149,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
operationsTab.updateSubTab("History", new FullHTMLPane(
"/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=" + groupId));
operationsTab.updateSubTab("Scheduled", new FullHTMLPane(
- //
- // eventsTab.updateSubTab("History", EventHistoryView.createResourceHistoryView(resource.getId())); //new FullHTMLPane("/rhq/common/events/history-plain.xhtml?id=" + resource.getId()));
- //
- // contentTab.updateSubTab("Deployed", new FullHTMLPane("/rhq/resource/content/view-plain.xhtml?id=" + resource.getId()));
- // contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()));
- // contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
- // contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
"/rhq/group/operation/groupOperationSchedules-plain.xhtml?groupId=" + groupId));
configurationTab.updateSubTab("Current", new FullHTMLPane(
commit a8cd0f333842f0059d06e8678cf0d38f9b5db3b5
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:09:51 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished group > operation tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 709e304..4a5f363 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -145,8 +145,10 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
inventoryTab.updateSubTab("Overview", new OverviewView(this.groupComposite));
inventoryTab.updateSubTab("Members", ResourceSearchView.getMembersOf(groupId));
// inventoryTab.updateSubTab("Connection Settings", new GroupPluginConfigurationEditView(this.group.getId(), this.group.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
- //
- // operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
+
+ operationsTab.updateSubTab("History", new FullHTMLPane(
+ "/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=" + groupId));
+ operationsTab.updateSubTab("Scheduled", new FullHTMLPane(
//
// eventsTab.updateSubTab("History", EventHistoryView.createResourceHistoryView(resource.getId())); //new FullHTMLPane("/rhq/common/events/history-plain.xhtml?id=" + resource.getId()));
//
@@ -154,6 +156,8 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()));
// contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
// contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
+ "/rhq/group/operation/groupOperationSchedules-plain.xhtml?groupId=" + groupId));
+
configurationTab.updateSubTab("Current", new FullHTMLPane(
"/rhq/group/configuration/viewCurrent-plain.xhtml?groupId=" + groupId));
configurationTab.updateSubTab("History", new FullHTMLPane(
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistory-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistory-plain.xhtml
new file mode 100644
index 0000000..36f8b54
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistory-plain.xhtml
@@ -0,0 +1,293 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <!--
+ ResourceGroup Operation Pending History
+ -->
+
+ <ui:param name="currentOperation" value="#{ResourceGroupOperationPendingHistoryUIBean.oldestInProgressResourceGroupOperation}" />
+
+ <h:form id="pendingForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+ <input type="hidden" name="category" value="#{param.category}" />
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">In Progress Operations</f:facet>
+
+ <ui:param name="resourceGroupOperationPendingHistoryDataModel" value="#{ResourceGroupOperationPendingHistoryUIBean.dataModel}"/>
+
+ <a4j:keepAlive beanName="ResourceGroupOperationPendingHistoryUIBean"/>
+
+ <a4j:poll id="resourceGroupOperationPendingHistoryDataTableReRenderer"
+ oncomplete="disableConditionalButtons();"
+ interval="60000"
+ ignoreDupResponses="true"
+ actionListener="#{ResourceGroupOperationPendingHistoryUIBean.clearDataModel}"
+ reRender="resourceGroupOperationPendingHistoryDataTable" />
+ <rich:dataTable id="resourceGroupOperationPendingHistoryDataTable"
+ rows="#{PageControl.ResourceGroupOperationPendingHistory.pageSize}"
+ value="#{resourceGroupOperationPendingHistoryDataModel}"
+ var="pendingItem"
+ width="100%"
+ columnsWidth="1%, 20%, 20%, 20%, 20%, 19%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceGroupOperationPendingHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="pendingSelectedItems" />
+ </f:facet>
+
+ <onc:select name="pendingSelectedItems" value="#{pendingItem.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.createdTime">
+ <h:outputText styleClass="headerText" value="Date Submitted" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml" >
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="opId" value="#{pendingItem.id}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="#{pendingItem.operationDefinition.displayName}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.operationDefinition.description}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.status}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.subjectName}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6" width="100%">
+ <onc:selectCommandButton action="#{ResourceGroupOperationPendingHistoryUIBean.cancel}"
+ value="CANCEL SELECTED" target="pendingSelectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.control}"/>
+
+ <ui:param name="paginationDataTableName" value="resourceGroupOperationPendingHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{resourceGroupOperationPendingHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ResourceGroupOperationPendingHistory}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ <!--
+ ResourceGroup Operation Completed History
+ -->
+
+ <h:form id="historyForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+ <input type="hidden" name="category" value="#{param.category}" />
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Completed Operations</f:facet>
+
+ <a4j:keepAlive beanName="ResourceGroupOperationCompletedHistoryUIBean"/>
+
+ <ui:param name="resourceGroupOperationCompletedHistoryDataModel" value="#{ResourceGroupOperationCompletedHistoryUIBean.dataModel}"/>
+
+ <h:outputText value="There are no completed operations" rendered="#{resourceGroupOperationCompletedHistoryDataModel.rowCount eq 0}"/>
+
+ <a4j:poll id="resourceGroupOperationCompletedHistoryDataTableReRenderer"
+ oncomplete="disableConditionalButtons();"
+ interval="60000"
+ ignoreDupResponses="true"
+ actionListener="#{ResourceGroupOperationCompletedHistoryUIBean.clearDataModel}"
+ reRender="resourceGroupOperationCompletedHistoryDataTable" />
+ <rich:dataTable rendered="#{resourceGroupOperationCompletedHistoryDataModel.rowCount gt 0}"
+ id="resourceGroupOperationCompletedHistoryDataTable"
+ rows="#{PageControl.ResourceGroupOperationCompletedHistory.pageSize}"
+ value="#{resourceGroupOperationCompletedHistoryDataModel}"
+ var="historyItem"
+ width="100%"
+ columnsWidth="1%, 17%, 17%, 17%, 17%, 16%, 16%"
+ rowKeyVar="rowIndex"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceGroupOperationCompletedHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="completedSelectedItems" />
+ </f:facet>
+
+ <onc:select name="completedSelectedItems" value="#{historyItem.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.createdTime">
+ <h:outputText styleClass="headerText" value="Date Submitted" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.modifiedTime">
+ <h:outputText styleClass="headerText" value="Date Completed" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.modifiedTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml" >
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="opId" value="#{historyItem.id}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="#{historyItem.operationDefinition.displayName}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{historyItem.operationDefinition.description}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText rendered="#{historyItem.status ne 'FAILURE'}" value="#{historyItem.status}"/>
+ <h:outputLink rendered="#{historyItem.status eq 'FAILURE'}"
+ value="javascript:displayMessageModal('Error Message','#{historyItem.errorMessage}')">
+ <h:outputText value="#{historyItem.status}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.subjectName}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="7" width="100%">
+ <onc:selectCommandButton action="#{ResourceGroupOperationCompletedHistoryUIBean.delete}"
+ value="DELETE SELECTED" target="completedSelectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.control}"
+ onclick="return preventDoubleClick();"/>
+
+ <ui:param name="paginationDataTableName" value="resourceGroupOperationCompletedHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{resourceGroupOperationCompletedHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ResourceGroupOperationCompletedHistory}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <!-- use a hidden button trick (which sends the same action a column click would) so request params aren't lost -->
+ <h:commandButton id="hiddenHistoryButton" style="visibility: hidden;" action="#{TableSorter.obtainFromOutcome}" />
+
+ </rich:panel>
+ </h:form>
+
+ <script type="text/javascript">
+ var submitted = false;
+ function preventDoubleClick() {
+ if (submitted) {
+ return false;
+ } else {
+ submitted = true;
+ return true;
+ }
+ }
+ </script>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml
new file mode 100644
index 0000000..8c9834e
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml
@@ -0,0 +1,232 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+<ui:param name="item" value="#{ResourceGroupOperationHistoryDetailsUIBean.history}"/>
+
+<h:form id="operationHistoryDetailsForm">
+<input type="hidden" name="groupId" value="${param.groupId}"/>
+<input type="hidden" name="opId" value="${param.opId}"/>
+<input type="hidden" name="category" value="#{param.category}"/>
+
+<a4j:keepAlive beanName="ResourceGroupOperationHistoryDetailsUIBean" ajaxOnly="true"/>
+
+<br/>
+<h:outputLink value="/rhq/group/operation/groupOperationHistory-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}"/>
+ <f:param name="category" value="#{param.category}"/>
+
+ <h:outputText value="< Return to Operation History"/>
+</h:outputLink>
+
+<rich:panel styleClass="BlockContent">
+ <f:facet name="header">Details</f:facet>
+ <table>
+ <tr>
+ <td align="right" style="width: 150px;">Operation:</td>
+ <td align="left">
+ <h:outputText value="#{item.operationDefinition.displayName}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Date Submitted:</td>
+ <td align="left">
+ <h:outputText value="#{item.createdTime}">
+ <f:converter converterId="UserDateTimeConverter"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Date Completed:</td>
+ <td align="left">
+ <h:outputText value="#{item.modifiedTime}" rendered="#{item.status ne 'INPROGRESS'}">
+ <f:converter converterId="UserDateTimeConverter"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Requester:</td>
+ <td align="left">
+ <h:outputText value="#{item.subjectName}" rendered="#{!(empty item.subjectName)}"/>
+ <h:outputText value="(unknown)" rendered="#{empty item.subjectName}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Status:</td>
+ <td align="left">
+ <h:outputText rendered="#{item.status eq 'SUCCESS' or item.status eq 'INPROGRESS'}"
+ value="#{item.status}"/>
+ <h:outputLink rendered="#{item.status ne 'SUCCESS' and item.status ne 'INPROGRESS'}"
+ value="#" id="resultsLink">
+ <h:outputText value="#{item.status}"/>
+ <rich:componentControl for="resultsModalPanel" attachTo="resultsLink" operation="show"
+ event="onclick"/>
+ </h:outputLink>
+ <rich:modalPanel id="resultsModalPanel" width="600" height="400"
+ style="overflow: auto;">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Results"/>
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="controls">
+ <h:panelGroup>
+ <h:graphicImage value="/images/close.png" style="cursor:pointer"
+ id="resultsModelPanelHideLink"/>
+ <rich:componentControl for="resultsModalPanel" attachTo="resultsModelPanelHideLink"
+ operation="hide" event="onclick"/>
+ </h:panelGroup>
+ </f:facet>
+
+ <div class="ErrorModalBody">
+ <h:outputText value="#{item.errorMessage}"/>
+ </div>
+ </rich:modalPanel>
+ </td>
+ </tr>
+ </table>
+</rich:panel>
+
+<rich:panel styleClass="BlockContent">
+ <f:facet name="header">Parameters</f:facet>
+ <onc:config
+ configurationDefinition="#{ResourceGroupOperationHistoryDetailsUIBean.parameters.configurationDefinition}"
+ configuration="#{ResourceGroupOperationHistoryDetailsUIBean.parameters.configuration}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="#{ResourceGroupOperationHistoryDetailsUIBean.parameters.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{ResourceGroupOperationHistoryDetailsUIBean.parameters.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"/>
+</rich:panel>
+
+<rich:panel styleClass="BlockContent">
+ <f:facet name="header">Resource Operation Results</f:facet>
+
+ <h:panelGrid columns="1" styleClass="data-table">
+
+ <ui:param name="resourceGroupOperationHistoryDetailsDataModel"
+ value="#{ResourceGroupOperationHistoryDetailsUIBean.dataModel}"/>
+
+ <h:outputText value="There were no resources in the group when this operation was executed"
+ rendered="#{resourceGroupOperationHistoryDetailsDataModel.rowCount eq 0}"/>
+
+ <rich:dataTable rendered="#{resourceGroupOperationHistoryDetailsDataModel.rowCount gt 0}"
+ id="resourceGroupOperationHistoryDetailsDataTable"
+ rows="#{PageControl.ResourceGroupOperationHistoryDetails.pageSize}"
+ value="#{resourceGroupOperationHistoryDetailsDataModel}"
+ var="resourceHistoryItem"
+ width="100%"
+ columnsWidth="20%, 20%, 20%, 20%, 19%"
+ headerClass="tableRowHeader"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceGroupOperationHistoryDetails"/>
+ </f:facet>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.id">
+ <h:outputText styleClass="headerText" value="ID"/>
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{resourceHistoryItem.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.createdTime">
+ <h:outputText styleClass="headerText" value="Date Submitted"/>
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{resourceHistoryItem.createdTime}">
+ <f:converter converterId="UserDateTimeConverter"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name"/>
+ </f:facet>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml">
+ <f:param name="id" value="#{resourceHistoryItem.resource.id}"/>
+ <f:param name="opId" value="#{resourceHistoryItem.id}"/>
+ <h:outputText value="#{resourceHistoryItem.operationDefinition.displayName}"/>
+ </h:outputLink>
+
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Resource"/>
+ </f:facet>
+
+ <h:outputText value="#{resourceHistoryItem.resource.name}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.status">
+ <h:outputText styleClass="headerText" value="Status"/>
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{resourceHistoryItem.status}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.subjectName">
+ <h:outputText styleClass="headerText" value="User"/>
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{resourceHistoryItem.subjectName}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6" width="100%">
+ <ui:param name="paginationDataTableName"
+ value="resourceGroupOperationHistoryDetailsDataTable"/>
+ <ui:param name="paginationDataModel"
+ value="#{resourceGroupOperationHistoryDetailsDataModel}"/>
+ <ui:param name="paginationPageControl"
+ value="#{PageControl.ResourceGroupOperationHistoryDetails}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </h:panelGrid>
+
+</rich:panel>
+
+<h:outputLink value="/rhq/group/operation/groupOperationHistory-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}"/>
+ <f:param name="category" value="#{param.category}"/>
+
+ <h:outputText value="< Return to Operation History"/>
+</h:outputLink>
+
+</h:form>
+
+</ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml
new file mode 100644
index 0000000..23274f2
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml
@@ -0,0 +1,118 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+ <br/>
+ <!-- ResourceGroup Operation Schedules -->
+ <h:outputLink value="/rhq/group/operation/groupOperationSchedules-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="< Return to Operation Schedules"/>
+ </h:outputLink>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">General Info</f:facet>
+ <table>
+ <tr>
+ <td align="right" style="width: 125px;">Operation:</td>
+ <td align="left">
+ <h:outputText value="#{item.operationDisplayName}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right" style="width: 125px;">Scheduled By:</td>
+ <td align="left">
+ <h:outputText value="#{item.subject.name}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right" style="width: 125px;">Halt on Failure:</td>
+ <td align="left">
+ <h:outputText value="#{item.haltOnFailure}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right" style="width: 125px;">Notes:</td>
+ <td align="left">
+ <h:outputText value="#{item.description}" />
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Parameters</f:facet>
+ <onc:config configurationDefinition="#{ResourceGroupOperationScheduleDetailsUIBean.parameters.configurationDefinition}"
+ configuration="#{ResourceGroupOperationScheduleDetailsUIBean.parameters.configuration}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="#{ResourceGroupOperationScheduleDetailsUIBean.parameters.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{ResourceGroupOperationScheduleDetailsUIBean.parameters.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"/>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Resource Operation Order"/>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Execute this operation: " />
+ <h:selectOneRadio id="executionType"
+ layout="pageDirection"
+ disabled="true"
+ value="#{ResourceGroupOperationScheduleDetailsUIBean.resourceExecutionOption}">
+ <f:selectItem value="#{ResourceGroupExecutionTypeUIBean.concurrentOption}" />
+ <f:selectItem value="#{ResourceGroupExecutionTypeUIBean.orderedOption}" />
+ </h:selectOneRadio>
+
+ <h:outputText value=" " />
+ <rich:orderingList id="resourceNameItems"
+ orderControlsVisible="false"
+ fastOrderControlsVisible="false"
+ value="#{ResourceGroupOperationScheduleDetailsUIBean.resourceNameItems}"
+ var="resourceNameItem" listHeight="150" listWidth="200"
+ converter="IntegerOptionItemConverter">
+ <rich:column>
+ <h:outputText value="#{resourceNameItem.displayName}"></h:outputText>
+ </rich:column>
+ </rich:orderingList>
+ </h:panelGrid>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Schedule Details</f:facet>
+ <onc:operationScheduler scheduleDetails="#{ResourceGroupOperationScheduleDetailsUIBean.operationDetails}" readOnly="true" />
+ </rich:panel>
+
+ <h:form id="scheduleForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+ <input type="hidden" name="jobId" value="${param.jobId}"/>
+ <h:panelGrid columns="1" styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton action="#{ResourceGroupOperationScheduleUIBean.executeNow}"
+ value="EXECUTE NOW" styleClass="buttonmed"
+ rendered="#{ResourceGroupUIBean.permissions.control}" />
+ </h:panelGrid>
+ </h:form>
+
+ <br />
+ <br />
+
+ <h:outputLink value="/rhq/group/operation/groupOperationSchedules-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="< Return to Operation Schedules"/>
+ </h:outputLink>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleNew-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleNew-plain.xhtml
new file mode 100644
index 0000000..486d22a
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleNew-plain.xhtml
@@ -0,0 +1,173 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <!--
+ ResourceGroup Operation Definitions
+ -->
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.control}" value="You do not have permissions to execute operations on this group"/>
+
+ <h:form id="newScheduleForm">
+ <input type="hidden" name="groupId" value="#{param.groupId}" />
+ <input type="hidden" name="parentGroupId" value="#{param.parentGroupId}" />
+ <input type="hidden" name="category" value="#{param.category}" />
+
+ <c:if test="${not empty param.opId}">
+ <input type="hidden" name="opId" value="#{param.opId}" />
+ </c:if>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Supported Operations</f:facet>
+
+ <rich:dataTable id="resourceGroupOperationDefinitionDataTable"
+ rows="0"
+ value="#{ResourceGroupOperationDefinitionUIBean.dataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="35%, 65%"
+ styleClass="resources-table"
+ headerClass="tableRowHeader"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="NONE" />
+ </f:facet>
+
+ <rich:column rendered="false">
+ <f:facet name="header">
+ <rich:spacer />
+ </f:facet>
+
+ <onc:select name="selectedItems" value="#{item.id}" type="radio" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink action="success" rendered="#{ResourceGroupUIBean.permissions.control}">
+ <f:param name="opId" value="#{item.id}" />
+ <f:param name="groupId" value="#{param.groupId}"/>
+ <f:param name="parentGroupId" value="#{param.parentGroupId}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="#{item.displayName} *" rendered="#{(not empty param.opId) and (param.opId == item.id)}"/>
+ <h:outputText value="#{item.displayName}" rendered="#{(empty param.opId) or (param.opId != item.id)}"/>
+ </h:outputLink>
+
+ <h:outputText value="#{item.displayName}" rendered="#{not ResourceGroupUIBean.permissions.control}"/>
+
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{item.description}"/>
+ </rich:column>
+
+ </rich:dataTable>
+
+ </h:panelGrid>
+ </rich:panel>
+
+ <rich:panel rendered="#{not empty param.opId and ResourceGroupUIBean.permissions.control}" styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Operation Parameters"/>
+ </f:facet>
+ <!-- even when things aren't rendered, they will still be executed? -->
+ <onc:config configurationDefinition="#{OperationDefinitionParametersUIBean.configurationDefinition}"
+ configuration="#{OperationDefinitionParametersUIBean.configuration}"
+ nullConfigurationDefinitionMessage="#{OperationDefinitionParametersUIBean.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{OperationDefinitionParametersUIBean.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"/>
+ </rich:panel>
+
+ <rich:panel rendered="#{not empty param.opId and ResourceGroupUIBean.permissions.control}" styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Resource Operation Order"/>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Execute this operation: " />
+ <h:selectOneRadio id="executionType"
+ layout="pageDirection"
+ value="#{ResourceGroupOperationDefinitionUIBean.resourceExecutionOption}"
+ onchange="updateDependent(this, 'newScheduleForm:haltOnFailure', '#{ResourceGroupExecutionTypeUIBean.concurrentOption.value}');">
+ <f:selectItem value="#{ResourceGroupExecutionTypeUIBean.concurrentOption}" />
+ <f:selectItem value="#{ResourceGroupExecutionTypeUIBean.orderedOption}" />
+ </h:selectOneRadio>
+
+ <h:outputText value=" " />
+ <rich:orderingList id="resourceNameItems"
+ value="#{ResourceGroupOperationDefinitionUIBean.resourceNameItems}"
+ var="resourceNameItem" listHeight="150" listWidth="200"
+ converter="IntegerOptionItemConverter">
+ <rich:column>
+ <h:outputText value="#{resourceNameItem.displayName}"></h:outputText>
+ </rich:column>
+ </rich:orderingList>
+ </h:panelGrid>
+ </rich:panel>
+
+ <rich:panel rendered="#{not empty param.opId and ResourceGroupUIBean.permissions.control}" styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Operation Schedule Details"/>
+ </f:facet>
+ <!-- bug in rich:panel renders children even if the panel isn't rendered -->
+ <onc:operationScheduler scheduleDetails="#{ResourceGroupOperationScheduleUIBean.operationDetails}"/>
+ </rich:panel>
+
+ <rich:panel rendered="#{not empty param.opId and ResourceGroupUIBean.permissions.control}" styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Other Options"/>
+ </f:facet>
+
+ <!-- Notes are for user use only, displayed back in the History view -->
+ <!-- The Notes value must fit into the Quartz job_details.description field. Quartz does not protect against SQL errors -->
+ <h:panelGrid columns="3">
+ <h:outputLabel for="timeout" value="Timeout:" />
+ <h:inputText id="timeout" value="#{ResourceGroupOperationDefinitionUIBean.timeout}" />
+ <h:outputText value="The maximum time this operation is given to finish, in seconds" />
+
+ <h:outputLabel for="haltOnFailure" value="Halt On Failure:" />
+ <h:selectBooleanCheckbox id="haltOnFailure" value="#{ResourceGroupOperationDefinitionUIBean.haltOnFailure}" />
+ <h:outputText value="If checked, an operation failure will cause the scheduling of the remaining ordered operations to halt" />
+
+ <h:outputLabel for="notes" value="Notes:" />
+ <h:inputText id="notes" maxlength="120" size="40" value="#{ResourceGroupOperationDefinitionUIBean.description}" />
+ <h:outputText value="Optional notes, if the operation is scheduled for execution later" />
+ </h:panelGrid>
+ <hr />
+ <h:panelGrid columns="1" styleClass="buttons-table" columnClasses="button-cell"
+ rendered="#{not empty param.opId}">
+ <h:commandButton action="#{ResourceGroupOperationScheduleUIBean.schedule}"
+ value="SCHEDULE" styleClass="buttonmed"
+ rendered="#{ResourceGroupUIBean.permissions.control}" />
+ </h:panelGrid>
+ </rich:panel>
+ <br /><br /><br /><br />
+ <br /><br /><br /><br />
+ </h:form>
+
+ <script type="text/javascript">
+ setInputDisabled(document.getElementById('newScheduleForm:haltOnFailure'), true, true);
+ clickAlreadySelectedElements();
+ </script>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationSchedules-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationSchedules-plain.xhtml
new file mode 100644
index 0000000..fbc7c17
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationSchedules-plain.xhtml
@@ -0,0 +1,106 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <!-- ResourceGroup Operation Schedules -->
+ <h:form id="scheduleForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+ <input type="hidden" name="category" value="#{param.category}" />
+
+ <!-- Operation Schedule Table -->
+ <rich:panel styleClass="BlockContent">
+
+ <ui:param name="resourceGroupOperationScheduleDataModel" value="#{ResourceGroupOperationScheduleUIBean.dataModel}"/>
+ <rich:dataTable id="resourceGroupOperationScheduleDataTable"
+ rows="0"
+ value="#{resourceGroupOperationScheduleDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 30%, 39%, 30%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="NONE" />
+ </f:facet>
+
+ <rich:column style="width: 1px;">
+ <f:facet name="header">
+ <onc:allSelect target="selectedItems" />
+ </f:facet>
+ <onc:select name="selectedItems" value="#{item.jobId}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Job ID" />
+ </f:facet>
+ <h:commandLink action="#{ResourceGroupOperationScheduleUIBean.selectScheduleToView}">
+ <h:outputText value="#{item.jobId}" />
+ </h:commandLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml" >
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="jobId" value="#{item.jobId}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="#{item.operationDisplayName}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Notes" />
+ </f:facet>
+ <h:outputText value="#{item.description}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="User" />
+ </f:facet>
+ <h:outputText value="#{item.subject.name}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="4" width="100%">
+ <onc:selectCommandButton action="#{ResourceGroupOperationScheduleUIBean.unschedule}"
+ value="UNSCHEDULE" target="selectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.control}"/>
+ <onc:selectCommandButton action="#{ResourceGroupOperationScheduleUIBean.executeNow}"
+ value="EXECUTE NOW" target="selectedItems"
+ styleClass="on-pager-button buttonsmall"
+ low="1" high="1"
+ rendered="#{ResourceGroupUIBean.permissions.control}"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/view-results-map-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/view-results-map-plain.xhtml
new file mode 100644
index 0000000..001f5bb
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/view-results-map-plain.xhtml
@@ -0,0 +1,41 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <p>
+ Below is the #{param.listName}[#{param.listIndex}] item from the results of the
+ execution of the #{ResourceGroupOperationHistoryDetailsUIBean.history.operationDefinition.displayName}
+ operation. Click OK to return to the main Operation History Details page.
+ </p>
+
+ <h:form id="viewOperationResultsMapForm">
+
+ <input type="hidden" name="id" value="#{ResourceGroupUIBean.id}"/>
+
+ <onc:config configurationDefinition="#{ResourceGroupOperationHistoryDetailsUIBean.results.configurationDefinition}"
+ configuration="#{ResourceGroupOperationHistoryDetailsUIBean.results.configuration}"
+ listName="#{param.listName}"
+ listIndex="#{param.listIndex}"
+ readOnly="true"/>
+
+ </h:form>
+
+ <h:panelGrid columns="1" styleClass="buttons-table" columnClasses="button-cell">
+ <h:panelGroup layout="block">
+ <div title="Return to Previous Page" onclick="history.back()" class="buttonmed">OK</div>
+ </h:panelGroup>
+ </h:panelGrid>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit 62ce6dd82fc3dae5ca2f46c631256fe2e81014f7
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:08:23 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished group > alerts tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index cc5e636..709e304 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -148,9 +148,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
//
// operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
//
- // alertsTab.updateSubTab("History", new ResourceAlertHistoryView(resource.getId()));
- // alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
- //
// eventsTab.updateSubTab("History", EventHistoryView.createResourceHistoryView(resource.getId())); //new FullHTMLPane("/rhq/common/events/history-plain.xhtml?id=" + resource.getId()));
//
// contentTab.updateSubTab("Deployed", new FullHTMLPane("/rhq/resource/content/view-plain.xhtml?id=" + resource.getId()));
@@ -162,6 +159,11 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
configurationTab.updateSubTab("History", new FullHTMLPane(
"/rhq/group/configuration/history-plain.xhtml?groupId=" + groupId));
+ alertsTab.updateSubTab("History", new FullHTMLPane(
+ "/rhq/group/alert/listGroupAlertHistory-plain.xhtml?groupId=" + groupId));
+ alertsTab.updateSubTab("Definitions", new FullHTMLPane(
+ "/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml?groupId=" + groupId));
+
eventsTab.updateSubTab("History", new FullHTMLPane("/rhq/group/events/history-plain.xhtml?groupId=" + groupId));
// topTabSet.setSelectedTab(selectedTab);
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml
new file mode 100644
index 0000000..7a677a5
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml
@@ -0,0 +1,126 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="alertDefinitionsListForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+
+ <rich:panel styleClass="BlockContent">
+ <a4j:keepAlive beanName="ListGroupAlertDefinitionsUIBean"/>
+
+ <ui:param name="alertDefinitionsDataModel" value="#{ListGroupAlertDefinitionsUIBean.dataModel}"/>
+ <rich:dataTable id="alertDefinitionsDataTable"
+ rows="#{PageControl.GroupAlertDefinitionsList.pageSize}"
+ value="#{alertDefinitionsDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 25%, 35%, 20%, 19%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+
+ <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>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.name">
+ <h:outputText styleClass="headerText" value="Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Config.do">
+ <f:param name="mode" value="viewRoles"/>
+ <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">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.ctime}">
+ <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>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="5" width="100%">
+ <h:commandButton action="#{ListGroupAlertDefinitionsUIBean.createNewAlertDefinition}"
+ value="NEW DEFINITION" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" >
+ <f:param name="groupId" value="${param.groupId}"/>
+ <f:param name="mode" value="new"/>
+ </h:commandButton>
+ <onc:selectCommandButton action="#{ListGroupAlertDefinitionsUIBean.enableSelectedAlertDefinitions}"
+ value="ENABLE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListGroupAlertDefinitionsUIBean.disableSelectedAlertDefinitions}"
+ value="DISABLE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListGroupAlertDefinitionsUIBean.deleteSelectedAlertDefinitions}"
+ value="DELETE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" />
+
+ <ui:param name="paginationDataTableName" value="alertDefinitionsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{alertDefinitionsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.GroupAlertDefinitionsList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertHistory-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertHistory-plain.xhtml
new file mode 100644
index 0000000..00aca9b
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertHistory-plain.xhtml
@@ -0,0 +1,177 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="alertHistoryForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+
+ <rich:panel styleClass="BlockContent">
+
+ <h:panelGrid columns="4" cellspacing="3">
+ <h:outputLabel for="alertDefinitionFilter" value="Group Alert Definition Filter: " />
+ <h:selectOneMenu id="alertDefinitionFilter" value="#{ListGroupAlertHistoryUIBean.alertDefinitionFilter}"
+ style="width: 300px;">
+ <a4j:support event="onchange"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListGroupAlertHistoryUIBean.clearDataModel}" />
+
+ <f:selectItems value="#{ListGroupAlertHistoryUIBean.alertDefinitionSelectItems}"/>
+ </h:selectOneMenu>
+ <rich:spacer/>
+ <rich:spacer/>
+
+ <h:outputLabel for="alertPriorityFilter" value="Alert Priority Filter: " />
+ <h:selectOneMenu id="alertPriorityFilter" value="#{ListGroupAlertHistoryUIBean.alertPriorityFilter}"
+ style="width: 300px;">
+ <a4j:support event="onchange"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListGroupAlertHistoryUIBean.clearDataModel}" />
+
+ <f:selectItems value="#{ListGroupAlertHistoryUIBean.alertPrioritySelectItems}"/>
+ </h:selectOneMenu>
+ <rich:spacer/>
+ <rich:spacer/>
+
+ <h:outputLabel for="dateFilter" value="Date Filter: " />
+ <h:inputText id="dateFilter" value="#{ListGroupAlertHistoryUIBean.dateFilter}"
+ onkeypress="return ignoreEnterKey(event);"
+ style="width: 300px;" />
+ <a4j:commandButton value="GO"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListGroupAlertHistoryUIBean.clearDataModel}"
+ styleClass="buttonmed">
+ <s:defaultAction />
+ </a4j:commandButton>
+ <h:outputText id="dateErrors" value="#{ListGroupAlertHistoryUIBean.dateErrors}" />
+ </h:panelGrid>
+
+ <br/>
+
+ <ui:param name="alertHistoryDataModel" value="#{ListGroupAlertHistoryUIBean.dataModel}"/>
+ <rich:dataTable id="alertHistoryDataTable"
+ rows="#{PageControl.GroupAlertHistoryList.pageSize}"
+ value="#{alertHistoryDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 20%, 20%, 20%, 30%, 9%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="GroupAlertHistoryList" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedAlerts" />
+ </f:facet>
+
+ <onc:select name="selectedAlerts" value="#{item.alert.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.alertDefinition.priority">
+ <h:outputText styleClass="headerText" value="Priority" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:graphicImage value="/images/icons/Flag_blue_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'LOW'}"/>
+ <h:graphicImage value="/images/icons/Flag_yellow_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'MEDIUM'}"/>
+ <h:graphicImage value="/images/icons/Flag_red_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'HIGH'}"/>
+
+ <h:outputText value="#{item.alert.alertDefinition.priority.name}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.ctime">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Alerts.do">
+ <f:param name="mode" value="viewAlert" />
+ <f:param name="id" value="#{item.alert.alertDefinition.resource.id}"/>
+ <f:param name="a" value="#{item.alert.id}" />
+ <h:outputText value="#{item.alert.ctime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.alertDefinition.name">
+ <h:outputText styleClass="headerText" value="Alert Definition" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Config.do">
+ <f:param name="mode" value="viewRoles"/>
+ <f:param name="id" value="#{item.alert.alertDefinition.resource.id}"/>
+ <f:param name="ad" value="#{item.alert.alertDefinition.id}"/>
+ <h:outputText value="#{item.alert.alertDefinition.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Alert Condition" />
+ </f:facet>
+ <h:outputText value="#{item.conditionText}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Actual Value" />
+ </f:facet>
+ <h:outputText value="#{item.conditionValue}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Recovery Info" />
+ </f:facet>
+ <h:outputText value="#{item.recoveryInfo}" />
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="7" width="100%">
+ <onc:selectCommandButton action="#{ListGroupAlertHistoryUIBean.deleteSelectedAlerts}"
+ value="DELETE SELECTED" target="selectedAlerts" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" />
+ <h:commandButton action="#{ListGroupAlertHistoryUIBean.purgeAllAlerts}"
+ value="PURGE ALL" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" />
+
+ <ui:param name="paginationDataTableName" value="alertHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{alertHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.GroupAlertHistoryList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <a4j:keepAlive beanName="ListGroupAlertHistoryUIBean"/>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+</ui:composition>
\ No newline at end of file
commit 79d8e1bb6ca9b8cb725aa2c40566ce1666d1a2a1
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:07:41 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished group > configuration tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index a1f46fc..cc5e636 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -148,9 +148,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
//
// operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
//
- // configurationTab.updateSubTab("Current", new ResourceConfigurationEditView(resource));
- // configurationTab.updateSubTab("History", ConfigurationHistoryView.getHistoryOf(resource.getId()));
- //
// alertsTab.updateSubTab("History", new ResourceAlertHistoryView(resource.getId()));
// alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
//
@@ -160,6 +157,10 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()));
// contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
// contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
+ configurationTab.updateSubTab("Current", new FullHTMLPane(
+ "/rhq/group/configuration/viewCurrent-plain.xhtml?groupId=" + groupId));
+ configurationTab.updateSubTab("History", new FullHTMLPane(
+ "/rhq/group/configuration/history-plain.xhtml?groupId=" + groupId));
eventsTab.updateSubTab("History", new FullHTMLPane("/rhq/group/events/history-plain.xhtml?groupId=" + groupId));
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java
index 1ba9b78..a1c2c45 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java
@@ -90,7 +90,7 @@ public class EditGroupResourceConfigurationUIBean extends AbstractGroupResourceC
"Failed to schedule group Resource Configuration update - cause: " + e);
viewId = VIEW_ID;
}
- this.redirect.setViewId(viewId);
+ this.redirect.setViewId(getViewId(viewId));
this.redirect.execute();
}
@@ -100,7 +100,7 @@ public class EditGroupResourceConfigurationUIBean extends AbstractGroupResourceC
@End
public void cancel() {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Edit canceled.");
- this.redirect.setViewId(ViewGroupResourceConfigurationUIBean.VIEW_ID);
+ this.redirect.setViewId(getViewId(ViewGroupResourceConfigurationUIBean.VIEW_ID));
this.redirect.execute();
return;
}
@@ -111,8 +111,17 @@ public class EditGroupResourceConfigurationUIBean extends AbstractGroupResourceC
@End
public void reset() {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "All properties reset to original values.");
- this.redirect.setViewId(VIEW_ID);
+ this.redirect.setViewId(getViewId(VIEW_ID));
this.redirect.execute();
return;
}
+
+ private String getViewId(String toViewId) {
+ String currentViewId = FacesContextUtility.getViewId();
+ int currentPlainIndex = currentViewId.indexOf("-plain.xhtml");
+ if (currentPlainIndex != -1) {
+ toViewId = toViewId.substring(0, toViewId.length() - 6) + "-plain.xhtml";
+ }
+ return toViewId;
+ }
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java
index 4839095..62d17d0 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java
@@ -18,15 +18,16 @@
*/
package org.rhq.enterprise.gui.configuration.group;
-import org.rhq.enterprise.gui.legacy.ParamConstants;
-
import org.jboss.seam.ScopeType;
-import org.jboss.seam.faces.Redirect;
import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.faces.Redirect;
+
+import org.rhq.core.gui.util.FacesContextUtility;
+import org.rhq.enterprise.gui.legacy.ParamConstants;
/**
* A POJO Seam component that handles loading Resource configurations across a compatible Group in view-only mode.
@@ -53,8 +54,17 @@ public class ViewGroupResourceConfigurationUIBean extends AbstractGroupResourceC
@End
public void edit() {
this.redirect.setParameter(ParamConstants.GROUP_ID_PARAM, getGroup().getId());
- this.redirect.setViewId(EditGroupResourceConfigurationUIBean.VIEW_ID);
+ this.redirect.setViewId(getViewId(EditGroupResourceConfigurationUIBean.VIEW_ID));
this.redirect.execute();
return;
}
+
+ private String getViewId(String toViewId) {
+ String currentViewId = FacesContextUtility.getViewId();
+ int currentPlainIndex = currentViewId.indexOf("-plain.xhtml");
+ if (currentPlainIndex != -1) {
+ toViewId = toViewId.substring(0, toViewId.length() - 6) + "-plain.xhtml";
+ }
+ return toViewId;
+ }
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/addSimple-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/addSimple-plain.xhtml
new file mode 100644
index 0000000..6fad880
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/addSimple-plain.xhtml
@@ -0,0 +1,45 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <p>
+ Enter a name and a value for the property to be added to the map '#{param.mapName}',
+ then click OK to return to the main Edit page for the '#{EditGroupResourceConfigurationUIBean.group.name}' Configuration.
+ </p>
+
+ <h:form id="addNewOpenMapMemberPropertyForm">
+
+ <input type="hidden" name="groupId" value="#{EditGroupResourceConfigurationUIBean.group.id}"/>
+ <input type="hidden" name="mapName" value="#{param.mapName}"/>
+
+ <h:panelGrid columns="2" width="400">
+ <h:panelGroup>
+ Name: <h:inputText value="#{GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.propertyName}"/>
+ </h:panelGroup>
+ <h:panelGroup>
+ Value: <h:inputText value="#{GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.propertyValue}"/>
+ </h:panelGroup>
+ </h:panelGrid>
+
+ <h:panelGrid columns="2" styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton value="OK" action="#{GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.addProperty}"
+ alt="Click to Add Property" styleClass="buttonmed"/>
+ <h:commandButton value="CANCEL" action="#{GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.cancel}"
+ immediate="true" alt="Click to Cancel" styleClass="buttonmed"/>
+ </h:panelGrid>
+
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/editCurrent-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/editCurrent-plain.xhtml
new file mode 100644
index 0000000..cd365bd
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/editCurrent-plain.xhtml
@@ -0,0 +1,69 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.configureRead}"
+ value="You do not have permissions to view configuration data for this group" />
+
+ <h:form id="configSetForm" onsubmit="prepareInputsForSubmission(this)"
+ rendered="#{ResourceGroupUIBean.permissions.configureRead and EditGroupResourceConfigurationUIBean.configurationSet ne null}">
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.configureWrite}"
+ value="You do not have permissions to change the configuration of this group"/>
+
+ <input type="hidden" name="groupId" value="#{param.groupId}"/>
+
+ <h:panelGrid columns="3" styleClass="buttons-table" columnClasses="button-cell"
+ rendered="${ResourceGroupUIBean.permissions.configureWrite}">
+ <h:commandButton type="submit" action="#{EditGroupResourceConfigurationUIBean.updateConfigurations}"
+ value="SAVE" title="Click to Save Changes"
+ styleClass="buttonmed"/>
+ <h:commandButton type="submit" immediate="true"
+ action="#{EditGroupResourceConfigurationUIBean.reset}"
+ value="RESET" title="Click to Reset All Properties to Their Original Values"
+ styleClass="buttonmed"/>
+ <h:commandButton type="submit" immediate="true"
+ action="#{EditGroupResourceConfigurationUIBean.cancel}"
+ value="CANCEL" title="Click to Cancel Edits and Return to View Page"
+ styleClass="buttonmed"/>
+ </h:panelGrid>
+
+ <a4j:region selfRendered="false">
+ <a4j:outputPanel layout="block" ajaxRendered="true" keepTransient="true">
+ <onc:configSet id="rhq_configSet"
+ configurationSet="#{EditGroupResourceConfigurationUIBean.configurationSet}"/>
+ </a4j:outputPanel>
+ </a4j:region>
+
+ <h:panelGrid columns="3" styleClass="buttons-table" columnClasses="button-cell"
+ rendered="${ResourceGroupUIBean.permissions.configureWrite}">
+ <h:commandButton type="submit" action="#{EditGroupResourceConfigurationUIBean.updateConfigurations}"
+ value="SAVE" title="Click to Save Changes"
+ styleClass="buttonmed"/>
+ <h:commandButton type="submit" immediate="true"
+ action="#{EditGroupResourceConfigurationUIBean.reset}"
+ value="RESET" title="Click to Reset All Properties to Their Original Values"
+ styleClass="buttonmed"/>
+ <h:commandButton type="submit" immediate="true"
+ action="#{EditGroupResourceConfigurationUIBean.cancel}"
+ value="CANCEL" title="Click to Cancel Edits and Return to View Page"
+ styleClass="buttonmed"/>
+ </h:panelGrid>
+
+ </h:form>
+
+ <ui:remove><!--<a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"/>--></ui:remove>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/history-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/history-plain.xhtml
new file mode 100644
index 0000000..566d95b
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/history-plain.xhtml
@@ -0,0 +1,281 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.configureRead}"
+ value="You do not have permissions to view configuration data for this group" />
+
+ <h:form id="historyForm" rendered="#{ResourceGroupUIBean.permissions.configureRead}">
+ <input type="hidden" name="groupId" value="#{param.groupId}"/>
+ <input type="hidden" name="arcuId" value="#{param.arcuId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Group Configuration Update History"/>
+ </f:facet>
+
+ <ui:param name="groupResourceConfigUpdateHistoryDataModel" value="#{GroupResourceConfigurationHistoryUIBean.dataModel}"/>
+ <rich:dataTable id="groupResourceConfigUpdateHistoryDataTable"
+ rows="#{PageControl.GroupResourceConfigurationUpdateHistory.pageSize}"
+ value="#{groupResourceConfigUpdateHistoryDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 9%, 25%, 25%, 10%, 10%, 20%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="GroupResourceConfigurationUpdateHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedUpdates" />
+ </f:facet>
+
+ <onc:select name="selectedUpdates" value="#{item.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="arcu.id">
+ <h:outputText styleClass="headerText" value="Version" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="arcu.createdTime">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="arcu.modifiedTime">
+ <h:outputText styleClass="headerText" value="Last Updated" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.modifiedTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="arcu.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.status}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="arcu.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.subjectName}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Action" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/group/configuration/history-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="arcuId" value="#{item.id}" />
+ <f:param name="mode" value="group" />
+ <h:outputText value="View Group Update" />
+ </h:outputLink>
+ <ui:remove>
+ <br />
+ <h:outputLink value="/rhq/group/configuration/history-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="arcuId" value="#{item.id}" />
+ <f:param name="mode" value="details" />
+ <h:outputText value="View Member Updates" />
+ </h:outputLink>
+ </ui:remove>
+
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="7" width="100%">
+ <onc:selectCommandButton action="#{GroupResourceConfigurationHistoryUIBean.deleteSelectedUpdates}"
+ rendered="${ResourceGroupUIBean.permissions.configureWrite}"
+ value="DELETE SELECTED" target="selectedUpdates"
+ styleClass="on-pager-button buttonsmall" />
+
+ <ui:param name="paginationDataTableName" value="groupResourceConfigUpdateHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{groupResourceConfigUpdateHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.GroupResourceConfigurationUpdateHistory}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ <rich:panel rendered="#{ResourceGroupUIBean.permissions.configureRead and param.mode eq 'group' and not empty param.arcuId}">
+ <f:facet name="header">
+ <h:outputText value="Group Configuration Update Request"/>
+ </f:facet>
+ <h:form id="configSetForm">
+ <input type="hidden" name="groupId" value="#{param.groupId}"/>
+ <input type="hidden" name="arcuId" value="#{param.arcuId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <a4j:region selfRendered="false">
+ <a4j:outputPanel layout="block" ajaxRendered="true" keepTransient="true">
+ <onc:configSet id="rhq_configSet"
+ configurationSet="#{GroupResourceConfigurationHistoryDetailsUIBean.configurationSet}"
+ readOnly="true"/>
+ </a4j:outputPanel>
+ </a4j:region>
+ </h:form>
+ </rich:panel>
+
+ <rich:panel rendered="#{ResourceGroupUIBean.permissions.configureRead and param.mode eq 'details' and not empty param.arcuId}">
+ <f:facet name="header">
+ <h:outputText value="Individual Resource Configuration Updates"/>
+ </f:facet>
+
+ <h:form id="resourceConfigurationUpdateDetailsForm">
+ <input type="hidden" name="groupId" value="#{param.groupId}"/>
+ <input type="hidden" name="arcuId" value="#{param.arcuId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <ui:param name="groupResourceConfigurationDetailsDataModel" value="#{GroupResourceConfigurationHistoryDetailsUIBean.dataModel}"/>
+ <rich:dataTable id="groupResourceConfigurationDetailsDataTable"
+ rows="#{PageControl.GroupResourceConfigurationUpdateDetails.pageSize}"
+ value="#{groupResourceConfigurationDetailsDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 20%, 20%, 20%, 30%, 9%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="GroupResourceConfigurationUpdateDetails" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="cu.resource.name">
+ <h:outputText styleClass="headerText" value="Resource" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.resourceName}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="cu.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.status}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Details" />
+ </f:facet>
+
+ <h:outputText value="#{item.errorMessage}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="cu.createdTime">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/rhq/resource/configuration/history-plain.xhtml">
+ <f:param name="id" value="#{item.resourceId}" />
+ <f:param name="configId" value="#{item.id}" />
+ <h:outputText value="#{item.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="cu.modifiedTime">
+ <h:outputText styleClass="headerText" value="Last Updated" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.modifiedTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="cu.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.subjectName}" />
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6" width="100%">
+ <ui:param name="paginationDataTableName" value="groupResourceConfigurationDetailsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{groupResourceConfigurationDetailsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.GroupResourceConfigurationUpdateDetails}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <a4j:keepAlive beanName="GroupResourceConfigurationHistoryUIBean"/>
+ <a4j:keepAlive beanName="GroupResourceConfigurationHistoryDetailsUIBean"/>
+ </h:form>
+ </rich:panel>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/viewCurrent-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/viewCurrent-plain.xhtml
new file mode 100644
index 0000000..97184d3
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/viewCurrent-plain.xhtml
@@ -0,0 +1,55 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.configureRead}"
+ value="You do not have permissions to view configuration data for this group" />
+
+ <h:form id="configSetForm" rendered="#{ResourceGroupUIBean.permissions.configureRead and ViewGroupResourceConfigurationUIBean.configurationSet ne null}">
+
+ <input type="hidden" name="groupId" value="#{ViewGroupResourceConfigurationUIBean.group.id}" />
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.configureWrite}"
+ value="You do not have permissions to change the configuration of this group"/>
+
+ <!-- edit button at top of config -->
+ <h:panelGrid columns="1" styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton value="EDIT" action="#{ViewGroupResourceConfigurationUIBean.edit}"
+ title="Edit this Compatible Group Configuration"
+ rendered="${ResourceGroupUIBean.permissions.configureWrite}"
+ styleClass="buttonmed"/>
+ </h:panelGrid>
+
+ <a4j:region selfRendered="false">
+ <a4j:outputPanel layout="block" ajaxRendered="true" keepTransient="true">
+ <onc:configSet id="rhq_configSet"
+ configurationSet="#{ViewGroupResourceConfigurationUIBean.configurationSet}"
+ readOnly="true"/>
+ </a4j:outputPanel>
+ </a4j:region>
+
+ <!-- edit button at bottom of config -->
+ <h:panelGrid columns="1" styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton value="EDIT" action="#{ViewGroupResourceConfigurationUIBean.edit}"
+ title="Edit this Compatible Group Configuration"
+ rendered="${ResourceGroupUIBean.permissions.configureWrite}"
+ styleClass="buttonmed"/>
+ </h:panelGrid>
+
+ </h:form>
+
+ <ui:remove><!--<a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"/>--></ui:remove>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit ba1bfcc92fbd25264c50513436dcade710e87e4d
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:05:22 2010 -0400
reformat, cosmetic
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 3363ea8..a1f46fc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -134,8 +134,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
int groupId = this.groupComposite.getResourceGroup().getId();
monitoringTab.updateSubTab("Graphs", new FullHTMLPane("/rhq/group/monitor/graphs-plain.xhtml?groupId="
- inventoryTab.updateSubTab("Overview", new OverviewView(this.groupComposite));
- inventoryTab.updateSubTab("Members", ResourceSearchView.getMembersOf(this.groupComposite.getResourceGroup().getId()));
+ groupId));
monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/group/monitor/tables-plain.xhtml?groupId="
+ groupId));
@@ -143,6 +141,9 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
+ groupId));
monitoringTab.updateSubTab("Call Time", new FullHTMLPane("/rhq/group/monitor/response-plain.xhtml?groupId="
+ groupId));
+
+ inventoryTab.updateSubTab("Overview", new OverviewView(this.groupComposite));
+ inventoryTab.updateSubTab("Members", ResourceSearchView.getMembersOf(groupId));
// inventoryTab.updateSubTab("Connection Settings", new GroupPluginConfigurationEditView(this.group.getId(), this.group.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
//
// operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
commit 11ebce8b1b6188a2550f8b210d911ea225a355e0
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:04:44 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished group > events tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index c2a4f35..3363ea8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -160,6 +160,8 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
// contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
+ eventsTab.updateSubTab("History", new FullHTMLPane("/rhq/group/events/history-plain.xhtml?groupId=" + groupId));
+
// topTabSet.setSelectedTab(selectedTab);
updateTabStatus();
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/events/history-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/events/history-plain.xhtml
new file mode 100644
index 0000000..00547cb
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/events/history-plain.xhtml
@@ -0,0 +1,19 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:include src="/rhq/common/events/history-plain.xhtml"/>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit 3cc66b4df2bdfc4252f5e5844412458f3cca4f7d
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:04:13 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished group > monitor tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index c7fbb97..c2a4f35 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -36,6 +36,7 @@ import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
+import org.rhq.enterprise.gui.coregui.client.components.FullHTMLPane;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTab;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedEvent;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedHandler;
@@ -130,16 +131,18 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// FullHTMLPane timelinePane = new FullHTMLPane("/rhq/resource/summary/timeline-plain.xhtml?id=" + resource.getId());
// summaryTab.updateSubTab("Overview", new ResourceOverviewView(resource));
// summaryTab.updateSubTab("Timeline", timelinePane);
+ int groupId = this.groupComposite.getResourceGroup().getId();
- // monitoringTab.updateSubTab("Graphs", new GraphListView(resource)); // new FullHTMLPane("/rhq/common/monitor/graphs.xhtml?id=" + resource.getId()));
- // monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/common/monitor/tables-plain.xhtml?id=" + resource.getId()));
- // monitoringTab.updateSubTab("Traits", new FullHTMLPane("/rhq/resource/monitor/traits-plain.xhtml?id=" + resource.getId()));
- // monitoringTab.updateSubTab("Availability", new FullHTMLPane("/rhq/resource/monitor/availabilityHistory-plain.xhtml?id=" + resource.getId()));
- // monitoringTab.updateSubTab("Schedules", new FullHTMLPane("/rhq/resource/monitor/schedules-plain.xhtml?id=" + resource.getId()));
- // monitoringTab.updateSubTab("Call Time", new CallTimeView(resource));
- //
+ monitoringTab.updateSubTab("Graphs", new FullHTMLPane("/rhq/group/monitor/graphs-plain.xhtml?groupId="
inventoryTab.updateSubTab("Overview", new OverviewView(this.groupComposite));
inventoryTab.updateSubTab("Members", ResourceSearchView.getMembersOf(this.groupComposite.getResourceGroup().getId()));
+ + groupId));
+ monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/group/monitor/tables-plain.xhtml?groupId="
+ + groupId));
+ monitoringTab.updateSubTab("Schedules", new FullHTMLPane("/rhq/group/monitor/schedules-plain.xhtml?groupId="
+ + groupId));
+ monitoringTab.updateSubTab("Call Time", new FullHTMLPane("/rhq/group/monitor/response-plain.xhtml?groupId="
+ + groupId));
// inventoryTab.updateSubTab("Connection Settings", new GroupPluginConfigurationEditView(this.group.getId(), this.group.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
//
// operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
@@ -235,6 +238,8 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
topTabSet.disableTab(eventsTab);
}
+ // only enable "Call Time" sub-tab for those that implement it
+ monitoringTab.setSubTabEnabled("Call Time", typeFacets.contains(ResourceTypeFacet.CALL_TIME));
}
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/graphs.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/graphs.xhtml
index 89474e1..647d131 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/graphs.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/graphs.xhtml
@@ -1,20 +1,14 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
- xmlns:rich="http://richfaces.ajax4jsf.org/rich"
- xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:onc="http://jboss.org/on/component"
- xmlns:onf="http://jboss.org/on/function">
-
-<ui:composition>
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<!-- chart actions -->
@@ -49,8 +43,8 @@
<!-- spacer for date/time overlay, so it doesn't overlap metric display range -->
<tr class="BlockContent">
<td>
- <br />
- <br />
+ <br />
+ <br />
</td>
</tr>
@@ -126,6 +120,4 @@
addWindowOnResizeEvent(maxIndicatorDivHeight);
</script>
-</ui:composition>
-
-</html>
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/graphs-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/graphs-plain.xhtml
new file mode 100644
index 0000000..14f6b68
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/graphs-plain.xhtml
@@ -0,0 +1,19 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:include src="/rhq/common/monitor/graphs.xhtml" />
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/response-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/response-plain.xhtml
new file mode 100644
index 0000000..75a22f5
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/response-plain.xhtml
@@ -0,0 +1,15 @@
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:include src="/rhq/common/monitor/response-plain.xhtml" />
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/schedules-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/schedules-plain.xhtml
new file mode 100644
index 0000000..0641783
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/schedules-plain.xhtml
@@ -0,0 +1,153 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.measure}" value="You don't have the measure permission for this group and therefore can not change metric schedules"/>
+
+ <h:form id="resourceGroupSchedulesForm">
+ <!-- hack to override the default button on the page, make this button pseudo-first in the form,
+ but take it out of the document flow and position it off the screen -->
+ <div style="position:absolute; top:-100px; ">
+ <onc:selectCommandButton id="enableAndSetSelectedSchedules"
+ name="enableAndSetSelectedSchedules"
+ action="#{ListResourceGroupMeasurementScheduleUIBean.enableAndSetSelected}"
+ value="SET" target="selectedResourceGroupSchedules"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.measure}" />
+ </div>
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Configure Metric Collection Schedules"/>
+ </f:facet>
+
+ <ui:param name="resourceGroupSchedulesDataModel" value="#{ListResourceGroupMeasurementScheduleUIBean.dataModel}"/>
+ <rich:dataTable id="resourceGroupSchedulesDataTable"
+ rows="#{PageControl.ResourceGroupMeasurementScheduleList.pageSize}"
+ value="#{resourceGroupSchedulesDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 20%, 30%, 20%, 9%, 20%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceGroupMeasurementScheduleList" />
+ </f:facet>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <onc:allSelect target="selectedResourceGroupSchedules" />
+ </f:facet>
+
+ <onc:select name="selectedResourceGroupSchedules" value="#{item.measurementDefinition.id}" />
+ </rich:column>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="definition.displayName">
+ <h:outputText styleClass="headerText" value="Metric" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.measurementDefinition.displayName}"/>
+ </rich:column>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{item.measurementDefinition.description}"/>
+ </rich:column>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="definition.dataType">
+ <h:outputText styleClass="headerText" value="Type" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.measurementDefinition.dataType}"/>
+ </rich:column>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Enabled" />
+ </f:facet>
+ <h:outputText value="#{(empty item.collectionEnabled) ? 'SOME' : (item.collectionEnabled ? 'Yes' : 'No')}" />
+ </rich:column>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Collection Interval" />
+ </f:facet>
+
+ <h:outputText value="#{item.collectionInterval}" rendered="#{item.collectionInterval ne 0}">
+ <f:converter converterId="DurationConverter" />
+ </h:outputText>
+ <h:outputText value="DIFFERENT" rendered="#{item.collectionInterval eq 0}" />
+ </rich:column>
+
+ <f:facet name="footer" rendered="false">
+ <rich:columnGroup>
+ <rich:column colspan="6">
+ <h:panelGrid columns="5" width="100%" rendered="#{ResourceGroupUIBean.permissions.measure}">
+ <onc:selectCommandButton id="enableSelectedSchedules"
+ name="enableSelectedSchedules"
+ action="#{ListResourceGroupMeasurementScheduleUIBean.enableSelected}"
+ value="ENABLE" target="selectedResourceGroupSchedules"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.measure}" />
+
+
+ <onc:selectCommandButton id="disableSelectedSchedules"
+ name="disableSelectedSchedules"
+ action="#{ListResourceGroupMeasurementScheduleUIBean.disableSelected}"
+ value="DISABLE" target="selectedResourceGroupSchedules"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.measure}" />
+
+ <h:panelGrid columns="3">
+ <h:outputText value="Collection Interval: "/>
+ <onc:duration binding="#{ListResourceGroupMeasurementScheduleUIBean.duration}"
+ optionList="s,m,h"/>
+ <onc:selectCommandButton id="enableAndSetSelectedSchedules"
+ name="enableAndSetSelectedSchedules"
+ action="#{ListResourceGroupMeasurementScheduleUIBean.enableAndSetSelected}"
+ value="SET" target="selectedResourceGroupSchedules"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.measure}"/>
+ </h:panelGrid>
+ <rich:spacer/>
+ <ui:param name="paginationDataTableName" value="resourceGroupSchedulesDataTable"/>
+ <ui:param name="paginationDataModel" value="#{resourceGroupSchedulesDataModel}"/>
+ <ui:param name="paginationPageControl"
+ value="#{PageControl.ResourceGroupMeasurementScheduleList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </h:panelGrid>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+</ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/tables-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/tables-plain.xhtml
new file mode 100644
index 0000000..a58529d
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/tables-plain.xhtml
@@ -0,0 +1,128 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:param name="resourceGroupHealthSummaryDataModel"
+ value="#{ResourceGroupMetricsTableUIBean.dataModel}" />
+
+ <ui:include src="/rhq/common/monitor/tables.xhtml" />
+
+ <rich:panel styleClass="BlockContent">
+
+ <f:facet name="header" styleClass="BlockTitle">
+ <a name="Group member Health" />
+ Group Member Health
+ </f:facet>
+
+ <h:form id="groupHealthSummaryForm">
+
+ <!-- On submit make sure these are provided for the context of any new instance of the UI beans -->
+ <input type="hidden" name="groupId"
+ value="#{ResourceGroupUIBean.groupId}" />
+
+ <a4j:keepAlive beanName="ResourceGroupMetricsTableUIBean"/>
+
+ <rich:dataTable id="resourceGroupHealthSummaryDataTable"
+ rows="#{PageControl.ResourceGroupHealthSummary.pageSize}"
+ value="#{resourceGroupHealthSummaryDataModel}"
+ var="healthSummary"
+ columnsWidth="1%"
+ width="100%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <rich:column width="1%">
+ <f:facet name="header">
+ <onc:allSelect target="selectedResources" />
+ </f:facet>
+
+ <onc:select name="selectedResources"
+ value="#{healthSummary.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Resource Name" />
+ </f:facet>
+
+ <h:outputLink
+ value="#{onf:getDefaultResourceTabURL()}">
+ <f:param name="id" value="#{healthSummary.id}" />
+ <h:outputText value="#{healthSummary.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Alerts" />
+ </f:facet>
+
+ <h:outputLink
+ value="/rhq/resource/alert/listAlertHistory-plain.xhtml">
+ <f:param name="id" value="#{healthSummary.id}"/>
+ <f:param name="mode" value="list"/>
+ <h:outputText value="#{healthSummary.alerts}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Availability" />
+ </f:facet>
+
+ <h:graphicImage
+ value="/images/icons/availability_green_16.png" alt="Up"
+ title="Up"
+ rendered="#{healthSummary.availabilityType == 'UP'}" />
+ <h:graphicImage value="/images/icons/availability_red_16.png"
+ alt="Down" title="Down"
+ rendered="#{healthSummary.availabilityType == 'DOWN'}" />
+ <h:graphicImage
+ value="/images/icons/availability_grey_16.png"
+ alt="Unknown" title="Unknown"
+ rendered="#{healthSummary.availabilityType == null}" />
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="4" width="100%">
+
+ <onc:selectCommandButton
+ action="#{ResourceGroupMetricsCompareUIBean.compareSelected}"
+ value="COMPARE METRICS"
+ target="selectedResources" low="2"
+ styleClass="on-pager-button buttonsmall" />
+
+ <ui:param name="paginationDataTableName"
+ value="resourceGroupHealthSummaryDataTable" />
+ <ui:param name="paginationDataModel"
+ value="#{resourceGroupHealthSummaryDataModel}" />
+ <ui:param name="paginationPageControl"
+ value="#{PageControl.ResourceGroupHealthSummary}" />
+ <ui:include
+ src="/rhq/resource/include/pagination-plain.xhtml" />
+
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+ </h:form>
+
+ </rich:panel>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/tables-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/tables-plain.xhtml
new file mode 100644
index 0000000..2b4b0c1
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/tables-plain.xhtml
@@ -0,0 +1,19 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:include src="/rhq/common/monitor/tables.xhtml"/>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit 242e1bbd40af27e6b06027da95b0cf5ee4e2024c
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:02:10 2010 -0400
move the measurement-based navigation rule to the appropriate *-navigiation.xml file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/inventory-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/inventory-navigation.xml
index 9620666..976dd89 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/inventory-navigation.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/inventory-navigation.xml
@@ -109,19 +109,4 @@
</navigation-rule>
- <navigation-rule>
-
- <from-view-id>/rhq/group/monitor/tables.xhtml</from-view-id>
-
- <!-- === compareResourcesGroupMetrics (struts) ========================= -->
-
- <navigation-case>
- <from-action>#{ResourceGroupMetricsCompareUIBean.compareSelected}</from-action>
- <from-outcome>compareResourceGroupMetrics</from-outcome>
- <to-view-id>/resource/common/monitor/Visibility.do?mode=compareMetrics&category=COMPATIBLE&groupId=#{param.groupId}#{ResourceGroupMetricsCompareUIBean.selected}</to-view-id>
- <redirect />
- </navigation-case>
-
- </navigation-rule>
-
</faces-config>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml
index d7ef174..ee342f0 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml
@@ -70,4 +70,19 @@
</navigation-rule>
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/monitor/tables.xhtml</from-view-id>
+
+ <!-- === compareResourcesGroupMetrics (struts) ========================= -->
+
+ <navigation-case>
+ <from-action>#{ResourceGroupMetricsCompareUIBean.compareSelected}</from-action>
+ <from-outcome>compareResourceGroupMetrics</from-outcome>
+ <to-view-id>/resource/common/monitor/Visibility.do?mode=compareMetrics&category=COMPATIBLE&groupId=#{param.groupId}#{ResourceGroupMetricsCompareUIBean.selected}</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ </navigation-rule>
+
</faces-config>
\ No newline at end of file
commit ede4e8b5e26a385afe77864f2d207cfb602d4df5
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:01:35 2010 -0400
prepare "plain" navigation scheme for iframed-facelets for groups
* copy/paste entire XXX-navigation.xml file to XXX-plain-navigation.xml
* search/replace *.xhtml with *-plain.xhtml inside each
* do this for the follow group subsystems:
** alerts, configuration, events, measurement, operations
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/alert-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/alert-plain-navigation.xml
new file mode 100644
index 0000000..854b6a6
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/alert-plain-navigation.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- Group Alert Definition List -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml?groupId=#{param.groupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createNewAlertDefinition</from-outcome>
+ <to-view-id>/alerts/Config.do?groupId=#{param.groupId}&mode=new</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml?groupId=#{param.groupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Alert History List -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/alert/listGroupAlertHistory-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>dateFilter</from-outcome>
+ <to-view-id>/rhq/group/alert/listGroupAlertHistory-plain.xhtml?groupId=#{param.groupId}&date=#{param.date}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/alert/listGroupAlertHistory-plain.xhtml?groupId=#{param.groupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/alert/listGroupAlertHistory-plain.xhtml?groupId=#{param.groupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/configuration-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/configuration-plain-navigation.xml
new file mode 100644
index 0000000..e89ccd6
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/configuration-plain-navigation.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <navigation-rule>
+ <from-view-id>/rhq/group/configuration/editCurrent-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.addNewOpenMapMemberProperty}</from-action>
+ <to-view-id>/rhq/group/configuration/addSimple-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/group/configuration/addSimple-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/group/configuration/editCurrent-plain.xhtml?refresh=rhq_prop</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/configuration/history-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/configuration/history-plain.xhtml?groupId=#{param.groupId}&mode=#{param.mode}&arcuId=#{param.arcuId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/configuration/history-plain.xhtml?groupId=#{param.groupId}&mode=#{param.mode}&arcuId=#{param.arcuId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+
+
+</faces-config>
+
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/events-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/events-plain-navigation.xml
new file mode 100644
index 0000000..447874c
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/events-plain-navigation.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/events/history-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/events/history-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/events/history-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
+
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-plain-navigation.xml
new file mode 100644
index 0000000..d2a81e0
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-plain-navigation.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- ResourceGroup Measurement Schedules -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/monitor/schedules-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/monitor/schedules-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/monitor/schedules-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Graphs -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/monitor/graphs-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/monitor/graphs-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Tables -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/monitor/tables-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/monitor/tables-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Response -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/monitor/response-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/monitor/response-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/monitor/response-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/monitor/tables-plain.xhtml</from-view-id>
+
+ <!-- === compareResourcesGroupMetrics (struts) ========================= -->
+
+ <navigation-case>
+ <from-action>#{ResourceGroupMetricsCompareUIBean.compareSelected}</from-action>
+ <from-outcome>compareResourceGroupMetrics</from-outcome>
+ <to-view-id>/resource/common/monitor/Visibility.do?mode=compareMetrics&category=COMPATIBLE&groupId=#{param.groupId}#{ResourceGroupMetricsCompareUIBean.selected}</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/operation-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/operation-plain-navigation.xml
new file mode 100644
index 0000000..a60e56a
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/operation-plain-navigation.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- New Resource Group Operation Schedule -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/operation/groupOperationScheduleNew-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- schedule an operation for deferred execution -->
+ <from-outcome>viewOperationSchedules</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationSchedules-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- schedule an operation for immediate execution -->
+ <from-outcome>viewOperationHistory</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go back here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationScheduleNew-plain.xhtml?groupId=#{param.groupId}&opId=#{param.opId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationScheduleNew-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Resource Group Operation Schedules -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/operation/groupOperationSchedules-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationSchedules-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationSchedules-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- schedule an operation for immediate execution -->
+ <from-outcome>viewOperationHistory</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- schedule an operation for immediate execution -->
+ <from-outcome>viewOperationHistory</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Resource Group Operation History -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.accessMap}</from-action>
+ <to-view-id>/rhq/group/operation/view-results-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml?groupId=#{param.groupId}&opId=#{param.opId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
index 03f80f0..1bcfe79 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
@@ -177,6 +177,12 @@
/WEB-INF/jsf-navigation-resource-group/operation-navigation.xml,
/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml,
+ /WEB-INF/jsf-navigation-resource-group/alert-plain-navigation.xml,
+ /WEB-INF/jsf-navigation-resource-group/configuration-plain-navigation.xml,
+ /WEB-INF/jsf-navigation-resource-group/events-plain-navigation.xml,
+ /WEB-INF/jsf-navigation-resource-group/operation-plain-navigation.xml,
+ /WEB-INF/jsf-navigation-resource-group/measurement-plain-navigation.xml,
+
/WEB-INF/jsf-navigation-auto-group/events-navigation.xml,
/WEB-INF/jsf-navigation-auto-group/measurement-navigation.xml,
commit 67479a29abb05104a075a8c5e6a4be1aea9135c6
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:00:07 2010 -0400
extend the "plain" layout scheme for iframed-facelets for groups
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/main-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/main-plain.xhtml
new file mode 100644
index 0000000..5faaa7c
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/main-plain.xhtml
@@ -0,0 +1,64 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+ <h1>Default Group Content</h1>
+ </ui:define>
+
+ <ui:remove>
+
+<!--
+ <f:param name="groupId" value="#{param.groupId}"/>
+ <f:param name="parentGroupId" value="#{param.parentGroupId}"/>
+ <f:param name="category" value="#{param.category}"/>
+
+ <onc:tab name="Monitor" image="/images/icons/Monitor_grey_16.png" rendered="#{ResourceGroupUIBean.compatible}">
+ <onc:subtab name="Graphs" url="/rhq/group/monitor/graphs.xhtml"/>
+ <onc:subtab name="Tables" url="/rhq/group/monitor/tables.xhtml"/>
+ <onc:subtab name="Schedules" url="/rhq/group/monitor/schedules.xhtml"/>
+ <c:if test="#{GlobalPermissionsUIBean.experimental}">
+ <onc:subtab name="Response" url="/rhq/group/monitor/response.xhtml"/>
+ </c:if>
+ </onc:tab>
+
+ <onc:tab name="Inventory" image="/images/icons/Inventory_grey_16.png">
+ <onc:subtab name="Overview" url="/rhq/group/inventory/view.xhtml" />
+ <c:if test="#{ResourceGroupUIBean.compatible and ResourceGroupUIBean.facets.pluginConfiguration}">
+ <onc:subtab name="Connection" url="/rhq/group/inventory/view-connection.xhtml" />
+ </c:if>
+ </onc:tab>
+
+ <onc:tab name="Alert" image="/images/icons/Alert_grey_16.png"
+ rendered="#{monitorEnabled and ResourceGroupUIBean.compatible}">
+ <onc:subtab name="Definitions" url="/rhq/group/alert/listGroupAlertDefinitions.xhtml" />
+ <onc:subtab name="History" url="/rhq/group/alert/listGroupAlertHistory.xhtml" />
+ </onc:tab>
+
+ <onc:tab name="Configuration" displayName="Configure" image="/images/icons/Configure_grey_16.png"
+ rendered="#{ResourceGroupUIBean.compatible and ResourceGroupUIBean.facets.configuration}">
+ <onc:subtab name="Current" url="/rhq/group/configuration/viewCurrent.xhtml" />
+ <onc:subtab name="History" url="/rhq/group/configuration/history.xhtml" />
+ </onc:tab>
+
+ <onc:tab name="Operations" image="/images/icons/Operation_grey_16.png" rendered="#{ResourceGroupUIBean.compatible and ResourceGroupUIBean.facets.operation}">
+ <onc:subtab name="New" url="/rhq/group/operation/groupOperationScheduleNew.xhtml"/>
+ <onc:subtab name="Schedules" url="/rhq/group/operation/groupOperationSchedules.xhtml"/>
+ <onc:subtab name="History" url="/rhq/group/operation/groupOperationHistory.xhtml"/>
+ </onc:tab>
+
+ <onc:tab name="Events" image="/images/icons/Events_grey_16.png" rendered="#{ResourceGroupUIBean.compatible and ResourceGroupUIBean.facets.event}">
+ <onc:subtab name="History" url="/rhq/group/events/history.xhtml"/>
+ </onc:tab>
+ -->
+ </ui:remove>
+
+</ui:composition>
\ No newline at end of file
commit 84c915b2f0955e7a7693c0c8f5676b0cef53419d
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 01:58:45 2010 -0400
fix group-wise sub-tabs, we only support a subset of resource-wise sub-tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 23da6c5..c7fbb97 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -89,7 +89,7 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
summaryTab.registerSubTabs("Overview", "Timeline");
monitoringTab = new TwoLevelTab("Monitoring", "/images/icons/Monitor_grey_16.png");
- monitoringTab.registerSubTabs("Graphs", "Tables", "Traits", "Availability", "Schedules", "Call Time");
+ monitoringTab.registerSubTabs("Graphs", "Tables", "Schedules", "Call Time");
inventoryTab = new TwoLevelTab("Inventory", "/images/icons/Inventory_grey_16.png");
inventoryTab.registerSubTabs("Overview", "Members", "Connection Settings");
commit 79ffb74e96fafa82561a329341487bf149bb8c15
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 01:57:38 2010 -0400
reformat, cosmetic
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 144442b..23da6c5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -69,7 +69,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
private ResourceGroupTitleBar titleBar;
-
@Override
protected void onDraw() {
super.onDraw();
@@ -120,7 +119,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// CoreGUI.addBreadCrumb(getPlace());
}
-
public void onGroupSelected(ResourceGroupComposite groupComposite) {
this.groupComposite = groupComposite;
@@ -181,8 +179,8 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
new ResourceTypeRepository.TypeLoadedCallback() {
public void onTypesLoaded(ResourceType type) {
group.setResourceType(type);
- GWTServiceLookup.getAuthorizationService().getImplicitGroupPermissions(
- group.getId(), new AsyncCallback<Set<Permission>>() {
+ GWTServiceLookup.getAuthorizationService().getImplicitGroupPermissions(group.getId(),
+ new AsyncCallback<Set<Permission>>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError("Failed to load group permissions.", caught);
}
@@ -224,7 +222,7 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// Configuration tab is only enabled for compatible groups of a type that supports the Configuration facet
// and when the current user has the CONFIGURE_READ permission.
- if (!typeFacets.contains(ResourceTypeFacet.CONFIGURATION) && permissions.isConfigureRead()) {
+ if (typeFacets.contains(ResourceTypeFacet.CONFIGURATION) && permissions.isConfigureRead()) {
topTabSet.enableTab(configurationTab);
} else {
topTabSet.disableTab(configurationTab);
@@ -239,35 +237,32 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
}
-
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
// Switch tabs directly, rather than letting the history framework do it, to avoid redrawing the outer views.
selectTab(tabSelectedEvent.getId(), tabSelectedEvent.getSubTabId());
String tabPath = "/" + tabSelectedEvent.getId() + "/" + tabSelectedEvent.getSubTabId();
String path = "ResourceGroup/" + this.groupComposite.getResourceGroup().getId() + tabPath;
-
+
// But still add an item to the history, specifying false to tell it not to fire an event.
History.newItem(path, false);
}
-
public void renderView(ViewPath viewPath) {
// e.g. #ResourceGroup/10010/Inventory/Overview
- String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
+ String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
String subTabName = (viewPath.viewsLeft() >= 1) ? viewPath.getNext().getPath() : null; // e.g. "Overview"
selectTab(tabName, subTabName);
}
-
public void selectTab(String tabName, String subtabName) {
if (tabName == null) {
tabName = DEFAULT_TAB_NAME;
}
- TwoLevelTab tab = (TwoLevelTab)this.topTabSet.getTabByTitle(tabName);
+ TwoLevelTab tab = (TwoLevelTab) this.topTabSet.getTabByTitle(tabName);
if (tab == null) {
CoreGUI.getErrorHandler().handleError("Invalid tab name: " + tabName);
// TODO: Should we fire a history event here to redirect to a valid bookmark?
- tab = (TwoLevelTab)this.topTabSet.getTabByTitle(DEFAULT_TAB_NAME);
+ tab = (TwoLevelTab) this.topTabSet.getTabByTitle(DEFAULT_TAB_NAME);
}
this.topTabSet.selectTab(tab);
if (subtabName != null) {
commit 1a767576db3dfd69412a858eef0af3dcdd920955
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 01:56:13 2010 -0400
always render call-time iframe-facelet, conditionally render the sub-tab instead
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index ea7b88e..92d74eb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -27,6 +27,8 @@ import com.smartgwt.client.types.Side;
import com.smartgwt.client.widgets.layout.VLayout;
import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.measurement.DataType;
+import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.composite.ResourcePermission;
@@ -204,7 +206,6 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
updateTabStatus();
- topTabSet.markForRedraw();
}
private void updateTabStatus() {
@@ -215,8 +216,8 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
resource.getResourceType().getId(),
EnumSet.of(ResourceTypeRepository.MetadataType.content, ResourceTypeRepository.MetadataType.operations,
ResourceTypeRepository.MetadataType.events,
- ResourceTypeRepository.MetadataType.resourceConfigurationDefinition),
- new ResourceTypeRepository.TypeLoadedCallback() {
+ ResourceTypeRepository.MetadataType.resourceConfigurationDefinition,
+ ResourceTypeRepository.MetadataType.measurements), new ResourceTypeRepository.TypeLoadedCallback() {
public void onTypesLoaded(ResourceType type) {
ResourceDetailView.this.type = type;
@@ -275,10 +276,23 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
topTabSet.enableTab(contentTab);
}
+ // only enable "Call Time" sub-tab for those that implement it
+ monitoringTab.setSubTabEnabled("Call Time", implementsCallTime(type));
+
if (topTabSet.getSelectedTab().getDisabled()) {
topTabSet.selectTab(0);
}
+ topTabSet.markForRedraw();
+ }
+
+ private boolean implementsCallTime(ResourceType type) {
+ for (MeasurementDefinition definition : type.getMetricDefinitions()) {
+ if (definition.getDataType() == DataType.CALLTIME) {
+ return true;
+ }
+ }
+ return false;
}
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml
index aa6576f..3da09e2 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml
@@ -14,20 +14,6 @@
<rich:panel styleClass="BlockContent">
- <c:if test="#{!ResourceUIBean.facets.callTime}">
- <c:if test="#{CallTimeUIBean.context.resourceId != -1}">
- Response Time Metrics are not supported for this resource.
- </c:if>
- <c:if test="#{CallTimeUIBean.context.groupId != -1}">
- Response Time Metrics are not supported for this compatible group.
- </c:if>
- <c:if test="#{CallTimeUIBean.context.parentResourceId != -1 and CallTimeUIBean.context.resourceTypeId != -1}">
- Response Time Metrics are not supported for this auto-group.
- </c:if>
-
- </c:if>
-
- <c:if test="#{ResourceUIBean.facets.callTime}">
<h:form id="callTimeForm">
<a4j:keepAlive beanName="CallTimeUIBean"/>
@@ -165,7 +151,6 @@
</table>
</h:form>
- </c:if>
</rich:panel>
commit a18620eb8f17662207c96e6b757d59f5cce71b9a
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 01:55:03 2010 -0400
allow sub-tabs to render as conditionally enabled/disabled buttons
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java
index bc79260..eb66445 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java
@@ -18,6 +18,10 @@
*/
package org.rhq.enterprise.gui.coregui.client.components.tab;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Set;
+
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.event.shared.HandlerRegistration;
import com.smartgwt.client.types.Overflow;
@@ -27,11 +31,8 @@ import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.tab.events.TabSelectedEvent;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
-import java.util.LinkedHashMap;
-
/**
* @author Greg Hinkle
*/
@@ -40,6 +41,7 @@ public class SubTabLayout extends VLayout {
ToolStrip buttonBar;
LinkedHashMap<String, Canvas> subtabs = new LinkedHashMap<String, Canvas>();
+ Set<String> disabledSubTabs = new HashSet<String>();
Canvas currentlyDisplayed;
String currentlySelected;
@@ -59,7 +61,6 @@ public class SubTabLayout extends VLayout {
setMargin(0);
setPadding(0);
-
buttonBar = new ToolStrip();
buttonBar.setBackgroundColor("grey");
buttonBar.setWidth100();
@@ -68,7 +69,6 @@ public class SubTabLayout extends VLayout {
addMember(buttonBar);
-
int i = 0;
for (final String title : subtabs.keySet()) {
@@ -78,18 +78,22 @@ public class SubTabLayout extends VLayout {
currentlySelected = title;
}
-
Button button = new Button(title);
button.setShowRollOver(false);
button.setActionType(SelectionType.RADIO);
button.setRadioGroup("subtabs");
button.setBorder(null);
button.setAutoFit(true);
+ if (disabledSubTabs.contains(title)) {
+ button.disable();
+ } else {
+ button.enable();
+ }
button.setBaseStyle("SubTabButton");
-// button.setStyleName("SubTabButton");
-// button.setStylePrimaryName("SubTabButton");
+ // button.setStyleName("SubTabButton");
+ // button.setStylePrimaryName("SubTabButton");
final Integer index = i++;
@@ -110,6 +114,14 @@ public class SubTabLayout extends VLayout {
selectTab(currentlySelected);
}
+ public void enableSubTab(String title) {
+ disabledSubTabs.remove(title);
+ }
+
+ public void disableSubTab(String title) {
+ disabledSubTabs.add(title);
+ }
+
public void updateSubTab(String title, Canvas canvas) {
subtabs.put(title, canvas);
if (isDrawn() && title.equals(currentlySelected)) {
@@ -121,7 +133,7 @@ public class SubTabLayout extends VLayout {
private void draw(Canvas canvas) {
if (currentlyDisplayed != null) {
currentlyDisplayed.hide();
-// removeMember(currentlyDisplayed);
+ // removeMember(currentlyDisplayed);
}
if (canvas != null) {
if (hasMember(canvas)) {
@@ -137,6 +149,9 @@ public class SubTabLayout extends VLayout {
}
}
+ public void unregisterAllSubTabs() {
+ subtabs.clear();
+ }
public void registerSubTab(String title, Canvas canvas) {
if (currentlySelected == null) {
@@ -149,8 +164,6 @@ public class SubTabLayout extends VLayout {
return currentIndex;
}
-
-
public boolean selectTab(String title) {
boolean foundTab = false;
currentlySelected = title;
@@ -164,16 +177,14 @@ public class SubTabLayout extends VLayout {
i++;
}
-
if (isDrawn()) {
- ((Button)buttonBar.getMember(currentIndex)).select();
+ ((Button) buttonBar.getMember(currentIndex)).select();
draw(subtabs.get(title));
}
-
+
return foundTab;
}
-
// ------- Event support -------
// Done with a separate handler manager from parent class on purpose (compatibility issue)
@@ -184,13 +195,8 @@ public class SubTabLayout extends VLayout {
}
public void fireSubTabSelection() {
- TwoLevelTabSelectedEvent event = new TwoLevelTabSelectedEvent(
- "?",
- currentlySelected,
- -1,
- currentIndex,
- currentlyDisplayed
- );
+ TwoLevelTabSelectedEvent event = new TwoLevelTabSelectedEvent("?", currentlySelected, -1, currentIndex,
+ currentlyDisplayed);
hm.fireEvent(event);
}
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java
index 9f9e5d4..c335dc9 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java
@@ -34,17 +34,24 @@ public class TwoLevelTab extends Tab {
layout = new SubTabLayout();
}
-
public void updateSubTab(String tab, Canvas canvas) {
layout.updateSubTab(tab, canvas);
}
public void registerSubTabs(String... tabs) {
- for (String tab :tabs) {
+ for (String tab : tabs) {
layout.registerSubTab(tab, null);
}
}
+ public void setSubTabEnabled(String tab, boolean enabled) {
+ if (enabled) {
+ layout.enableSubTab(tab);
+ } else {
+ layout.disableSubTab(tab);
+ }
+ }
+
public SubTabLayout getLayout() {
return layout;
}
@@ -54,6 +61,4 @@ public class TwoLevelTab extends Tab {
return layout;
}
-
-
}
commit 84b7bda95f895864671f515285923186475638be
Merge: 484719e... a13c17d...
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Aug 11 15:49:10 2010 +0200
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit 2638f279d22aebb3e5ebcad5f7bd17c3d873b33b
Merge: aef5cf2... a13c17d...
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Aug 11 15:02:32 2010 +0200
Merge branch 'master' into code-smell
commit a13c17de245205bc8b5703ab6b45fa8300942b3e
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:21:50 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished resource > operation tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 88e1abd..ea7b88e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -157,7 +157,17 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
inventoryTab.updateSubTab("Children", ResourceSearchView.getChildrenOf(resource.getId()));
inventoryTab.updateSubTab("Connection Settings", new PluginConfigurationEditView(resource)); // new ConfigurationEditor(resource.getId(), resource.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
- operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
+ // comment out GWT-based operation history until...
+ // 1) user can delete history if they possess the appropriate permissions
+ // 2) user can see both operation arguments and results in the history details pop-up
+ // 3) operation arguments/results become read-only configuration data in the history details pop-up
+ // 4) user can navigate to the group operation that spawned this resource operation history, if appropriate
+ //operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
+ // note: enabled operation execution/schedules from left-nav, if it doesn't already exist
+ operationsTab.updateSubTab("History", new FullHTMLPane(
+ "/rhq/resource/operation/resourceOperationHistory-plain.xhtml?id=" + resource.getId()));
+ operationsTab.updateSubTab("Scheduled", new FullHTMLPane(
+ "/rhq/resource/operation/resourceOperationSchedules-plain.xhtml?id=" + resource.getId()));
configurationTab.updateSubTab("Current", new ResourceConfigurationEditView(resource));
configurationTab.updateSubTab("History", ConfigurationHistoryView.getHistoryOf(resource.getId()));
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistory-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistory-plain.xhtml
new file mode 100644
index 0000000..13ee0b0
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistory-plain.xhtml
@@ -0,0 +1,270 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <!--
+ Resource Operation Pending History
+ -->
+
+ <ui:param name="currentOperation"
+ value="#{ResourceOperationPendingHistoryUIBean.oldestInProgressResourceOperation}" />
+
+ <h:form id="pendingForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">In Progress Operations</f:facet>
+
+ <a4j:keepAlive beanName="ResourceOperationPendingHistoryUIBean"/>
+
+ <ui:param name="resourceOperationPendingHistoryDataModel" value="#{ResourceOperationPendingHistoryUIBean.dataModel}"/>
+
+ <a4j:poll id="resourceOperationPendingHistoryDataTableReRenderer"
+ oncomplete="disableConditionalButtons();"
+ interval="60000"
+ ignoreDupResponses="true"
+ actionListener="#{ResourceOperationPendingHistoryUIBean.clearDataModel}"
+ reRender="resourceOperationPendingHistoryDataTable" />
+ <rich:dataTable id="resourceOperationPendingHistoryDataTable"
+ rows="#{PageControl.ResourceOperationPendingHistory.pageSize}"
+ value="#{resourceOperationPendingHistoryDataModel}"
+ var="pendingItem"
+ width="100%"
+ columnsWidth="1%, 15%, 15%, 20%, 30%, 19%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceOperationPendingHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="pendingSelectedItems" />
+ </f:facet>
+
+ <onc:select name="pendingSelectedItems" value="#{pendingItem.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.createdTime">
+ <h:outputText styleClass="headerText" value="Date Submitted" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml" >
+ <f:param name="id" value="#{param.id}" />
+ <f:param name="opId" value="#{pendingItem.id}" />
+ <h:outputText value="#{pendingItem.operationDefinition.displayName}"/>
+ </h:outputLink>
+
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.operationDefinition.description}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.status}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.subjectName}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6">
+ <onc:selectCommandButton action="#{ResourceOperationPendingHistoryUIBean.cancel}"
+ value="CANCEL SELECTED" target="pendingSelectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.control}"/>
+
+ <ui:param name="paginationDataTableName" value="resourceOperationPendingHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{resourceOperationPendingHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ResourceOperationPendingHistory}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ <!--
+ Resource Operation Completed History
+ -->
+
+ <h:form id="historyForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Completed Operations</f:facet>
+
+ <a4j:keepAlive beanName="ResourceOperationCompletedHistoryUIBean"/>
+
+ <ui:param name="resourceOperationCompletedHistoryDataModel" value="#{ResourceOperationCompletedHistoryUIBean.dataModel}"/>
+
+ <a4j:poll id="resourceOperationCompletedHistoryDataTableReRenderer"
+ oncomplete="disableConditionalButtons();"
+ interval="60000"
+ ignoreDupResponses="true"
+ actionListener="#{ResourceOperationCompletedHistoryUIBean.clearDataModel}"
+ reRender="resourceOperationCompletedHistoryDataTable" />
+ <rich:dataTable id="resourceOperationCompletedHistoryDataTable"
+ rows="#{PageControl.ResourceOperationCompletedHistory.pageSize}"
+ value="#{resourceOperationCompletedHistoryDataModel}"
+ var="historyItem"
+ width="100%"
+ columnsWidth="1%, 12%, 12%, 17%, 37%, 11%, 11%"
+ rowKeyVar="rowIndex"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceOperationCompletedHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="completedSelectedItems" />
+ </f:facet>
+
+ <onc:select name="completedSelectedItems" value="#{historyItem.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.createdTime">
+ <h:outputText styleClass="headerText" value="Date Submitted" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.modifiedTime">
+ <h:outputText styleClass="headerText" value="Date Completed" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.modifiedTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml" >
+ <f:param name="id" value="#{param.id}" />
+ <f:param name="opId" value="#{historyItem.id}" />
+ <h:outputText value="#{historyItem.operationDefinition.displayName}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{historyItem.operationDefinition.description}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText rendered="#{historyItem.status ne 'FAILURE'}" value="#{historyItem.status}"/>
+ <onc:errorPopup popupId="completed-#{historyItem.id}" errorMessage="#{historyItem.errorMessage}" rendered="#{historyItem.status eq 'FAILURE'}">Failure</onc:errorPopup>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.subjectName}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="7" width="100%">
+ <onc:selectCommandButton action="#{ResourceOperationCompletedHistoryUIBean.delete}"
+ value="DELETE SELECTED" target="completedSelectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.control}"/>
+
+ <ui:param name="paginationDataTableName" value="resourceOperationCompletedHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{resourceOperationCompletedHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ResourceOperationCompletedHistory}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <!-- use a hidden button trick (which sends the same action a column click would) so request params aren't lost -->
+ <h:commandButton id="hiddenHistoryButton" style="visibility: hidden;" action="#{TableSorter.obtainFromOutcome}" />
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml
new file mode 100644
index 0000000..d7d9f27
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml
@@ -0,0 +1,122 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+ <br/>
+ <ui:param name="item" value="#{ResourceOperationHistoryDetailsUIBean.history}" />
+
+ <h:form id="operationHistoryDetailsForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+ <input type="hidden" name="opId" value="${param.opId}"/>
+
+ <a4j:keepAlive beanName="ResourceOperationHistoryDetailsUIBean" ajaxOnly="true"/>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationHistory-plain.xhtml">
+ <f:param name="id" value="#{param.id}" />
+ <h:outputText value="< Return to Operation History"/>
+ </h:outputLink>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Details</f:facet>
+ <table>
+ <tr>
+ <td align="right" style="width: 150px;">Operation:</td>
+ <td align="left">
+ <h:outputText value="#{item.operationDefinition.displayName}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Date Submitted:</td>
+ <td align="left">
+ <h:outputText value="#{item.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Date Completed:</td>
+ <td align="left">
+ <h:outputText value="#{item.modifiedTime}" rendered="#{item.status ne 'INPROGRESS'}" >
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Requester:</td>
+ <td align="left">
+ <h:outputText value="#{item.subjectName}" rendered="#{!(empty item.subjectName)}" />
+ <h:outputText value="(unknown)" rendered="#{empty item.subjectName}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Status:</td>
+ <td align="left">
+ <h:outputText rendered="#{item.status eq 'SUCCESS' or item.status eq 'INPROGRESS'}"
+ value="#{item.status}"/>
+ <h:outputLink rendered="#{item.status ne 'SUCCESS' and item.status ne 'INPROGRESS'}"
+ value="#" id="resultsLink">
+ <h:outputText value="#{item.status}"/>
+ <rich:componentControl for="resultsModalPanel" attachTo="resultsLink" operation="show" event="onclick"/>
+ </h:outputLink>
+ <rich:modalPanel id="resultsModalPanel" width="600" height="400"
+ style="overflow: auto;">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Results" />
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="controls">
+ <h:panelGroup>
+ <h:graphicImage value="/images/close.png" style="cursor:pointer" id="resultsModelPanelHideLink"/>
+ <rich:componentControl for="resultsModalPanel" attachTo="resultsModelPanelHideLink" operation="hide" event="onclick"/>
+ </h:panelGroup>
+ </f:facet>
+ <div class="ErrorModalBody">
+ <h:outputText value="#{item.errorMessage}" />
+ </div>
+ </rich:modalPanel>
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Parameters</f:facet>
+ <onc:config configurationDefinition="#{ResourceOperationHistoryDetailsUIBean.parameters.configurationDefinition}"
+ configuration="#{ResourceOperationHistoryDetailsUIBean.parameters.configuration}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="#{ResourceOperationHistoryDetailsUIBean.parameters.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{ResourceOperationHistoryDetailsUIBean.parameters.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"/>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Results</f:facet>
+ <onc:config configurationDefinition="#{ResourceOperationHistoryDetailsUIBean.results.configurationDefinition}"
+ configuration="#{ResourceOperationHistoryDetailsUIBean.results.configuration}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="#{ResourceOperationHistoryDetailsUIBean.results.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{ResourceOperationHistoryDetailsUIBean.results.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"
+ rendered="#{item.status ne 'INPROGRESS'}" />
+ </rich:panel>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationHistory-plain.xhtml">
+ <f:param name="id" value="#{param.id}" />
+ <h:outputText value="< Return to Operation History"/>
+ </h:outputLink>
+
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationScheduleDetails-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationScheduleDetails-plain.xhtml
new file mode 100644
index 0000000..95f9a96
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationScheduleDetails-plain.xhtml
@@ -0,0 +1,73 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+ <br/>
+ <!-- Resource Operation Schedules -->
+ <h:form id="scheduleForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationSchedules-plain.xhtml">
+ <f:param name="id" value="#{param.id}" />
+ <h:outputText value="< Return to Operation Schedules"/>
+ </h:outputLink>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">General Info</f:facet>
+ <table>
+ <tr>
+ <td align="right" style="width: 125px;">Operation:</td>
+ <td align="left">
+ <h:outputText value="#{item.operationDisplayName}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right" style="width: 125px;">Scheduled By:</td>
+ <td align="left">
+ <h:outputText value="#{item.subject.name}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right" style="width: 125px;">Notes:</td>
+ <td align="left">
+ <h:outputText value="#{item.description}" />
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Parameters</f:facet>
+ <onc:config configurationDefinition="#{ResourceOperationScheduleDetailsUIBean.parameters.configurationDefinition}"
+ configuration="#{ResourceOperationScheduleDetailsUIBean.parameters.configuration}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="#{ResourceOperationScheduleDetailsUIBean.parameters.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{ResourceOperationScheduleDetailsUIBean.parameters.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"/>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Schedule Details</f:facet>
+
+ <onc:operationScheduler scheduleDetails="#{ResourceOperationScheduleDetailsUIBean.operationDetails}" readOnly="true"/>
+ </rich:panel>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationSchedules-plain.xhtml">
+ <f:param name="id" value="#{param.id}" />
+ <h:outputText value="< Return to Operation Schedules"/>
+ </h:outputLink>
+
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationSchedules-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationSchedules-plain.xhtml
new file mode 100644
index 0000000..ef0b83f
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationSchedules-plain.xhtml
@@ -0,0 +1,104 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <!-- Resource Operation Schedules -->
+ <h:form id="scheduleForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <!-- Operation Schedule Table -->
+ <rich:panel styleClass="BlockContent">
+
+ <ui:param name="resourceOperationScheduleDataModel" value="#{ResourceOperationScheduleUIBean.dataModel}"/>
+ <rich:dataTable id="resourceOperationScheduleDataTable"
+ rows="0"
+ value="#{resourceOperationScheduleDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 30%, 39%, 30%"
+ styleClass="resources-table"
+ headerClass="tableRowHeader"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="NONE" />
+ </f:facet>
+
+ <rich:column style="width: 1px;">
+ <f:facet name="header">
+ <onc:allSelect target="selectedItems" />
+ </f:facet>
+ <onc:select name="selectedItems" value="#{item.jobId}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Job ID" />
+ </f:facet>
+ <h:commandLink action="#{ResourceOperationScheduleUIBean.selectScheduleToView}">
+ <h:outputText value="#{item.jobId}" />
+ </h:commandLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationScheduleDetails-plain.xhtml" >
+ <f:param name="id" value="#{param.id}" />
+ <f:param name="jobId" value="#{item.jobId}" />
+ <h:outputText value="#{item.operationDisplayName}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Notes" />
+ </f:facet>
+ <h:outputText value="#{item.description}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="User" />
+ </f:facet>
+ <h:outputText value="#{item.subject.name}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="4" width="100%">
+ <onc:selectCommandButton action="#{ResourceOperationScheduleUIBean.unschedule}"
+ value="UNSCHEDULE" target="selectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.control}"/>
+ <onc:selectCommandButton action="#{ResourceOperationScheduleUIBean.executeNow}"
+ value="EXECUTE NOW" target="selectedItems"
+ styleClass="on-pager-button buttonsmall"
+ low="1" high="1"
+ rendered="#{ResourceUIBean.permissions.control}"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
commit 4274e4c27857fec55a502d90ba0675bcf398f290
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:21:31 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished resource > alerts tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index bd39bfc..88e1abd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -162,9 +162,17 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
configurationTab.updateSubTab("Current", new ResourceConfigurationEditView(resource));
configurationTab.updateSubTab("History", ConfigurationHistoryView.getHistoryOf(resource.getId()));
- alertsTab.updateSubTab("History", new ResourceAlertHistoryView(resource.getId()));
- alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
-
+ // comment out GWT-based alert definitions/history views until...
+ // 1) new workflow is implement for alert definition creation, with particular attention to interaction model for alert notifications
+ // 2) user can delete/ack/purgeAll alerts if they possess the appropriate permissions
+ // 3) user can enable/disable/delete alert definitions if they possess the appropriate permissions
+ // 4) user can search alert history by: date alert was fired, alert priority, or alert definition
+ //alertsTab.updateSubTab("History", new ResourceAlertHistoryView(resource.getId()));
+ //alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
+ alertsTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/alert/listAlertHistory-plain.xhtml?id="
+ + resource.getId()));
+ alertsTab.updateSubTab("Definitions", new FullHTMLPane(
+ "/rhq/resource/alert/listAlertDefinitions-plain.xhtml?id=" + resource.getId()));
// comment out GWT-based view until...
// 1) user can search event history by: metric display range, event source, event details, event severity
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions-plain.xhtml
new file mode 100644
index 0000000..746eb4a
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions-plain.xhtml
@@ -0,0 +1,161 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="alertDefinitionsListForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <rich:panel styleClass="BlockContent">
+
+ <a4j:keepAlive beanName="ListAlertDefinitionsUIBean"/>
+
+ <ui:param name="alertDefinitionsDataModel" value="#{ListAlertDefinitionsUIBean.dataModel}"/>
+ <rich:dataTable id="alertDefinitionsDataTable"
+ rows="#{PageControl.AlertDefinitionsList.pageSize}"
+ value="#{alertDefinitionsDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 25%, 30%, 20%, 5%, 14%, 5%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+
+ <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>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.name">
+ <h:outputText styleClass="headerText" value="Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Config.do">
+ <f:param name="mode" value="viewRoles"/>
+ <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">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.ctime}">
+ <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>
+
+ <rich:column>
+ <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"/>
+ <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}"/>
+ <f:param name="from" value="#{item.id}"/>
+ <f:param name="ad" value="#{item.groupAlertDefinition.id}"/>
+ <h:outputText value="View Group Definition" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <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>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="7" width="100%">
+ <h:commandButton action="#{ListAlertDefinitionsUIBean.createNewAlertDefinition}"
+ value="NEW DEFINITION" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" >
+ <f:param name="id" value="${param.id}"/>
+ <f:param name="mode" value="new"/>
+ </h:commandButton>
+ <onc:selectCommandButton action="#{ListAlertDefinitionsUIBean.enableSelectedAlertDefinitions}"
+ value="ENABLE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListAlertDefinitionsUIBean.disableSelectedAlertDefinitions}"
+ value="DISABLE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListAlertDefinitionsUIBean.deleteSelectedAlertDefinitions}"
+ value="DELETE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListAlertDefinitionsUIBean.copySelectedAlertDefinitions}"
+ value="COPY SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert and param.debug}" />
+
+ <ui:param name="paginationDataTableName" value="alertDefinitionsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{alertDefinitionsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AlertDefinitionsList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertHistory-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertHistory-plain.xhtml
new file mode 100644
index 0000000..a6cb1fb
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertHistory-plain.xhtml
@@ -0,0 +1,210 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="alertHistoryForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <rich:panel styleClass="BlockContent">
+
+ <h:panelGrid columns="4" cellspacing="3">
+ <h:outputLabel for="alertDefinitionFilter" value="Alert Definition Filter: " />
+ <h:selectOneMenu id="alertDefinitionFilter" value="#{ListAlertHistoryUIBean.alertDefinitionFilter}"
+ style="width: 300px;">
+ <a4j:support event="onchange"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListAlertHistoryUIBean.clearDataModel}" />
+
+ <f:selectItems value="#{ListAlertHistoryUIBean.alertDefinitionSelectItems}"/>
+ </h:selectOneMenu>
+ <rich:spacer/>
+ <rich:spacer/>
+
+ <h:outputLabel for="alertPriorityFilter" value="Alert Priority Filter: " />
+ <h:selectOneMenu id="alertPriorityFilter" value="#{ListAlertHistoryUIBean.alertPriorityFilter}"
+ style="width: 300px;">
+ <a4j:support event="onchange"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListAlertHistoryUIBean.clearDataModel}" />
+
+ <f:selectItems value="#{ListAlertHistoryUIBean.alertPrioritySelectItems}"/>
+ </h:selectOneMenu>
+ <rich:spacer/>
+ <rich:spacer/>
+
+ <h:outputLabel for="dateFilter" value="Date Filter: " />
+ <h:inputText id="dateFilter" value="#{ListAlertHistoryUIBean.dateFilter}"
+ onkeypress="return ignoreEnterKey(event);"
+ style="width: 300px;" />
+ <a4j:commandButton value="GO"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListAlertHistoryUIBean.clearDataModel}"
+ styleClass="buttonmed">
+ <s:defaultAction />
+ </a4j:commandButton>
+ <h:outputText id="dateErrors" value="#{ListAlertHistoryUIBean.dateErrors}" />
+ </h:panelGrid>
+
+ <br/>
+
+ <ui:param name="alertHistoryDataModel" value="#{ListAlertHistoryUIBean.dataModel}"/>
+ <rich:dataTable id="alertHistoryDataTable"
+ rows="#{PageControl.AlertHistoryList.pageSize}"
+ value="#{alertHistoryDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 15%, 20%, 20%, 20%, 7%, 8%, 9%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="AlertHistoryList" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedAlerts" />
+ </f:facet>
+
+ <onc:select name="selectedAlerts" value="#{item.alert.id}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.id">
+ <h:outputText styleClass="headerText" value="ID" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.alert.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.alertDefinition.priority">
+ <h:outputText styleClass="headerText" value="Priority" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:graphicImage value="/images/icons/Flag_blue_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'LOW'}"/>
+ <h:graphicImage value="/images/icons/Flag_yellow_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'MEDIUM'}"/>
+ <h:graphicImage value="/images/icons/Flag_red_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'HIGH'}"/>
+
+ <h:outputText value="#{item.alert.alertDefinition.priority.name}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.ctime">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Alerts.do">
+ <f:param name="mode" value="viewAlert" />
+ <f:param name="id" value="#{Resource.id}" />
+ <f:param name="a" value="#{item.alert.id}" />
+ <h:outputText value="#{item.alert.ctime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.alertDefinition.name">
+ <h:outputText styleClass="headerText" value="Alert Definition" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Config.do">
+ <f:param name="mode" value="viewRoles" />
+ <f:param name="id" value="#{Resource.id}"/>
+ <f:param name="ad" value="#{item.alert.alertDefinition.id}"/>
+ <h:outputText value="#{item.alert.alertDefinition.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Alert Condition" />
+ </f:facet>
+ <h:outputText value="#{item.conditionText}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Actual Value" />
+ </f:facet>
+ <h:outputText value="#{item.conditionValue}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Ack by" />
+ </f:facet>
+ <h:outputText value="#{item.alert.acknowledgingSubject}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.acknowledgeTime">
+ <h:outputText styleClass="headerText" value="Ack date" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.alert.acknowledgeTime}">
+ <f:converter converterId="RelativeDurationConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Recovery Info" />
+ </f:facet>
+ <h:outputText value="#{item.recoveryInfo}" />
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="9" width="100%">
+ <onc:selectCommandButton action="#{ListAlertHistoryUIBean.deleteSelectedAlerts}"
+ value="DELETE SELECTED" target="selectedAlerts" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+ <h:commandButton action="#{ListAlertHistoryUIBean.purgeAllAlerts}"
+ value="PURGE ALL" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListAlertHistoryUIBean.acknowledgeSelectedAlerts}"
+ value="ACKNOWLEDGE SELECTED" target="selectedAlerts" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+
+
+
+ <ui:param name="paginationDataTableName" value="alertHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{alertHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AlertHistoryList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <a4j:keepAlive beanName="ListAlertHistoryUIBean"/>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+</ui:composition>
commit 0245ea3ea921514be30422fa5a6c62340f1a6736
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:20:41 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished resource > content tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 8944436..bd39bfc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -166,10 +166,6 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
- contentTab.updateSubTab("Deployed", new FullHTMLPane("/rhq/resource/content/view-plain.xhtml?id=" + resource.getId()));
- contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()));
- contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
- contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
// comment out GWT-based view until...
// 1) user can search event history by: metric display range, event source, event details, event severity
// 2) user can delete events if they possess the appropriate permissions
@@ -177,6 +173,14 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
eventsTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/events/history-plain.xhtml?id="
+ resource.getId()));
+ contentTab.updateSubTab("Deployed", new FullHTMLPane("/rhq/resource/content/view-plain.xhtml?id="
+ + resource.getId()));
+ contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id="
+ + resource.getId()));
+ contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id="
+ + resource.getId()));
+ contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id="
+ + resource.getId()));
// topTabSet.setSelectedTab(selectedTab);
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/deploy-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/deploy-plain.xhtml
index ef85b15..28cc396 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/deploy-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/deploy-plain.xhtml
@@ -1,34 +1,27 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
+ <ui:define name="content">
<h:form id="currentPackageVersionsForm">
<input type="hidden" name="id" value="${param.id}"/>
<rich:panel styleClass="BlockContent">
- <f:facet name="header"><h:outputText value="Packages Eligible for Deployment"/></f:facet>
<p>The following packages were found from the repositories currently subscribed to by this resource. In order
to enable more existing packages for deployment, use the subscriptions sub-tab to subscribe this resource
to more repositories.</p>
- <a4j:keepAlive beanName="ResourcePackageVersionsUIBean"/>
+ <a4j:keepAlive beanName="ResourcePackageVersionsUIBean"/>
<ui:param name="resourcePackageVersionsDataModel" value="#{ResourcePackageVersionsUIBean.dataModel}"/>
<rich:dataTable id="resourcePackageVersionsDataTable"
@@ -37,7 +30,7 @@
var="item"
width="100%"
columnsWidth="1%, 15%, 10%, 10%, 10%, 54%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -113,7 +106,7 @@
value="DEPLOY SELECTED" target="selectedPackages" styleClass="on-pager-button buttonsmall"
rendered="${ResourceUIBean.permissions.content}"/>
- <ui:include src="/rhq/resource/include/pagination.xhtml">
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml">
<ui:param name="paginationDataTableName" value="resourcePackageVersionsDataTable"/>
<ui:param name="paginationDataModel" value="#{resourcePackageVersionsDataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.ResourcePackageVersionsList}"/>
@@ -144,5 +137,5 @@
</rich:panel>
</h:form>
-</body>
-</html>
+ </ui:define>
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-plain.xhtml
index 01ae31c..a237c26 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-plain.xhtml
@@ -24,7 +24,7 @@
<h:form id="contentaRequestsForm">
<input type="hidden" name="id" value="${param.id}"/>
-<rich:panel>
+<rich:panel styleClass="BlockContent">
<f:facet name="header"><h:outputText value="Currently Executing Requests"/></f:facet>
<i><h:outputText value="There are no currently executing content requests"
@@ -37,7 +37,7 @@
var="item"
width="100%"
columnsWidth="16%, 17%, 16%, 16%, 16%, 16%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -124,7 +124,7 @@
<ui:param name="paginationDataTableName" value="contentInProgressRequestsDataTable"/>
<ui:param name="paginationDataModel" value="#{ListInProgressContentRequestsUIBean.dataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.ContentInProgressRequestsList}"/>
- <ui:include src="../include/pagination.xhtml"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
</rich:column>
</rich:columnGroup>
</f:facet>
@@ -134,13 +134,12 @@
</rich:panel>
-<rich:panel>
+<rich:panel styleClass="BlockContent">
<f:facet name="header"><h:outputText value="Completed Requests"/></f:facet>
<i><h:outputText value="There are no completed content requests"
rendered="#{ListCompletedContentRequestsUIBean.dataModel.rowCount eq 0}"/></i>
-
<rich:dataTable rendered="#{ListCompletedContentRequestsUIBean.dataModel.rowCount gt 0}"
binding="#{ListCompletedContentRequestsUIBean.dataTable}"
id="contentCompletedRequestsDataTable"
@@ -149,7 +148,7 @@
var="item"
width="100%"
columnsWidth="16%, 17%, 16%, 16%, 16%, 16%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -236,18 +235,16 @@
<ui:param name="paginationDataTableName" value="contentCompletedRequestsDataTable"/>
<ui:param name="paginationDataModel" value="#{ListCompletedContentRequestsUIBean.dataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.ContentCompletedRequestsList}"/>
- <ui:include src="../include/pagination.xhtml"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
</rich:column>
</rich:columnGroup>
</f:facet>
</rich:dataTable>
-
-
</rich:panel>
-<rich:panel>
+<rich:panel styleClass="BlockContent">
<f:facet name="header"><h:outputText value="Full Package Audit Trail"/></f:facet>
<p>The following is a complete listing of all of the package operations that have occurred on this resource.
@@ -266,7 +263,7 @@
var="item"
width="100%"
columnsWidth="20%, 20%, 20%, 10%, 20%, 10%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -346,15 +343,13 @@
<ui:param name="paginationDataTableName" value="auditTrailDataTable"/>
<ui:param name="paginationDataModel" value="#{AuditTrailUIBean.dataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.AuditTrailList}"/>
- <ui:include src="../include/pagination.xhtml"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
</rich:column>
</rich:columnGroup>
</f:facet>
-
</rich:dataTable>
-
</rich:panel>
</h:form>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/installed_package_details-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/installed_package_details-plain.xhtml
index cf93350..61d62b0 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/installed_package_details-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/installed_package_details-plain.xhtml
@@ -1,24 +1,16 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
- xmlns:rich="http://richfaces.ajax4jsf.org/rich"
- xmlns:a4j="http://richfaces.org/a4j">
-
-
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
+ <ui:define name="content">
<a4j:keepAlive beanName="ListPackageHistoryUIBean"/>
@@ -73,7 +65,6 @@
var="item"
width="100%"
columnsWidth="20%, 20%, 20%, 20%, 20%"
- headerClass="tableRowHeader"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -153,5 +144,5 @@
<h:outputLink value="/rhq/resource/content/view-plain.xhtml?id=#{param.id}">
<h:outputText value="Return to Packages"/>
</h:outputLink>
-</body>
-</html>
+ </ui:define>
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml
index c5fb200..c5e970d 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml
@@ -1,30 +1,24 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
+ <ui:define name="content">
+
<!-- CURRENT REPOS -->
<h:form id="currentRepoForm">
<input type="hidden" name="id" value="${param.id}"/>
<rich:panel styleClass="BlockContent">
<f:facet name="header"><h:outputText value="Current Resource Subscriptions"/></f:facet>
- <a4j:keepAlive beanName="ResourceReposUIBean"/>
+ <a4j:keepAlive beanName="ResourceReposUIBean"/>
<ui:param name="resourceReposDataModel" value="#{ResourceReposUIBean.dataModel}"/>
<rich:dataTable id="resourceReposDataTable"
@@ -33,7 +27,7 @@
var="item"
width="100%"
columnsWidth="1%, 25%, 40%, 5%, 15%, 15%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -115,7 +109,7 @@
styleClass="on-pager-button buttonsmall"
rendered="${GlobalPermissionsUIBean.inventory}"/>
- <ui:include src="/rhq/resource/include/pagination.xhtml">
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml">
<ui:param name="paginationDataTableName" value="resourceReposDataTable"/>
<ui:param name="paginationDataModel" value="#{resourceReposDataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.ResourceReposList}"/>
@@ -137,7 +131,7 @@
<rich:panel styleClass="BlockContent">
<f:facet name="header"><h:outputText value="Available Repositories"/></f:facet>
- <a4j:keepAlive beanName="AvailableResourceReposUIBean"/>
+ <a4j:keepAlive beanName="AvailableResourceReposUIBean"/>
<ui:param name="availableResourceReposDataModel" value="#{AvailableResourceReposUIBean.dataModel}"/>
<rich:dataTable id="availableResourceReposDataTable"
@@ -146,7 +140,7 @@
var="item"
width="100%"
columnsWidth="1%, 25%, 40%, 5%, 15%, 15%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -228,7 +222,7 @@
styleClass="on-pager-button buttonsmall"
rendered="${GlobalPermissionsUIBean.inventory}"/>
- <ui:include src="/rhq/resource/include/pagination.xhtml">
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml">
<ui:param name="paginationDataTableName" value="availableResourceReposDataTable"/>
<ui:param name="paginationDataModel" value="#{availableResourceReposDataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.AvailableResourceReposList}"/>
@@ -254,6 +248,5 @@
</h:form>
-</body>
-
-</html>
+ </ui:define>
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/view-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/view-plain.xhtml
index 918c3ce..7ff59f3 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/view-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/view-plain.xhtml
@@ -1,41 +1,28 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
+ <ui:define name="content">
+
<!-- Content Table -->
<h:form id="contentForm">
<input type="hidden" name="id" value="${param.id}"/>
<rich:panel styleClass="BlockContent">
-
- <f:facet name="header"><h:outputText value="Deployed Content"/></f:facet>
-
- <a4j:log level="debug" width="400"/>
-
-
<h:panelGrid columns="3" width="100%">
<h:panelGroup>
<h:outputText value="Filter: " />
<h:inputText id="search" value="#{ListPackagesUIBean.search}">
<a4j:support event="onchange"
- status="commonStatus"
reRender="packagesDataTable, packagesDataTableScroller"
actionListener="#{ListPackagesUIBean.clearDataModel}"/>
</h:inputText>
@@ -46,7 +33,6 @@
<h:selectOneMenu id="packageTypeFilter"
value="#{ListPackagesUIBean.packageTypeFilter}">
<a4j:support event="onchange"
- status="commonStatus"
reRender="packagesDataTable, packagesDataTableScroller"
actionListener="#{ListPackagesUIBean.clearDataModel}"/>
<f:selectItems value="#{ListPackagesUIBean.packageTypes}" />
@@ -58,7 +44,6 @@
<h:selectOneMenu id="packageVersionFilter"
value="#{ListPackagesUIBean.packageVersionFilter}">
<a4j:support event="onchange"
- status="commonStatus"
reRender="packagesDataTable, packagesDataTableScroller"
actionListener="#{ListPackagesUIBean.clearDataModel}"/>
<f:selectItems value="#{ListPackagesUIBean.packageVersions}" />
@@ -66,9 +51,9 @@
</h:panelGroup>
</h:panelGrid>
+ <br/>
- <a4j:keepAlive beanName="ListPackagesUIBean"/>
-
+ <a4j:keepAlive beanName="ListPackagesUIBean"/>
<ui:param name="packagesDataModel" value="#{ListPackagesUIBean.dataModel}"/>
<rich:dataTable id="packagesDataTable"
@@ -77,7 +62,7 @@
var="item"
width="100%"
columnsWidth="1%, 35%, 30%, 15%, 19%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -153,7 +138,7 @@
<onc:selectCommandButton action="#{DeletePackagesUIBean.beginDeleteWorkflow}"
value="DELETE SELECTED" target="selectedPackages" styleClass="on-pager-button buttonsmall"/>
- <ui:include src="../include/pagination.xhtml">
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml">
<ui:param name="paginationDataTableName" value="packagesDataTable"/>
<ui:param name="paginationDataModel" value="#{packagesDataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.InstalledPackagesList}"/>
@@ -166,5 +151,5 @@
</rich:panel>
</h:form>
-</body>
-</html>
+ </ui:define>
+</ui:composition>
commit 6c658cc0dbcff6b9090e71d05349e5b71e170fcd
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:19:59 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished resource > events tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 63e34e8..8944436 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -165,12 +165,17 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
alertsTab.updateSubTab("History", new ResourceAlertHistoryView(resource.getId()));
alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
- eventsTab.updateSubTab("History", EventHistoryView.createResourceHistoryView(resource.getId())); //new FullHTMLPane("/rhq/common/events/history-plain.xhtml?id=" + resource.getId()));
contentTab.updateSubTab("Deployed", new FullHTMLPane("/rhq/resource/content/view-plain.xhtml?id=" + resource.getId()));
contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()));
contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
+ // comment out GWT-based view until...
+ // 1) user can search event history by: metric display range, event source, event details, event severity
+ // 2) user can delete events if they possess the appropriate permissions
+ //eventsTab.updateSubTab("History", EventHistoryView.createResourceHistoryView(resource.getId()));
+ eventsTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/events/history-plain.xhtml?id="
+ + resource.getId()));
// topTabSet.setSelectedTab(selectedTab);
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/events/history-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/events/history-plain.xhtml
index fc68398..21bbc81 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/events/history-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/events/history-plain.xhtml
@@ -1,5 +1,5 @@
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
@@ -10,11 +10,6 @@
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css" />
-</head>
-<body>
-
<h:form id="eventHistoryForm" >
<a4j:keepAlive beanName="EventHistoryUIBean"/>
@@ -36,16 +31,12 @@
</c:if>
<rich:panel styleClass="BlockContent">
- <f:facet name="header">
- <h:outputText value="Events" />
- </f:facet>
<h:panelGrid columns="3" cellspacing="3">
<h:outputLabel for="sourceFilter" value="Source Filter: " />
<h:inputText id="sourceFilter" value="#{EventHistoryUIBean.sourceFilter}"
style="width: 300px;">
<a4j:support event="onchange"
- status="commonStatus"
reRender="eventHistoryDataTable, eventHistoryDataTableScroller"
actionListener="#{EventHistoryUIBean.clearDataModel}" />
</h:inputText>
@@ -56,7 +47,6 @@
onkeypress="return ignoreEnterKey(event);"
style="width: 300px;" />
<a4j:support event="onchange"
- status="commonStatus"
reRender="eventHistoryDataTable, eventHistoryDataTableScroller"
actionListener="#{EventHistoryUIBean.clearDataModel}" />
<rich:spacer/>
@@ -65,7 +55,6 @@
<h:selectManyCheckbox id="severityFilter" value="#{EventHistoryUIBean.severityFilter}"
style="width: 300px;">
<a4j:support event="onchange"
- status="commonStatus"
reRender="eventHistoryDataTable,eventHistoryDataTableScroller"
actionListener="#{EventHistoryUIBean.clearDataModel}" />
@@ -73,7 +62,6 @@
</h:selectManyCheckbox>
<a4j:commandButton value="GO"
- status="commonStatus"
reRender="eventHistoryDataTable,eventHistoryDataTableScroller"
actionListener="#{EventHistoryUIBean.clearDataModel}"
styleClass="buttonmed">
@@ -91,7 +79,6 @@
var="item"
width="100%"
styleClass="resources-table"
- headerClass="tableRowHeader"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -178,7 +165,7 @@
<ui:param name="paginationDataTableName" value="eventHistoryDataTable" />
<ui:param name="paginationDataModel" value="#{eventHistoryDataModel}" />
<ui:param name="paginationPageControl" value="#{PageControl.EventsHistoryList}" />
- <ui:include src="/rhq/resource/include/pagination.xhtml" />
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml" />
</rich:column>
</rich:columnGroup>
</f:facet>
@@ -252,6 +239,4 @@
</rich:modalPanel>
</h:form>
-</body>
-</html>
-
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/events/history-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/events/history-plain.xhtml
new file mode 100644
index 0000000..4cc4ca4
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/events/history-plain.xhtml
@@ -0,0 +1,20 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:include src="/rhq/common/events/history-plain.xhtml"/>
+
+ </ui:define>
+
+</ui:composition>
+
commit 74ac7e6a4910b36c67e211350d2a84e3ba6c80ff
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:19:04 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished resource > monitor tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index e4cec95..63e34e8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -143,12 +143,16 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
+ resource.getId()));
monitoringTab.updateSubTab("Graphs", new GraphListView(resource)); // new FullHTMLPane("/rhq/common/monitor/graphs.xhtml?id=" + resource.getId()));
- monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/common/monitor/tables-plain.xhtml?id=" + resource.getId()));
- monitoringTab.updateSubTab("Traits", new FullHTMLPane("/rhq/resource/monitor/traits-plain.xhtml?id=" + resource.getId()));
- monitoringTab.updateSubTab("Availability", new FullHTMLPane("/rhq/resource/monitor/availabilityHistory-plain.xhtml?id=" + resource.getId()));
- monitoringTab.updateSubTab("Schedules", new FullHTMLPane("/rhq/resource/monitor/schedules-plain.xhtml?id=" + resource.getId()));
- monitoringTab.updateSubTab("Call Time", new CallTimeView(resource));
-
+ monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/common/monitor/tables-plain.xhtml?id="
+ + resource.getId()));
+ monitoringTab.updateSubTab("Traits", new FullHTMLPane("/rhq/resource/monitor/traits-plain.xhtml?id="
+ + resource.getId()));
+ monitoringTab.updateSubTab("Availability", new FullHTMLPane(
+ "/rhq/resource/monitor/availabilityHistory-plain.xhtml?id=" + resource.getId()));
+ monitoringTab.updateSubTab("Schedules", new FullHTMLPane("/rhq/resource/monitor/schedules-plain.xhtml?id="
+ + resource.getId()));
+ monitoringTab.updateSubTab("Call Time", new FullHTMLPane("/rhq/resource/monitor/response-plain.xhtml?id="
+ + resource.getId()));
inventoryTab.updateSubTab("Children", ResourceSearchView.getChildrenOf(resource.getId()));
inventoryTab.updateSubTab("Connection Settings", new PluginConfigurationEditView(resource)); // new ConfigurationEditor(resource.getId(), resource.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml
new file mode 100644
index 0000000..aa6576f
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml
@@ -0,0 +1,173 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <rich:panel styleClass="BlockContent">
+
+ <c:if test="#{!ResourceUIBean.facets.callTime}">
+ <c:if test="#{CallTimeUIBean.context.resourceId != -1}">
+ Response Time Metrics are not supported for this resource.
+ </c:if>
+ <c:if test="#{CallTimeUIBean.context.groupId != -1}">
+ Response Time Metrics are not supported for this compatible group.
+ </c:if>
+ <c:if test="#{CallTimeUIBean.context.parentResourceId != -1 and CallTimeUIBean.context.resourceTypeId != -1}">
+ Response Time Metrics are not supported for this auto-group.
+ </c:if>
+
+ </c:if>
+
+ <c:if test="#{ResourceUIBean.facets.callTime}">
+ <h:form id="callTimeForm">
+ <a4j:keepAlive beanName="CallTimeUIBean"/>
+
+ <!-- On submit make sure these are provided for the context of any new instance of the UI beans -->
+ <c:if test="#{CallTimeUIBean.context.resourceId != -1}">
+ <input type="hidden" name="id" value="#{CallTimeUIBean.context.resourceId}" />
+ </c:if>
+ <c:if test="#{CallTimeUIBean.context.groupId != -1}">
+ <input type="hidden" name="groupId" value="#{CallTimeUIBean.context.groupId}" />
+ </c:if>
+ <c:if
+ test="#{CallTimeUIBean.context.parentResourceId != -1}">
+ <input type="hidden" name="parent" value="#{CallTimeUIBean.context.parentResourceId}" />
+ </c:if>
+ <c:if test="#{CallTimeUIBean.context.resourceTypeId != -1}">
+ <input type="hidden" name="type" value="#{CallTimeUIBean.context.resourceTypeId}" />
+ </c:if>
+
+ <h:panelGrid columns="3" cellspacing="3">
+ <h:outputLabel for="destinationFilter" value="Destination Filter: " />
+ <h:inputText id="destinationFilter" value="#{CallTimeUIBean.destinationFilter}"
+ onkeypress="return ignoreEnterKey(event);"
+ style="width: 300px;" />
+ <a4j:commandButton value="GO" reRender="callTimeDataTable, callTimeDataTableScroller"
+ actionListener="#{CallTimeUIBean.clearDataModel}"
+ styleClass="buttonmed">
+ <s:defaultAction/>
+ </a4j:commandButton>
+ </h:panelGrid>
+
+ <ui:param name="callTimeDataModel" value="#{CallTimeUIBean.dataModel}" />
+ <rich:dataTable id="callTimeDataTable"
+ value="#{callTimeDataModel}"
+ rows="#{PageControl.CallTimeHistory.pageSize}"
+ var="item"
+ width="100%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="CallTimeHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="calltimedatavalue.key.callDestination">
+ <h:outputText value="Destination" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{onf:elideString(item.callDestination, 50, 'left')}" title="#{item.callDestination}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="SUM(calltimedatavalue.count)">
+ <h:outputText value="Request Count" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.count}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="MIN(calltimedatavalue.minimum)">
+ <h:outputText value="Minimum" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.minimum}">
+ <f:converter converterId="ShortDurationConverter"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="SUM(calltimedatavalue.total)/SUM(calltimedatavalue.count)">
+ <h:outputText value="Average" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.average}">
+ <f:converter converterId="ShortDurationConverter"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="MAX(calltimedatavalue.maximum)">
+ <h:outputText value="Maximum" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.maximum}">
+ <f:converter converterId="ShortDurationConverter"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="SUM(calltimedatavalue.total)">
+ <h:outputText value="Total" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.total}">
+ <f:converter converterId="ShortDurationConverter"/>
+ </h:outputText>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6" width="100%">
+ <ui:param name="paginationDataTableName" value="callTimeDataTable" />
+ <ui:param name="paginationDataModel" value="#{callTimeDataModel}" />
+ <ui:param name="paginationPageControl" value="#{PageControl.CallTimeHistory}" />
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <table>
+ <tr>
+ <td><onc:metric optionList="m,h,d" /></td>
+ <td>
+ <h:commandLink rendered="#{not MetricComponentUtilityUIBean.readOnly}"
+ action="#{MetricComponentUtilityUIBean.update}" >
+ <img src="/images/dash-button_go-arrow.gif" alt="Apply Metric Settings "/>
+ </h:commandLink>
+ <h:commandLink rendered="#{MetricComponentUtilityUIBean.readOnly}"
+ action="#{MetricComponentUtilityUIBean.switchToSimpleMode}">
+ <h:outputText value="Switch to Simple Mode" />
+ </h:commandLink>
+ </td>
+ </tr>
+ </table>
+
+ </h:form>
+ </c:if>
+
+ </rich:panel>
+
+ </ui:define>
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/tables-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/tables-plain.xhtml
index b75b9b2..b6664e3 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/tables-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/tables-plain.xhtml
@@ -1,28 +1,19 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:c="http://java.sun.com/jstl/core"
- xmlns:onc="http://jboss.org/on/component"
- xmlns:onf="http://jboss.org/on/function"
- xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
- xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-
-<ui:composition>
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
<rich:panel styleClass="BlockContent">
- <f:facet name="header" styleClass="BlockTitle">
- <a name="Numeric Metrics" />
- Numeric Metrics
- </f:facet>
-
<h:form id="metricsTableForm">
<!-- On submit make sure these are provided for the context of any new instance of the UI beans -->
<c:if test="#{MetricsTableUIBean.context.resourceId != -1}">
@@ -43,11 +34,12 @@
value="#{MetricsTableUIBean.context.resourceTypeId}" />
</c:if>
-
<rich:dataTable value="#{MetricsTableUIBean.metricSummaries}"
width="100%"
var="metric"
- columnsWidth="1%"
+ columnsWidth="1%,40%,12%,12%,12%,12%,12%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -159,10 +151,10 @@
</td>
</tr>
</table>
+
</h:form>
</rich:panel>
-</ui:composition>
-
-</html>
+ </ui:define>
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/availabilityHistory-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/availabilityHistory-plain.xhtml
index 545e523..27f9d7a 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/availabilityHistory-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/availabilityHistory-plain.xhtml
@@ -1,29 +1,16 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-
-<body>
- <f:facet name="header" styleClass="BlockTitle">
- <a name="AvailabilityHistory"/>
- Availability History
- </f:facet>
-
+ <ui:define name="content">
<h:panelGroup layout="block" rendered="#{ListAvailabilityHistoryUIBean.dataModel.rowCount == 0}">
This resource does not currently have any availability history.
@@ -135,8 +122,7 @@
rendered="#{availability.availabilityType == 'DOWN'}"/>
<h:graphicImage value="/images/icons/availability_grey_16.png" alt="Unknown" title="Unknown"
rendered="#{availability.availabilityType == null}"/>
-
- <h:outputText value="#{availability.availabilityType}"/>
+ <h:outputText value=" #{availability.availabilityType}"/>
</rich:column>
<rich:column
@@ -181,7 +167,7 @@
<rich:columnGroup>
<rich:column colspan="4">
- <ui:include src="../include/pagination.xhtml">
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml">
<ui:param name="paginationDataTableName" value="availabilityHistoryDataTable"/>
<ui:param name="paginationDataModel" value="#{availabilityHistoryDataModel}"/>
<ui:param name="paginationPageControl"
@@ -195,6 +181,7 @@
</h:form>
</rich:panel>
-</body>
-</html>
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/response-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/response-plain.xhtml
new file mode 100644
index 0000000..e19932a
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/response-plain.xhtml
@@ -0,0 +1,14 @@
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:include src="/rhq/common/monitor/response-plain.xhtml" />
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/schedules-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/schedules-plain.xhtml
index a9d1ab3..8854225 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/schedules-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/schedules-plain.xhtml
@@ -1,10 +1,5 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
@@ -14,13 +9,13 @@
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
- <h:outputText rendered="#{not ResourceUIBean.permissions.measure}" value="You don't have the measure permission for this resource and therefore can not change metric schedules"/>
+ <ui:define name="content">
+ <rich:panel styleClass="BlockContent">
+
+ <h:outputText rendered="#{not ResourceUIBean.permissions.measure}"
+ value="You don't have the measure permission for this resource and therefore can not change metric schedules"/>
<h:form id="resourceSchedulesForm">
<!-- hack to override the default button on the page, make this button pseudo-first in the form,
@@ -33,13 +28,6 @@
rendered="#{ResourceUIBean.permissions.measure}" />
</div>
<input type="hidden" name="id" value="${param.id}"/>
-
- <rich:panel styleClass="BlockContent">
- <f:facet name="header">
- <h:outputText value="Configure Metric Collection Schedules"/>
- </f:facet>
-
- <h:panelGrid columns="1" styleClass="data-table">
<ui:param name="resourceSchedulesDataModel" value="#{ListResourceMeasurementScheduleUIBean.dataModel}"/>
<rich:dataTable id="resourceSchedulesDataTable"
@@ -49,7 +37,6 @@
width="100%"
columnsWidth="1%, 20%, 30%, 20%, 9%, 20%"
styleClass="resources-table"
- headerClass="tableRowHeader"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -163,10 +150,9 @@
</f:facet>
</rich:dataTable>
-
- </h:panelGrid>
-
- </rich:panel>
</h:form>
-</body>
-</html>
+
+ </rich:panel>
+
+ </ui:define>
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/traits-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/traits-plain.xhtml
index 9038116..61a1014 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/traits-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/traits-plain.xhtml
@@ -1,30 +1,19 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
+ <ui:define name="content">
+
<rich:panel styleClass="BlockContent">
- <f:facet name="header" styleClass="BlockTitle">
- <a name="Traits"/>
- Traits
- </f:facet>
-
<rich:dataTable value="#{ResourceMetricsTableUIBean.traitSummaries}"
width="100%"
var="metric"
@@ -80,6 +69,8 @@
<rich:dataTable value="#{ResourceMetricsTableUIBean.traitHistory}"
width="100%"
var="history"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -101,5 +92,5 @@
</rich:dataTable>
</rich:panel>
-</body>
-</html>
+ </ui:define>
+</ui:composition>
diff --git a/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml b/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml
index b3079dd..0ea6e12 100644
--- a/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml
+++ b/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml
@@ -759,10 +759,6 @@
<position
name="Monitor.Schedules"
placement="after" />
- <activators>
- <facet
- name="call_time" />
- </activators>
</tab>
<!-- Inventory Subtabs -->
commit 8ff2464dbb943f9e87f7ad57d0dd87b53c2d94fb
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:15:25 2010 -0400
reformat, cosmetic
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 7415ba7..e4cec95 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -32,9 +32,7 @@ import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.composite.ResourcePermission;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
-import org.rhq.enterprise.gui.coregui.client.alert.definitions.AlertDefinitionsView;
import org.rhq.enterprise.gui.coregui.client.components.FullHTMLPane;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTab;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedEvent;
@@ -43,14 +41,10 @@ import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSet;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSearchView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSelectListener;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.alert.ResourceAlertHistoryView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.configuration.ConfigurationHistoryView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.configuration.ResourceConfigurationEditView;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.event.EventHistoryView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.inventory.PluginConfigurationEditView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.GraphListView;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.calltime.CallTimeView;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.operation.OperationHistoryView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.overview.ResourceOverviewView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
@@ -59,7 +53,8 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTyp
*
* @author Greg Hinkle
*/
-public class ResourceDetailView extends VLayout implements BookmarkableView, ResourceSelectListener, TwoLevelTabSelectedHandler {
+public class ResourceDetailView extends VLayout implements BookmarkableView, ResourceSelectListener,
+ TwoLevelTabSelectedHandler {
private static final String DEFAULT_TAB_NAME = "Summary";
@@ -80,7 +75,6 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
private ResourceTitleBar titleBar;
-
public void setResource(Resource resource) {
this.resource = resource;
}
@@ -92,7 +86,6 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
setWidth100();
setHeight100();
-
// The Tabs section
topTabSet = new TwoLevelTabSet();
@@ -126,8 +119,8 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
contentTab = new TwoLevelTab("Content", "/images/icons/Content_grey_16.png");
contentTab.registerSubTabs("Deployed", "New", "Subscriptions", "History");
- topTabSet.setTabs(summaryTab, monitoringTab, inventoryTab, operationsTab, alertsTab, configurationTab, eventsTab, contentTab);
-
+ topTabSet.setTabs(summaryTab, monitoringTab, inventoryTab, operationsTab, alertsTab, configurationTab,
+ eventsTab, contentTab);
topTabSet.addTwoLevelTabSelectedHandler(this);
@@ -136,7 +129,7 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
addMember(topTabSet);
-// CoreGUI.addBreadCrumb(getPlace());
+ // CoreGUI.addBreadCrumb(getPlace());
}
public void onResourceSelected(Resource resource) {
@@ -144,11 +137,10 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
this.resource = resource;
titleBar.setResource(resource);
-
- FullHTMLPane timelinePane = new FullHTMLPane("/rhq/resource/summary/timeline-plain.xhtml?id=" + resource.getId());
- summaryTab.updateSubTab("Overview", new ResourceOverviewView(resource));
- summaryTab.updateSubTab("Timeline", timelinePane);
+ summaryTab.updateSubTab("Overview", new ResourceOverviewView(resource));
+ summaryTab.updateSubTab("Timeline", new FullHTMLPane("/rhq/resource/summary/timeline-plain.xhtml?id="
+ + resource.getId()));
monitoringTab.updateSubTab("Graphs", new GraphListView(resource)); // new FullHTMLPane("/rhq/common/monitor/graphs.xhtml?id=" + resource.getId()));
monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/common/monitor/tables-plain.xhtml?id=" + resource.getId()));
@@ -177,45 +169,42 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
-// topTabSet.setSelectedTab(selectedTab);
+ // topTabSet.setSelectedTab(selectedTab);
updateTabStatus();
topTabSet.markForRedraw();
}
-
private void updateTabStatus() {
// Go and get the type with all needed metadata
// and then get the permissions for this resource
- ResourceTypeRepository.Cache.getInstance().getResourceTypes(resource.getResourceType().getId(),
- EnumSet.of(ResourceTypeRepository.MetadataType.content,
- ResourceTypeRepository.MetadataType.operations,
- ResourceTypeRepository.MetadataType.events,
- ResourceTypeRepository.MetadataType.resourceConfigurationDefinition),
- new ResourceTypeRepository.TypeLoadedCallback() {
- public void onTypesLoaded(ResourceType type) {
-
- ResourceDetailView.this.type = type;
-
- GWTServiceLookup.getAuthorizationService().
- getImplicitResourcePermissions(ResourceDetailView.this.resource.getId(),
- new AsyncCallback<Set<Permission>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load resource permissions", caught);
- }
-
- public void onSuccess(Set<Permission> result) {
- ResourceDetailView.this.permissions = new ResourcePermission(result);
- completeTabUpdate();
- }
- });
- }
- });
+ ResourceTypeRepository.Cache.getInstance().getResourceTypes(
+ resource.getResourceType().getId(),
+ EnumSet.of(ResourceTypeRepository.MetadataType.content, ResourceTypeRepository.MetadataType.operations,
+ ResourceTypeRepository.MetadataType.events,
+ ResourceTypeRepository.MetadataType.resourceConfigurationDefinition),
+ new ResourceTypeRepository.TypeLoadedCallback() {
+ public void onTypesLoaded(ResourceType type) {
+
+ ResourceDetailView.this.type = type;
+
+ GWTServiceLookup.getAuthorizationService().getImplicitResourcePermissions(
+ ResourceDetailView.this.resource.getId(), new AsyncCallback<Set<Permission>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to load resource permissions", caught);
+ }
+
+ public void onSuccess(Set<Permission> result) {
+ ResourceDetailView.this.permissions = new ResourcePermission(result);
+ completeTabUpdate();
+ }
+ });
+ }
+ });
}
-
private void completeTabUpdate() {
if (!permissions.isMeasure()) {
@@ -224,13 +213,13 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
topTabSet.enableTab(monitoringTab);
}
- if (type.getOperationDefinitions() == null || type.getOperationDefinitions().isEmpty() || !permissions.isControl()) {
+ if (type.getOperationDefinitions() == null || type.getOperationDefinitions().isEmpty()
+ || !permissions.isControl()) {
topTabSet.disableTab(operationsTab);
} else {
topTabSet.enableTab(operationsTab);
}
-
if (!permissions.isAlert()) {
topTabSet.disableTab(alertsTab);
} else {
@@ -255,14 +244,12 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
topTabSet.enableTab(contentTab);
}
-
if (topTabSet.getSelectedTab().getDisabled()) {
topTabSet.selectTab(0);
}
}
-
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
// Switch tabs directly, rather than letting the history framework do it, to avoid redrawing the outer views.
selectTab(tabSelectedEvent.getId(), tabSelectedEvent.getSubTabId());
@@ -273,24 +260,22 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
History.newItem(path, false);
}
-
public void renderView(ViewPath viewPath) {
// e.g. #Resource/10010/Inventory/Overview
- String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
+ String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
String subTabName = (viewPath.viewsLeft() >= 1) ? viewPath.getNext().getPath() : null; // e.g. "Overview"
selectTab(tabName, subTabName);
}
-
public void selectTab(String tabName, String subtabName) {
if (tabName == null) {
tabName = DEFAULT_TAB_NAME;
}
- TwoLevelTab tab = (TwoLevelTab)this.topTabSet.getTabByTitle(tabName);
+ TwoLevelTab tab = (TwoLevelTab) this.topTabSet.getTabByTitle(tabName);
if (tab == null) {
CoreGUI.getErrorHandler().handleError("Invalid tab name: " + tabName);
// TODO: Should we fire a history event here to redirect to a valid bookmark?
- tab = (TwoLevelTab)this.topTabSet.getTabByTitle(DEFAULT_TAB_NAME);
+ tab = (TwoLevelTab) this.topTabSet.getTabByTitle(DEFAULT_TAB_NAME);
}
this.topTabSet.selectTab(tab);
if (subtabName != null) {
commit e666b220a74d9784863570d292662fc5259781b1
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:10:53 2010 -0400
prepare "plain" navigation scheme for iframed-facelets
* copy/paste entire XXX-navigation.xml file to XXX-plain-navigation.xml
* search/replace *.xhtml with *-plain.xhtml inside each
* do this for the follow resource subsystems:
** alerts, content, events, measurement, operations
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/alert-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/alert-plain-navigation.xml
new file mode 100644
index 0000000..2bbef2d
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/alert-plain-navigation.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- Alert Definition List -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/alert/listAlertDefinitions-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/alert/listAlertDefinitions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createNewAlertDefinition</from-outcome>
+ <to-view-id>/alerts/Config.do?id=#{param.id}&mode=new&nomenu=true</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/alert/listAlertDefinitions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Alert Templates List -->
+ <navigation-rule>
+ <from-view-id>/rhq/admin/listAlertTemplates-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/admin/listAlertTemplates-plain.xhtml?type=#{param.type}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createNewAlertTemplate</from-outcome>
+ <to-view-id>/alerts/Config.do?type=#{param.type}&mode=new&nomenu=true</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/admin/listAlertTemplates-plain.xhtml?type=#{param.type}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Alert History List -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/alert/listAlertHistory-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>dateFilter</from-outcome>
+ <to-view-id>/rhq/resource/alert/listAlertHistory-plain.xhtml?id=#{param.id}&date=#{param.date}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/alert/listAlertHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/alert/listAlertHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- CRUD for alert notification templates -->
+ <navigation-rule>
+ <from-view-id>/rhq/admin/alert/template/notification/list-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>create</from-outcome>
+ <to-view-id>/rhq/admin/alert/template/notification/new-plain.xhtml</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/admin/alert/template/notification/list-plain.xhtml</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/admin/alert/template/notification/new-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/admin/alert/template/notification/details-plain.xhtml?mode=view&templateId=#{NewAlertNotificationTemplateUIBean.createdTemplateId}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/admin/alert/template/notification/list-plain.xhtml</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/admin/alert/template/notification/details-plain.xhtml</from-view-id>
+
+ <!-- navigation cases for CRUD of general properties -->
+ <navigation-case>
+ <from-action>#{AlertNotificationTemplateDetailsUIBean.edit}</from-action>
+ <to-view-id>/rhq/admin/alert/template/notification/details-plain.xhtml?mode=edit&templateId=#{param.templateId}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{AlertNotificationTemplateDetailsUIBean.save}</from-action>
+ <to-view-id>/rhq/admin/alert/template/notification/details-plain.xhtml?mode=view&templateId=#{param.templateId}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{AlertNotificationTemplateDetailsUIBean.cancel}</from-action>
+ <to-view-id>/rhq/admin/alert/template/notification/details-plain.xhtml?mode=view&templateId=#{param.templateId}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <!-- navigation case to go to the common page for editing alert notifications -->
+ <navigation-case>
+ <from-action>#{AlertNotificationTemplateDetailsUIBean.editNotifications}</from-action>
+ <to-view-id>/rhq/common/alert/notification/details-plain.xhtml?context=template&contextId=#{param.templateId}</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- alert notifications and custom sender UI -->
+ <navigation-rule>
+ <from-view-id>/rhq/common/alert/notification/details-plain.xhtml</from-view-id>
+
+ <!-- refresh *with* notification ID when: -->
+ <!-- 1) selecting an alert notification element from the table -->
+ <!-- 2) save alert notifications that use a configuration-based rendering schemes -->
+ <!-- 3) save alert notifications that use custom rendering schemes -->
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/common/alert/notification/details-plain.xhtml?context=#{param.context}&contextId=#{param.contextId}&contextSubId=#{param.contextSubId}&nid=#{alertNotificationsUIBean.activeNotification.id}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <!-- clicking remove button should refresh but deselect the active notification -->
+ <navigation-case>
+ <from-action>#{alertNotificationsUIBean.removeSelected}</from-action>
+ <to-view-id>/rhq/common/alert/notification/details-plain.xhtml?context=#{param.context}&contextId=#{param.contextId}&contextSubId=#{param.contextSubId}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+ </navigation-rule>
+
+</faces-config>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/content-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/content-plain-navigation.xml
new file mode 100644
index 0000000..14db2d7
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/content-plain-navigation.xml
@@ -0,0 +1,491 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/subscription-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/content/subscription-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{ResourceReposUIBean.deleteSelectedResourceRepos}</from-action>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/content/subscription-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{AvailableResourceReposUIBean.subscribeSelectedResourceRepos}</from-action>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/content/subscription-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/view-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/content/view-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+<!--
+ <navigation-case>
+ <from-action>#{ListPackagesUIBean.deleteSelectedInstalledPackages}</from-action>
+ <from-outcome>successOrFailure</from-outcome>
+ <to-view-id>/rhq/resource/content/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+-->
+
+ <navigation-case>
+ <from-action>#{DeletePackagesUIBean.beginDeleteWorkflow}</from-action>
+ <from-outcome>beginDeleteWorkflow</from-outcome>
+ <to-view-id>/rhq/resource/content/confirm-delete-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/deploy-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>uploadNew</from-outcome>
+ <to-view-id>/rhq/resource/content/create-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{CreateNewPackageUIBean.deployExisting}</from-action>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/content/confirm-create-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ </navigation-rule>
+
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/update-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>uploadNew</from-outcome>
+ <to-view-id>/rhq/resource/content/create-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{CreateNewPackageUIBean.deployExisting}</from-action>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/content/confirm-create-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ </navigation-rule>
+
+
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/history-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>showContentServiceRequestDetails</from-outcome>
+ <to-view-id>/rhq/resource/content/history-request-plain.xhtml?id=#{param.id}&selectedRequestId=#{param.selectedRequestId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>showHistoryItem</from-outcome>
+ <to-view-id>/rhq/resource/content/audit-trail-item-plain.xhtml?id=#{param.id}&selectedHistoryId=#{param.selectedHistoryId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/history-request-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>showHistoryItem</from-outcome>
+ <to-view-id>/rhq/resource/content/history-request-item-plain.xhtml?id=#{param.id}&selectedHistoryId=#{param.selectedHistoryId}&selectedRequestId=#{param.selectedRequestId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>returnToAllRequests</from-outcome>
+ <to-view-id>/rhq/resource/content/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/history-request-item-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>returnToRequest</from-outcome>
+ <to-view-id>/rhq/resource/content/history-request-plain.xhtml?id=#{param.id}&selectedRequestId=#{param.selectedRequestId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>stepDetails</from-outcome>
+ <to-view-id>/rhq/resource/content/history-request-step-details-plain.xhtml?id=#{param.id}&selectedHistoryId=#{param.selectedHistoryId}&selectedRequestId=#{param.selectedRequestId}&stepId=#{param.stepId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/history-request-step-details-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>returnToHistory</from-outcome>
+ <to-view-id>/rhq/resource/content/history-request-item-plain.xhtml?id=#{param.id}&selectedHistoryId=#{param.selectedHistoryId}&selectedRequestId=#{param.selectedRequestId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/create-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-action>#{CreateNewPackageUIBean.createPackage}</from-action>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/content/confirm-create-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/resource/content/deploy-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/confirm-create-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>successOrFailure</from-outcome>
+ <to-view-id>/rhq/resource/content/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/resource/content/deploy-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/confirm-delete-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>successOrFailure</from-outcome>
+ <to-view-id>/rhq/resource/content/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/resource/content/deploy-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Repo List -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/listRepos-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/listRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createNewRepo</from-outcome>
+ <to-view-id>/rhq/content/createRepo-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>importRepos</from-outcome>
+ <to-view-id>/rhq/content/importRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/listRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/importRepos-plain.xhtml</from-view-id>
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/listRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ <navigation-case>
+ <!-- import failed -->
+ <from-outcome>failed</from-outcome>
+ <to-view-id>/rhq/content/importRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/importRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Repo View -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/repo-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/repo-plain.xhtml?mode=view&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>edit</from-outcome>
+ <to-view-id>/rhq/content/repo-plain.xhtml?mode=edit&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>associateWithContentProviders</from-outcome>
+ <to-view-id>/rhq/content/repoAssociations-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>subscribeResources</from-outcome>
+ <to-view-id>/rhq/content/repoSubscriptions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/repo-plain.xhtml?mode=view&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Content Source List -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/listContentProviders-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/listContentProviders-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createNewContentSource</from-outcome>
+ <to-view-id>/rhq/content/createContentProvider-plain.xhtml?mode=new</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/listContentProviders-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Content Source View -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/contentProvider-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml?mode=view&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>edit</from-outcome>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml?mode=edit&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml?mode=view&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.accessMap}</from-action>
+ <to-view-id>/rhq/content/contentProvider-view-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.accessMap}</from-action>
+ <to-view-id>/rhq/content/contentProvider-edit-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.addNewMap}</from-action>
+ <to-view-id>/rhq/content/contentProvider-add-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Content Source Creation -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/createContentProvider-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.accessMap}</from-action>
+ <to-view-id>/rhq/content/createContentProvider-edit-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.addNewMap}</from-action>
+ <to-view-id>/rhq/content/createContentProvider-add-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>save</from-outcome>
+ <to-view-id>/rhq/content/listContentProviders-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/content/listContentProviders-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/createContentProvider-edit-map-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/content/createContentProvider-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/createContentProvider-add-map-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/content/createContentProvider-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/contentProvider-view-map-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/contentProvider-edit-map-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/contentProvider-add-map-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Repo Creation -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/createRepo-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>save</from-outcome>
+ <to-view-id>/rhq/content/listRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/content/listRepos-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Repo Associations With Content Sources -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/repoAssociations-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/repoAssociations-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/repoAssociations-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Repo Subscriptions -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/repoSubscriptions-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/repoSubscriptions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>search</from-outcome>
+ <to-view-id>/rhq/content/repoSubscriptions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/repoSubscriptions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/events-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/events-plain-navigation.xml
new file mode 100644
index 0000000..ef6b120
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/events-plain-navigation.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/resource/events/history-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/events/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/events/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
+
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/measurement-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/measurement-plain-navigation.xml
new file mode 100644
index 0000000..9578b33
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/measurement-plain-navigation.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- Resource Measurement Schedules -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/monitor/schedules-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/monitor/schedules-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/monitor/schedules-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Graphs -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/monitor/graphs-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/monitor/graphs-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Tables -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/monitor/tables-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/monitor/tables-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Response -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/monitor/response-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/monitor/response-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/monitor/response-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/operation-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/operation-plain-navigation.xml
new file mode 100644
index 0000000..9750c4c
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/operation-plain-navigation.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<faces-config version="1.2"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- New Resource Operation Schedule -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/operation/resourceOperationScheduleNew-plain.xhtml</from-view-id>
+ <navigation-case>
+ <!-- schedule an operation for deferred execution -->
+ <from-outcome>viewOperationSchedules</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationSchedules-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- schedule an operation for immediate execution -->
+ <from-outcome>viewOperationHistory</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go back here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationScheduleNew-plain.xhtml?id=#{param.id}&opId=#{param.opId}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go back here -->
+ <from-outcome>validationError</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationScheduleNew-plain.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationScheduleNew-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Resource Operation Schedules -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/operation/resourceOperationSchedules-plain.xhtml</from-view-id>
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationSchedules-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationSchedules-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- schedule an operation for immediate execution -->
+ <from-outcome>viewOperationHistory</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Resource Operation History -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/operation/resourceOperationHistory-plain.xhtml</from-view-id>
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml</from-view-id>
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.accessMap}</from-action>
+ <to-view-id>/rhq/resource/operation/view-results-map-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+</faces-config>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
index 8d69a36..03f80f0 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
@@ -161,6 +161,12 @@
/WEB-INF/jsf-navigation/measurement-navigation.xml,
/WEB-INF/jsf-navigation/summary-navigation.xml,
/WEB-INF/jsf-navigation/test-navigation.xml,
+
+ /WEB-INF/jsf-navigation/alert-plain-navigation.xml,
+ /WEB-INF/jsf-navigation/content-plain-navigation.xml,
+ /WEB-INF/jsf-navigation/events-plain-navigation.xml,
+ /WEB-INF/jsf-navigation/operation-plain-navigation.xml,
+ /WEB-INF/jsf-navigation/measurement-plain-navigation.xml,
/WEB-INF/jsf-navigation-definition/group-definition-navigation.xml,
commit d5dfe2ed9d42af51c6c3d3793f79e315c52ed092
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:08:28 2010 -0400
create a "plain" pagination scheme for iframed-facelets
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/include/pagination-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/include/pagination-plain.xhtml
new file mode 100644
index 0000000..8a4debb
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/include/pagination-plain.xhtml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:onf="http://jboss.org/on/function">
+
+ <body>
+
+ <f:view>
+
+ Usage: The following parameters must be set in the calling page
+
+ paginationDataTableName - Name of the data table to be controlled
+ paginationDataModel - Data model of the underlying table being controlled (used for total row count)
+ paginationPageControl - Page control value to set when changing the number of rows per page
+
+ <ui:composition>
+
+ <h:panelGroup layout="block" style="float: right; margin-right: 30px">
+ <ui:param name="paginationDataScrollerName" value="#{paginationDataTableName}Scroller"/>
+ <c:if test="#{empty paginationUIBean}">
+ <ui:param name="paginationSettingUIBean" value="#{PageControlSettingsUIBean}" />
+ </c:if>
+ <c:if test="#{not empty paginationUIBean}">
+ <ui:param name="paginationSettingUIBean" value="#{paginationUIBean}" />
+ </c:if>
+
+ <table>
+ <tr>
+ <td nowrap="nowrap">
+
+
+ <h:outputText value="Total: #{paginationDataModel.rowCount}"
+ style="margin-right: 1em; font-weight: bold; "/>
+ <h:outputText value="Items Per Page: #{paginationPageControl.pageSize}"
+ style="font-weight: bold; "
+ rendered="#{paginationDataModel.rowCount gt paginationSettingUIBean.minimumPageSize
+ and not paginationPageControl.unlimited
+ and not (onf:length(paginationSettingUIBean.pageSizes) gt 1)}" />
+ <h:outputText value="Items Per Page:"
+ style="margin-right: 1em; font-weight: bold; "
+ rendered="#{paginationDataModel.rowCount gt paginationSettingUIBean.minimumPageSize
+ and not paginationPageControl.unlimited
+ and (onf:length(paginationSettingUIBean.pageSizes) gt 1)}"/>
+ <h:selectOneListbox id="currentPageSize"
+ size="1"
+ value="#{paginationPageControl.pageSize}"
+ rendered="#{paginationDataModel.rowCount gt paginationSettingUIBean.minimumPageSize
+ and not paginationPageControl.unlimited
+ and (onf:length(paginationSettingUIBean.pageSizes) gt 1)}">
+ <a4j:support event="onchange"
+ reRender="#{paginationDataTableName}, #{paginationDataScrollerName}"/>
+ <f:selectItems value="#{paginationSettingUIBean.pageSizes}" />
+ </h:selectOneListbox>
+
+ </td>
+ <td nowrap="nowrap">
+
+ <!-- Limit to 7 pages until e find a general fix for RHQ-1813 -->
+ <rich:datascroller id="#{paginationDataScrollerName}"
+ for="#{paginationDataTableName}"
+ rendered="#{not paginationPageControl.unlimited}"
+ selectedStyle="font-weight: bold;"
+ inactiveStyle="font-weight: normal;"
+ stepControls="show"
+ fastControls="hide"
+ boundaryControls="hide"
+ maxPages="7"
+ page="#{paginationPageControl.pageNumber}">
+ <f:facet name="next">
+ <h:panelGroup>
+ <h:graphicImage value="/images/tbb_pageright.gif" style="padding: 0px 5px 0px 7px;" />
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="next_disabled">
+ <h:panelGroup>
+ <h:graphicImage value="/images/tbb_pageright_gray.gif" style="padding: 0px 5px 0px 7px;" />
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="previous">
+ <h:panelGroup>
+ <h:graphicImage value="/images/tbb_pageleft.gif" style="padding: 0px 5px 0px 7px;" />
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="previous_disabled">
+ <h:panelGroup>
+ <h:graphicImage value="/images/tbb_pageleft_gray.gif" style="padding: 0px 5px 0px 7px;" />
+ </h:panelGroup>
+ </f:facet>
+ </rich:datascroller>
+
+ </td>
+ </tr>
+ </table>
+
+
+ </h:panelGroup>
+
+ <div style="clear: both;"/>
+
+ </ui:composition>
+ </f:view>
+
+ </body>
+</html>
\ No newline at end of file
commit 5a37b80f0cee3cf67c9aea9ca386019555ece295
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:08:08 2010 -0400
create a "plain" layout scheme for iframed-facelets
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/entity/layout/main-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/entity/layout/main-plain.xhtml
new file mode 100644
index 0000000..157b598
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/entity/layout/main-plain.xhtml
@@ -0,0 +1,39 @@
+<ui:composition template="/rhq/layout/main-plain-layout.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <ui:define name="body-area">
+
+ <!-- work around for IE and its broken box model. Without the concrete height value, the nav pane will shrink on hover. -->
+ <!--[if IE]>
+ <div id="contentParent" style="height: 100%">
+ <![endif]-->
+ <!--[if !IE]><!-->
+ <div id="contentParent">
+ <!--<![endif]-->
+ <div id="centerContentWrapper" class="content-right">
+ <div style="left: 0; right: 0; height: 100%;">
+
+ <!-- Shows the results of the last action executed. -->
+ <h:messages showSummary="true"
+ showDetail="true"
+ infoClass="InfoBlock"
+ warnClass="WarnBlock"
+ errorClass="ErrorBlock"
+ fatalClass="FatalBlock"
+ globalOnly="true"
+ layout="table"
+ width="100%" />
+
+ <ui:insert name="content"><p>Default Entity Content</p></ui:insert>
+ </div>
+ </div>
+ </div>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/layout/main-plain-layout.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/layout/main-plain-layout.xhtml
new file mode 100644
index 0000000..ffb0bda
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/layout/main-plain-layout.xhtml
@@ -0,0 +1,310 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+<head>
+ <title>${msg["product.shortName"]} - #{(!empty pageTitle) ? pageTitle : defaultPageTitle}</title>
+
+ <meta http-equiv="Expires" content="-1"/>
+ <meta http-equiv="Pragma" content="no-cache"/>
+ <meta http-equiv="Max-Age" content="0"/>
+ <meta http-equiv="Cache-Control" content="no-cache"/>
+ <ui:insert name="metaHeaders"></ui:insert>
+
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/win.css"/>
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/form-style.css"/>
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/menu.css"/>
+
+ <script type="text/javascript" src="/js/functions.js"></script>
+ <script type="text/javascript" src="/js/prototype.js"></script>
+ <script type="text/javascript" src="/js/window.js"></script>
+ <script type="text/javascript" src="/js/effects.js"></script>
+ <!--<script type="text/javascript" src="/js/debug.js"></script>-->
+ <script type="text/javascript" src="/js/formValues.js"></script>
+ <script type="text/javascript" src="/js/rhq.js"></script>
+ <script type="text/javascript" src="/js/popup.js"></script>
+ <link href="/css/theme/default.css" rel="stylesheet" type="text/css"/>
+ <link href="/css/theme/alphacube.css" rel="stylesheet" type="text/css"/>
+ <link href="/css/theme/debug.css" rel="stylesheet" type="text/css"/>
+
+ <link rel="icon" type="image/png" href="/images/favicon.png"/>
+ <link rel="apple-touch-icon" href="/images/favicon.png"/>
+
+ <!-- Trims up the headers of RF toggle panel headers -->
+ <style type="text/css">
+ .BlockTitle {
+ padding-top: 3px;
+ padding-bottom: 3px;
+ }
+ HTML, BODY { overflow: hidden; }
+ </style>
+
+
+<style type="text/css">
+
+.dr-pnl {
+ border-style: none;
+ padding: 0;
+}
+
+.dr-pnl-b {
+ border-color: white;
+ padding: 0;
+ margin: 0;
+}
+
+.dr-pnl-h { /* Files */
+ background-image: none;
+ background-color: rgb(164, 178, 185);
+ font-family: sans-serif;
+ font-size: 10px;
+}
+
+.dr-pmenu-group-self-label { /* filename */
+ color: rgb(109, 120, 124);
+ font-family: sans-serif;
+ font-size: 9px;
+ white-space: nowrap;
+}
+
+.rich-pmenu { /* Defines styles for panel menu */
+
+}
+.rich-pmenu-disabled-element { /* Defines styles for panel menu disabled element */
+
+}
+.rich-pmenu-group { /* styles for panel menu group */
+ background-image: none;
+ background-color: rgb(217, 223, 227);
+}
+
+.rich-pmenu-group-self-label { /* directory - Defines styles for panel menu group label */
+ font-family: sans-serif;
+ font-size: 9px;
+ color: rgb(102, 102, 102);
+ white-space: nowrap;
+}
+.rich-pmenu-item { /* Defines styles for panel menu item */
+ background-color: rgb(223, 228, 232);
+ color: rgb(217, 223, 227);
+ border-style: none;
+ margin: 0;
+ padding: 0;
+ padding-left: 15px;
+
+}
+.rich-pmenu-nowrap { /* Defines styles for panel menu wrapper */
+
+}
+.rich-pmenu-selected-element { /* Defines styles for panel menu selected element */
+ background-color: white;
+ font-style: normal;
+ font-weight: bold;
+ color: #00ff99;
+
+}
+.rich-pmenu-top-group { /* Defines styles for panel menu top group element */
+ padding-left: 15px;
+}
+.rich-pmenu-top-group-div { /* Defines styles for panel menu top group div element */
+ border-style: none;
+ border-bottom-style: dotted;
+ border-bottom-color: white;
+ margin: 0;
+ padding: 0;
+}
+
+.raw-outer-table-left-col {
+ background-color: rgb(217, 223, 227);
+}
+
+.raw-outer-table-left-col-footer {
+ background-color: rgb(217, 223, 227);
+ width: 100%;
+}
+
+.raw-outer-table-left-col-footer-content {
+ font-family: sans-serif;
+ font-size: 9px;
+ font-weight: bold;
+ color: gray;
+ padding-left: 10px;
+}
+
+.rawConfigUndoButton {
+ font-size: 9px;
+ font-weight: bold;
+ color: #666666;
+ background-color: #FFFFFF;
+ border: 1px solid #B0B0B0;
+ padding: 0px 5px;
+ cursor: pointer;
+ text-decoration: none
+}
+
+.rawCancelButton {
+ font-size: 11px;
+ font-weight: bold;
+ color: #E6E8ED;
+ background-color: #828CA3;
+ border: 1px outset #626C83;
+ padding: 1px 10px;
+ cursor: pointer;
+ text-decoration: none;
+ margin-left: 5px;
+}
+
+.rawConfigFileNameCol {
+ color: rgb(109, 120, 124);
+ font-family: sans-serif;
+ font-size: 9px;
+ white-space: nowrap;
+}
+
+.rawConfigUndoCol {
+ width: 25%;
+ text-align: right;
+}
+
+.rawConfigFileHeader {
+ color: gray;
+ white-space: nowrap;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+.rawConfigFileContents {
+ font-family: sans-serif;
+ color: gray;
+ background-color: white;
+ border-style: solid;
+ border-width: thin;
+ border-color: rgb(102, 102, 102);
+ width: 100%;
+ height: 300px;
+ overflow-x: auto;
+ overflow-y: scroll;
+}
+
+
+
+ </style>
+
+
+
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/tabular.css"/>
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/layout.css"/>
+
+ <script type="text/javascript">
+ var imagePath = "/images/";
+ </script>
+
+</head>
+
+<body bgcolor="#FFFFFF" style="height: 100%;">
+
+<ui:remove>
+ <!-- Set the content type to "text/html" (overriding the default of "application/xhtml+xml") to force
+Firefox and other Gecko-based browsers to render the page in "Almost Standards" (i.e. transitional) mode. -->
+</ui:remove>
+<f:view contentType="text/html">
+
+
+ <f:loadBundle basename="ApplicationResources" var="msg"/>
+
+ <!-- =================== PAGE HEADER =================== -->
+
+ <script language="javascript" type="text/javascript">
+ //this has to be defined before the resize trackers inside
+ //the PageBody element because they depend on the values
+ //computed inside this tracker function.
+ WindowResizeTracker.addListener(function() {
+ var header = $('PageHeader');
+ var borderHeight = 2; //set in the inline style of div PageHeader
+
+ if (Prototype.Browser.IE) {
+ header.style.height = WindowResizeTracker.currentSizes.windowHeight + 'px';
+ } else {
+ header.style.height = (WindowResizeTracker.currentSizes.windowHeight - borderHeight) + 'px';
+ }
+ header.style.width = WindowResizeTracker.currentSizes.windowWidth + 'px';
+
+ var body = $('PageBody');
+ //0 = menu height (and the top position of PageBody)
+ body.style.height = (WindowResizeTracker.currentSizes.windowHeight - 0 - borderHeight) + 'px';
+ body.style.width = header.style.width;
+
+ document.body.style.height = WindowResizeTracker.currentSizes.windowHeight + 'px';
+ });
+ </script>
+ <!-- work around for IE and its broken box model. Without the concrete height value, the nav pane will shrink on hover. -->
+ <!--[if IE]>
+ <div id="PageHeader" style="border-bottom: 2px solid #999; position: absolute; top: 0; bottom: 0; left: 0; right: 0; height: 100%">
+ <![endif]-->
+ <!--[if !IE]><!-->
+ <div id="PageHeader" style="border-bottom: 2px solid #999; position: absolute; top: 0; bottom: 0; left: 0; right: 0;">
+ <!--<![endif]-->
+
+ <!-- work around for IE and its broken box model. Without the concrete height value, the nav pane will shrink on hover. -->
+ <!--[if IE]>
+ <div id="PageBody" style="width: 100%; position: absolute; top: 0px; bottom: 0; height: 100%;">
+ <![endif]-->
+ <!--[if !IE]><!-->
+ <div id="PageBody" style="width: 100%; position: absolute; top: 0px; bottom: 0;">
+ <!--<![endif]-->
+ <ui:insert name="body-area">Default Page Body</ui:insert>
+ </div>
+
+ </div>
+
+
+
+ <!-- =================== BODY =================== -->
+
+
+ <div id="about" class="dialog" style="display: none; position: absolute; top: 0; left: 0;">
+ <div class="DisplayContent" style="margin: 0;">
+ <div style="margin:5px">
+ <p class="compact">
+ <span class="DisplaySubhead">${msg['footer.aboutLink']}</span><br/>
+ <span class="DisplayLabel">${msg['footer.version']}: ${msg['product.version']}</span><br/>
+ <span class="DisplayLabel">${msg['footer.buildNumber']}: ${msg['product.buildNumber']}</span>
+ </p>
+
+ <p class="compact">
+ <f:verbatim>${msg['footer.copyright']}</f:verbatim> ${msg['about.Copyright.Content']}
+ </p>
+
+ <p class="compact">
+ ${msg['about.MoreInfo.Label']}<br/>
+ <a href="mailto:${msg['about.MoreInfo.LinkSales']}">${msg['about.MoreInfo.LinkSales']}</a><br/>
+ <a href="mailto:${msg['about.MoreInfo.LinkSupport']}">${msg['about.MoreInfo.LinkSupport']}</a>
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <!-- work-around to enable us to embed richfaces components inside the onc:simpleTrigger;
+without this, the page will throw a javascript error "{blah} is not defined" or
+"{yadda} is not a constructor", and the pop-up action will not work -->
+ <rich:calendar rendered="false"/>
+ <rich:inputNumberSpinner rendered="false"/>
+
+</f:view>
+
+<script type="text/javascript">
+ addWindowOnLoadEvent(disableConditionalButtons);
+</script>
+
+</body>
+</html>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/layout/main-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/layout/main-plain.xhtml
new file mode 100644
index 0000000..6f2cd02
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/layout/main-plain.xhtml
@@ -0,0 +1,17 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+ <h1>Default Resource Content</h1>
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit b0cac99b444d86edc047a3a1bc031907207c2350
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:00:40 2010 -0400
criteria objects with customized sorting should not get LEFT JOIN treatment
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
index 3216ec7..82ffd48 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
@@ -342,6 +342,12 @@ public final class CriteriaQueryGenerator {
boolean doNotPrefixAlias = isNumber(suffix) || criteria.hasCustomizedSorting();
String sortFragment = doNotPrefixAlias ? suffix : (alias + "." + suffix);
+ if (criteria.hasCustomizedSorting()) {
+ // customized sorting does not get LEFT JOIN expressions added
+ orderingFieldTokens.add(sortFragment + " " + ordering);
+ continue;
+ }
+
int lastDelimiterIndex = sortFragment.lastIndexOf('.');
if (lastDelimiterIndex == -1) {
// does not require joins, just add the ordering field token directly
@@ -568,8 +574,8 @@ public final class CriteriaQueryGenerator {
try {
Class<?> entityClass = criteria.getPersistentClass();
- SearchTranslationManager searchManager = new SearchTranslationManager(subject,
- SearchSubsystem.get(entityClass));
+ SearchTranslationManager searchManager = new SearchTranslationManager(subject, SearchSubsystem
+ .get(entityClass));
searchManager.setExpression(searchExpression);
// translate first, if there was an error we won't add the dangling 'AND' to the where clause
commit 56cdad77b1f9e576bdeb7f27eec7d6f4ea929351
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 01:01:03 2010 -0400
Don't allow "Step X of Y" for wizard-based flows to wrap to next line
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/wizard/WizardView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/wizard/WizardView.java
index a8ff10b..3d88005 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/wizard/WizardView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/wizard/WizardView.java
@@ -206,6 +206,7 @@ public class WizardView extends VLayout {
currentStep = stepIndex;
stepLabel.setContents("Step " + (stepIndex + 1) + " of " + wizardSteps.size());
+ stepLabel.setWrap(false);
WizardStep step = wizardSteps.get(currentStep);
commit 4bed8786b2d15c9ace92b938e1b9e160dde5d65e
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 00:30:37 2010 -0400
fix 2 compilation errors where Set could not be assigned to EnumSet
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java
index 9e853f0..2c572fb 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java
@@ -60,7 +60,7 @@ public class GroupActivationContext extends AbstractResourceOrGroupActivationCon
// lazy load
if (this.facets == null) {
ResourceFacets resourceFacets = this.resourceTypeManager.getResourceFacets(getResourceType().getId());
- this.facets = resourceFacets.getFacets();
+ this.facets = EnumSet.copyOf(resourceFacets.getFacets());
}
return this.facets;
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java
index 510f584..de91285 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java
@@ -62,7 +62,7 @@ public class ResourceActivationContext extends AbstractResourceOrGroupActivation
if (this.facets == null) {
ResourceFacets resourceFacets = this.resourceTypeManager.getResourceFacets(resource.getResourceType()
.getId());
- this.facets = resourceFacets.getFacets();
+ this.facets = EnumSet.copyOf(resourceFacets.getFacets());
}
return this.facets;
}
commit 6e66afbb63d19bad003c6c26b08b31c8c7135171
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Aug 10 18:23:34 2010 -0400
fix bookmarking/history for Resource tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 1204539..144442b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -92,7 +92,7 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
monitoringTab = new TwoLevelTab("Monitoring", "/images/icons/Monitor_grey_16.png");
monitoringTab.registerSubTabs("Graphs", "Tables", "Traits", "Availability", "Schedules", "Call Time");
- inventoryTab = new TwoLevelTab(DEFAULT_TAB_NAME, "/images/icons/Inventory_grey_16.png");
+ inventoryTab = new TwoLevelTab("Inventory", "/images/icons/Inventory_grey_16.png");
inventoryTab.registerSubTabs("Overview", "Members", "Connection Settings");
operationsTab = new TwoLevelTab("Operations", "/images/icons/Operation_grey_16.png");
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java
index d16d403..c75f6e8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java
@@ -116,14 +116,14 @@ public class ResourceGroupTopView extends HLayout implements BookmarkableView {
public void renderView(ViewPath viewPath) {
if (viewPath.isEnd()) {
// default detail view
- viewPath.getViewPath().add(new ViewId("Summary"));
+ viewPath.getViewPath().add(new ViewId("Inventory"));
viewPath.getViewPath().add(new ViewId("Overview"));
}
Integer groupId = Integer.parseInt(viewPath.getCurrent().getPath());
if (currentGroup == null || currentGroup.getResourceGroup().getId() != groupId) {
- // The previous bookmark did not already point to this group.
+ // The previous history item did not already point to this group.
setSelectedGroup(groupId, viewPath);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index a40f10a..7415ba7 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -25,7 +25,6 @@ import com.google.gwt.user.client.History;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Side;
import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.tab.Tab;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.resource.Resource;
@@ -62,6 +61,8 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTyp
*/
public class ResourceDetailView extends VLayout implements BookmarkableView, ResourceSelectListener, TwoLevelTabSelectedHandler {
+ private static final String DEFAULT_TAB_NAME = "Summary";
+
private Resource resource;
private ResourcePermission permissions;
private ResourceType type;
@@ -79,9 +80,6 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
private ResourceTitleBar titleBar;
- private ViewId tabView;
- private ViewId subtabView;
-
public void setResource(Resource resource) {
this.resource = resource;
@@ -146,10 +144,7 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
this.resource = resource;
titleBar.setResource(resource);
-
- int selectedTab = topTabSet.getSelectedTabNumber();
-
-
+
FullHTMLPane timelinePane = new FullHTMLPane("/rhq/resource/summary/timeline-plain.xhtml?id=" + resource.getId());
summaryTab.updateSubTab("Overview", new ResourceOverviewView(resource));
summaryTab.updateSubTab("Timeline", timelinePane);
@@ -269,43 +264,43 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
+ // Switch tabs directly, rather than letting the history framework do it, to avoid redrawing the outer views.
+ selectTab(tabSelectedEvent.getId(), tabSelectedEvent.getSubTabId());
String tabPath = "/" + tabSelectedEvent.getId() + "/" + tabSelectedEvent.getSubTabId();
-// System.out.println("TAB: " + currentView.getPath() + tabPath);
+ String path = "Resource/" + this.resource.getId() + tabPath;
- if (resource != null) {
- String path = "Resource/" + resource.getId() + tabPath;
- History.newItem(path, false);
- }
+ // But still add an item to the history, specifying false to tell it not to fire an event.
+ History.newItem(path, false);
}
public void renderView(ViewPath viewPath) {
- // TODO: Implement this method.
-
- if (viewPath.isEnd()) {
- // default
-
- } else {
-
- tabView = viewPath.getCurrent();
- subtabView = viewPath.getNext();
-
- for (Tab t : topTabSet.getTabs()) {
- TwoLevelTab tab = (TwoLevelTab) t;
-
- if (tab.getTitle().equals(tabView.getPath())) {
- topTabSet.selectTab(tab); //tabView.getPath());
-
- tab.getLayout().selectTab(subtabView.getPath());
-
+ // e.g. #Resource/10010/Inventory/Overview
+ String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
+ String subTabName = (viewPath.viewsLeft() >= 1) ? viewPath.getNext().getPath() : null; // e.g. "Overview"
+ selectTab(tabName, subTabName);
+ }
- }
+ public void selectTab(String tabName, String subtabName) {
+ if (tabName == null) {
+ tabName = DEFAULT_TAB_NAME;
+ }
+ TwoLevelTab tab = (TwoLevelTab)this.topTabSet.getTabByTitle(tabName);
+ if (tab == null) {
+ CoreGUI.getErrorHandler().handleError("Invalid tab name: " + tabName);
+ // TODO: Should we fire a history event here to redirect to a valid bookmark?
+ tab = (TwoLevelTab)this.topTabSet.getTabByTitle(DEFAULT_TAB_NAME);
+ }
+ this.topTabSet.selectTab(tab);
+ if (subtabName != null) {
+ if (!tab.getLayout().selectTab(subtabName)) {
+ CoreGUI.getErrorHandler().handleError("Invalid subtab name: " + subtabName);
+ // TODO: Should we fire a history event here to redirect to a valid bookmark?
+ return;
}
-
-
+ tab.getLayout().selectTab(subtabName);
}
-
-
}
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceView.java
index e342628..f7b5c6e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceView.java
@@ -133,16 +133,13 @@ public class ResourceView extends HLayout implements BookmarkableView {
Integer resourceId = Integer.parseInt(viewPath.getCurrent().getPath());
if (currentResource == null || currentResource.getId() != resourceId) {
-
+ // The previous history item did not already point to this Resource.
setSelectedResource(resourceId, viewPath);
-
- this.treeView.renderView(viewPath);
-
- viewPath.next();
-
- this.detailView.renderView(viewPath);
-
}
+
+ viewPath.next();
+ this.treeView.renderView(viewPath);
+ this.detailView.renderView(viewPath);
}
}
commit 92f76547ae768f78379d0abbd9fde4b3d0e375e8
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Aug 10 17:33:32 2010 -0400
fix bookmarks/history for group tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java
index 9b07011..bc79260 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java
@@ -151,12 +151,14 @@ public class SubTabLayout extends VLayout {
- public void selectTab(String title) {
+ public boolean selectTab(String title) {
+ boolean foundTab = false;
currentlySelected = title;
int i = 0;
for (String sub : subtabs.keySet()) {
if (sub.equals(title)) {
currentIndex = i;
+ foundTab = true;
break;
}
i++;
@@ -167,11 +169,11 @@ public class SubTabLayout extends VLayout {
((Button)buttonBar.getMember(currentIndex)).select();
draw(subtabs.get(title));
}
+
+ return foundTab;
}
-
-
// ------- Event support -------
// Done with a separate handler manager from parent class on purpose (compatibility issue)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTabSet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTabSet.java
index a8bc6cd..b12304c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTabSet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTabSet.java
@@ -18,7 +18,6 @@
*/
package org.rhq.enterprise.gui.coregui.client.components.tab;
-import com.google.gwt.event.shared.DefaultHandlerRegistration;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.event.shared.HandlerRegistration;
import com.smartgwt.client.widgets.tab.Tab;
@@ -26,15 +25,12 @@ import com.smartgwt.client.widgets.tab.TabSet;
import com.smartgwt.client.widgets.tab.events.TabSelectedEvent;
import com.smartgwt.client.widgets.tab.events.TabSelectedHandler;
-import java.util.ArrayList;
-
/**
* @author Greg Hinkle
*/
public class TwoLevelTabSet extends TabSet implements TabSelectedHandler, TwoLevelTabSelectedHandler {
-
public void setTabs(TwoLevelTab... tabs) {
super.setTabs(tabs);
for (TwoLevelTab tab : tabs) {
@@ -48,9 +44,6 @@ public class TwoLevelTabSet extends TabSet implements TabSelectedHandler, TwoLev
}
-
-
-
// ------- Event support -------
// Done with a separate handler manager from parent class on purpose (compatibility issue)
@@ -80,5 +73,15 @@ public class TwoLevelTabSet extends TabSet implements TabSelectedHandler, TwoLev
m.fireEvent(tabSelectedEvent);
}
+
+ public Tab getTabByTitle(String title) {
+ Tab[] tabs = getTabs();
+ for (Tab tab : tabs) {
+ if (tab.getTitle().equals(title)) {
+ return tab;
+ }
+ }
+ return null;
+ }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 7ce23a7..1204539 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -25,7 +25,6 @@ import com.google.gwt.user.client.History;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Side;
import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.tab.Tab;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.resource.ResourceType;
@@ -36,7 +35,6 @@ import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTab;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedEvent;
@@ -51,11 +49,12 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTyp
* Right panel of the group view.
*
* @author Greg Hinkle
+ * @author Ian Springer
*/
public class ResourceGroupDetailView extends VLayout implements BookmarkableView, TwoLevelTabSelectedHandler {
+ private static final String DEFAULT_TAB_NAME = "Inventory";
private ResourceGroupComposite groupComposite;
- private ResourceType groupType;
private ResourcePermission permissions;
private TwoLevelTab summaryTab;
@@ -70,8 +69,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
private ResourceGroupTitleBar titleBar;
- private ViewId tabView;
- private ViewId subtabView;
@Override
protected void onDraw() {
@@ -95,7 +92,7 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
monitoringTab = new TwoLevelTab("Monitoring", "/images/icons/Monitor_grey_16.png");
monitoringTab.registerSubTabs("Graphs", "Tables", "Traits", "Availability", "Schedules", "Call Time");
- inventoryTab = new TwoLevelTab("Inventory", "/images/icons/Inventory_grey_16.png");
+ inventoryTab = new TwoLevelTab(DEFAULT_TAB_NAME, "/images/icons/Inventory_grey_16.png");
inventoryTab.registerSubTabs("Overview", "Members", "Connection Settings");
operationsTab = new TwoLevelTab("Operations", "/images/icons/Operation_grey_16.png");
@@ -123,6 +120,7 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// CoreGUI.addBreadCrumb(getPlace());
}
+
public void onGroupSelected(ResourceGroupComposite groupComposite) {
this.groupComposite = groupComposite;
@@ -183,7 +181,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
new ResourceTypeRepository.TypeLoadedCallback() {
public void onTypesLoaded(ResourceType type) {
group.setResourceType(type);
- ResourceGroupDetailView.this.groupType = type;
GWTServiceLookup.getAuthorizationService().getImplicitGroupPermissions(
group.getId(), new AsyncCallback<Set<Permission>>() {
public void onFailure(Throwable caught) {
@@ -242,34 +239,44 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
}
+
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
+ // Switch tabs directly, rather than letting the history framework do it, to avoid redrawing the outer views.
+ selectTab(tabSelectedEvent.getId(), tabSelectedEvent.getSubTabId());
String tabPath = "/" + tabSelectedEvent.getId() + "/" + tabSelectedEvent.getSubTabId();
- // System.out.println("TAB: " + currentView.getPath() + tabPath);
-
- if (groupComposite != null) {
- String path = "ResourceGroup/" + groupComposite.getResourceGroup().getId() + tabPath;
- History.newItem(path, false);
- }
+ String path = "ResourceGroup/" + this.groupComposite.getResourceGroup().getId() + tabPath;
+
+ // But still add an item to the history, specifying false to tell it not to fire an event.
+ History.newItem(path, false);
}
- public void renderView(ViewPath viewPath) {
- if (viewPath.isEnd()) {
- // default
- } else {
- tabView = viewPath.getCurrent();
- subtabView = viewPath.getNext();
-
- for (Tab t : topTabSet.getTabs()) {
- TwoLevelTab tab = (TwoLevelTab) t;
- if (tab.getTitle().equals(tabView.getPath())) {
- topTabSet.selectTab(tabView.getPath());
+ public void renderView(ViewPath viewPath) {
+ // e.g. #ResourceGroup/10010/Inventory/Overview
+ String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
+ String subTabName = (viewPath.viewsLeft() >= 1) ? viewPath.getNext().getPath() : null; // e.g. "Overview"
+ selectTab(tabName, subTabName);
+ }
- tab.getLayout().selectTab(subtabView.getPath());
- }
+ public void selectTab(String tabName, String subtabName) {
+ if (tabName == null) {
+ tabName = DEFAULT_TAB_NAME;
+ }
+ TwoLevelTab tab = (TwoLevelTab)this.topTabSet.getTabByTitle(tabName);
+ if (tab == null) {
+ CoreGUI.getErrorHandler().handleError("Invalid tab name: " + tabName);
+ // TODO: Should we fire a history event here to redirect to a valid bookmark?
+ tab = (TwoLevelTab)this.topTabSet.getTabByTitle(DEFAULT_TAB_NAME);
+ }
+ this.topTabSet.selectTab(tab);
+ if (subtabName != null) {
+ if (!tab.getLayout().selectTab(subtabName)) {
+ CoreGUI.getErrorHandler().handleError("Invalid subtab name: " + subtabName);
+ // TODO: Should we fire a history event here to redirect to a valid bookmark?
+ return;
}
+ tab.getLayout().selectTab(subtabName);
}
-
}
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java
index f45b169..d16d403 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java
@@ -123,15 +123,12 @@ public class ResourceGroupTopView extends HLayout implements BookmarkableView {
Integer groupId = Integer.parseInt(viewPath.getCurrent().getPath());
if (currentGroup == null || currentGroup.getResourceGroup().getId() != groupId) {
-
+ // The previous bookmark did not already point to this group.
setSelectedGroup(groupId, viewPath);
-
- this.treeView.setSelectedGroup(groupId);
-
- viewPath.next();
-
- this.detailView.renderView(viewPath);
}
+
+ viewPath.next();
+ this.detailView.renderView(viewPath);
}
}
commit 484719eea50ab62afc6938632b0861b87712458d
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 10 22:50:17 2010 +0200
Put some more developer URLs in there.
diff --git a/pom.xml b/pom.xml
index ed621bf..bc895da 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1139,6 +1139,7 @@
<developer>
<name>Greg Hinkle</name>
<timezone>-5</timezone>
+ <url>http://www.jroller.com/ghinkle/</url>
</developer>
<developer>
<name>Lukas Krejci</name>
@@ -1159,6 +1160,7 @@
<developer>
<name>John 'Mazz' Mazzitelli</name>
<timezone>-5</timezone>
+ <url>http://management-platform.blogspot.com</url>
</developer>
<developer>
<name>Simeon Pinder</name>
commit c9c6d348a082f89c8f4a18edc2afb3d5e7498cc4
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Aug 10 12:56:19 2010 -0400
implement group Inventory>Overview subtab, with the exception of the ability to edit the group's name and description
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceFacets.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceFacets.java
index cc3cb50..c05d5ef 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceFacets.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceFacets.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -23,12 +23,14 @@
package org.rhq.core.domain.resource.composite;
import java.io.Serializable;
-import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.Set;
import org.rhq.core.domain.resource.ResourceTypeFacet;
/**
- * The set of facets a Resource supports - used to determine which quicknav icons and tabs to display in the UI.
+ * The set of facets a Resource or compatible Resource group supports - used to determine which quick-nav icons and tabs
+ * to display in the GUI.
*
* @author Ian Springer
*/
@@ -39,18 +41,22 @@ public class ResourceFacets implements Serializable {
public static ResourceFacets ALL = new ResourceFacets(-1, true, true, true, true, true, true, true, true);
/*
* immutable private member data makes this object safe to use in a concurrent environment, such as a
- * concurrent-access cache of ResourceFacets objects
+ * concurrent-access cache of ResourceFacets objects (TODO (ips): make these final again?)
*/
- private final int resourceTypeId;
- private final boolean measurement;
- private final boolean event;
- private final boolean pluginConfiguration;
- private final boolean configuration;
- private final boolean operation;
- private final boolean content;
- private final boolean callTime;
- private final boolean support;
- private EnumSet<ResourceTypeFacet> facets;
+ private int resourceTypeId;
+ private boolean measurement;
+ private boolean event;
+ private boolean pluginConfiguration;
+ private boolean configuration;
+ private boolean operation;
+ private boolean content;
+ private boolean callTime;
+ private boolean support;
+ private Set<ResourceTypeFacet> facets;
+
+ // no-arg constructor required by GWT compiler
+ public ResourceFacets() {
+ }
public ResourceFacets(int resourceTypeId, boolean measurement, boolean event, boolean pluginConfiguration,
boolean configuration, boolean operation, boolean content, boolean callTime, boolean support) {
@@ -163,12 +169,12 @@ public class ResourceFacets implements Serializable {
*
* @return an enum representation of the facets
*/
- public EnumSet<ResourceTypeFacet> getFacets() {
+ public Set<ResourceTypeFacet> getFacets() {
return facets;
}
private void initEnum() {
- this.facets = EnumSet.noneOf(ResourceTypeFacet.class);
+ this.facets = new HashSet<ResourceTypeFacet>();
if (measurement)
this.facets.add(ResourceTypeFacet.MEASUREMENT);
if (event)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/composite/ResourceGroupComposite.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/composite/ResourceGroupComposite.java
index 6a837c9..5199ba2 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/composite/ResourceGroupComposite.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/composite/ResourceGroupComposite.java
@@ -53,6 +53,8 @@ public class ResourceGroupComposite implements Serializable {
private ResourceFacets resourceFacets;
+ // TODO: Expose authz permissions current user has for the group.
+
private class GroupDefinitionMember extends ResourceGroup {
public void setGroupCategory(GroupCategory category) {
super.setGroupCategory(category);
@@ -101,8 +103,8 @@ public class ResourceGroupComposite implements Serializable {
} else if (this.resourceGroup.getGroupCategory() == GroupCategory.MIXED) {
this.category = GroupCategory.MIXED;
} else {
- throw new IllegalArgumentException("Unknown category " + this.resourceGroup.getGroupCategory()
- + " for ResourceGroup " + this.resourceGroup.getName());
+ throw new IllegalArgumentException("Unknown category [" + this.resourceGroup.getGroupCategory()
+ + "] for ResourceGroup [" + this.resourceGroup.getName() + "]");
}
this.resourceFacets = facets;
@@ -218,6 +220,6 @@ public class ResourceGroupComposite implements Serializable {
+ this.resourceGroup.getName() //
+ ", implicit[up/down/avail=," + this.implicitUp + "/" + this.implicitDown + "/" + this.implicitAvail + "]"
+ ", explicit[up/down/avail=," + this.explicitUp + "/" + this.explicitDown + "/" + this.explicitAvail + "]"
- + ", permission=" + "]";
+ + ", facets=" + this.resourceFacets + "]";
}
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGroupGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGroupGWTService.java
index c6f5800..5644554 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGroupGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/ResourceGroupGWTService.java
@@ -18,18 +18,16 @@
*/
package org.rhq.enterprise.gui.coregui.client.gwt;
-
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
import org.rhq.core.domain.criteria.ResourceGroupDefinitionCriteria;
import org.rhq.core.domain.resource.group.GroupDefinition;
import org.rhq.core.domain.resource.group.ResourceGroup;
+import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
import org.rhq.core.domain.util.PageList;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
-
-
/**
* @author Greg Hinkle
*/
@@ -38,6 +36,8 @@ public interface ResourceGroupGWTService extends RemoteService {
PageList<ResourceGroup> findResourceGroupsByCriteria(ResourceGroupCriteria criteria);
+ PageList<ResourceGroupComposite> findResourceGroupCompositesByCriteria(ResourceGroupCriteria criteria);
+
PageList<GroupDefinition> findGroupDefinitionsByCriteria(ResourceGroupDefinitionCriteria criteria);
void ensureMembershipMatches(int groupId, int[] resourceIds);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index c3d6a43..7ce23a7 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -29,9 +29,11 @@ import com.smartgwt.client.widgets.tab.Tab;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.ResourceTypeFacet;
import org.rhq.core.domain.resource.composite.ResourcePermission;
import org.rhq.core.domain.resource.group.GroupCategory;
import org.rhq.core.domain.resource.group.ResourceGroup;
+import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.ViewId;
@@ -52,10 +54,9 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTyp
*/
public class ResourceGroupDetailView extends VLayout implements BookmarkableView, TwoLevelTabSelectedHandler {
- private ResourceGroup group;
- private ResourcePermission permissions;
-
+ private ResourceGroupComposite groupComposite;
private ResourceType groupType;
+ private ResourcePermission permissions;
private TwoLevelTab summaryTab;
private TwoLevelTab monitoringTab;
@@ -122,15 +123,13 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// CoreGUI.addBreadCrumb(getPlace());
}
- public void onGroupSelected(ResourceGroup group) {
+ public void onGroupSelected(ResourceGroupComposite groupComposite) {
- this.group = group;
+ this.groupComposite = groupComposite;
- titleBar.setGroup(group);
+ this.titleBar.setGroup(groupComposite.getResourceGroup());
- int selectedTab = topTabSet.getSelectedTabNumber();
-
- // TODO all of the tabs
+ // TODO: Implement the rest of the tabs.
// FullHTMLPane timelinePane = new FullHTMLPane("/rhq/resource/summary/timeline-plain.xhtml?id=" + resource.getId());
// summaryTab.updateSubTab("Overview", new ResourceOverviewView(resource));
@@ -143,8 +142,8 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// monitoringTab.updateSubTab("Schedules", new FullHTMLPane("/rhq/resource/monitor/schedules-plain.xhtml?id=" + resource.getId()));
// monitoringTab.updateSubTab("Call Time", new CallTimeView(resource));
//
- inventoryTab.updateSubTab("Overview", new OverviewView());
- inventoryTab.updateSubTab("Members", ResourceSearchView.getMembersOf(this.group.getId()));
+ inventoryTab.updateSubTab("Overview", new OverviewView(this.groupComposite));
+ inventoryTab.updateSubTab("Members", ResourceSearchView.getMembersOf(this.groupComposite.getResourceGroup().getId()));
// inventoryTab.updateSubTab("Connection Settings", new GroupPluginConfigurationEditView(this.group.getId(), this.group.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
//
// operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
@@ -170,10 +169,11 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
}
private void updateTabStatus() {
- // Go and get the type with all needed metadata
- // and then get the permissions for this resource
+ final ResourceGroup group = this.groupComposite.getResourceGroup();
if (group.getGroupCategory() == GroupCategory.COMPATIBLE) {
+
+ // Load the fully fetched ResourceType.
ResourceType groupType = group.getResourceType();
ResourceTypeRepository.Cache.getInstance().getResourceTypes(
groupType.getId(),
@@ -182,13 +182,12 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
ResourceTypeRepository.MetadataType.resourceConfigurationDefinition),
new ResourceTypeRepository.TypeLoadedCallback() {
public void onTypesLoaded(ResourceType type) {
-
+ group.setResourceType(type);
ResourceGroupDetailView.this.groupType = type;
-
GWTServiceLookup.getAuthorizationService().getImplicitGroupPermissions(
- ResourceGroupDetailView.this.group.getId(), new AsyncCallback<Set<Permission>>() {
+ group.getId(), new AsyncCallback<Set<Permission>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load group permissions", caught);
+ CoreGUI.getErrorHandler().handleError("Failed to load group permissions.", caught);
}
public void onSuccess(Set<Permission> result) {
@@ -203,36 +202,42 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
private void completeTabUpdate() {
- if (!permissions.isMeasure()) {
- topTabSet.disableTab(monitoringTab);
- } else {
- topTabSet.enableTab(monitoringTab);
- }
+ // Summary and Inventory tabs are always enabled.
+ topTabSet.enableTab(summaryTab);
+ topTabSet.enableTab(inventoryTab);
- if (groupType.getOperationDefinitions() == null || groupType.getOperationDefinitions().isEmpty()
- || !permissions.isControl()) {
- topTabSet.disableTab(operationsTab);
+ GroupCategory groupCategory = groupComposite.getResourceGroup().getGroupCategory();
+
+ // Monitoring and Alerts tabs are always enabled for compatible groups and always disabled for mixed groups.
+ if (groupCategory == GroupCategory.COMPATIBLE) {
+ topTabSet.enableTab(monitoringTab);
+ topTabSet.enableTab(alertsTab);
} else {
- topTabSet.enableTab(operationsTab);
+ topTabSet.disableTab(monitoringTab);
+ topTabSet.disableTab(alertsTab);
}
- if (!permissions.isAlert()) {
- topTabSet.disableTab(alertsTab);
+ // Operations tab is only enabled for compatible groups of a type that supports the Operations facet.
+ Set<ResourceTypeFacet> typeFacets = groupComposite.getResourceFacets().getFacets();
+ if (typeFacets.contains(ResourceTypeFacet.OPERATION)) {
+ topTabSet.enableTab(operationsTab);
} else {
- topTabSet.enableTab(alertsTab);
+ topTabSet.disableTab(operationsTab);
}
- if (groupType.getResourceConfigurationDefinition() == null || !permissions.isConfigureRead()) {
- topTabSet.disableTab(configurationTab);
- } else {
+ // Configuration tab is only enabled for compatible groups of a type that supports the Configuration facet
+ // and when the current user has the CONFIGURE_READ permission.
+ if (!typeFacets.contains(ResourceTypeFacet.CONFIGURATION) && permissions.isConfigureRead()) {
topTabSet.enableTab(configurationTab);
+ } else {
+ topTabSet.disableTab(configurationTab);
}
- if (groupType.getEventDefinitions() == null || groupType.getEventDefinitions().isEmpty()
- || !permissions.isMeasure()) {
+ // Events tab is only enabled for compatible groups of a type that supports the Events facet.
+ if (typeFacets.contains(ResourceTypeFacet.EVENT)) {
topTabSet.enableTab(eventsTab);
} else {
- topTabSet.enableTab(eventsTab);
+ topTabSet.disableTab(eventsTab);
}
}
@@ -241,22 +246,16 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
String tabPath = "/" + tabSelectedEvent.getId() + "/" + tabSelectedEvent.getSubTabId();
// System.out.println("TAB: " + currentView.getPath() + tabPath);
- if (group != null) {
- String path = "ResourceGroup/" + group.getId() + tabPath;
+ if (groupComposite != null) {
+ String path = "ResourceGroup/" + groupComposite.getResourceGroup().getId() + tabPath;
History.newItem(path, false);
}
}
public void renderView(ViewPath viewPath) {
-
- Integer groupId = Integer.parseInt(viewPath.getCurrent().getPath());
-
-
if (viewPath.isEnd()) {
// default
-
} else {
-
tabView = viewPath.getCurrent();
subtabView = viewPath.getNext();
@@ -269,9 +268,7 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
tab.getLayout().selectTab(subtabView.getPath());
}
-
}
-
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java
index 8faaae8..f45b169 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTopView.java
@@ -27,7 +27,7 @@ import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.layout.HLayout;
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
-import org.rhq.core.domain.resource.group.ResourceGroup;
+import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
@@ -45,11 +45,10 @@ public class ResourceGroupTopView extends HLayout implements BookmarkableView {
private Canvas contentCanvas;
- private ResourceGroup currentGroup;
- //private Resource resourcePlatform;
+ private ResourceGroupComposite currentGroup;
private ResourceGroupTreeView treeView;
- private ResourceGroupDetailView detailView = new ResourceGroupDetailView();
+ private ResourceGroupDetailView detailView;
private ResourceGroupGWTServiceAsync groupService = GWTServiceLookup.getResourceGroupService();
@@ -58,6 +57,7 @@ public class ResourceGroupTopView extends HLayout implements BookmarkableView {
}
+
@Override
protected void onInit() {
super.onInit();
@@ -65,58 +65,45 @@ public class ResourceGroupTopView extends HLayout implements BookmarkableView {
setWidth100();
setHeight100();
-
treeView = new ResourceGroupTreeView();
addMember(treeView);
contentCanvas = new Canvas();
addMember(contentCanvas);
-
- // created above
detailView = new ResourceGroupDetailView();
// treeView.addResourceSelectListener(detailView);
-
setContent(detailView);
-
}
- public void setSelectedGroup(final int groupId, final ViewPath view) {
- ResourceGroup group = this.treeView.getGroup(groupId);
- if (group != null) {
- setSelectedGroup(group, view);
- } else {
- ResourceGroupCriteria criteria = new ResourceGroupCriteria();
- criteria.addFilterId(groupId);
- criteria.fetchTags(true);
- groupService.findResourceGroupsByCriteria(criteria, new AsyncCallback<PageList<ResourceGroup>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getMessageCenter().notify(new Message("Group with id [" + groupId +
- "] does not exist or is not accessible.", Message.Severity.Warning));
-
- CoreGUI.goTo(InventoryView.VIEW_PATH);
- }
- public void onSuccess(PageList<ResourceGroup> result) {
- if (result.isEmpty()) {
- //noinspection ThrowableInstanceNeverThrown
- onFailure(new Exception("Group with id [" + groupId + "] does not exist."));
- } else {
- ResourceGroup group = result.get(0);
- setSelectedGroup(group, view);
- }
+ public void setSelectedGroup(final int groupId, final ViewPath view) {
+ ResourceGroupCriteria criteria = new ResourceGroupCriteria();
+ criteria.addFilterId(groupId);
+ //criteria.fetchTags(true);
+ groupService.findResourceGroupCompositesByCriteria(criteria, new AsyncCallback<PageList<ResourceGroupComposite>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getMessageCenter().notify(new Message("Group with id [" + groupId +
+ "] does not exist or is not accessible.", Message.Severity.Warning));
+ caught.printStackTrace();
+ CoreGUI.goTo(InventoryView.VIEW_PATH);
+ }
+
+ public void onSuccess(PageList<ResourceGroupComposite> result) {
+ if (result.isEmpty()) {
+ //noinspection ThrowableInstanceNeverThrown
+ onFailure(new Exception("Group with id [" + groupId + "] does not exist."));
+ } else {
+ currentGroup = result.get(0);
+ treeView.setSelectedGroup(currentGroup.getResourceGroup().getId());
+ detailView.onGroupSelected(currentGroup);
}
- });
- }
+ }
+ });
}
- private void setSelectedGroup(ResourceGroup group, ViewPath viewPath) {
- this.currentGroup = group;
- this.treeView.setSelectedGroup(group.getId());
- this.detailView.onGroupSelected(group);
- }
public void setContent(Canvas newContent) {
if (contentCanvas.getChildren().length > 0)
@@ -135,7 +122,7 @@ public class ResourceGroupTopView extends HLayout implements BookmarkableView {
Integer groupId = Integer.parseInt(viewPath.getCurrent().getPath());
- if (currentGroup == null || currentGroup.getId() != groupId) {
+ if (currentGroup == null || currentGroup.getResourceGroup().getId() != groupId) {
setSelectedGroup(groupId, viewPath);
@@ -144,7 +131,6 @@ public class ResourceGroupTopView extends HLayout implements BookmarkableView {
viewPath.next();
this.detailView.renderView(viewPath);
-
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java
index bd79780..1730ac3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java
@@ -43,8 +43,6 @@ import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
*/
public class ResourceGroupTreeView extends VLayout {
- private int groupId;
- private ResourceGroup group;
private TreeGrid treeGrid;
public ResourceGroupTreeView() {
@@ -52,24 +50,19 @@ public class ResourceGroupTreeView extends VLayout {
setHeight100();
}
-
@Override
protected void onInit() {
super.onInit();
-
this.treeGrid = new TreeGrid();
this.treeGrid.setWidth100();
this.treeGrid.setHeight100();
treeGrid.setShowRoot(true);
addMember(this.treeGrid);
-
-
}
public void setSelectedGroup(int groupId) {
- this.groupId = groupId;
GWTServiceLookup.getClusterService().getClusterTree(groupId,
new AsyncCallback<ClusterFlyweight>() {
public void onFailure(Throwable caught) {
@@ -80,33 +73,9 @@ public class ResourceGroupTreeView extends VLayout {
loadTree(result);
}
});
-
- // TODO: Get the group from the ResourceGroupTreeView in case it was already loaded.
- ResourceGroupCriteria criteria = new ResourceGroupCriteria();
- criteria.addFilterId(groupId);
- criteria.fetchTags(true);
- GWTServiceLookup.getResourceGroupService().findResourceGroupsByCriteria(criteria,
- new AsyncCallback<PageList<ResourceGroup>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load group", caught);
- }
-
- public void onSuccess(PageList<ResourceGroup> result) {
- group = result.get(0);
- }
- });
-
}
- ResourceGroup getGroup(int groupId) {
- // TODO: Get the group from the ResourceGroupTreeView in case it was already loaded.
- return this.group;
- }
-
-
private void loadTree(ClusterFlyweight root) {
-
-
TreeNode rootNode = new TreeNode(root.getName());
loadTree(rootNode, root);
@@ -116,7 +85,6 @@ public class ResourceGroupTreeView extends VLayout {
treeGrid.setData(tree);
markForRedraw();
-
}
public void loadTree(TreeNode parent, ClusterFlyweight parentNode) {
@@ -125,14 +93,8 @@ public class ResourceGroupTreeView extends VLayout {
ArrayList<TreeNode> childNodes = new ArrayList<TreeNode>();
HashMap<Integer,TreeNode> typeNodes = new HashMap<Integer, TreeNode>();
-
for (ClusterFlyweight child : parentNode.getChildren()) {
-
-
-
-
-
TreeNode node = new TreeNode(child.getName());
childNodes.add(node);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/OverviewView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/OverviewView.java
index c5aeb38..57ecbcd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/OverviewView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/OverviewView.java
@@ -1,12 +1,147 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 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.coregui.client.inventory.groups.detail.inventory;
+import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.widgets.HTMLFlow;
+import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.FormItem;
+import com.smartgwt.client.widgets.form.fields.SpacerItem;
+import com.smartgwt.client.widgets.form.fields.StaticTextItem;
+import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
+import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.group.GroupDefinition;
+import org.rhq.core.domain.resource.group.ResourceGroup;
+import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
+
+import java.util.ArrayList;
+import java.util.Date;
/**
+ * The group Inventory>Overview tab.
+ *
* @author Ian Springer
*/
public class OverviewView extends VLayout {
+ private ResourceGroupComposite groupComposite;
+
+ public OverviewView(ResourceGroupComposite groupComposite) {
+ super();
+ this.groupComposite = groupComposite;
+ }
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+
+ ResourceGroup group = this.groupComposite.getResourceGroup();
+
+ HLayout spacer = new HLayout();
+ spacer.setHeight(15);
+ addMember(spacer);
+
+ DynamicForm generalPropsForm = new DynamicForm();
+ generalPropsForm.setNumCols(4);
+ generalPropsForm.setColWidths("25%", "25%", "25%", "25%");
+ generalPropsForm.setWrapItemTitles(false);
+ setWidth("90%");
+
+ ArrayList<FormItem> formItems = new ArrayList<FormItem>();
+ ArrayList<String> itemIds = new ArrayList<String>();
+
+ //HeaderItem headerItem = new HeaderItem("header", "General Properties");
+ //headerItem.setValue("General Properties");
+ //formItems.add(headerItem);
+
+ StaticTextItem nameItem = new StaticTextItem("nameItem", "Name");
+ nameItem.setValue(group.getName());
+ formItems.add(nameItem);
+ itemIds.add(nameItem.getName());
+
+ StaticTextItem typeItem = new StaticTextItem("typeItem", "Member Type");
+ ResourceType type = group.getResourceType();
+ if (type != null) {
+ typeItem.setTooltip("Plugin: " + type.getPlugin() + "\n<br>" + "Type: " + type.getName());
+ typeItem.setValue(type.getName() + " (" + type.getPlugin() + ")");
+ } else {
+ typeItem.setValue("<i>Mixed</i>");
+ }
+ formItems.add(typeItem);
+ itemIds.add(typeItem.getName());
+
+ StaticTextItem countItem = new StaticTextItem("countItem", "Member Count");
+ long memberCount = this.groupComposite.getImplicitUp() + this.groupComposite.getImplicitDown();
+ countItem.setValue(memberCount);
+ formItems.add(countItem);
+ itemIds.add(countItem.getName());
+
+ StaticTextItem descriptionItem = new StaticTextItem("descriptionItem", "Description");
+ String description = group.getDescription();
+ descriptionItem.setValue((description != null) ? description : "<i>none</i>");
+ formItems.add(descriptionItem);
+ itemIds.add(descriptionItem.getName());
+
+ StaticTextItem dynamicItem = new StaticTextItem("dynamicItem", "Dynamic?");
+ dynamicItem.setValue((group.getGroupDefinition() != null) ? "yes" : "no");
+ formItems.add(dynamicItem);
+ itemIds.add(dynamicItem.getName());
+
+ StaticTextItem recursiveItem = new StaticTextItem("recursiveItem", "Recursive?");
+ recursiveItem.setValue((group.isRecursive()) ? "yes" : "no");
+ formItems.add(recursiveItem);
+ itemIds.add(recursiveItem.getName());
+
+ StaticTextItem createdItem = new StaticTextItem("createdItem", "Created");
+ createdItem.setValue(new Date(group.getCtime()));
+ formItems.add(createdItem);
+ itemIds.add(createdItem.getName());
+
+ StaticTextItem lastModifiedItem = new StaticTextItem("lastModifiedItem", "Last Modified");
+ lastModifiedItem.setValue(new Date(group.getMtime()));
+ formItems.add(lastModifiedItem);
+ itemIds.add(lastModifiedItem.getName());
+
+ StaticTextItem lastModifiedByItem = new StaticTextItem("lastModifiedByItem", "Last Modified By");
+ lastModifiedByItem.setValue(group.getModifiedBy());
+ formItems.add(lastModifiedByItem);
+ itemIds.add(lastModifiedByItem.getName());
+
+ StaticTextItem groupDefinitionItem = new StaticTextItem("groupDefinitionItem", "Group Definition");
+ GroupDefinition groupDefinition = group.getGroupDefinition();
+ // TODO (ips): Make this a link to the group def.
+ groupDefinitionItem.setValue((groupDefinition != null) ? groupDefinition.getName() : "<i>none</i>");
+ formItems.add(groupDefinitionItem);
+ itemIds.add(groupDefinitionItem.getName());
+
+ generalPropsForm.setItems(formItems.toArray(new FormItem[formItems.size()]));
+ addMember(generalPropsForm);
- // TODO: Group general properties go here.
-
+ if (groupDefinition != null) {
+ spacer = new HLayout();
+ spacer.setHeight(10);
+ addMember(spacer);
+
+ HTMLFlow note = new HTMLFlow();
+ note.setContents("<b>*</b> Dynamic group names and descriptions are managed, and therefore are not editable.");
+ note.setAlign(Alignment.CENTER);
+ addMember(note);
+ }
+ }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java
index 981fb60..6f1228c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/overview/ResourceSummaryView.java
@@ -144,7 +144,6 @@ public class ResourceSummaryView extends DynamicForm implements ResourceSelectLi
formItems.add(descriptionItem);
itemIds.add(descriptionItem.getName());
-
StaticTextItem versionItem = new StaticTextItem("versionItem", "Version");
formItems.add(versionItem);
itemIds.add(versionItem.getName());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
index 48e9961..67326c1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/ResourceGroupGWTServiceImpl.java
@@ -22,6 +22,7 @@ import org.rhq.core.domain.criteria.ResourceGroupCriteria;
import org.rhq.core.domain.criteria.ResourceGroupDefinitionCriteria;
import org.rhq.core.domain.resource.group.GroupDefinition;
import org.rhq.core.domain.resource.group.ResourceGroup;
+import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGroupGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
@@ -39,13 +40,15 @@ public class ResourceGroupGWTServiceImpl extends AbstractGWTServiceImpl implemen
private ResourceGroupManagerLocal groupManager = LookupUtil.getResourceGroupManager();
private GroupDefinitionManagerLocal definitionManager = LookupUtil.getGroupDefinitionManager();
-
public PageList<ResourceGroup> findResourceGroupsByCriteria(ResourceGroupCriteria criteria) {
return SerialUtility.prepare(groupManager.findResourceGroupsByCriteria(getSessionSubject(), criteria),
"ResourceGroupService.findResourceGroupsByCriteria");
}
- // TODO GH: build and expose findResourceGroupCompositesByCriteria
+ public PageList<ResourceGroupComposite> findResourceGroupCompositesByCriteria(ResourceGroupCriteria criteria) {
+ return SerialUtility.prepare(groupManager.findResourceGroupCompositesByCriteria(getSessionSubject(), criteria),
+ "ResourceGroupService.findResourceGroupCompositesByCriteria");
+ }
public PageList<GroupDefinition> findGroupDefinitionsByCriteria(ResourceGroupDefinitionCriteria criteria) {
return SerialUtility.prepare(definitionManager.findGroupDefinitionsByCriteria(getSessionSubject(), criteria),
commit 14cb5621315e2cfecdad8bb54c8d995b95340820
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Aug 10 12:26:56 2010 -0400
Group List View and Create Wizard Work
- converted group list view to extend Table instead of VLayout with single table
- added group delete to list view
- changed button and confirm text for consistency (now like bundle buttons)
- removed checkboxes from list view
- added some core gui refresh to list view
- simplified wizard invoke style
- left justify create step and increase text box sizes
- improve Next/Previous handling
- respect selected compatible type on member selection page
- fetch only the required resources for compatible group member select
- fix issues with member filtering
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java
index f29a064..8171d96 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java
@@ -18,51 +18,52 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.groups;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.ListGridFieldType;
-import com.smartgwt.client.types.SelectionAppearance;
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
-import com.smartgwt.client.widgets.layout.VLayout;
+import org.rhq.core.domain.resource.group.ResourceGroup;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.components.table.Table;
import org.rhq.enterprise.gui.coregui.client.components.table.TableAction;
-import org.rhq.enterprise.gui.coregui.client.components.wizard.WizardView;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGroupGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.inventory.groups.wizard.GroupCreateWizard;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSearchView;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
/**
* @author Greg Hinkle
*/
-public class ResourceGroupListView extends VLayout {
-
- private Table table;
+public class ResourceGroupListView extends Table {
public ResourceGroupListView() {
- this(null);
-
+ super("Resource Groups");
+ setWidth100();
+ setHeight100();
}
- /**
- * Resource Group list filtered by a given criteria
- * @param criteria
- */
public ResourceGroupListView(Criteria criteria) {
+ super("Resource Groups", criteria);
+ }
- setWidth100();
- setHeight100();
+ @Override
+ protected void onInit() {
+ super.onInit();
- final ResourceGroupsDataSource datasource = ResourceGroupsDataSource.getInstance();
+ // setHeaderIcon("?_24.png");
- table = new Table("Resource Groups", criteria);
- table.setDataSource(datasource);
+ final ResourceGroupsDataSource datasource = ResourceGroupsDataSource.getInstance();
+ setDataSource(datasource);
- table.getListGrid().setSelectionType(SelectionStyle.SIMPLE);
- table.getListGrid().setSelectionAppearance(SelectionAppearance.CHECKBOX);
- table.getListGrid().setResizeFieldsInRealTime(true);
+ getListGrid().setSelectionType(SelectionStyle.SIMPLE);
+ //table.getListGrid().setSelectionAppearance(SelectionAppearance.CHECKBOX);
+ getListGrid().setResizeFieldsInRealTime(true);
ListGridField idField = new ListGridField("id", "Id", 55);
idField.setType(ListGridFieldType.INTEGER);
@@ -81,26 +82,38 @@ public class ResourceGroupListView extends VLayout {
ListGridField availabilityField = new ListGridField("currentAvailability", "Availability", 55);
availabilityField.setAlign(Alignment.CENTER);
- table.getListGrid().setFields(idField, nameField, descriptionField, typeNameField, pluginNameField,
- categoryField, availabilityField);
-
- table.addTableAction("Delete Groups", Table.SelectionEnablement.ANY,
- "Are you sure you want to delete # groups?", new TableAction() {
- public void executeAction(ListGridRecord[] selection) {
- // TODO: Implement this method.
+ getListGrid().setFields(idField, nameField, descriptionField, typeNameField, pluginNameField, categoryField,
+ availabilityField);
+
+ addTableAction("Delete", Table.SelectionEnablement.ANY, "Delete the selected resource groups?",
+ new TableAction() {
+ public void executeAction(ListGridRecord[] selections) {
+ ResourceGroupsDataSource ds = (ResourceGroupsDataSource) getDataSource();
+ for (ListGridRecord selection : selections) {
+ ResourceGroupGWTServiceAsync resourceGroupManager = GWTServiceLookup.getResourceGroupService();
+ final ResourceGroup object = ds.copyValues(selection);
+ resourceGroupManager.deleteResourceGroup(object.getId(), new AsyncCallback<Void>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(
+ "Failed to delete resource group [" + object.getName() + "]", caught);
+ }
+
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(
+ new Message("Deleted resource group [" + object.getName() + "]", Severity.Info));
+
+ CoreGUI.refresh();
+ }
+ });
+ }
}
});
- table.addTableAction("New Group", new TableAction() {
+ addTableAction("New", new TableAction() {
public void executeAction(ListGridRecord[] selection) {
- WizardView view = new WizardView(new GroupCreateWizard());
- view.displayDialog();
+ new GroupCreateWizard().startBundleWizard();
}
});
-
-
- addMember(table);
-
}
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupsDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupsDataSource.java
index debe24d..aaaaeaa 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupsDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupsDataSource.java
@@ -28,6 +28,7 @@ import com.smartgwt.client.rpc.RPCResponse;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
+import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.group.GroupCategory;
import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.core.domain.util.PageList;
@@ -115,7 +116,24 @@ public class ResourceGroupsDataSource extends RPCDataSource<ResourceGroup> {
@Override
public ResourceGroup copyValues(ListGridRecord from) {
- return null; // TODO: Implement this method.
+ Integer idAttrib = from.getAttributeAsInt("id");
+ String nameAttrib = from.getAttribute("name");
+ String descriptionAttrib = from.getAttribute("description");
+ String typeNameAttrib = from.getAttribute("typeName");
+ String pluginNameAttrib = from.getAttribute("pluginName");
+ ResourceType rt = null;
+
+ ResourceGroup rg = new ResourceGroup(nameAttrib);
+ rg.setId(idAttrib);
+ rg.setDescription(descriptionAttrib);
+ if (null != typeNameAttrib) {
+ rt = new ResourceType();
+ rt.setName(typeNameAttrib);
+ rt.setPlugin(pluginNameAttrib);
+ rg.setResourceType(rt);
+ }
+
+ return rg;
}
@Override
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateStep.java
index 96b6017..032cc75 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateStep.java
@@ -52,19 +52,22 @@ public class GroupCreateStep extends AbstractWizardStep {
form = new DynamicForm();
form.setValuesManager(new ValuesManager());
- form.setNumCols(4);
+ form.setWidth100();
+ form.setNumCols(2);
TextItem name = new TextItem("name", "Name");
name.setRequired(true);
-
- TextItem location = new TextItem("location", "Location");
+ name.setWidth(300);
TextAreaItem description = new AutoFitTextAreaItem("description", "Description");
+ description.setWidth(300);
+
+ TextItem location = new TextItem("location", "Location");
+ location.setWidth(300);
CheckboxItem recursive = new CheckboxItem("recursive", "Recursive");
LinkedHashMap<String, Canvas> options = new LinkedHashMap<String, Canvas>();
-
options.put("Mixed", null);
IPickTreeItem typeSelectItem = new IPickTreeItem("type", "Type");
@@ -81,16 +84,25 @@ public class GroupCreateStep extends AbstractWizardStep {
options.put("Compatible", form2);
RadioGroupWithComponentsItem kind = new RadioGroupWithComponentsItem("kind", "Group Type", options, form);
- kind.setValue("Mixed Resources");
+ kind.setValue("Mixed");
- form.setFields(name, location, description, recursive, kind);
+ form.setFields(name, description, location, recursive, kind);
}
return form;
}
public boolean nextPage() {
- return form.validate();
+ boolean valid = form.validate();
+ if (valid) {
+ RadioGroupWithComponentsItem kind = (RadioGroupWithComponentsItem) form.getField("kind");
+ if ("Compatible".equals(kind.getSelected())) {
+ DynamicForm form2 = (DynamicForm) kind.getSelectedComponent();
+ valid = (null != form2.getValue("type"));
+ }
+ }
+
+ return valid;
}
public String getName() {
@@ -103,11 +115,16 @@ public class GroupCreateStep extends AbstractWizardStep {
group.setLocation(form.getValueAsString("location"));
group.setRecursive(form.getValue("recursive") != null ? true : false);
- if (form.getValue("type") != null) {
- ResourceType type = new ResourceType();
- type.setId(Integer.parseInt(form.getValueAsString("type")));
- group.setResourceType(type);
+ RadioGroupWithComponentsItem kind = (RadioGroupWithComponentsItem) form.getField("kind");
+ if ("Compatible".equals(kind.getSelected())) {
+ DynamicForm form2 = (DynamicForm) kind.getSelectedComponent();
+ if (null != form2.getValue("type")) {
+ ResourceType rt = new ResourceType();
+ rt.setId(Integer.parseInt(form2.getValueAsString("type")));
+ group.setResourceType(rt);
+ }
}
+
return group;
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateWizard.java
index 4c8b074..55d1588 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateWizard.java
@@ -28,6 +28,7 @@ import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.widgets.IButton;
+import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.components.wizard.AbstractWizard;
@@ -68,6 +69,18 @@ public class GroupCreateWizard extends AbstractWizard {
return null; // TODO: Implement this method.
}
+ /**
+ * @return only the rt id is set
+ */
+ public ResourceType getCompatibleGroupResourceType() {
+ ResourceGroup rg = createStep.getGroup();
+ ResourceType rt = null;
+ if (null != rg) {
+ rt = rg.getResourceType();
+ }
+ return rt;
+ }
+
public void cancel() {
// TODO: Implement this method.
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupMembersStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupMembersStep.java
index 5f13657..cc79abc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupMembersStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupMembersStep.java
@@ -26,6 +26,7 @@ import java.util.HashSet;
import com.smartgwt.client.widgets.Canvas;
+import org.rhq.core.domain.resource.ResourceType;
import org.rhq.enterprise.gui.coregui.client.components.wizard.AbstractWizardStep;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.selection.ResourceSelector;
@@ -34,16 +35,20 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.selection.Resour
*/
public class GroupMembersStep extends AbstractWizardStep {
- private GroupCreateWizard wizard;
- private ResourceSelector selector;
+ private GroupCreateWizard wizard = null;
+ private ResourceSelector selector = null;
+ private ResourceType requireType = null;
public GroupMembersStep(GroupCreateWizard wizard) {
this.wizard = wizard;
}
public Canvas getCanvas() {
- if (selector == null) {
+ ResourceType rt = wizard.getCompatibleGroupResourceType();
+ if ((selector == null) || (rt != requireType)) {
selector = new ResourceSelector();
+ requireType = rt;
+ selector.setRequireType(rt);
}
return selector;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceDatasource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceDatasource.java
index af8931b..c0731b8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceDatasource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceDatasource.java
@@ -98,6 +98,24 @@ public class ResourceDatasource extends RPCDataSource<Resource> {
public void executeFetch(final DSRequest request, final DSResponse response) {
+ ResourceCriteria criteria = getFetchCriteria(request);
+
+ resourceService.findResourcesByCriteria(criteria, new AsyncCallback<PageList<Resource>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to fetch resource data", caught);
+ response.setStatus(RPCResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onSuccess(PageList<Resource> result) {
+
+ dataRetrieved(result, response, request);
+ }
+ });
+ }
+
+ protected ResourceCriteria getFetchCriteria(final DSRequest request) {
+
ResourceCriteria criteria = new ResourceCriteria();
criteria.setPageControl(getPageControl(request));
@@ -164,18 +182,7 @@ public class ResourceDatasource extends RPCDataSource<Resource> {
criteria.addFilterTagName((String) request.getCriteria().getValues().get("tagName"));
}
- resourceService.findResourcesByCriteria(criteria, new AsyncCallback<PageList<Resource>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to fetch resource data", caught);
- response.setStatus(RPCResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
-
- public void onSuccess(PageList<Resource> result) {
-
- dataRetrieved(result, response, request);
- }
- });
+ return criteria;
}
@Override
@@ -221,7 +228,7 @@ public class ResourceDatasource extends RPCDataSource<Resource> {
record.setAttribute("id", from.getId());
record.setAttribute(NAME.propertyName(), from.getName());
record.setAttribute(DESCRIPTION.propertyName(), from.getDescription());
- record.setAttribute(TYPE.propertyName(), from.getResourceType().getName());
+ record.setAttribute(TYPE.propertyName(), from.getResourceType().getId());
record.setAttribute(PLUGIN.propertyName(), from.getResourceType().getPlugin());
record.setAttribute(CATEGORY.propertyName(), from.getResourceType().getCategory().getDisplayName());
record.setAttribute("icon", from.getResourceType().getCategory().getDisplayName() + "_"
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java
index 1274e14..0d25f38 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java
@@ -18,12 +18,18 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.resource.selection;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.CATEGORY;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.NAME;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.PLUGIN;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.TYPE;
+
import java.util.ArrayList;
import java.util.Collection;
import com.smartgwt.client.data.AdvancedCriteria;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.data.Criterion;
+import com.smartgwt.client.data.DSRequest;
import com.smartgwt.client.types.OperatorId;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.IPickTreeItem;
@@ -31,7 +37,9 @@ import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.grid.ListGridRecord;
+import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.ResourceType;
import org.rhq.enterprise.gui.coregui.client.components.selector.AbstractSelector;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDatasource;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypePluginTreeDataSource;
@@ -42,18 +50,18 @@ import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
*/
public class ResourceSelector extends AbstractSelector<Resource> {
- private Integer requireTypeId;
+ private ResourceType requireType;
public ResourceSelector() {
super();
}
- public Integer getRequireTypeId() {
- return requireTypeId;
+ public ResourceType getRequireType() {
+ return requireType;
}
- public void setRequireTypeId(Integer requireTypeId) {
- this.requireTypeId = requireTypeId;
+ public void setRequireType(ResourceType requireType) {
+ this.requireType = requireType;
markForRedraw();
}
@@ -70,10 +78,15 @@ public class ResourceSelector extends AbstractSelector<Resource> {
typeSelectItem.setEmptyMenuMessage("Loading...");
typeSelectItem.setShowIcons(true);
- if (requireTypeId != null) {
- typeSelectItem.setValue(requireTypeId);
- typeSelectItem.setDisabled(true);
- availableFilterForm.setItems(search, typeSelectItem);
+ if (requireType != null) {
+ // TODO: Currently ignore the typeSelectItem widget because we already know the type.
+ // Alternatively, we could display it disabled but we'd want the type name to be displayed as the
+ // value. To get this to display the type name I think we need to pre-fetch the type tree here. We could
+ // potentially optimize typeSelectItem.setValue(requireType.getId()) to build a tree that includes only
+ // this single type.
+ //typeSelectItem.setValue(requireType.getId());
+ //typeSelectItem.setDisabled(true);
+ availableFilterForm.setItems(search);
} else {
SelectItem categorySelect = new SelectItem("category", "Category");
categorySelect.setValueMap("Platform", "Server", "Service");
@@ -91,23 +104,23 @@ public class ResourceSelector extends AbstractSelector<Resource> {
protected Criteria getLatestCriteria(DynamicForm availableFilterForm) {
String search = (String) availableFilterForm.getValue("search");
- String type = (String) availableFilterForm.getValue("type");
+ String type = availableFilterForm.getValueAsString("type");
String category = (String) availableFilterForm.getValue("category");
ArrayList<Criterion> criteria = new ArrayList<Criterion>(3);
if (null != search) {
- criteria.add(new Criterion("name", OperatorId.CONTAINS, search));
+ criteria.add(new Criterion(NAME.propertyName(), OperatorId.CONTAINS, search));
}
if (null != type) {
// If type is a number its a typeId, otherwise a plugin name
try {
Integer.parseInt(type);
- criteria.add(new Criterion("type", OperatorId.EQUALS, type));
+ criteria.add(new Criterion(TYPE.propertyName(), OperatorId.EQUALS, type));
} catch (NumberFormatException nfe) {
- criteria.add(new Criterion("plugin", OperatorId.EQUALS, type));
+ criteria.add(new Criterion(PLUGIN.propertyName(), OperatorId.EQUALS, type));
}
}
if (null != category) {
- criteria.add(new Criterion("category", OperatorId.EQUALS, category));
+ criteria.add(new Criterion(CATEGORY.propertyName(), OperatorId.EQUALS, category));
}
AdvancedCriteria latestCriteria = new AdvancedCriteria(OperatorId.AND, criteria.toArray(new Criterion[criteria
.size()]));
@@ -127,5 +140,21 @@ public class ResourceSelector extends AbstractSelector<Resource> {
}
return records;
}
+
+ @Override
+ protected ResourceCriteria getFetchCriteria(final DSRequest request) {
+ ResourceCriteria result = super.getFetchCriteria(request);
+
+ // additional filters
+ if (null != requireType) {
+ result.addFilterResourceTypeId(requireType.getId());
+ }
+
+ // additional return data
+ result.fetchResourceType(true);
+
+ return result;
+ }
+
}
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/index.html b/modules/enterprise/gui/portal-war/src/main/webapp/index.html
index c6499a3..156119e 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/index.html
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/index.html
@@ -1,9 +1,9 @@
-<html>
- <head>
- <meta http-equiv="Refresh" content="0; URL=/coregui/CoreGUI.html#Dashboard"/>
- </head>
- <body>
- <p>Redirecting to <a href="/coregui/CoreGUI.html#Dashboard">coregui.war</a>...</p>
- </body>
-</html>
-
+<html>
+ <head>
+ <meta http-equiv="Refresh" content="0; URL=/coregui/CoreGUI.html#Dashboard"/>
+ </head>
+ <body>
+ <p>Redirecting to <a href="/coregui/CoreGUI.html#Dashboard">coregui.war</a>...</p>
+ </body>
+</html>
+
commit ab5237ba41268de18da049c127ad1d83a380378b
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Aug 10 12:18:03 2010 -0400
cosmetic changes only
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
index 227e783..03a2198 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
@@ -22,8 +22,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
-import java.util.HashSet;
-import java.util.ListIterator;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.DSRequest;
@@ -48,7 +46,6 @@ import org.rhq.enterprise.gui.coregui.client.gwt.ResourceTypeGWTServiceAsync;
*/
public class ResourceTypePluginTreeDataSource extends DataSource {
-
private ResourceTypeGWTServiceAsync resourceTypeService = GWTServiceLookup.getResourceTypeGWTService();
public ResourceTypePluginTreeDataSource() {
@@ -57,7 +54,6 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
setDataProtocol(DSProtocol.CLIENTCUSTOM);
setDataFormat(DSDataFormat.CUSTOM);
-
DataSourceTextField idField = new DataSourceTextField("id", "ID");
idField.setPrimaryKey(true);
@@ -70,7 +66,6 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
DataSourceTextField resourceTypeField = new DataSourceTextField("category", "Category");
-
setFields(idField, parentIdField, resourceNameField, resourceKeyField, resourceTypeField);
}
@@ -80,17 +75,16 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
// Asume success
response.setStatus(0);
switch (request.getOperationType()) {
- case FETCH:
- executeFetch(request, response);
- break;
- default:
- break;
+ case FETCH:
+ executeFetch(request, response);
+ break;
+ default:
+ break;
}
return request.getData();
}
-
protected void executeFetch(final DSRequest request, final DSResponse response) {
String parentIdString = request.getCriteria().getAttributeAsString("parentId");
@@ -98,26 +92,23 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
processResponse(request.getRequestId(), response);
} else {
-
ResourceTypeCriteria criteria = new ResourceTypeCriteria();
criteria.fetchParentResourceTypes(true);
criteria.setPageControl(PageControl.getUnlimitedInstance());
- resourceTypeService.findResourceTypesByCriteria(criteria,
- new AsyncCallback<PageList<ResourceType>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load resource type tree data", caught);
- }
-
- public void onSuccess(PageList<ResourceType> result) {
- response.setData(buildNodes(result));
- processResponse(request.getRequestId(), response);
- }
- });
+ resourceTypeService.findResourceTypesByCriteria(criteria, new AsyncCallback<PageList<ResourceType>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to load resource type tree data", caught);
+ }
+
+ public void onSuccess(PageList<ResourceType> result) {
+ response.setData(buildNodes(result));
+ processResponse(request.getRequestId(), response);
+ }
+ });
}
}
-
public static TreeNode[] buildNodes(PageList<ResourceType> result) {
HashMap<String, PluginTreeNode> pluginNodes = new HashMap<String, PluginTreeNode>();
@@ -127,12 +118,11 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
if (type.getParentResourceTypes() == null || type.getParentResourceTypes().isEmpty()) {
PluginTreeNode pluginNode = pluginNodes.get(type.getPlugin());
- if (pluginNode == null) {
- pluginNode = new PluginTreeNode(type.getPlugin());
- pluginNodes.put(type.getPlugin(), pluginNode);
- nodes.add(pluginNode);
- }
-
+ if (pluginNode == null) {
+ pluginNode = new PluginTreeNode(type.getPlugin());
+ pluginNodes.put(type.getPlugin(), pluginNode);
+ nodes.add(pluginNode);
+ }
nodes.add(new ResourceTypeTreeNode(type, type.getPlugin()));
} else {
@@ -152,7 +142,6 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
return treeNodes;
}
-
/**
* Returns a prepopulated PageControl based on the provided DSRequest. This will set sort fields,
* pagination, but *not* filter fields.
@@ -166,7 +155,8 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
if (request.getStartRow() == null || request.getEndRow() == null) {
pageControl = new PageControl();
} else {
- pageControl = PageControl.getExplicitPageControl(request.getStartRow(), request.getEndRow() - request.getStartRow());
+ pageControl = PageControl.getExplicitPageControl(request.getStartRow(), request.getEndRow()
+ - request.getStartRow());
}
// Initialize sorting.
@@ -183,7 +173,6 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
return pageControl;
}
-
public static class PluginTreeNode extends TreeNode {
String id;
@@ -195,19 +184,22 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
setParentID(null);
setAttribute("name", pluginName + " Plugin");
-// setAttribute("plugin",pluginName);
+ // setAttribute("plugin",pluginName);
setIcon("types/plugin_16.png"); // todo doesn't work
setEnabled(true);
}
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
PluginTreeNode that = (PluginTreeNode) o;
- if (!id.equals(that.id)) return false;
+ if (!id.equals(that.id))
+ return false;
return true;
}
@@ -245,20 +237,23 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
setIsFolder(true);
}
-
public ResourceType getResourceType() {
return resourceType;
}
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
ResourceTypeTreeNode that = (ResourceTypeTreeNode) o;
- if (!id.equals(that.id)) return false;
- if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
+ if (!id.equals(that.id))
+ return false;
+ if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null)
+ return false;
return true;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
index 9d354f4..d761dbd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
@@ -18,36 +18,16 @@
*/
package org.rhq.enterprise.gui.coregui.client.menu;
-import com.google.gwt.dom.client.Document;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.History;
-import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Hyperlink;
-import com.smartgwt.client.types.ContentsType;
-import com.smartgwt.client.types.VerticalAlignment;
-import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.HTMLFlow;
import com.smartgwt.client.widgets.Img;
-import com.smartgwt.client.widgets.Label;
-import com.smartgwt.client.widgets.events.ClickEvent;
-import com.smartgwt.client.widgets.events.ClickHandler;
-import com.smartgwt.client.widgets.events.DrawEvent;
-import com.smartgwt.client.widgets.events.DrawHandler;
-import com.smartgwt.client.widgets.events.ShowContextMenuEvent;
-import com.smartgwt.client.widgets.events.ShowContextMenuHandler;
-import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.LayoutSpacer;
import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.menu.Menu;
-import com.smartgwt.client.widgets.menu.MenuBar;
-import com.smartgwt.client.widgets.menu.MenuItem;
-import com.smartgwt.client.widgets.menu.MenuItemSeparator;
-import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.LinkManager;
import org.rhq.enterprise.gui.coregui.client.components.AboutModalWindow;
/**
@@ -57,13 +37,12 @@ public class MenuBarView extends VLayout {
private AboutModalWindow aboutModalWindow;
- public static final String[] SECTIONS = {"Dashboard", "Inventory", "Reports", "Bundles", "Administration"};
+ public static final String[] SECTIONS = { "Dashboard", "Inventory", "Reports", "Bundles", "Administration" };
private String selected = "Dashboard";
private HTMLFlow linksPane;
-
protected void onDraw() {
super.onDraw();
@@ -81,7 +60,6 @@ public class MenuBarView extends VLayout {
}
});
-
ToolStrip topStrip = new ToolStrip();
topStrip.setHeight(34);
topStrip.setWidth100();
@@ -104,16 +82,16 @@ public class MenuBarView extends VLayout {
topStrip.addMember(new LayoutSpacer());
- HLayout helpLayout = new HLayout();
-// Label loggedInAs = new Label("Logged in as " + CoreGUI.getSessionSubject().getName());
-// loggedInAs.setWrap(false);
-// loggedInAs.setValign(VerticalAlignment.CENTER);
-// helpLayout.addMember(loggedInAs);
+ //HLayout helpLayout = new HLayout();
+ // Label loggedInAs = new Label("Logged in as " + CoreGUI.getSessionSubject().getName());
+ // loggedInAs.setWrap(false);
+ // loggedInAs.setValign(VerticalAlignment.CENTER);
+ // helpLayout.addMember(loggedInAs);
topStrip.addMember(new Hyperlink("Help", "Help"));
topStrip.addMember(new Hyperlink("Preferences", "Preferences"));
topStrip.addMember(new Hyperlink("Log Out", "LogOut"));
-// helpLayout.setLayoutAlign(VerticalAlignment.CENTER);
-// topStrip.addMember(helpLayout);
+ // helpLayout.setLayoutAlign(VerticalAlignment.CENTER);
+ // topStrip.addMember(helpLayout);
/* DynamicForm links = new DynamicForm();
links.setNumCols(SECTIONS.length * 2);
@@ -148,7 +126,7 @@ public class MenuBarView extends VLayout {
private String setupLinks() {
StringBuilder headerString = new StringBuilder(
- "<table style=\"height: 34px;\" cellpadding=\"0\" cellspacing=\"0\"><tr>");
+ "<table style=\"height: 34px;\" cellpadding=\"0\" cellspacing=\"0\"><tr>");
boolean first = true;
for (String section : SECTIONS) {
@@ -162,7 +140,8 @@ public class MenuBarView extends VLayout {
styleClass += "Selected";
}
- headerString.append("<td class=\"" + styleClass + "\" onclick=\"document.location='#" + section + "'\" >");
+ headerString.append("<td id=\"" + section + "\" class=\"" + styleClass
+ + "\" onclick=\"document.location='#" + section + "'\" >");
headerString.append(section);
headerString.append("</td>\n");
@@ -174,5 +153,4 @@ public class MenuBarView extends VLayout {
return headerString.toString();
}
-
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
index a288517..95436d4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
@@ -20,11 +20,6 @@ package org.rhq.enterprise.gui.coregui.client.util;
import java.util.Collection;
-import org.rhq.core.domain.util.PageControl;
-import org.rhq.core.domain.util.PageList;
-import org.rhq.core.domain.util.PageOrdering;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-
import com.smartgwt.client.data.DSRequest;
import com.smartgwt.client.data.DSResponse;
import com.smartgwt.client.data.DataSource;
@@ -32,6 +27,10 @@ import com.smartgwt.client.types.DSDataFormat;
import com.smartgwt.client.types.DSProtocol;
import com.smartgwt.client.widgets.grid.ListGridRecord;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageOrdering;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+
/**
* Base GWT-RPC oriented DataSource class.
*
@@ -59,21 +58,21 @@ public abstract class RPCDataSource<T> extends DataSource {
DSResponse response = createResponse(request);
switch (request.getOperationType()) {
- case FETCH:
- executeFetch(request, response);
- break;
- case ADD:
- executeAdd(request, response);
- break;
- case UPDATE:
- executeUpdate(request, response);
- break;
- case REMOVE:
- executeRemove(request, response);
- break;
- default:
- super.transformRequest(request);
- break;
+ case FETCH:
+ executeFetch(request, response);
+ break;
+ case ADD:
+ executeAdd(request, response);
+ break;
+ case UPDATE:
+ executeUpdate(request, response);
+ break;
+ case REMOVE:
+ executeRemove(request, response);
+ break;
+ default:
+ super.transformRequest(request);
+ break;
}
} catch (Throwable t) {
CoreGUI.getErrorHandler().handleError("Failure in datasource [" + request.getOperationType() + "]", t);
@@ -95,7 +94,8 @@ public abstract class RPCDataSource<T> extends DataSource {
if (request.getStartRow() == null || request.getEndRow() == null) {
pageControl = new PageControl();
} else {
- pageControl = PageControl.getExplicitPageControl(request.getStartRow(), request.getEndRow() - request.getStartRow());
+ pageControl = PageControl.getExplicitPageControl(request.getStartRow(), request.getEndRow()
+ - request.getStartRow());
}
// Initialize sorting.
@@ -112,7 +112,6 @@ public abstract class RPCDataSource<T> extends DataSource {
return pageControl;
}
-
public ListGridRecord[] buildRecords(Collection<T> list) {
if (list == null) {
return null;
@@ -126,7 +125,6 @@ public abstract class RPCDataSource<T> extends DataSource {
return records;
}
-
/**
* Extensions should implement this method to retrieve data. Paging solutions should use
* {@link #getPageControl(com.smartgwt.client.data.DSRequest)}. All implementations should call processResponse()
@@ -138,12 +136,10 @@ public abstract class RPCDataSource<T> extends DataSource {
*/
protected abstract void executeFetch(final DSRequest request, final DSResponse response);
-
public abstract T copyValues(ListGridRecord from);
public abstract ListGridRecord copyValues(T from);
-
/**
* Executed on <code>REMOVE</code> operation. <code>processResponse (requestId, response)</code>
* should be called when operation completes (either successful or failure).
commit 622cb7544ac6e28d4557a68e9f57420387d9c5de
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Aug 10 12:14:32 2010 -0400
cosmetic changes only
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java
index 3dc9f4c..8b2726c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java
@@ -18,15 +18,11 @@
*/
package org.rhq.enterprise.gui.coregui.client.bundle.list;
-import com.google.gwt.user.client.History;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.types.ListGridFieldType;
-import com.smartgwt.client.types.SelectionAppearance;
import com.smartgwt.client.types.SelectionStyle;
-import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGridRecord;
-import com.smartgwt.client.widgets.layout.VLayout;
import org.rhq.core.domain.bundle.Bundle;
import org.rhq.core.domain.bundle.composite.BundleWithLatestVersionComposite;
@@ -63,7 +59,6 @@ public class BundlesListView extends Table {
setHeaderIcon("subsystems/bundle/Bundle_24.png");
-
setDataSource(new BundlesWithLatestVersionDataSource());
getListGrid().getField("id").setWidth("60");
@@ -71,27 +66,26 @@ public class BundlesListView extends Table {
getListGrid().getField("link").setType(ListGridFieldType.LINK);
getListGrid().getField("link").setTarget("_self");
-// getListGrid().getField("name").setCellFormatter(new CellFormatter() {
-// public String format(Object o, ListGridRecord listGridRecord, int i, int i1) {
-// return "";//<a href=\"#Bundles/Bundle/" + listGridRecord.getAttribute("id") + "\">" + o + "</a>";
-// }
-// });
+ // getListGrid().getField("name").setCellFormatter(new CellFormatter() {
+ // public String format(Object o, ListGridRecord listGridRecord, int i, int i1) {
+ // return "";//<a href=\"#Bundles/Bundle/" + listGridRecord.getAttribute("id") + "\">" + o + "</a>";
+ // }
+ // });
getListGrid().getField("description").setWidth("25%");
getListGrid().getField("latestVersion").setWidth("25%");
getListGrid().getField("versionsCount").setWidth("*");
getListGrid().setSelectionType(SelectionStyle.SIMPLE);
-// getListGrid().setSelectionAppearance(SelectionAppearance.CHECKBOX);
+ // getListGrid().setSelectionAppearance(SelectionAppearance.CHECKBOX);
addTableAction("New", Table.SelectionEnablement.ALWAYS, null, new TableAction() {
public void executeAction(ListGridRecord[] selection) {
new BundleCreateWizard().startBundleWizard();
-
}
});
- addTableAction("Delete", Table.SelectionEnablement.ANY, "Delete the selected bundle?", new TableAction() {
+ addTableAction("Delete", Table.SelectionEnablement.ANY, "Delete the selected bundles?", new TableAction() {
public void executeAction(ListGridRecord[] selections) {
BundlesWithLatestVersionDataSource ds = (BundlesWithLatestVersionDataSource) getDataSource();
for (ListGridRecord selection : selections) {
@@ -148,7 +142,6 @@ public class BundlesListView extends Table {
});
}
-
public int getMatches() {
return this.getListGrid().getTotalRows();
}
13 years, 10 months
[rhq] Branch 'code-smell' - 2 commits - modules/helpers modules/plugins
by Heiko W. Rupp
modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/PluginGen.java | 76 ++++++----
modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java | 4
modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/ResourceCategory.java | 2
modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestDiscoveryComponent.java | 4
modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java | 1
5 files changed, 54 insertions(+), 33 deletions(-)
New commits:
commit f1365e541a2ba19357abfa063333dc9901f6d786
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Aug 12 12:24:08 2010 +0200
12644 prevent NPE
diff --git a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestDiscoveryComponent.java b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestDiscoveryComponent.java
index 6830f5f..16d6c89 100644
--- a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestDiscoveryComponent.java
+++ b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestDiscoveryComponent.java
@@ -18,6 +18,7 @@
*/
package org.rhq.plugins.perftest;
+import java.util.Collections;
import java.util.Set;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.resource.ResourceType;
@@ -44,6 +45,9 @@ public class PerfTestDiscoveryComponent implements ResourceDiscoveryComponent {
Set<DiscoveredResourceDetails> resourceDetails = null;
if (manager.isEnabled()) {
ResourceFactory resourceFactory = manager.getResourceFactory(resourceType.getName());
+ if (resourceFactory==null)
+ return Collections.emptySet();
+
resourceDetails = resourceFactory.discoverResources(context);
// If there is a plugin configuration factory defined, run it on each resource
diff --git a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java
index d9aabf9..1eb831d 100644
--- a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java
+++ b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java
@@ -310,6 +310,7 @@ public class ScenarioManager {
return new SimpleResourceFactory((SimpleResourceGenerator) generator);
}
+ log.warn("No factory for generator " + generator.toString() + " specified");
return null;
}
commit 391f9be4637842049cc01e90d7bce1b4ce54e86f
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Aug 12 12:02:58 2010 +0200
Fix some potential NPE and resource leakage
diff --git a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/PluginGen.java b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/PluginGen.java
index 69587d0..17a6818 100644
--- a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/PluginGen.java
+++ b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/PluginGen.java
@@ -61,37 +61,49 @@ public class PluginGen {
public void run() throws Exception {
+ Props props = null;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
+ try {
- Props props = askQuestions(br, new Props());
- if (props == null) {
- // abort by user
- return;
- }
+ props = askQuestions(br, new Props());
+ if (props == null) {
+ // abort by user
+ return;
+ }
+
+ boolean done = false;
+ do {
- boolean done = false;
- do {
-
- System.out.println();
- System.out.print("Do you want to add a child to " + props.getName() + "? (y/N) ");
- String answer = br.readLine();
- answer = answer.toLowerCase(Locale.getDefault());
- if (answer.startsWith("n") || answer.length() == 0)
- done = true;
- else {
- Props child = askQuestions(br, props);
- if (child == null) {
- // abort by user
- return;
+ System.out.println();
+ System.out.print("Do you want to add a child to " + props.getName() + "? (y/N) ");
+ String answer = br.readLine();
+ if (answer==null) {
+ break;
+ }
+ answer = answer.toLowerCase(Locale.getDefault());
+ if (answer.startsWith("n") || answer.length() == 0)
+ done = true;
+ else {
+ Props child = askQuestions(br, props);
+ if (child == null) {
+ // abort by user
+ return;
+ }
+ props.getChildren().add(child);
}
- props.getChildren().add(child);
- }
- } while (!done);
+ } while (!done);
+ } catch (IOException ioe) {
+ System.err.println("Internal error happended: " + ioe.getMessage());
+ } finally {
+ br.close();
+ }
- log.info("\nYou have choosen:\n" + props.toString());
- postprocess(props);
- generate(props);
+ if (props!=null) {
+ log.info("\nYou have chosen:\n" + props.toString());
+ postprocess(props);
+ generate(props);
+ }
System.out.println("Don't forget to ");
System.out.println(" - add your plugin to the parent pom.xml if needed");
@@ -345,11 +357,15 @@ public class PluginGen {
Template templ = config.getTemplate(template + ".ftl");
Writer out = new BufferedWriter(new FileWriter(new File(directory, fileName)));
- Map<String, Props> root = new HashMap<String, Props>();
- root.put("props", props);
- templ.process(root, out);
- out.flush();
- out.close();
+ try {
+ Map<String, Props> root = new HashMap<String, Props>();
+ root.put("props", props);
+ templ.process(root, out);
+ }
+ finally {
+ out.flush();
+ out.close();
+ }
} catch (IOException ioe) {
ioe.printStackTrace();
} catch (TemplateException te) {
diff --git a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
index a657f42..4034184 100644
--- a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
+++ b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
@@ -87,9 +87,9 @@ public class Props {
private Set<Template> templates = new HashSet<Template>();
- private Set<MetricProps> metrics = new LinkedHashSet<MetricProps>();;
+ private Set<MetricProps> metrics = new LinkedHashSet<MetricProps>();
- private Set<OperationProps> operations = new LinkedHashSet<OperationProps>();;
+ private Set<OperationProps> operations = new LinkedHashSet<OperationProps>();
private String pluginName;
private String pluginDescription;
diff --git a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/ResourceCategory.java b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/ResourceCategory.java
index 566af60..911ed41 100644
--- a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/ResourceCategory.java
+++ b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/ResourceCategory.java
@@ -77,7 +77,7 @@ public enum ResourceCategory {
public static ResourceCategory getByAbbrv(char abbrev) {
EnumSet<ResourceCategory> set = EnumSet.allOf(ResourceCategory.class);
for (ResourceCategory cat : set) {
- if (cat.getAbbrev()==abbrev)
+ if (cat.abbrevLetter ==abbrev)
return cat;
}
return null;
13 years, 10 months
[rhq] 14 commits - modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java | 50 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java | 13
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java | 79 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java | 20
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java | 15
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java | 22
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/alert-plain-navigation.xml | 60 ++
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/configuration-plain-navigation.xml | 45 +
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/events-plain-navigation.xml | 26
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/inventory-navigation.xml | 15
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml | 15
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-plain-navigation.xml | 88 +++
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/operation-plain-navigation.xml | 119 ++++
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml | 6
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/graphs.xhtml | 26
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml | 15
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml | 126 ++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertHistory-plain.xhtml | 177 ++++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/addSimple-plain.xhtml | 45 +
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/editCurrent-plain.xhtml | 69 ++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/history-plain.xhtml | 281 +++++++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/viewCurrent-plain.xhtml | 55 +
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/events/history-plain.xhtml | 19
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/main-plain.xhtml | 64 ++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/graphs-plain.xhtml | 19
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/response-plain.xhtml | 15
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/schedules-plain.xhtml | 153 +++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/tables-plain.xhtml | 128 ++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistory-plain.xhtml | 293 ++++++++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml | 232 +++++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml | 118 ++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleNew-plain.xhtml | 173 +++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationSchedules-plain.xhtml | 106 +++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/view-results-map-plain.xhtml | 41 +
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/tables-plain.xhtml | 19
35 files changed, 2624 insertions(+), 123 deletions(-)
New commits:
commit 910702a4e6da5c6c7cd223f9ad7de12eac8d156c
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:10:30 2010 -0400
we don't support content at the group-level, so delete those commented-out sub-tab references
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 4a5f363..7ce294f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -149,13 +149,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
operationsTab.updateSubTab("History", new FullHTMLPane(
"/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=" + groupId));
operationsTab.updateSubTab("Scheduled", new FullHTMLPane(
- //
- // eventsTab.updateSubTab("History", EventHistoryView.createResourceHistoryView(resource.getId())); //new FullHTMLPane("/rhq/common/events/history-plain.xhtml?id=" + resource.getId()));
- //
- // contentTab.updateSubTab("Deployed", new FullHTMLPane("/rhq/resource/content/view-plain.xhtml?id=" + resource.getId()));
- // contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()));
- // contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
- // contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
"/rhq/group/operation/groupOperationSchedules-plain.xhtml?groupId=" + groupId));
configurationTab.updateSubTab("Current", new FullHTMLPane(
commit a8cd0f333842f0059d06e8678cf0d38f9b5db3b5
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:09:51 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished group > operation tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 709e304..4a5f363 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -145,8 +145,10 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
inventoryTab.updateSubTab("Overview", new OverviewView(this.groupComposite));
inventoryTab.updateSubTab("Members", ResourceSearchView.getMembersOf(groupId));
// inventoryTab.updateSubTab("Connection Settings", new GroupPluginConfigurationEditView(this.group.getId(), this.group.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
- //
- // operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
+
+ operationsTab.updateSubTab("History", new FullHTMLPane(
+ "/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=" + groupId));
+ operationsTab.updateSubTab("Scheduled", new FullHTMLPane(
//
// eventsTab.updateSubTab("History", EventHistoryView.createResourceHistoryView(resource.getId())); //new FullHTMLPane("/rhq/common/events/history-plain.xhtml?id=" + resource.getId()));
//
@@ -154,6 +156,8 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()));
// contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
// contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
+ "/rhq/group/operation/groupOperationSchedules-plain.xhtml?groupId=" + groupId));
+
configurationTab.updateSubTab("Current", new FullHTMLPane(
"/rhq/group/configuration/viewCurrent-plain.xhtml?groupId=" + groupId));
configurationTab.updateSubTab("History", new FullHTMLPane(
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistory-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistory-plain.xhtml
new file mode 100644
index 0000000..36f8b54
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistory-plain.xhtml
@@ -0,0 +1,293 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <!--
+ ResourceGroup Operation Pending History
+ -->
+
+ <ui:param name="currentOperation" value="#{ResourceGroupOperationPendingHistoryUIBean.oldestInProgressResourceGroupOperation}" />
+
+ <h:form id="pendingForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+ <input type="hidden" name="category" value="#{param.category}" />
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">In Progress Operations</f:facet>
+
+ <ui:param name="resourceGroupOperationPendingHistoryDataModel" value="#{ResourceGroupOperationPendingHistoryUIBean.dataModel}"/>
+
+ <a4j:keepAlive beanName="ResourceGroupOperationPendingHistoryUIBean"/>
+
+ <a4j:poll id="resourceGroupOperationPendingHistoryDataTableReRenderer"
+ oncomplete="disableConditionalButtons();"
+ interval="60000"
+ ignoreDupResponses="true"
+ actionListener="#{ResourceGroupOperationPendingHistoryUIBean.clearDataModel}"
+ reRender="resourceGroupOperationPendingHistoryDataTable" />
+ <rich:dataTable id="resourceGroupOperationPendingHistoryDataTable"
+ rows="#{PageControl.ResourceGroupOperationPendingHistory.pageSize}"
+ value="#{resourceGroupOperationPendingHistoryDataModel}"
+ var="pendingItem"
+ width="100%"
+ columnsWidth="1%, 20%, 20%, 20%, 20%, 19%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceGroupOperationPendingHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="pendingSelectedItems" />
+ </f:facet>
+
+ <onc:select name="pendingSelectedItems" value="#{pendingItem.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.createdTime">
+ <h:outputText styleClass="headerText" value="Date Submitted" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml" >
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="opId" value="#{pendingItem.id}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="#{pendingItem.operationDefinition.displayName}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.operationDefinition.description}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.status}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.subjectName}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6" width="100%">
+ <onc:selectCommandButton action="#{ResourceGroupOperationPendingHistoryUIBean.cancel}"
+ value="CANCEL SELECTED" target="pendingSelectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.control}"/>
+
+ <ui:param name="paginationDataTableName" value="resourceGroupOperationPendingHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{resourceGroupOperationPendingHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ResourceGroupOperationPendingHistory}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ <!--
+ ResourceGroup Operation Completed History
+ -->
+
+ <h:form id="historyForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+ <input type="hidden" name="category" value="#{param.category}" />
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Completed Operations</f:facet>
+
+ <a4j:keepAlive beanName="ResourceGroupOperationCompletedHistoryUIBean"/>
+
+ <ui:param name="resourceGroupOperationCompletedHistoryDataModel" value="#{ResourceGroupOperationCompletedHistoryUIBean.dataModel}"/>
+
+ <h:outputText value="There are no completed operations" rendered="#{resourceGroupOperationCompletedHistoryDataModel.rowCount eq 0}"/>
+
+ <a4j:poll id="resourceGroupOperationCompletedHistoryDataTableReRenderer"
+ oncomplete="disableConditionalButtons();"
+ interval="60000"
+ ignoreDupResponses="true"
+ actionListener="#{ResourceGroupOperationCompletedHistoryUIBean.clearDataModel}"
+ reRender="resourceGroupOperationCompletedHistoryDataTable" />
+ <rich:dataTable rendered="#{resourceGroupOperationCompletedHistoryDataModel.rowCount gt 0}"
+ id="resourceGroupOperationCompletedHistoryDataTable"
+ rows="#{PageControl.ResourceGroupOperationCompletedHistory.pageSize}"
+ value="#{resourceGroupOperationCompletedHistoryDataModel}"
+ var="historyItem"
+ width="100%"
+ columnsWidth="1%, 17%, 17%, 17%, 17%, 16%, 16%"
+ rowKeyVar="rowIndex"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceGroupOperationCompletedHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="completedSelectedItems" />
+ </f:facet>
+
+ <onc:select name="completedSelectedItems" value="#{historyItem.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.createdTime">
+ <h:outputText styleClass="headerText" value="Date Submitted" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.modifiedTime">
+ <h:outputText styleClass="headerText" value="Date Completed" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.modifiedTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml" >
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="opId" value="#{historyItem.id}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="#{historyItem.operationDefinition.displayName}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{historyItem.operationDefinition.description}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText rendered="#{historyItem.status ne 'FAILURE'}" value="#{historyItem.status}"/>
+ <h:outputLink rendered="#{historyItem.status eq 'FAILURE'}"
+ value="javascript:displayMessageModal('Error Message','#{historyItem.errorMessage}')">
+ <h:outputText value="#{historyItem.status}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.subjectName}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="7" width="100%">
+ <onc:selectCommandButton action="#{ResourceGroupOperationCompletedHistoryUIBean.delete}"
+ value="DELETE SELECTED" target="completedSelectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.control}"
+ onclick="return preventDoubleClick();"/>
+
+ <ui:param name="paginationDataTableName" value="resourceGroupOperationCompletedHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{resourceGroupOperationCompletedHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ResourceGroupOperationCompletedHistory}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <!-- use a hidden button trick (which sends the same action a column click would) so request params aren't lost -->
+ <h:commandButton id="hiddenHistoryButton" style="visibility: hidden;" action="#{TableSorter.obtainFromOutcome}" />
+
+ </rich:panel>
+ </h:form>
+
+ <script type="text/javascript">
+ var submitted = false;
+ function preventDoubleClick() {
+ if (submitted) {
+ return false;
+ } else {
+ submitted = true;
+ return true;
+ }
+ }
+ </script>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml
new file mode 100644
index 0000000..8c9834e
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml
@@ -0,0 +1,232 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+<ui:param name="item" value="#{ResourceGroupOperationHistoryDetailsUIBean.history}"/>
+
+<h:form id="operationHistoryDetailsForm">
+<input type="hidden" name="groupId" value="${param.groupId}"/>
+<input type="hidden" name="opId" value="${param.opId}"/>
+<input type="hidden" name="category" value="#{param.category}"/>
+
+<a4j:keepAlive beanName="ResourceGroupOperationHistoryDetailsUIBean" ajaxOnly="true"/>
+
+<br/>
+<h:outputLink value="/rhq/group/operation/groupOperationHistory-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}"/>
+ <f:param name="category" value="#{param.category}"/>
+
+ <h:outputText value="< Return to Operation History"/>
+</h:outputLink>
+
+<rich:panel styleClass="BlockContent">
+ <f:facet name="header">Details</f:facet>
+ <table>
+ <tr>
+ <td align="right" style="width: 150px;">Operation:</td>
+ <td align="left">
+ <h:outputText value="#{item.operationDefinition.displayName}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Date Submitted:</td>
+ <td align="left">
+ <h:outputText value="#{item.createdTime}">
+ <f:converter converterId="UserDateTimeConverter"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Date Completed:</td>
+ <td align="left">
+ <h:outputText value="#{item.modifiedTime}" rendered="#{item.status ne 'INPROGRESS'}">
+ <f:converter converterId="UserDateTimeConverter"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Requester:</td>
+ <td align="left">
+ <h:outputText value="#{item.subjectName}" rendered="#{!(empty item.subjectName)}"/>
+ <h:outputText value="(unknown)" rendered="#{empty item.subjectName}"/>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Status:</td>
+ <td align="left">
+ <h:outputText rendered="#{item.status eq 'SUCCESS' or item.status eq 'INPROGRESS'}"
+ value="#{item.status}"/>
+ <h:outputLink rendered="#{item.status ne 'SUCCESS' and item.status ne 'INPROGRESS'}"
+ value="#" id="resultsLink">
+ <h:outputText value="#{item.status}"/>
+ <rich:componentControl for="resultsModalPanel" attachTo="resultsLink" operation="show"
+ event="onclick"/>
+ </h:outputLink>
+ <rich:modalPanel id="resultsModalPanel" width="600" height="400"
+ style="overflow: auto;">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Results"/>
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="controls">
+ <h:panelGroup>
+ <h:graphicImage value="/images/close.png" style="cursor:pointer"
+ id="resultsModelPanelHideLink"/>
+ <rich:componentControl for="resultsModalPanel" attachTo="resultsModelPanelHideLink"
+ operation="hide" event="onclick"/>
+ </h:panelGroup>
+ </f:facet>
+
+ <div class="ErrorModalBody">
+ <h:outputText value="#{item.errorMessage}"/>
+ </div>
+ </rich:modalPanel>
+ </td>
+ </tr>
+ </table>
+</rich:panel>
+
+<rich:panel styleClass="BlockContent">
+ <f:facet name="header">Parameters</f:facet>
+ <onc:config
+ configurationDefinition="#{ResourceGroupOperationHistoryDetailsUIBean.parameters.configurationDefinition}"
+ configuration="#{ResourceGroupOperationHistoryDetailsUIBean.parameters.configuration}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="#{ResourceGroupOperationHistoryDetailsUIBean.parameters.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{ResourceGroupOperationHistoryDetailsUIBean.parameters.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"/>
+</rich:panel>
+
+<rich:panel styleClass="BlockContent">
+ <f:facet name="header">Resource Operation Results</f:facet>
+
+ <h:panelGrid columns="1" styleClass="data-table">
+
+ <ui:param name="resourceGroupOperationHistoryDetailsDataModel"
+ value="#{ResourceGroupOperationHistoryDetailsUIBean.dataModel}"/>
+
+ <h:outputText value="There were no resources in the group when this operation was executed"
+ rendered="#{resourceGroupOperationHistoryDetailsDataModel.rowCount eq 0}"/>
+
+ <rich:dataTable rendered="#{resourceGroupOperationHistoryDetailsDataModel.rowCount gt 0}"
+ id="resourceGroupOperationHistoryDetailsDataTable"
+ rows="#{PageControl.ResourceGroupOperationHistoryDetails.pageSize}"
+ value="#{resourceGroupOperationHistoryDetailsDataModel}"
+ var="resourceHistoryItem"
+ width="100%"
+ columnsWidth="20%, 20%, 20%, 20%, 19%"
+ headerClass="tableRowHeader"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceGroupOperationHistoryDetails"/>
+ </f:facet>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.id">
+ <h:outputText styleClass="headerText" value="ID"/>
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{resourceHistoryItem.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.createdTime">
+ <h:outputText styleClass="headerText" value="Date Submitted"/>
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{resourceHistoryItem.createdTime}">
+ <f:converter converterId="UserDateTimeConverter"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name"/>
+ </f:facet>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml">
+ <f:param name="id" value="#{resourceHistoryItem.resource.id}"/>
+ <f:param name="opId" value="#{resourceHistoryItem.id}"/>
+ <h:outputText value="#{resourceHistoryItem.operationDefinition.displayName}"/>
+ </h:outputLink>
+
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Resource"/>
+ </f:facet>
+
+ <h:outputText value="#{resourceHistoryItem.resource.name}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.status">
+ <h:outputText styleClass="headerText" value="Status"/>
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{resourceHistoryItem.status}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.subjectName">
+ <h:outputText styleClass="headerText" value="User"/>
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{resourceHistoryItem.subjectName}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6" width="100%">
+ <ui:param name="paginationDataTableName"
+ value="resourceGroupOperationHistoryDetailsDataTable"/>
+ <ui:param name="paginationDataModel"
+ value="#{resourceGroupOperationHistoryDetailsDataModel}"/>
+ <ui:param name="paginationPageControl"
+ value="#{PageControl.ResourceGroupOperationHistoryDetails}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </h:panelGrid>
+
+</rich:panel>
+
+<h:outputLink value="/rhq/group/operation/groupOperationHistory-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}"/>
+ <f:param name="category" value="#{param.category}"/>
+
+ <h:outputText value="< Return to Operation History"/>
+</h:outputLink>
+
+</h:form>
+
+</ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml
new file mode 100644
index 0000000..23274f2
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml
@@ -0,0 +1,118 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+ <br/>
+ <!-- ResourceGroup Operation Schedules -->
+ <h:outputLink value="/rhq/group/operation/groupOperationSchedules-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="< Return to Operation Schedules"/>
+ </h:outputLink>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">General Info</f:facet>
+ <table>
+ <tr>
+ <td align="right" style="width: 125px;">Operation:</td>
+ <td align="left">
+ <h:outputText value="#{item.operationDisplayName}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right" style="width: 125px;">Scheduled By:</td>
+ <td align="left">
+ <h:outputText value="#{item.subject.name}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right" style="width: 125px;">Halt on Failure:</td>
+ <td align="left">
+ <h:outputText value="#{item.haltOnFailure}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right" style="width: 125px;">Notes:</td>
+ <td align="left">
+ <h:outputText value="#{item.description}" />
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Parameters</f:facet>
+ <onc:config configurationDefinition="#{ResourceGroupOperationScheduleDetailsUIBean.parameters.configurationDefinition}"
+ configuration="#{ResourceGroupOperationScheduleDetailsUIBean.parameters.configuration}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="#{ResourceGroupOperationScheduleDetailsUIBean.parameters.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{ResourceGroupOperationScheduleDetailsUIBean.parameters.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"/>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Resource Operation Order"/>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Execute this operation: " />
+ <h:selectOneRadio id="executionType"
+ layout="pageDirection"
+ disabled="true"
+ value="#{ResourceGroupOperationScheduleDetailsUIBean.resourceExecutionOption}">
+ <f:selectItem value="#{ResourceGroupExecutionTypeUIBean.concurrentOption}" />
+ <f:selectItem value="#{ResourceGroupExecutionTypeUIBean.orderedOption}" />
+ </h:selectOneRadio>
+
+ <h:outputText value=" " />
+ <rich:orderingList id="resourceNameItems"
+ orderControlsVisible="false"
+ fastOrderControlsVisible="false"
+ value="#{ResourceGroupOperationScheduleDetailsUIBean.resourceNameItems}"
+ var="resourceNameItem" listHeight="150" listWidth="200"
+ converter="IntegerOptionItemConverter">
+ <rich:column>
+ <h:outputText value="#{resourceNameItem.displayName}"></h:outputText>
+ </rich:column>
+ </rich:orderingList>
+ </h:panelGrid>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Schedule Details</f:facet>
+ <onc:operationScheduler scheduleDetails="#{ResourceGroupOperationScheduleDetailsUIBean.operationDetails}" readOnly="true" />
+ </rich:panel>
+
+ <h:form id="scheduleForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+ <input type="hidden" name="jobId" value="${param.jobId}"/>
+ <h:panelGrid columns="1" styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton action="#{ResourceGroupOperationScheduleUIBean.executeNow}"
+ value="EXECUTE NOW" styleClass="buttonmed"
+ rendered="#{ResourceGroupUIBean.permissions.control}" />
+ </h:panelGrid>
+ </h:form>
+
+ <br />
+ <br />
+
+ <h:outputLink value="/rhq/group/operation/groupOperationSchedules-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="< Return to Operation Schedules"/>
+ </h:outputLink>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleNew-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleNew-plain.xhtml
new file mode 100644
index 0000000..486d22a
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationScheduleNew-plain.xhtml
@@ -0,0 +1,173 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <!--
+ ResourceGroup Operation Definitions
+ -->
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.control}" value="You do not have permissions to execute operations on this group"/>
+
+ <h:form id="newScheduleForm">
+ <input type="hidden" name="groupId" value="#{param.groupId}" />
+ <input type="hidden" name="parentGroupId" value="#{param.parentGroupId}" />
+ <input type="hidden" name="category" value="#{param.category}" />
+
+ <c:if test="${not empty param.opId}">
+ <input type="hidden" name="opId" value="#{param.opId}" />
+ </c:if>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Supported Operations</f:facet>
+
+ <rich:dataTable id="resourceGroupOperationDefinitionDataTable"
+ rows="0"
+ value="#{ResourceGroupOperationDefinitionUIBean.dataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="35%, 65%"
+ styleClass="resources-table"
+ headerClass="tableRowHeader"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="NONE" />
+ </f:facet>
+
+ <rich:column rendered="false">
+ <f:facet name="header">
+ <rich:spacer />
+ </f:facet>
+
+ <onc:select name="selectedItems" value="#{item.id}" type="radio" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink action="success" rendered="#{ResourceGroupUIBean.permissions.control}">
+ <f:param name="opId" value="#{item.id}" />
+ <f:param name="groupId" value="#{param.groupId}"/>
+ <f:param name="parentGroupId" value="#{param.parentGroupId}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="#{item.displayName} *" rendered="#{(not empty param.opId) and (param.opId == item.id)}"/>
+ <h:outputText value="#{item.displayName}" rendered="#{(empty param.opId) or (param.opId != item.id)}"/>
+ </h:outputLink>
+
+ <h:outputText value="#{item.displayName}" rendered="#{not ResourceGroupUIBean.permissions.control}"/>
+
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{item.description}"/>
+ </rich:column>
+
+ </rich:dataTable>
+
+ </h:panelGrid>
+ </rich:panel>
+
+ <rich:panel rendered="#{not empty param.opId and ResourceGroupUIBean.permissions.control}" styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Operation Parameters"/>
+ </f:facet>
+ <!-- even when things aren't rendered, they will still be executed? -->
+ <onc:config configurationDefinition="#{OperationDefinitionParametersUIBean.configurationDefinition}"
+ configuration="#{OperationDefinitionParametersUIBean.configuration}"
+ nullConfigurationDefinitionMessage="#{OperationDefinitionParametersUIBean.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{OperationDefinitionParametersUIBean.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"/>
+ </rich:panel>
+
+ <rich:panel rendered="#{not empty param.opId and ResourceGroupUIBean.permissions.control}" styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Resource Operation Order"/>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Execute this operation: " />
+ <h:selectOneRadio id="executionType"
+ layout="pageDirection"
+ value="#{ResourceGroupOperationDefinitionUIBean.resourceExecutionOption}"
+ onchange="updateDependent(this, 'newScheduleForm:haltOnFailure', '#{ResourceGroupExecutionTypeUIBean.concurrentOption.value}');">
+ <f:selectItem value="#{ResourceGroupExecutionTypeUIBean.concurrentOption}" />
+ <f:selectItem value="#{ResourceGroupExecutionTypeUIBean.orderedOption}" />
+ </h:selectOneRadio>
+
+ <h:outputText value=" " />
+ <rich:orderingList id="resourceNameItems"
+ value="#{ResourceGroupOperationDefinitionUIBean.resourceNameItems}"
+ var="resourceNameItem" listHeight="150" listWidth="200"
+ converter="IntegerOptionItemConverter">
+ <rich:column>
+ <h:outputText value="#{resourceNameItem.displayName}"></h:outputText>
+ </rich:column>
+ </rich:orderingList>
+ </h:panelGrid>
+ </rich:panel>
+
+ <rich:panel rendered="#{not empty param.opId and ResourceGroupUIBean.permissions.control}" styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Operation Schedule Details"/>
+ </f:facet>
+ <!-- bug in rich:panel renders children even if the panel isn't rendered -->
+ <onc:operationScheduler scheduleDetails="#{ResourceGroupOperationScheduleUIBean.operationDetails}"/>
+ </rich:panel>
+
+ <rich:panel rendered="#{not empty param.opId and ResourceGroupUIBean.permissions.control}" styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Other Options"/>
+ </f:facet>
+
+ <!-- Notes are for user use only, displayed back in the History view -->
+ <!-- The Notes value must fit into the Quartz job_details.description field. Quartz does not protect against SQL errors -->
+ <h:panelGrid columns="3">
+ <h:outputLabel for="timeout" value="Timeout:" />
+ <h:inputText id="timeout" value="#{ResourceGroupOperationDefinitionUIBean.timeout}" />
+ <h:outputText value="The maximum time this operation is given to finish, in seconds" />
+
+ <h:outputLabel for="haltOnFailure" value="Halt On Failure:" />
+ <h:selectBooleanCheckbox id="haltOnFailure" value="#{ResourceGroupOperationDefinitionUIBean.haltOnFailure}" />
+ <h:outputText value="If checked, an operation failure will cause the scheduling of the remaining ordered operations to halt" />
+
+ <h:outputLabel for="notes" value="Notes:" />
+ <h:inputText id="notes" maxlength="120" size="40" value="#{ResourceGroupOperationDefinitionUIBean.description}" />
+ <h:outputText value="Optional notes, if the operation is scheduled for execution later" />
+ </h:panelGrid>
+ <hr />
+ <h:panelGrid columns="1" styleClass="buttons-table" columnClasses="button-cell"
+ rendered="#{not empty param.opId}">
+ <h:commandButton action="#{ResourceGroupOperationScheduleUIBean.schedule}"
+ value="SCHEDULE" styleClass="buttonmed"
+ rendered="#{ResourceGroupUIBean.permissions.control}" />
+ </h:panelGrid>
+ </rich:panel>
+ <br /><br /><br /><br />
+ <br /><br /><br /><br />
+ </h:form>
+
+ <script type="text/javascript">
+ setInputDisabled(document.getElementById('newScheduleForm:haltOnFailure'), true, true);
+ clickAlreadySelectedElements();
+ </script>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationSchedules-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationSchedules-plain.xhtml
new file mode 100644
index 0000000..fbc7c17
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/groupOperationSchedules-plain.xhtml
@@ -0,0 +1,106 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <!-- ResourceGroup Operation Schedules -->
+ <h:form id="scheduleForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+ <input type="hidden" name="category" value="#{param.category}" />
+
+ <!-- Operation Schedule Table -->
+ <rich:panel styleClass="BlockContent">
+
+ <ui:param name="resourceGroupOperationScheduleDataModel" value="#{ResourceGroupOperationScheduleUIBean.dataModel}"/>
+ <rich:dataTable id="resourceGroupOperationScheduleDataTable"
+ rows="0"
+ value="#{resourceGroupOperationScheduleDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 30%, 39%, 30%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="NONE" />
+ </f:facet>
+
+ <rich:column style="width: 1px;">
+ <f:facet name="header">
+ <onc:allSelect target="selectedItems" />
+ </f:facet>
+ <onc:select name="selectedItems" value="#{item.jobId}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Job ID" />
+ </f:facet>
+ <h:commandLink action="#{ResourceGroupOperationScheduleUIBean.selectScheduleToView}">
+ <h:outputText value="#{item.jobId}" />
+ </h:commandLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml" >
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="jobId" value="#{item.jobId}" />
+ <f:param name="category" value="#{param.category}" />
+
+ <h:outputText value="#{item.operationDisplayName}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Notes" />
+ </f:facet>
+ <h:outputText value="#{item.description}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="User" />
+ </f:facet>
+ <h:outputText value="#{item.subject.name}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="4" width="100%">
+ <onc:selectCommandButton action="#{ResourceGroupOperationScheduleUIBean.unschedule}"
+ value="UNSCHEDULE" target="selectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.control}"/>
+ <onc:selectCommandButton action="#{ResourceGroupOperationScheduleUIBean.executeNow}"
+ value="EXECUTE NOW" target="selectedItems"
+ styleClass="on-pager-button buttonsmall"
+ low="1" high="1"
+ rendered="#{ResourceGroupUIBean.permissions.control}"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/view-results-map-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/view-results-map-plain.xhtml
new file mode 100644
index 0000000..001f5bb
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/operation/view-results-map-plain.xhtml
@@ -0,0 +1,41 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <p>
+ Below is the #{param.listName}[#{param.listIndex}] item from the results of the
+ execution of the #{ResourceGroupOperationHistoryDetailsUIBean.history.operationDefinition.displayName}
+ operation. Click OK to return to the main Operation History Details page.
+ </p>
+
+ <h:form id="viewOperationResultsMapForm">
+
+ <input type="hidden" name="id" value="#{ResourceGroupUIBean.id}"/>
+
+ <onc:config configurationDefinition="#{ResourceGroupOperationHistoryDetailsUIBean.results.configurationDefinition}"
+ configuration="#{ResourceGroupOperationHistoryDetailsUIBean.results.configuration}"
+ listName="#{param.listName}"
+ listIndex="#{param.listIndex}"
+ readOnly="true"/>
+
+ </h:form>
+
+ <h:panelGrid columns="1" styleClass="buttons-table" columnClasses="button-cell">
+ <h:panelGroup layout="block">
+ <div title="Return to Previous Page" onclick="history.back()" class="buttonmed">OK</div>
+ </h:panelGroup>
+ </h:panelGrid>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit 62ce6dd82fc3dae5ca2f46c631256fe2e81014f7
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:08:23 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished group > alerts tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index cc5e636..709e304 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -148,9 +148,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
//
// operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
//
- // alertsTab.updateSubTab("History", new ResourceAlertHistoryView(resource.getId()));
- // alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
- //
// eventsTab.updateSubTab("History", EventHistoryView.createResourceHistoryView(resource.getId())); //new FullHTMLPane("/rhq/common/events/history-plain.xhtml?id=" + resource.getId()));
//
// contentTab.updateSubTab("Deployed", new FullHTMLPane("/rhq/resource/content/view-plain.xhtml?id=" + resource.getId()));
@@ -162,6 +159,11 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
configurationTab.updateSubTab("History", new FullHTMLPane(
"/rhq/group/configuration/history-plain.xhtml?groupId=" + groupId));
+ alertsTab.updateSubTab("History", new FullHTMLPane(
+ "/rhq/group/alert/listGroupAlertHistory-plain.xhtml?groupId=" + groupId));
+ alertsTab.updateSubTab("Definitions", new FullHTMLPane(
+ "/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml?groupId=" + groupId));
+
eventsTab.updateSubTab("History", new FullHTMLPane("/rhq/group/events/history-plain.xhtml?groupId=" + groupId));
// topTabSet.setSelectedTab(selectedTab);
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml
new file mode 100644
index 0000000..7a677a5
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml
@@ -0,0 +1,126 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="alertDefinitionsListForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+
+ <rich:panel styleClass="BlockContent">
+ <a4j:keepAlive beanName="ListGroupAlertDefinitionsUIBean"/>
+
+ <ui:param name="alertDefinitionsDataModel" value="#{ListGroupAlertDefinitionsUIBean.dataModel}"/>
+ <rich:dataTable id="alertDefinitionsDataTable"
+ rows="#{PageControl.GroupAlertDefinitionsList.pageSize}"
+ value="#{alertDefinitionsDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 25%, 35%, 20%, 19%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+
+ <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>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.name">
+ <h:outputText styleClass="headerText" value="Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Config.do">
+ <f:param name="mode" value="viewRoles"/>
+ <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">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.ctime}">
+ <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>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="5" width="100%">
+ <h:commandButton action="#{ListGroupAlertDefinitionsUIBean.createNewAlertDefinition}"
+ value="NEW DEFINITION" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" >
+ <f:param name="groupId" value="${param.groupId}"/>
+ <f:param name="mode" value="new"/>
+ </h:commandButton>
+ <onc:selectCommandButton action="#{ListGroupAlertDefinitionsUIBean.enableSelectedAlertDefinitions}"
+ value="ENABLE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListGroupAlertDefinitionsUIBean.disableSelectedAlertDefinitions}"
+ value="DISABLE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListGroupAlertDefinitionsUIBean.deleteSelectedAlertDefinitions}"
+ value="DELETE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" />
+
+ <ui:param name="paginationDataTableName" value="alertDefinitionsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{alertDefinitionsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.GroupAlertDefinitionsList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertHistory-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertHistory-plain.xhtml
new file mode 100644
index 0000000..00aca9b
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertHistory-plain.xhtml
@@ -0,0 +1,177 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="alertHistoryForm">
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+
+ <rich:panel styleClass="BlockContent">
+
+ <h:panelGrid columns="4" cellspacing="3">
+ <h:outputLabel for="alertDefinitionFilter" value="Group Alert Definition Filter: " />
+ <h:selectOneMenu id="alertDefinitionFilter" value="#{ListGroupAlertHistoryUIBean.alertDefinitionFilter}"
+ style="width: 300px;">
+ <a4j:support event="onchange"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListGroupAlertHistoryUIBean.clearDataModel}" />
+
+ <f:selectItems value="#{ListGroupAlertHistoryUIBean.alertDefinitionSelectItems}"/>
+ </h:selectOneMenu>
+ <rich:spacer/>
+ <rich:spacer/>
+
+ <h:outputLabel for="alertPriorityFilter" value="Alert Priority Filter: " />
+ <h:selectOneMenu id="alertPriorityFilter" value="#{ListGroupAlertHistoryUIBean.alertPriorityFilter}"
+ style="width: 300px;">
+ <a4j:support event="onchange"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListGroupAlertHistoryUIBean.clearDataModel}" />
+
+ <f:selectItems value="#{ListGroupAlertHistoryUIBean.alertPrioritySelectItems}"/>
+ </h:selectOneMenu>
+ <rich:spacer/>
+ <rich:spacer/>
+
+ <h:outputLabel for="dateFilter" value="Date Filter: " />
+ <h:inputText id="dateFilter" value="#{ListGroupAlertHistoryUIBean.dateFilter}"
+ onkeypress="return ignoreEnterKey(event);"
+ style="width: 300px;" />
+ <a4j:commandButton value="GO"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListGroupAlertHistoryUIBean.clearDataModel}"
+ styleClass="buttonmed">
+ <s:defaultAction />
+ </a4j:commandButton>
+ <h:outputText id="dateErrors" value="#{ListGroupAlertHistoryUIBean.dateErrors}" />
+ </h:panelGrid>
+
+ <br/>
+
+ <ui:param name="alertHistoryDataModel" value="#{ListGroupAlertHistoryUIBean.dataModel}"/>
+ <rich:dataTable id="alertHistoryDataTable"
+ rows="#{PageControl.GroupAlertHistoryList.pageSize}"
+ value="#{alertHistoryDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 20%, 20%, 20%, 30%, 9%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="GroupAlertHistoryList" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedAlerts" />
+ </f:facet>
+
+ <onc:select name="selectedAlerts" value="#{item.alert.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.alertDefinition.priority">
+ <h:outputText styleClass="headerText" value="Priority" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:graphicImage value="/images/icons/Flag_blue_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'LOW'}"/>
+ <h:graphicImage value="/images/icons/Flag_yellow_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'MEDIUM'}"/>
+ <h:graphicImage value="/images/icons/Flag_red_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'HIGH'}"/>
+
+ <h:outputText value="#{item.alert.alertDefinition.priority.name}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.ctime">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Alerts.do">
+ <f:param name="mode" value="viewAlert" />
+ <f:param name="id" value="#{item.alert.alertDefinition.resource.id}"/>
+ <f:param name="a" value="#{item.alert.id}" />
+ <h:outputText value="#{item.alert.ctime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.alertDefinition.name">
+ <h:outputText styleClass="headerText" value="Alert Definition" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Config.do">
+ <f:param name="mode" value="viewRoles"/>
+ <f:param name="id" value="#{item.alert.alertDefinition.resource.id}"/>
+ <f:param name="ad" value="#{item.alert.alertDefinition.id}"/>
+ <h:outputText value="#{item.alert.alertDefinition.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Alert Condition" />
+ </f:facet>
+ <h:outputText value="#{item.conditionText}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Actual Value" />
+ </f:facet>
+ <h:outputText value="#{item.conditionValue}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Recovery Info" />
+ </f:facet>
+ <h:outputText value="#{item.recoveryInfo}" />
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="7" width="100%">
+ <onc:selectCommandButton action="#{ListGroupAlertHistoryUIBean.deleteSelectedAlerts}"
+ value="DELETE SELECTED" target="selectedAlerts" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" />
+ <h:commandButton action="#{ListGroupAlertHistoryUIBean.purgeAllAlerts}"
+ value="PURGE ALL" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.alert}" />
+
+ <ui:param name="paginationDataTableName" value="alertHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{alertHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.GroupAlertHistoryList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <a4j:keepAlive beanName="ListGroupAlertHistoryUIBean"/>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+</ui:composition>
\ No newline at end of file
commit 79d8e1bb6ca9b8cb725aa2c40566ce1666d1a2a1
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:07:41 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished group > configuration tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index a1f46fc..cc5e636 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -148,9 +148,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
//
// operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
//
- // configurationTab.updateSubTab("Current", new ResourceConfigurationEditView(resource));
- // configurationTab.updateSubTab("History", ConfigurationHistoryView.getHistoryOf(resource.getId()));
- //
// alertsTab.updateSubTab("History", new ResourceAlertHistoryView(resource.getId()));
// alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
//
@@ -160,6 +157,10 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()));
// contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
// contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
+ configurationTab.updateSubTab("Current", new FullHTMLPane(
+ "/rhq/group/configuration/viewCurrent-plain.xhtml?groupId=" + groupId));
+ configurationTab.updateSubTab("History", new FullHTMLPane(
+ "/rhq/group/configuration/history-plain.xhtml?groupId=" + groupId));
eventsTab.updateSubTab("History", new FullHTMLPane("/rhq/group/events/history-plain.xhtml?groupId=" + groupId));
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java
index 1ba9b78..a1c2c45 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java
@@ -90,7 +90,7 @@ public class EditGroupResourceConfigurationUIBean extends AbstractGroupResourceC
"Failed to schedule group Resource Configuration update - cause: " + e);
viewId = VIEW_ID;
}
- this.redirect.setViewId(viewId);
+ this.redirect.setViewId(getViewId(viewId));
this.redirect.execute();
}
@@ -100,7 +100,7 @@ public class EditGroupResourceConfigurationUIBean extends AbstractGroupResourceC
@End
public void cancel() {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Edit canceled.");
- this.redirect.setViewId(ViewGroupResourceConfigurationUIBean.VIEW_ID);
+ this.redirect.setViewId(getViewId(ViewGroupResourceConfigurationUIBean.VIEW_ID));
this.redirect.execute();
return;
}
@@ -111,8 +111,17 @@ public class EditGroupResourceConfigurationUIBean extends AbstractGroupResourceC
@End
public void reset() {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "All properties reset to original values.");
- this.redirect.setViewId(VIEW_ID);
+ this.redirect.setViewId(getViewId(VIEW_ID));
this.redirect.execute();
return;
}
+
+ private String getViewId(String toViewId) {
+ String currentViewId = FacesContextUtility.getViewId();
+ int currentPlainIndex = currentViewId.indexOf("-plain.xhtml");
+ if (currentPlainIndex != -1) {
+ toViewId = toViewId.substring(0, toViewId.length() - 6) + "-plain.xhtml";
+ }
+ return toViewId;
+ }
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java
index 4839095..62d17d0 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java
@@ -18,15 +18,16 @@
*/
package org.rhq.enterprise.gui.configuration.group;
-import org.rhq.enterprise.gui.legacy.ParamConstants;
-
import org.jboss.seam.ScopeType;
-import org.jboss.seam.faces.Redirect;
import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.faces.Redirect;
+
+import org.rhq.core.gui.util.FacesContextUtility;
+import org.rhq.enterprise.gui.legacy.ParamConstants;
/**
* A POJO Seam component that handles loading Resource configurations across a compatible Group in view-only mode.
@@ -53,8 +54,17 @@ public class ViewGroupResourceConfigurationUIBean extends AbstractGroupResourceC
@End
public void edit() {
this.redirect.setParameter(ParamConstants.GROUP_ID_PARAM, getGroup().getId());
- this.redirect.setViewId(EditGroupResourceConfigurationUIBean.VIEW_ID);
+ this.redirect.setViewId(getViewId(EditGroupResourceConfigurationUIBean.VIEW_ID));
this.redirect.execute();
return;
}
+
+ private String getViewId(String toViewId) {
+ String currentViewId = FacesContextUtility.getViewId();
+ int currentPlainIndex = currentViewId.indexOf("-plain.xhtml");
+ if (currentPlainIndex != -1) {
+ toViewId = toViewId.substring(0, toViewId.length() - 6) + "-plain.xhtml";
+ }
+ return toViewId;
+ }
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/addSimple-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/addSimple-plain.xhtml
new file mode 100644
index 0000000..6fad880
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/addSimple-plain.xhtml
@@ -0,0 +1,45 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <p>
+ Enter a name and a value for the property to be added to the map '#{param.mapName}',
+ then click OK to return to the main Edit page for the '#{EditGroupResourceConfigurationUIBean.group.name}' Configuration.
+ </p>
+
+ <h:form id="addNewOpenMapMemberPropertyForm">
+
+ <input type="hidden" name="groupId" value="#{EditGroupResourceConfigurationUIBean.group.id}"/>
+ <input type="hidden" name="mapName" value="#{param.mapName}"/>
+
+ <h:panelGrid columns="2" width="400">
+ <h:panelGroup>
+ Name: <h:inputText value="#{GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.propertyName}"/>
+ </h:panelGroup>
+ <h:panelGroup>
+ Value: <h:inputText value="#{GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.propertyValue}"/>
+ </h:panelGroup>
+ </h:panelGrid>
+
+ <h:panelGrid columns="2" styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton value="OK" action="#{GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.addProperty}"
+ alt="Click to Add Property" styleClass="buttonmed"/>
+ <h:commandButton value="CANCEL" action="#{GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.cancel}"
+ immediate="true" alt="Click to Cancel" styleClass="buttonmed"/>
+ </h:panelGrid>
+
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/editCurrent-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/editCurrent-plain.xhtml
new file mode 100644
index 0000000..cd365bd
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/editCurrent-plain.xhtml
@@ -0,0 +1,69 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.configureRead}"
+ value="You do not have permissions to view configuration data for this group" />
+
+ <h:form id="configSetForm" onsubmit="prepareInputsForSubmission(this)"
+ rendered="#{ResourceGroupUIBean.permissions.configureRead and EditGroupResourceConfigurationUIBean.configurationSet ne null}">
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.configureWrite}"
+ value="You do not have permissions to change the configuration of this group"/>
+
+ <input type="hidden" name="groupId" value="#{param.groupId}"/>
+
+ <h:panelGrid columns="3" styleClass="buttons-table" columnClasses="button-cell"
+ rendered="${ResourceGroupUIBean.permissions.configureWrite}">
+ <h:commandButton type="submit" action="#{EditGroupResourceConfigurationUIBean.updateConfigurations}"
+ value="SAVE" title="Click to Save Changes"
+ styleClass="buttonmed"/>
+ <h:commandButton type="submit" immediate="true"
+ action="#{EditGroupResourceConfigurationUIBean.reset}"
+ value="RESET" title="Click to Reset All Properties to Their Original Values"
+ styleClass="buttonmed"/>
+ <h:commandButton type="submit" immediate="true"
+ action="#{EditGroupResourceConfigurationUIBean.cancel}"
+ value="CANCEL" title="Click to Cancel Edits and Return to View Page"
+ styleClass="buttonmed"/>
+ </h:panelGrid>
+
+ <a4j:region selfRendered="false">
+ <a4j:outputPanel layout="block" ajaxRendered="true" keepTransient="true">
+ <onc:configSet id="rhq_configSet"
+ configurationSet="#{EditGroupResourceConfigurationUIBean.configurationSet}"/>
+ </a4j:outputPanel>
+ </a4j:region>
+
+ <h:panelGrid columns="3" styleClass="buttons-table" columnClasses="button-cell"
+ rendered="${ResourceGroupUIBean.permissions.configureWrite}">
+ <h:commandButton type="submit" action="#{EditGroupResourceConfigurationUIBean.updateConfigurations}"
+ value="SAVE" title="Click to Save Changes"
+ styleClass="buttonmed"/>
+ <h:commandButton type="submit" immediate="true"
+ action="#{EditGroupResourceConfigurationUIBean.reset}"
+ value="RESET" title="Click to Reset All Properties to Their Original Values"
+ styleClass="buttonmed"/>
+ <h:commandButton type="submit" immediate="true"
+ action="#{EditGroupResourceConfigurationUIBean.cancel}"
+ value="CANCEL" title="Click to Cancel Edits and Return to View Page"
+ styleClass="buttonmed"/>
+ </h:panelGrid>
+
+ </h:form>
+
+ <ui:remove><!--<a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"/>--></ui:remove>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/history-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/history-plain.xhtml
new file mode 100644
index 0000000..566d95b
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/history-plain.xhtml
@@ -0,0 +1,281 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.configureRead}"
+ value="You do not have permissions to view configuration data for this group" />
+
+ <h:form id="historyForm" rendered="#{ResourceGroupUIBean.permissions.configureRead}">
+ <input type="hidden" name="groupId" value="#{param.groupId}"/>
+ <input type="hidden" name="arcuId" value="#{param.arcuId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Group Configuration Update History"/>
+ </f:facet>
+
+ <ui:param name="groupResourceConfigUpdateHistoryDataModel" value="#{GroupResourceConfigurationHistoryUIBean.dataModel}"/>
+ <rich:dataTable id="groupResourceConfigUpdateHistoryDataTable"
+ rows="#{PageControl.GroupResourceConfigurationUpdateHistory.pageSize}"
+ value="#{groupResourceConfigUpdateHistoryDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 9%, 25%, 25%, 10%, 10%, 20%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="GroupResourceConfigurationUpdateHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedUpdates" />
+ </f:facet>
+
+ <onc:select name="selectedUpdates" value="#{item.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="arcu.id">
+ <h:outputText styleClass="headerText" value="Version" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="arcu.createdTime">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="arcu.modifiedTime">
+ <h:outputText styleClass="headerText" value="Last Updated" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.modifiedTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="arcu.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.status}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="arcu.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.subjectName}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Action" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/group/configuration/history-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="arcuId" value="#{item.id}" />
+ <f:param name="mode" value="group" />
+ <h:outputText value="View Group Update" />
+ </h:outputLink>
+ <ui:remove>
+ <br />
+ <h:outputLink value="/rhq/group/configuration/history-plain.xhtml">
+ <f:param name="groupId" value="#{param.groupId}" />
+ <f:param name="arcuId" value="#{item.id}" />
+ <f:param name="mode" value="details" />
+ <h:outputText value="View Member Updates" />
+ </h:outputLink>
+ </ui:remove>
+
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="7" width="100%">
+ <onc:selectCommandButton action="#{GroupResourceConfigurationHistoryUIBean.deleteSelectedUpdates}"
+ rendered="${ResourceGroupUIBean.permissions.configureWrite}"
+ value="DELETE SELECTED" target="selectedUpdates"
+ styleClass="on-pager-button buttonsmall" />
+
+ <ui:param name="paginationDataTableName" value="groupResourceConfigUpdateHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{groupResourceConfigUpdateHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.GroupResourceConfigurationUpdateHistory}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ <rich:panel rendered="#{ResourceGroupUIBean.permissions.configureRead and param.mode eq 'group' and not empty param.arcuId}">
+ <f:facet name="header">
+ <h:outputText value="Group Configuration Update Request"/>
+ </f:facet>
+ <h:form id="configSetForm">
+ <input type="hidden" name="groupId" value="#{param.groupId}"/>
+ <input type="hidden" name="arcuId" value="#{param.arcuId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <a4j:region selfRendered="false">
+ <a4j:outputPanel layout="block" ajaxRendered="true" keepTransient="true">
+ <onc:configSet id="rhq_configSet"
+ configurationSet="#{GroupResourceConfigurationHistoryDetailsUIBean.configurationSet}"
+ readOnly="true"/>
+ </a4j:outputPanel>
+ </a4j:region>
+ </h:form>
+ </rich:panel>
+
+ <rich:panel rendered="#{ResourceGroupUIBean.permissions.configureRead and param.mode eq 'details' and not empty param.arcuId}">
+ <f:facet name="header">
+ <h:outputText value="Individual Resource Configuration Updates"/>
+ </f:facet>
+
+ <h:form id="resourceConfigurationUpdateDetailsForm">
+ <input type="hidden" name="groupId" value="#{param.groupId}"/>
+ <input type="hidden" name="arcuId" value="#{param.arcuId}"/>
+ <input type="hidden" name="mode" value="#{param.mode}"/>
+
+ <ui:param name="groupResourceConfigurationDetailsDataModel" value="#{GroupResourceConfigurationHistoryDetailsUIBean.dataModel}"/>
+ <rich:dataTable id="groupResourceConfigurationDetailsDataTable"
+ rows="#{PageControl.GroupResourceConfigurationUpdateDetails.pageSize}"
+ value="#{groupResourceConfigurationDetailsDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 20%, 20%, 20%, 30%, 9%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="GroupResourceConfigurationUpdateDetails" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="cu.resource.name">
+ <h:outputText styleClass="headerText" value="Resource" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.resourceName}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="cu.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.status}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Details" />
+ </f:facet>
+
+ <h:outputText value="#{item.errorMessage}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="cu.createdTime">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/rhq/resource/configuration/history-plain.xhtml">
+ <f:param name="id" value="#{item.resourceId}" />
+ <f:param name="configId" value="#{item.id}" />
+ <h:outputText value="#{item.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="cu.modifiedTime">
+ <h:outputText styleClass="headerText" value="Last Updated" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.modifiedTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="cu.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.subjectName}" />
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6" width="100%">
+ <ui:param name="paginationDataTableName" value="groupResourceConfigurationDetailsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{groupResourceConfigurationDetailsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.GroupResourceConfigurationUpdateDetails}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <a4j:keepAlive beanName="GroupResourceConfigurationHistoryUIBean"/>
+ <a4j:keepAlive beanName="GroupResourceConfigurationHistoryDetailsUIBean"/>
+ </h:form>
+ </rich:panel>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/viewCurrent-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/viewCurrent-plain.xhtml
new file mode 100644
index 0000000..97184d3
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/configuration/viewCurrent-plain.xhtml
@@ -0,0 +1,55 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.configureRead}"
+ value="You do not have permissions to view configuration data for this group" />
+
+ <h:form id="configSetForm" rendered="#{ResourceGroupUIBean.permissions.configureRead and ViewGroupResourceConfigurationUIBean.configurationSet ne null}">
+
+ <input type="hidden" name="groupId" value="#{ViewGroupResourceConfigurationUIBean.group.id}" />
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.configureWrite}"
+ value="You do not have permissions to change the configuration of this group"/>
+
+ <!-- edit button at top of config -->
+ <h:panelGrid columns="1" styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton value="EDIT" action="#{ViewGroupResourceConfigurationUIBean.edit}"
+ title="Edit this Compatible Group Configuration"
+ rendered="${ResourceGroupUIBean.permissions.configureWrite}"
+ styleClass="buttonmed"/>
+ </h:panelGrid>
+
+ <a4j:region selfRendered="false">
+ <a4j:outputPanel layout="block" ajaxRendered="true" keepTransient="true">
+ <onc:configSet id="rhq_configSet"
+ configurationSet="#{ViewGroupResourceConfigurationUIBean.configurationSet}"
+ readOnly="true"/>
+ </a4j:outputPanel>
+ </a4j:region>
+
+ <!-- edit button at bottom of config -->
+ <h:panelGrid columns="1" styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton value="EDIT" action="#{ViewGroupResourceConfigurationUIBean.edit}"
+ title="Edit this Compatible Group Configuration"
+ rendered="${ResourceGroupUIBean.permissions.configureWrite}"
+ styleClass="buttonmed"/>
+ </h:panelGrid>
+
+ </h:form>
+
+ <ui:remove><!--<a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"/>--></ui:remove>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit ba1bfcc92fbd25264c50513436dcade710e87e4d
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:05:22 2010 -0400
reformat, cosmetic
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 3363ea8..a1f46fc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -134,8 +134,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
int groupId = this.groupComposite.getResourceGroup().getId();
monitoringTab.updateSubTab("Graphs", new FullHTMLPane("/rhq/group/monitor/graphs-plain.xhtml?groupId="
- inventoryTab.updateSubTab("Overview", new OverviewView(this.groupComposite));
- inventoryTab.updateSubTab("Members", ResourceSearchView.getMembersOf(this.groupComposite.getResourceGroup().getId()));
+ groupId));
monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/group/monitor/tables-plain.xhtml?groupId="
+ groupId));
@@ -143,6 +141,9 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
+ groupId));
monitoringTab.updateSubTab("Call Time", new FullHTMLPane("/rhq/group/monitor/response-plain.xhtml?groupId="
+ groupId));
+
+ inventoryTab.updateSubTab("Overview", new OverviewView(this.groupComposite));
+ inventoryTab.updateSubTab("Members", ResourceSearchView.getMembersOf(groupId));
// inventoryTab.updateSubTab("Connection Settings", new GroupPluginConfigurationEditView(this.group.getId(), this.group.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
//
// operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
commit 11ebce8b1b6188a2550f8b210d911ea225a355e0
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:04:44 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished group > events tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index c2a4f35..3363ea8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -160,6 +160,8 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
// contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
+ eventsTab.updateSubTab("History", new FullHTMLPane("/rhq/group/events/history-plain.xhtml?groupId=" + groupId));
+
// topTabSet.setSelectedTab(selectedTab);
updateTabStatus();
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/events/history-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/events/history-plain.xhtml
new file mode 100644
index 0000000..00547cb
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/events/history-plain.xhtml
@@ -0,0 +1,19 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:include src="/rhq/common/events/history-plain.xhtml"/>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit 3cc66b4df2bdfc4252f5e5844412458f3cca4f7d
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:04:13 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished group > monitor tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index c7fbb97..c2a4f35 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -36,6 +36,7 @@ import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
+import org.rhq.enterprise.gui.coregui.client.components.FullHTMLPane;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTab;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedEvent;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedHandler;
@@ -130,16 +131,18 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// FullHTMLPane timelinePane = new FullHTMLPane("/rhq/resource/summary/timeline-plain.xhtml?id=" + resource.getId());
// summaryTab.updateSubTab("Overview", new ResourceOverviewView(resource));
// summaryTab.updateSubTab("Timeline", timelinePane);
+ int groupId = this.groupComposite.getResourceGroup().getId();
- // monitoringTab.updateSubTab("Graphs", new GraphListView(resource)); // new FullHTMLPane("/rhq/common/monitor/graphs.xhtml?id=" + resource.getId()));
- // monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/common/monitor/tables-plain.xhtml?id=" + resource.getId()));
- // monitoringTab.updateSubTab("Traits", new FullHTMLPane("/rhq/resource/monitor/traits-plain.xhtml?id=" + resource.getId()));
- // monitoringTab.updateSubTab("Availability", new FullHTMLPane("/rhq/resource/monitor/availabilityHistory-plain.xhtml?id=" + resource.getId()));
- // monitoringTab.updateSubTab("Schedules", new FullHTMLPane("/rhq/resource/monitor/schedules-plain.xhtml?id=" + resource.getId()));
- // monitoringTab.updateSubTab("Call Time", new CallTimeView(resource));
- //
+ monitoringTab.updateSubTab("Graphs", new FullHTMLPane("/rhq/group/monitor/graphs-plain.xhtml?groupId="
inventoryTab.updateSubTab("Overview", new OverviewView(this.groupComposite));
inventoryTab.updateSubTab("Members", ResourceSearchView.getMembersOf(this.groupComposite.getResourceGroup().getId()));
+ + groupId));
+ monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/group/monitor/tables-plain.xhtml?groupId="
+ + groupId));
+ monitoringTab.updateSubTab("Schedules", new FullHTMLPane("/rhq/group/monitor/schedules-plain.xhtml?groupId="
+ + groupId));
+ monitoringTab.updateSubTab("Call Time", new FullHTMLPane("/rhq/group/monitor/response-plain.xhtml?groupId="
+ + groupId));
// inventoryTab.updateSubTab("Connection Settings", new GroupPluginConfigurationEditView(this.group.getId(), this.group.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
//
// operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
@@ -235,6 +238,8 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
topTabSet.disableTab(eventsTab);
}
+ // only enable "Call Time" sub-tab for those that implement it
+ monitoringTab.setSubTabEnabled("Call Time", typeFacets.contains(ResourceTypeFacet.CALL_TIME));
}
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/graphs.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/graphs.xhtml
index 89474e1..647d131 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/graphs.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/graphs.xhtml
@@ -1,20 +1,14 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
- xmlns:rich="http://richfaces.ajax4jsf.org/rich"
- xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:onc="http://jboss.org/on/component"
- xmlns:onf="http://jboss.org/on/function">
-
-<ui:composition>
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<!-- chart actions -->
@@ -49,8 +43,8 @@
<!-- spacer for date/time overlay, so it doesn't overlap metric display range -->
<tr class="BlockContent">
<td>
- <br />
- <br />
+ <br />
+ <br />
</td>
</tr>
@@ -126,6 +120,4 @@
addWindowOnResizeEvent(maxIndicatorDivHeight);
</script>
-</ui:composition>
-
-</html>
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/graphs-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/graphs-plain.xhtml
new file mode 100644
index 0000000..14f6b68
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/graphs-plain.xhtml
@@ -0,0 +1,19 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:include src="/rhq/common/monitor/graphs.xhtml" />
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/response-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/response-plain.xhtml
new file mode 100644
index 0000000..75a22f5
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/response-plain.xhtml
@@ -0,0 +1,15 @@
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:include src="/rhq/common/monitor/response-plain.xhtml" />
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/schedules-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/schedules-plain.xhtml
new file mode 100644
index 0000000..0641783
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/schedules-plain.xhtml
@@ -0,0 +1,153 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:outputText rendered="#{not ResourceGroupUIBean.permissions.measure}" value="You don't have the measure permission for this group and therefore can not change metric schedules"/>
+
+ <h:form id="resourceGroupSchedulesForm">
+ <!-- hack to override the default button on the page, make this button pseudo-first in the form,
+ but take it out of the document flow and position it off the screen -->
+ <div style="position:absolute; top:-100px; ">
+ <onc:selectCommandButton id="enableAndSetSelectedSchedules"
+ name="enableAndSetSelectedSchedules"
+ action="#{ListResourceGroupMeasurementScheduleUIBean.enableAndSetSelected}"
+ value="SET" target="selectedResourceGroupSchedules"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.measure}" />
+ </div>
+ <input type="hidden" name="groupId" value="${param.groupId}"/>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">
+ <h:outputText value="Configure Metric Collection Schedules"/>
+ </f:facet>
+
+ <ui:param name="resourceGroupSchedulesDataModel" value="#{ListResourceGroupMeasurementScheduleUIBean.dataModel}"/>
+ <rich:dataTable id="resourceGroupSchedulesDataTable"
+ rows="#{PageControl.ResourceGroupMeasurementScheduleList.pageSize}"
+ value="#{resourceGroupSchedulesDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 20%, 30%, 20%, 9%, 20%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceGroupMeasurementScheduleList" />
+ </f:facet>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <onc:allSelect target="selectedResourceGroupSchedules" />
+ </f:facet>
+
+ <onc:select name="selectedResourceGroupSchedules" value="#{item.measurementDefinition.id}" />
+ </rich:column>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="definition.displayName">
+ <h:outputText styleClass="headerText" value="Metric" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.measurementDefinition.displayName}"/>
+ </rich:column>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{item.measurementDefinition.description}"/>
+ </rich:column>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="definition.dataType">
+ <h:outputText styleClass="headerText" value="Type" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.measurementDefinition.dataType}"/>
+ </rich:column>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Enabled" />
+ </f:facet>
+ <h:outputText value="#{(empty item.collectionEnabled) ? 'SOME' : (item.collectionEnabled ? 'Yes' : 'No')}" />
+ </rich:column>
+
+ <rich:column style="background-color: #{item.collectionEnabled ? '#E2F2E6' : '#E2D2D2'}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Collection Interval" />
+ </f:facet>
+
+ <h:outputText value="#{item.collectionInterval}" rendered="#{item.collectionInterval ne 0}">
+ <f:converter converterId="DurationConverter" />
+ </h:outputText>
+ <h:outputText value="DIFFERENT" rendered="#{item.collectionInterval eq 0}" />
+ </rich:column>
+
+ <f:facet name="footer" rendered="false">
+ <rich:columnGroup>
+ <rich:column colspan="6">
+ <h:panelGrid columns="5" width="100%" rendered="#{ResourceGroupUIBean.permissions.measure}">
+ <onc:selectCommandButton id="enableSelectedSchedules"
+ name="enableSelectedSchedules"
+ action="#{ListResourceGroupMeasurementScheduleUIBean.enableSelected}"
+ value="ENABLE" target="selectedResourceGroupSchedules"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.measure}" />
+
+
+ <onc:selectCommandButton id="disableSelectedSchedules"
+ name="disableSelectedSchedules"
+ action="#{ListResourceGroupMeasurementScheduleUIBean.disableSelected}"
+ value="DISABLE" target="selectedResourceGroupSchedules"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.measure}" />
+
+ <h:panelGrid columns="3">
+ <h:outputText value="Collection Interval: "/>
+ <onc:duration binding="#{ListResourceGroupMeasurementScheduleUIBean.duration}"
+ optionList="s,m,h"/>
+ <onc:selectCommandButton id="enableAndSetSelectedSchedules"
+ name="enableAndSetSelectedSchedules"
+ action="#{ListResourceGroupMeasurementScheduleUIBean.enableAndSetSelected}"
+ value="SET" target="selectedResourceGroupSchedules"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceGroupUIBean.permissions.measure}"/>
+ </h:panelGrid>
+ <rich:spacer/>
+ <ui:param name="paginationDataTableName" value="resourceGroupSchedulesDataTable"/>
+ <ui:param name="paginationDataModel" value="#{resourceGroupSchedulesDataModel}"/>
+ <ui:param name="paginationPageControl"
+ value="#{PageControl.ResourceGroupMeasurementScheduleList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </h:panelGrid>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+</ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/tables-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/tables-plain.xhtml
new file mode 100644
index 0000000..a58529d
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/monitor/tables-plain.xhtml
@@ -0,0 +1,128 @@
+<ui:composition template="/rhq/group/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:param name="resourceGroupHealthSummaryDataModel"
+ value="#{ResourceGroupMetricsTableUIBean.dataModel}" />
+
+ <ui:include src="/rhq/common/monitor/tables.xhtml" />
+
+ <rich:panel styleClass="BlockContent">
+
+ <f:facet name="header" styleClass="BlockTitle">
+ <a name="Group member Health" />
+ Group Member Health
+ </f:facet>
+
+ <h:form id="groupHealthSummaryForm">
+
+ <!-- On submit make sure these are provided for the context of any new instance of the UI beans -->
+ <input type="hidden" name="groupId"
+ value="#{ResourceGroupUIBean.groupId}" />
+
+ <a4j:keepAlive beanName="ResourceGroupMetricsTableUIBean"/>
+
+ <rich:dataTable id="resourceGroupHealthSummaryDataTable"
+ rows="#{PageControl.ResourceGroupHealthSummary.pageSize}"
+ value="#{resourceGroupHealthSummaryDataModel}"
+ var="healthSummary"
+ columnsWidth="1%"
+ width="100%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <rich:column width="1%">
+ <f:facet name="header">
+ <onc:allSelect target="selectedResources" />
+ </f:facet>
+
+ <onc:select name="selectedResources"
+ value="#{healthSummary.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Resource Name" />
+ </f:facet>
+
+ <h:outputLink
+ value="#{onf:getDefaultResourceTabURL()}">
+ <f:param name="id" value="#{healthSummary.id}" />
+ <h:outputText value="#{healthSummary.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Alerts" />
+ </f:facet>
+
+ <h:outputLink
+ value="/rhq/resource/alert/listAlertHistory-plain.xhtml">
+ <f:param name="id" value="#{healthSummary.id}"/>
+ <f:param name="mode" value="list"/>
+ <h:outputText value="#{healthSummary.alerts}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Availability" />
+ </f:facet>
+
+ <h:graphicImage
+ value="/images/icons/availability_green_16.png" alt="Up"
+ title="Up"
+ rendered="#{healthSummary.availabilityType == 'UP'}" />
+ <h:graphicImage value="/images/icons/availability_red_16.png"
+ alt="Down" title="Down"
+ rendered="#{healthSummary.availabilityType == 'DOWN'}" />
+ <h:graphicImage
+ value="/images/icons/availability_grey_16.png"
+ alt="Unknown" title="Unknown"
+ rendered="#{healthSummary.availabilityType == null}" />
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="4" width="100%">
+
+ <onc:selectCommandButton
+ action="#{ResourceGroupMetricsCompareUIBean.compareSelected}"
+ value="COMPARE METRICS"
+ target="selectedResources" low="2"
+ styleClass="on-pager-button buttonsmall" />
+
+ <ui:param name="paginationDataTableName"
+ value="resourceGroupHealthSummaryDataTable" />
+ <ui:param name="paginationDataModel"
+ value="#{resourceGroupHealthSummaryDataModel}" />
+ <ui:param name="paginationPageControl"
+ value="#{PageControl.ResourceGroupHealthSummary}" />
+ <ui:include
+ src="/rhq/resource/include/pagination-plain.xhtml" />
+
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+ </h:form>
+
+ </rich:panel>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/tables-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/tables-plain.xhtml
new file mode 100644
index 0000000..2b4b0c1
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/tables-plain.xhtml
@@ -0,0 +1,19 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:include src="/rhq/common/monitor/tables.xhtml"/>
+
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit 242e1bbd40af27e6b06027da95b0cf5ee4e2024c
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:02:10 2010 -0400
move the measurement-based navigation rule to the appropriate *-navigiation.xml file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/inventory-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/inventory-navigation.xml
index 9620666..976dd89 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/inventory-navigation.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/inventory-navigation.xml
@@ -109,19 +109,4 @@
</navigation-rule>
- <navigation-rule>
-
- <from-view-id>/rhq/group/monitor/tables.xhtml</from-view-id>
-
- <!-- === compareResourcesGroupMetrics (struts) ========================= -->
-
- <navigation-case>
- <from-action>#{ResourceGroupMetricsCompareUIBean.compareSelected}</from-action>
- <from-outcome>compareResourceGroupMetrics</from-outcome>
- <to-view-id>/resource/common/monitor/Visibility.do?mode=compareMetrics&category=COMPATIBLE&groupId=#{param.groupId}#{ResourceGroupMetricsCompareUIBean.selected}</to-view-id>
- <redirect />
- </navigation-case>
-
- </navigation-rule>
-
</faces-config>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml
index d7ef174..ee342f0 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml
@@ -70,4 +70,19 @@
</navigation-rule>
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/monitor/tables.xhtml</from-view-id>
+
+ <!-- === compareResourcesGroupMetrics (struts) ========================= -->
+
+ <navigation-case>
+ <from-action>#{ResourceGroupMetricsCompareUIBean.compareSelected}</from-action>
+ <from-outcome>compareResourceGroupMetrics</from-outcome>
+ <to-view-id>/resource/common/monitor/Visibility.do?mode=compareMetrics&category=COMPATIBLE&groupId=#{param.groupId}#{ResourceGroupMetricsCompareUIBean.selected}</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ </navigation-rule>
+
</faces-config>
\ No newline at end of file
commit ede4e8b5e26a385afe77864f2d207cfb602d4df5
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:01:35 2010 -0400
prepare "plain" navigation scheme for iframed-facelets for groups
* copy/paste entire XXX-navigation.xml file to XXX-plain-navigation.xml
* search/replace *.xhtml with *-plain.xhtml inside each
* do this for the follow group subsystems:
** alerts, configuration, events, measurement, operations
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/alert-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/alert-plain-navigation.xml
new file mode 100644
index 0000000..854b6a6
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/alert-plain-navigation.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- Group Alert Definition List -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml?groupId=#{param.groupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createNewAlertDefinition</from-outcome>
+ <to-view-id>/alerts/Config.do?groupId=#{param.groupId}&mode=new</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/alert/listGroupAlertDefinitions-plain.xhtml?groupId=#{param.groupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Alert History List -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/alert/listGroupAlertHistory-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>dateFilter</from-outcome>
+ <to-view-id>/rhq/group/alert/listGroupAlertHistory-plain.xhtml?groupId=#{param.groupId}&date=#{param.date}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/alert/listGroupAlertHistory-plain.xhtml?groupId=#{param.groupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/alert/listGroupAlertHistory-plain.xhtml?groupId=#{param.groupId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/configuration-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/configuration-plain-navigation.xml
new file mode 100644
index 0000000..e89ccd6
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/configuration-plain-navigation.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <navigation-rule>
+ <from-view-id>/rhq/group/configuration/editCurrent-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.addNewOpenMapMemberProperty}</from-action>
+ <to-view-id>/rhq/group/configuration/addSimple-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/group/configuration/addSimple-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/group/configuration/editCurrent-plain.xhtml?refresh=rhq_prop</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/configuration/history-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/configuration/history-plain.xhtml?groupId=#{param.groupId}&mode=#{param.mode}&arcuId=#{param.arcuId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/configuration/history-plain.xhtml?groupId=#{param.groupId}&mode=#{param.mode}&arcuId=#{param.arcuId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+
+
+</faces-config>
+
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/events-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/events-plain-navigation.xml
new file mode 100644
index 0000000..447874c
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/events-plain-navigation.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/events/history-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/events/history-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/events/history-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
+
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-plain-navigation.xml
new file mode 100644
index 0000000..d2a81e0
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/measurement-plain-navigation.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- ResourceGroup Measurement Schedules -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/monitor/schedules-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/monitor/schedules-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/monitor/schedules-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Graphs -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/monitor/graphs-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/monitor/graphs-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Tables -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/monitor/tables-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/monitor/tables-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Response -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/monitor/response-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/monitor/response-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/monitor/response-plain.xhtml?groupId=#{param.groupId}&category=COMPATIBLE</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/monitor/tables-plain.xhtml</from-view-id>
+
+ <!-- === compareResourcesGroupMetrics (struts) ========================= -->
+
+ <navigation-case>
+ <from-action>#{ResourceGroupMetricsCompareUIBean.compareSelected}</from-action>
+ <from-outcome>compareResourceGroupMetrics</from-outcome>
+ <to-view-id>/resource/common/monitor/Visibility.do?mode=compareMetrics&category=COMPATIBLE&groupId=#{param.groupId}#{ResourceGroupMetricsCompareUIBean.selected}</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/operation-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/operation-plain-navigation.xml
new file mode 100644
index 0000000..a60e56a
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation-resource-group/operation-plain-navigation.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- New Resource Group Operation Schedule -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/operation/groupOperationScheduleNew-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- schedule an operation for deferred execution -->
+ <from-outcome>viewOperationSchedules</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationSchedules-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- schedule an operation for immediate execution -->
+ <from-outcome>viewOperationHistory</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go back here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationScheduleNew-plain.xhtml?groupId=#{param.groupId}&opId=#{param.opId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationScheduleNew-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Resource Group Operation Schedules -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/operation/groupOperationSchedules-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationSchedules-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationSchedules-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- schedule an operation for immediate execution -->
+ <from-outcome>viewOperationHistory</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/operation/groupOperationScheduleDetails-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- schedule an operation for immediate execution -->
+ <from-outcome>viewOperationHistory</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Resource Group Operation History -->
+ <navigation-rule>
+ <from-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=#{param.groupId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.accessMap}</from-action>
+ <to-view-id>/rhq/group/operation/view-results-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/group/operation/groupOperationHistoryDetails-plain.xhtml?groupId=#{param.groupId}&opId=#{param.opId}&category=#{param.category}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
index 03f80f0..1bcfe79 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
@@ -177,6 +177,12 @@
/WEB-INF/jsf-navigation-resource-group/operation-navigation.xml,
/WEB-INF/jsf-navigation-resource-group/measurement-navigation.xml,
+ /WEB-INF/jsf-navigation-resource-group/alert-plain-navigation.xml,
+ /WEB-INF/jsf-navigation-resource-group/configuration-plain-navigation.xml,
+ /WEB-INF/jsf-navigation-resource-group/events-plain-navigation.xml,
+ /WEB-INF/jsf-navigation-resource-group/operation-plain-navigation.xml,
+ /WEB-INF/jsf-navigation-resource-group/measurement-plain-navigation.xml,
+
/WEB-INF/jsf-navigation-auto-group/events-navigation.xml,
/WEB-INF/jsf-navigation-auto-group/measurement-navigation.xml,
commit 67479a29abb05104a075a8c5e6a4be1aea9135c6
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 02:00:07 2010 -0400
extend the "plain" layout scheme for iframed-facelets for groups
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/main-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/main-plain.xhtml
new file mode 100644
index 0000000..5faaa7c
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/main-plain.xhtml
@@ -0,0 +1,64 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+ <h1>Default Group Content</h1>
+ </ui:define>
+
+ <ui:remove>
+
+<!--
+ <f:param name="groupId" value="#{param.groupId}"/>
+ <f:param name="parentGroupId" value="#{param.parentGroupId}"/>
+ <f:param name="category" value="#{param.category}"/>
+
+ <onc:tab name="Monitor" image="/images/icons/Monitor_grey_16.png" rendered="#{ResourceGroupUIBean.compatible}">
+ <onc:subtab name="Graphs" url="/rhq/group/monitor/graphs.xhtml"/>
+ <onc:subtab name="Tables" url="/rhq/group/monitor/tables.xhtml"/>
+ <onc:subtab name="Schedules" url="/rhq/group/monitor/schedules.xhtml"/>
+ <c:if test="#{GlobalPermissionsUIBean.experimental}">
+ <onc:subtab name="Response" url="/rhq/group/monitor/response.xhtml"/>
+ </c:if>
+ </onc:tab>
+
+ <onc:tab name="Inventory" image="/images/icons/Inventory_grey_16.png">
+ <onc:subtab name="Overview" url="/rhq/group/inventory/view.xhtml" />
+ <c:if test="#{ResourceGroupUIBean.compatible and ResourceGroupUIBean.facets.pluginConfiguration}">
+ <onc:subtab name="Connection" url="/rhq/group/inventory/view-connection.xhtml" />
+ </c:if>
+ </onc:tab>
+
+ <onc:tab name="Alert" image="/images/icons/Alert_grey_16.png"
+ rendered="#{monitorEnabled and ResourceGroupUIBean.compatible}">
+ <onc:subtab name="Definitions" url="/rhq/group/alert/listGroupAlertDefinitions.xhtml" />
+ <onc:subtab name="History" url="/rhq/group/alert/listGroupAlertHistory.xhtml" />
+ </onc:tab>
+
+ <onc:tab name="Configuration" displayName="Configure" image="/images/icons/Configure_grey_16.png"
+ rendered="#{ResourceGroupUIBean.compatible and ResourceGroupUIBean.facets.configuration}">
+ <onc:subtab name="Current" url="/rhq/group/configuration/viewCurrent.xhtml" />
+ <onc:subtab name="History" url="/rhq/group/configuration/history.xhtml" />
+ </onc:tab>
+
+ <onc:tab name="Operations" image="/images/icons/Operation_grey_16.png" rendered="#{ResourceGroupUIBean.compatible and ResourceGroupUIBean.facets.operation}">
+ <onc:subtab name="New" url="/rhq/group/operation/groupOperationScheduleNew.xhtml"/>
+ <onc:subtab name="Schedules" url="/rhq/group/operation/groupOperationSchedules.xhtml"/>
+ <onc:subtab name="History" url="/rhq/group/operation/groupOperationHistory.xhtml"/>
+ </onc:tab>
+
+ <onc:tab name="Events" image="/images/icons/Events_grey_16.png" rendered="#{ResourceGroupUIBean.compatible and ResourceGroupUIBean.facets.event}">
+ <onc:subtab name="History" url="/rhq/group/events/history.xhtml"/>
+ </onc:tab>
+ -->
+ </ui:remove>
+
+</ui:composition>
\ No newline at end of file
commit 84c915b2f0955e7a7693c0c8f5676b0cef53419d
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 01:58:45 2010 -0400
fix group-wise sub-tabs, we only support a subset of resource-wise sub-tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 23da6c5..c7fbb97 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -89,7 +89,7 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
summaryTab.registerSubTabs("Overview", "Timeline");
monitoringTab = new TwoLevelTab("Monitoring", "/images/icons/Monitor_grey_16.png");
- monitoringTab.registerSubTabs("Graphs", "Tables", "Traits", "Availability", "Schedules", "Call Time");
+ monitoringTab.registerSubTabs("Graphs", "Tables", "Schedules", "Call Time");
inventoryTab = new TwoLevelTab("Inventory", "/images/icons/Inventory_grey_16.png");
inventoryTab.registerSubTabs("Overview", "Members", "Connection Settings");
commit 79ffb74e96fafa82561a329341487bf149bb8c15
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 01:57:38 2010 -0400
reformat, cosmetic
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 144442b..23da6c5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -69,7 +69,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
private ResourceGroupTitleBar titleBar;
-
@Override
protected void onDraw() {
super.onDraw();
@@ -120,7 +119,6 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// CoreGUI.addBreadCrumb(getPlace());
}
-
public void onGroupSelected(ResourceGroupComposite groupComposite) {
this.groupComposite = groupComposite;
@@ -181,8 +179,8 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
new ResourceTypeRepository.TypeLoadedCallback() {
public void onTypesLoaded(ResourceType type) {
group.setResourceType(type);
- GWTServiceLookup.getAuthorizationService().getImplicitGroupPermissions(
- group.getId(), new AsyncCallback<Set<Permission>>() {
+ GWTServiceLookup.getAuthorizationService().getImplicitGroupPermissions(group.getId(),
+ new AsyncCallback<Set<Permission>>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError("Failed to load group permissions.", caught);
}
@@ -224,7 +222,7 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
// Configuration tab is only enabled for compatible groups of a type that supports the Configuration facet
// and when the current user has the CONFIGURE_READ permission.
- if (!typeFacets.contains(ResourceTypeFacet.CONFIGURATION) && permissions.isConfigureRead()) {
+ if (typeFacets.contains(ResourceTypeFacet.CONFIGURATION) && permissions.isConfigureRead()) {
topTabSet.enableTab(configurationTab);
} else {
topTabSet.disableTab(configurationTab);
@@ -239,35 +237,32 @@ public class ResourceGroupDetailView extends VLayout implements BookmarkableView
}
-
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
// Switch tabs directly, rather than letting the history framework do it, to avoid redrawing the outer views.
selectTab(tabSelectedEvent.getId(), tabSelectedEvent.getSubTabId());
String tabPath = "/" + tabSelectedEvent.getId() + "/" + tabSelectedEvent.getSubTabId();
String path = "ResourceGroup/" + this.groupComposite.getResourceGroup().getId() + tabPath;
-
+
// But still add an item to the history, specifying false to tell it not to fire an event.
History.newItem(path, false);
}
-
public void renderView(ViewPath viewPath) {
// e.g. #ResourceGroup/10010/Inventory/Overview
- String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
+ String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
String subTabName = (viewPath.viewsLeft() >= 1) ? viewPath.getNext().getPath() : null; // e.g. "Overview"
selectTab(tabName, subTabName);
}
-
public void selectTab(String tabName, String subtabName) {
if (tabName == null) {
tabName = DEFAULT_TAB_NAME;
}
- TwoLevelTab tab = (TwoLevelTab)this.topTabSet.getTabByTitle(tabName);
+ TwoLevelTab tab = (TwoLevelTab) this.topTabSet.getTabByTitle(tabName);
if (tab == null) {
CoreGUI.getErrorHandler().handleError("Invalid tab name: " + tabName);
// TODO: Should we fire a history event here to redirect to a valid bookmark?
- tab = (TwoLevelTab)this.topTabSet.getTabByTitle(DEFAULT_TAB_NAME);
+ tab = (TwoLevelTab) this.topTabSet.getTabByTitle(DEFAULT_TAB_NAME);
}
this.topTabSet.selectTab(tab);
if (subtabName != null) {
commit 1a767576db3dfd69412a858eef0af3dcdd920955
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 01:56:13 2010 -0400
always render call-time iframe-facelet, conditionally render the sub-tab instead
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index ea7b88e..92d74eb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -27,6 +27,8 @@ import com.smartgwt.client.types.Side;
import com.smartgwt.client.widgets.layout.VLayout;
import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.measurement.DataType;
+import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.composite.ResourcePermission;
@@ -204,7 +206,6 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
updateTabStatus();
- topTabSet.markForRedraw();
}
private void updateTabStatus() {
@@ -215,8 +216,8 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
resource.getResourceType().getId(),
EnumSet.of(ResourceTypeRepository.MetadataType.content, ResourceTypeRepository.MetadataType.operations,
ResourceTypeRepository.MetadataType.events,
- ResourceTypeRepository.MetadataType.resourceConfigurationDefinition),
- new ResourceTypeRepository.TypeLoadedCallback() {
+ ResourceTypeRepository.MetadataType.resourceConfigurationDefinition,
+ ResourceTypeRepository.MetadataType.measurements), new ResourceTypeRepository.TypeLoadedCallback() {
public void onTypesLoaded(ResourceType type) {
ResourceDetailView.this.type = type;
@@ -275,10 +276,23 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
topTabSet.enableTab(contentTab);
}
+ // only enable "Call Time" sub-tab for those that implement it
+ monitoringTab.setSubTabEnabled("Call Time", implementsCallTime(type));
+
if (topTabSet.getSelectedTab().getDisabled()) {
topTabSet.selectTab(0);
}
+ topTabSet.markForRedraw();
+ }
+
+ private boolean implementsCallTime(ResourceType type) {
+ for (MeasurementDefinition definition : type.getMetricDefinitions()) {
+ if (definition.getDataType() == DataType.CALLTIME) {
+ return true;
+ }
+ }
+ return false;
}
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml
index aa6576f..3da09e2 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml
@@ -14,20 +14,6 @@
<rich:panel styleClass="BlockContent">
- <c:if test="#{!ResourceUIBean.facets.callTime}">
- <c:if test="#{CallTimeUIBean.context.resourceId != -1}">
- Response Time Metrics are not supported for this resource.
- </c:if>
- <c:if test="#{CallTimeUIBean.context.groupId != -1}">
- Response Time Metrics are not supported for this compatible group.
- </c:if>
- <c:if test="#{CallTimeUIBean.context.parentResourceId != -1 and CallTimeUIBean.context.resourceTypeId != -1}">
- Response Time Metrics are not supported for this auto-group.
- </c:if>
-
- </c:if>
-
- <c:if test="#{ResourceUIBean.facets.callTime}">
<h:form id="callTimeForm">
<a4j:keepAlive beanName="CallTimeUIBean"/>
@@ -165,7 +151,6 @@
</table>
</h:form>
- </c:if>
</rich:panel>
commit a18620eb8f17662207c96e6b757d59f5cce71b9a
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Aug 12 01:55:03 2010 -0400
allow sub-tabs to render as conditionally enabled/disabled buttons
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java
index bc79260..eb66445 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/SubTabLayout.java
@@ -18,6 +18,10 @@
*/
package org.rhq.enterprise.gui.coregui.client.components.tab;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Set;
+
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.event.shared.HandlerRegistration;
import com.smartgwt.client.types.Overflow;
@@ -27,11 +31,8 @@ import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.tab.events.TabSelectedEvent;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
-import java.util.LinkedHashMap;
-
/**
* @author Greg Hinkle
*/
@@ -40,6 +41,7 @@ public class SubTabLayout extends VLayout {
ToolStrip buttonBar;
LinkedHashMap<String, Canvas> subtabs = new LinkedHashMap<String, Canvas>();
+ Set<String> disabledSubTabs = new HashSet<String>();
Canvas currentlyDisplayed;
String currentlySelected;
@@ -59,7 +61,6 @@ public class SubTabLayout extends VLayout {
setMargin(0);
setPadding(0);
-
buttonBar = new ToolStrip();
buttonBar.setBackgroundColor("grey");
buttonBar.setWidth100();
@@ -68,7 +69,6 @@ public class SubTabLayout extends VLayout {
addMember(buttonBar);
-
int i = 0;
for (final String title : subtabs.keySet()) {
@@ -78,18 +78,22 @@ public class SubTabLayout extends VLayout {
currentlySelected = title;
}
-
Button button = new Button(title);
button.setShowRollOver(false);
button.setActionType(SelectionType.RADIO);
button.setRadioGroup("subtabs");
button.setBorder(null);
button.setAutoFit(true);
+ if (disabledSubTabs.contains(title)) {
+ button.disable();
+ } else {
+ button.enable();
+ }
button.setBaseStyle("SubTabButton");
-// button.setStyleName("SubTabButton");
-// button.setStylePrimaryName("SubTabButton");
+ // button.setStyleName("SubTabButton");
+ // button.setStylePrimaryName("SubTabButton");
final Integer index = i++;
@@ -110,6 +114,14 @@ public class SubTabLayout extends VLayout {
selectTab(currentlySelected);
}
+ public void enableSubTab(String title) {
+ disabledSubTabs.remove(title);
+ }
+
+ public void disableSubTab(String title) {
+ disabledSubTabs.add(title);
+ }
+
public void updateSubTab(String title, Canvas canvas) {
subtabs.put(title, canvas);
if (isDrawn() && title.equals(currentlySelected)) {
@@ -121,7 +133,7 @@ public class SubTabLayout extends VLayout {
private void draw(Canvas canvas) {
if (currentlyDisplayed != null) {
currentlyDisplayed.hide();
-// removeMember(currentlyDisplayed);
+ // removeMember(currentlyDisplayed);
}
if (canvas != null) {
if (hasMember(canvas)) {
@@ -137,6 +149,9 @@ public class SubTabLayout extends VLayout {
}
}
+ public void unregisterAllSubTabs() {
+ subtabs.clear();
+ }
public void registerSubTab(String title, Canvas canvas) {
if (currentlySelected == null) {
@@ -149,8 +164,6 @@ public class SubTabLayout extends VLayout {
return currentIndex;
}
-
-
public boolean selectTab(String title) {
boolean foundTab = false;
currentlySelected = title;
@@ -164,16 +177,14 @@ public class SubTabLayout extends VLayout {
i++;
}
-
if (isDrawn()) {
- ((Button)buttonBar.getMember(currentIndex)).select();
+ ((Button) buttonBar.getMember(currentIndex)).select();
draw(subtabs.get(title));
}
-
+
return foundTab;
}
-
// ------- Event support -------
// Done with a separate handler manager from parent class on purpose (compatibility issue)
@@ -184,13 +195,8 @@ public class SubTabLayout extends VLayout {
}
public void fireSubTabSelection() {
- TwoLevelTabSelectedEvent event = new TwoLevelTabSelectedEvent(
- "?",
- currentlySelected,
- -1,
- currentIndex,
- currentlyDisplayed
- );
+ TwoLevelTabSelectedEvent event = new TwoLevelTabSelectedEvent("?", currentlySelected, -1, currentIndex,
+ currentlyDisplayed);
hm.fireEvent(event);
}
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java
index 9f9e5d4..c335dc9 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java
@@ -34,17 +34,24 @@ public class TwoLevelTab extends Tab {
layout = new SubTabLayout();
}
-
public void updateSubTab(String tab, Canvas canvas) {
layout.updateSubTab(tab, canvas);
}
public void registerSubTabs(String... tabs) {
- for (String tab :tabs) {
+ for (String tab : tabs) {
layout.registerSubTab(tab, null);
}
}
+ public void setSubTabEnabled(String tab, boolean enabled) {
+ if (enabled) {
+ layout.enableSubTab(tab);
+ } else {
+ layout.disableSubTab(tab);
+ }
+ }
+
public SubTabLayout getLayout() {
return layout;
}
@@ -54,6 +61,4 @@ public class TwoLevelTab extends Tab {
return layout;
}
-
-
}
13 years, 10 months
[rhq] Branch 'apache-noaugeas' - modules/plugins
by fdrabek
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheConfigurationBase.java | 1
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheConfigurationBaseComponent.java | 12
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheDirectoryDiscoveryComponent.java | 5
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDirectoryDiscoveryComponent.java | 5
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDiscoveryComponent.java | 5
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java | 297 ----------
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerConfiguration.java | 236 +++++++
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java | 28
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java | 6
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java | 28
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java | 12
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ModJKComponent.java | 2
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ModJKDiscoveryComponent.java | 8
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java | 115 +++
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/mapping/load/ApacheToConfigurationBase.java | 1
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/mapping/load/MappingPositionToConfiguration.java | 1
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/AugeasNodeSearch.java | 130 ----
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/OsProcessUtility.java | 1
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/WWWUtils.java | 73 ++
modules/plugins/apache/src/main/java/org/rhq/plugins/www/util/WWWUtils.java | 73 --
20 files changed, 501 insertions(+), 538 deletions(-)
New commits:
commit b6acdd59fb490003f3272fcc8db8618171990e0c
Author: Filip Drabek <fdrabek(a)dhcp-lab-136.englab.brq.redhat.com>
Date: Wed Aug 11 14:18:31 2010 +0200
apache refactoring
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheConfigurationBase.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheConfigurationBase.java
index 2f00aa4..b1adf79 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheConfigurationBase.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheConfigurationBase.java
@@ -7,7 +7,6 @@ import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
public interface ApacheConfigurationBase<T extends ResourceComponent> extends ResourceComponent<T> {
public abstract ApacheDirective getNode(ApacheDirectiveTree tree);
- public void finishConfigurationUpdate(ConfigurationUpdateReport report);
public abstract ApacheDirectiveTree loadParser();
public abstract boolean saveParser(ApacheDirectiveTree tree);
public void conditionalRestart() throws Exception;
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheConfigurationBaseComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheConfigurationBaseComponent.java
index 3148780..7f6326f 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheConfigurationBaseComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheConfigurationBaseComponent.java
@@ -14,7 +14,6 @@ import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
import org.rhq.plugins.apache.parser.mapping.ApacheAugeasMapping;
-import org.rhq.plugins.apache.util.AugeasNodeSearch;
public class ApacheConfigurationBaseComponent implements ApacheConfigurationBase,ConfigurationFacet, DeleteResourceFacet {
@@ -73,10 +72,10 @@ public class ApacheConfigurationBaseComponent implements ApacheConfigurationBase
if (parentNode.saveParser(tree)){
report.setStatus(ConfigurationUpdateStatus.SUCCESS);
log.info("Apache configuration was updated");
- finishConfigurationUpdate(report);
+ conditionalRestart();
}else{
- report.setStatus(ConfigurationUpdateStatus.FAILURE);
log.info("Update of apache configuration failed.");
+ report.setStatus(ConfigurationUpdateStatus.FAILURE);
}
} catch (Exception e) {
@@ -85,15 +84,12 @@ public class ApacheConfigurationBaseComponent implements ApacheConfigurationBase
else
log.error("Saving of configuration failed.", e);
report.setStatus(ConfigurationUpdateStatus.FAILURE);
+ report.setErrorMessageFromThrowable(e);
}
}
- public void finishConfigurationUpdate(ConfigurationUpdateReport report) {
- parentComponent.finishConfigurationUpdate(report);
- }
-
public ApacheDirective getNode(ApacheDirectiveTree tree){
- ApacheDirective node = AugeasNodeSearch.findNodeById(parentComponent.getNode(tree), resourceContext.getResourceKey());
+ ApacheDirective node = tree.findNodeById(parentComponent.getNode(tree), resourceContext.getResourceKey());
return node;
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheDirectoryDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheDirectoryDiscoveryComponent.java
index 44ee365..301e419 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheDirectoryDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheDirectoryDiscoveryComponent.java
@@ -36,7 +36,6 @@ import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
-import org.rhq.plugins.apache.util.AugeasNodeSearch;
import org.rhq.plugins.apache.util.AugeasNodeValueUtil;
@@ -61,14 +60,14 @@ public class ApacheDirectoryDiscoveryComponent implements ResourceDiscoveryCompo
Set<DiscoveredResourceDetails> discoveredResources = new LinkedHashSet<DiscoveredResourceDetails>();
ApacheDirectiveTree tree = context.getParentResourceComponent().loadParser();
ApacheDirective parentNode = context.getParentResourceComponent().getNode(tree);
- List<ApacheDirective> directories = AugeasNodeSearch.searchNode(PARENT_DIRECTIVES, DIRECTORY_DIRECTIVE, parentNode);
+ List<ApacheDirective> directories = tree.searchNode(PARENT_DIRECTIVES, DIRECTORY_DIRECTIVE, parentNode);
ResourceType resourceType = context.getResourceType();
for (ApacheDirective node : directories) {
Configuration pluginConfiguration = new Configuration();
- String ifmoduleParams = AugeasNodeSearch.getNodeKey(node, parentNode);
+ String ifmoduleParams = tree.getNodeKey(node, parentNode);
List<String> params = node.getValues();
String directoryParam;
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDirectoryDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDirectoryDiscoveryComponent.java
index efa1f91..409d405 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDirectoryDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDirectoryDiscoveryComponent.java
@@ -33,7 +33,6 @@ import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
-import org.rhq.plugins.apache.util.AugeasNodeSearch;
public class ApacheIfModuleDirectoryDiscoveryComponent implements ResourceDiscoveryComponent<ApacheConfigurationBaseComponent> {
@@ -50,7 +49,7 @@ public class ApacheIfModuleDirectoryDiscoveryComponent implements ResourceDiscov
ApacheDirectiveTree tree = directory.loadParser();
ApacheDirective parentNode = directory.getNode(tree);
- List<ApacheDirective> ifModuleNodes = AugeasNodeSearch.searchNode(parentRes, IFMODULE_NODE_NAME, parentNode);
+ List<ApacheDirective> ifModuleNodes = tree.searchNode(parentRes, IFMODULE_NODE_NAME, parentNode);
ResourceType resourceType = context.getResourceType();
@@ -58,7 +57,7 @@ public class ApacheIfModuleDirectoryDiscoveryComponent implements ResourceDiscov
for (ApacheDirective node : ifModuleNodes) {
- String resourceKey = AugeasNodeSearch.getNodeKey(node,parentNode);
+ String resourceKey = tree.getNodeKey(node,parentNode);
String [] paramArray = resourceKey.split("\\|");
String resourceName = paramArray[1];
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDiscoveryComponent.java
index b2de482..fdcc225 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDiscoveryComponent.java
@@ -33,7 +33,6 @@ import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
-import org.rhq.plugins.apache.util.AugeasNodeSearch;
public class ApacheIfModuleDiscoveryComponent implements ResourceDiscoveryComponent<ApacheConfigurationBase> {
@@ -50,13 +49,13 @@ public class ApacheIfModuleDiscoveryComponent implements ResourceDiscoveryCompo
ApacheDirectiveTree tree = parentComponent.loadParser();
ApacheDirective parentNode = parentComponent.getNode(tree);
- List<ApacheDirective> ifModuleNodes = AugeasNodeSearch.searchNode(parentRes, IFMODULE_NODE_NAME, parentNode);
+ List<ApacheDirective> ifModuleNodes = tree.searchNode(parentRes, IFMODULE_NODE_NAME, parentNode);
ResourceType resourceType = context.getResourceType();
for (ApacheDirective node : ifModuleNodes) {
- String resourceKey = AugeasNodeSearch.getNodeKey(node,parentNode);
+ String resourceKey = tree.getNodeKey(node,parentNode);
String [] paramArray = resourceKey.split("\\|");
String resourceName = paramArray[1];
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
index 44d6f11..535b67f 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
@@ -20,7 +20,6 @@ package org.rhq.plugins.apache;
import java.io.File;
import java.io.IOException;
-import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
@@ -56,25 +55,19 @@ import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.core.system.OperatingSystemType;
-import org.rhq.core.system.SystemInfo;
-import org.rhq.plugins.apache.parser.ApacheConfigReader;
import org.rhq.plugins.apache.parser.ApacheConfigWriter;
import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
-import org.rhq.plugins.apache.parser.ApacheParser;
-import org.rhq.plugins.apache.parser.ApacheParserImpl;
import org.rhq.plugins.apache.parser.mapping.ApacheAugeasMapping;
import org.rhq.plugins.apache.util.ApacheBinaryInfo;
-import org.rhq.plugins.apache.util.ConfigurationTimestamp;
import org.rhq.plugins.apache.util.Glob;
import org.rhq.plugins.apache.util.HttpdAddressUtility;
+import org.rhq.plugins.apache.util.WWWUtils;
import org.rhq.plugins.platform.PlatformComponent;
import org.rhq.plugins.www.snmp.SNMPClient;
import org.rhq.plugins.www.snmp.SNMPException;
import org.rhq.plugins.www.snmp.SNMPSession;
import org.rhq.plugins.www.snmp.SNMPValue;
-import org.rhq.plugins.www.util.WWWUtils;
/**
* The resource component for Apache 2.x servers.
@@ -85,47 +78,24 @@ import org.rhq.plugins.www.util.WWWUtils;
public class ApacheServerComponent implements ApacheConfigurationBase<PlatformComponent>,MeasurementFacet, OperationFacet,
ConfigurationFacet, CreateChildResourceFacet {
- public static final String CONFIGURATION_NOT_SUPPORTED_ERROR_MESSAGE = "Configuration is supported only for Apache version 2 and up using Augeas. You either have an old version of Apache or Augeas is not installed.";
-
private final Log log = LogFactory.getLog(this.getClass());
-
- public static final String PLUGIN_CONFIG_PROP_SERVER_ROOT = "serverRoot";
- public static final String PLUGIN_CONFIG_PROP_EXECUTABLE_PATH = "executablePath";
- public static final String PLUGIN_CONFIG_PROP_CONTROL_SCRIPT_PATH = "controlScriptPath";
- public static final String PLUGIN_CONFIG_PROP_URL = "url";
- public static final String PLUGIN_CONFIG_PROP_HTTPD_CONF = "configFile";
-
public static final String PLUGIN_CONFIG_PROP_SNMP_AGENT_HOST = "snmpAgentHost";
public static final String PLUGIN_CONFIG_PROP_SNMP_AGENT_PORT = "snmpAgentPort";
public static final String PLUGIN_CONFIG_PROP_SNMP_AGENT_COMMUNITY = "snmpAgentCommunity";
-
public static final String PLUGIN_CONFIG_PROP_ERROR_LOG_FILE_PATH = "errorLogFilePath";
public static final String PLUGIN_CONFIG_PROP_ERROR_LOG_EVENTS_ENABLED = "errorLogEventsEnabled";
public static final String PLUGIN_CONFIG_PROP_ERROR_LOG_MINIMUM_SEVERITY = "errorLogMinimumSeverity";
public static final String PLUGIN_CONFIG_PROP_ERROR_LOG_INCLUDES_PATTERN = "errorLogIncludesPattern";
public static final String PLUGIN_CONFIG_PROP_VHOST_FILES_MASK = "vhostFilesMask";
public static final String PLUGIN_CONFIG_PROP_VHOST_CREATION_POLICY = "vhostCreationPolicy";
-
public static final String PLUGIN_CONFIG_PROP_RESTART_AFTER_CONFIG_UPDATE = "restartAfterConfigurationUpdate";
-
public static final String PLUGIN_CONFIG_VHOST_IN_SINGLE_FILE_PROP_VALUE = "single-file";
- public static final String PLUGIN_CONFIG_VHOST_PER_FILE_PROP_VALUE = "vhost-per-file";
-
+ public static final String PLUGIN_CONFIG_VHOST_PER_FILE_PROP_VALUE = "vhost-per-file";
public static final String AUXILIARY_INDEX_PROP = "_index";
-
public static final String SERVER_BUILT_TRAIT = "serverBuilt";
- public static final String AUGEAS_ENABLED = "augeasEnabled";
-
- public static final String DEFAULT_EXECUTABLE_PATH = "bin" + File.separator
- + ((File.separatorChar == '/') ? "httpd" : "Apache.exe");
-
public static final String DEFAULT_ERROR_LOG_PATH = "logs" + File.separator
+ ((File.separatorChar == '/') ? "error_log" : "error.log");
-
private static final String ERROR_LOG_ENTRY_EVENT_TYPE = "errorLogEntry";
-
- private static final String[] CONTROL_SCRIPT_PATHS = { "bin/apachectl", "sbin/apachectl", "bin/apachectl2",
- "sbin/apachectl2" };
private ResourceContext<PlatformComponent> resourceContext;
private EventContext eventContext;
@@ -133,7 +103,7 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
private URL url;
private ApacheBinaryInfo binaryInfo;
private long availPingTime = -1;
-
+ private ApacheServerConfiguration config;
/**
* Delegate instance for handling all calls to invoke operations on this component.
*/
@@ -144,10 +114,10 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
this.resourceContext = resourceContext;
this.eventContext = resourceContext.getEventContext();
this.snmpClient = new SNMPClient();
-
+ this.config = new ApacheServerConfiguration(resourceContext);
+
try {
boolean configured = false;
-
SNMPSession snmpSession = getSNMPSession();
if (!snmpSession.ping()) {
log
@@ -162,32 +132,14 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
configured = true;
}
- Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
- String url = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_URL, null);
- if (url != null) {
- try {
- this.url = new URL(url);
- if (this.url.getPort() == 0) {
- log
- .error("The 'url' connection property is invalid - 0 is not a valid port; please change the value to the "
- + "port the \"main\" Apache server is listening on. NOTE: If the 'url' property was set this way "
- + "after autodiscovery, you most likely did not include the port in the ServerName directive for "
- + "the \"main\" Apache server in httpd.conf.");
- } else {
- configured = true;
- }
- } catch (MalformedURLException e) {
- throw new InvalidPluginConfigurationException("Value of '" + PLUGIN_CONFIG_PROP_URL
- + "' connection property ('" + url + "') is not a valid URL.");
- }
- }
+ this.url = config.getUrl();
- if (!configured) {
+ if (!configured && url ==null) {
throw new InvalidPluginConfigurationException(
"Neither SNMP nor an URL for checking availability has been configured");
}
- File executablePath = getExecutablePath();
+ File executablePath = config.getExecutablePath();
try {
this.binaryInfo = ApacheBinaryInfo.getInfo(executablePath.getPath(), this.resourceContext
.getSystemInformation());
@@ -316,13 +268,14 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
log.info("Apache configuration was updated");
report.setStatus(ConfigurationUpdateStatus.SUCCESS);
- finishConfigurationUpdate(report);
+ conditionalRestart();
} catch (Exception e) {
if (tree != null)
log.error("Augeas failed to save configuration ");
else
log.error("Augeas failed to save configuration", e);
report.setStatus(ConfigurationUpdateStatus.FAILURE);
+ report.setErrorMessageFromThrowable(e);
}
}
@@ -349,7 +302,7 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
try{
tree = loadParser();
- addr = getAddressUtility().getVirtualHostSampleAddress(tree, vhostDefs[0], serverName);
+ addr = config.getAddressUtility().getVirtualHostSampleAddress(tree, vhostDefs[0], serverName);
} catch (Exception e) {
report.setStatus(CreateResourceStatus.FAILURE);
report.setException(e);
@@ -368,18 +321,14 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
//fill in the plugin config
String url = "http://" + addr.host + ":" + addr.port + "/";
- vhostPluginConfig.put(new PropertySimple(ApacheVirtualHostServiceComponent.URL_CONFIG_PROP, url));
-
- //determine the sequence number of the new vhost
- List<ApacheDirective> existingVhosts = tree.search("<VirtualHost");
- int seq = existingVhosts.size() + 1;
-
+ vhostPluginConfig.put(new PropertySimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_URL, url));
+
Configuration pluginConfig = resourceContext.getPluginConfiguration();
String creationType = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_VHOST_CREATION_POLICY,
PLUGIN_CONFIG_VHOST_PER_FILE_PROP_VALUE);
ApacheDirective vhost = null;
- String vhostFile = getHttpdConfFile().getAbsolutePath();
+ String vhostFile = config.getHttpdConfFile().getAbsolutePath();
if (PLUGIN_CONFIG_VHOST_IN_SINGLE_FILE_PROP_VALUE.equals(creationType)) {
vhost = tree.createNode(tree.getRootNode(), "<VirtualHost");
@@ -400,7 +349,7 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
//check if the the file is already Includede
boolean isIncluded = false;
for(String glob : tree.getGlobs()) {
- if (Glob.matches(getServerRoot(), glob, vhostFileFile)) {
+ if (Glob.matches(config.getServerRoot(), glob, vhostFileFile)) {
isIncluded=true;
break;
}
@@ -432,7 +381,7 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
saveParser(tree);
report.setStatus(CreateResourceStatus.SUCCESS);
- finishChildResourceCreate(report);
+ conditionalRestart();
} catch (Exception e) {
report.setStatus(CreateResourceStatus.FAILURE);
report.setException(e);
@@ -469,167 +418,6 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
return snmpSession;
}
-
- /**
- * Return the absolute path of this Apache server's server root (e.g. "C:\Program Files\Apache Group\Apache2").
- *
- * @return the absolute path of this Apache server's server root (e.g. "C:\Program Files\Apache Group\Apache2")
- */
- @NotNull
- public File getServerRoot() {
- Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
- String serverRoot = getRequiredPropertyValue(pluginConfig, PLUGIN_CONFIG_PROP_SERVER_ROOT);
- return new File(serverRoot);
- }
-
- /**
- * Return the absolute path of this Apache server's executable (e.g. "C:\Program Files\Apache
- * Group\Apache2\bin\Apache.exe").
- *
- * @return the absolute path of this Apache server's executable (e.g. "C:\Program Files\Apache
- * Group\Apache2\bin\Apache.exe")
- */
- @NotNull
- public File getExecutablePath() {
- Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
- String executablePath = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_EXECUTABLE_PATH, null);
- File executableFile;
- if (executablePath != null) {
- executableFile = resolvePathRelativeToServerRoot(executablePath);
- } else {
- List<ApacheDirective> serverRootDirectives = loadParser().getRootNode().getChildByName("ServerRoot");
- String serverRoot = serverRootDirectives.get(0).getValues().get(0);
-
- SystemInfo systemInfo = this.resourceContext.getSystemInformation();
- if (systemInfo.getOperatingSystemType() != OperatingSystemType.WINDOWS) // UNIX
- {
- // Try some combinations in turn
- executableFile = new File(serverRoot, "bin/httpd");
- if (!executableFile.exists()) {
- executableFile = new File(serverRoot, "bin/apache2");
- }
- if (!executableFile.exists()) {
- executableFile = new File(serverRoot, "bin/apache");
- }
- } else // Windows
- {
- executableFile = new File(serverRoot, "bin/Apache.exe");
- }
- }
-
- return executableFile;
- }
-
- /**
- * Returns the httpd.conf file
- * @return A File object that represents the httpd.conf file or null in case of error
- */
- public File getHttpdConfFile() {
- Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
- PropertySimple prop = pluginConfig.getSimple(PLUGIN_CONFIG_PROP_HTTPD_CONF);
- if (prop == null || prop.getStringValue() == null)
- return null;
- return resolvePathRelativeToServerRoot(pluginConfig, prop.getStringValue());
- }
-
- /**
- * Return the absolute path of this Apache server's control script (e.g. "C:\Program Files\Apache
- * Group\Apache2\bin\Apache.exe").
- *
- * On Unix we need to try various locations, as some unixes have bin/ conf/ .. all within one root
- * and on others those are separated.
- *
- * @return the absolute path of this Apache server's control script (e.g. "C:\Program Files\Apache
- * Group\Apache2\bin\Apache.exe")
- */
- @NotNull
- public File getControlScriptPath() {
- Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
- String controlScriptPath = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_CONTROL_SCRIPT_PATH, null);
- File controlScriptFile = null;
- if (controlScriptPath != null) {
- controlScriptFile = resolvePathRelativeToServerRoot(controlScriptPath);
- } else {
- SystemInfo systemInfo = this.resourceContext.getSystemInformation();
- if (systemInfo.getOperatingSystemType() != OperatingSystemType.WINDOWS) // UNIX
- {
- boolean found = false;
- // First try server root as base
- List<ApacheDirective> serverRootDirectives = loadParser().getRootNode().getChildByName("ServerRoot");
- String serverRoot = serverRootDirectives.get(0).getValues().get(0);
-
- for (String path : CONTROL_SCRIPT_PATHS) {
- controlScriptFile = new File(serverRoot, path);
- if (controlScriptFile.exists()) {
- found = true;
- break;
- }
- }
- if (!found) {
- String executablePath = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_EXECUTABLE_PATH, null);
- if (executablePath != null) {
- // this is now somethig like /usr/sbin/httpd .. trim off the last 2 parts
- int i = executablePath.lastIndexOf('/');
- executablePath = executablePath.substring(0, i);
- i = executablePath.lastIndexOf('/');
- executablePath = executablePath.substring(0, i);
- for (String path : CONTROL_SCRIPT_PATHS) {
- controlScriptFile = new File(executablePath, path);
- if (controlScriptFile.exists()) {
- found = true;
- break;
- }
- }
- }
- }
- if (!found) {
- controlScriptFile = getExecutablePath(); // fall back to the httpd binary
- }
- } else // Windows
- {
- controlScriptFile = getExecutablePath();
- }
- }
-
- return controlScriptFile;
- }
-
- @NotNull
- public ConfigurationTimestamp getConfigurationTimestamp() {
- return new ConfigurationTimestamp(loadParser().getIncludedFiles());
- }
-
- /**
- * This method is supposed to be called from {@link #updateResourceConfiguration(ConfigurationUpdateReport)}
- * of this resource and any child resources.
- *
- * Based on the plugin configuration of this resource, the Apache instance is either restarted or left as is.
- *
- * @param report the report is updated with the error message and status is set to failure if the restart fails.
- */
- public void finishConfigurationUpdate(ConfigurationUpdateReport report) {
- try {
- conditionalRestart();
- } catch (Exception e) {
- report.setStatus(ConfigurationUpdateStatus.FAILURE);
- report.setErrorMessageFromThrowable(e);
- }
- }
-
- /**
- * This method is akin to {@link #finishConfigurationUpdate(ConfigurationUpdateReport)} but should
- * be used in the {@link #createResource(CreateResourceReport)} method.
- *
- * @param report the report is updated with the error message and status is set to failure if the restart fails.
- */
- public void finishChildResourceCreate(CreateResourceReport report) {
- try {
- conditionalRestart();
- } catch (Exception e) {
- report.setStatus(CreateResourceStatus.FAILURE);
- report.setException(e);
- }
- }
/**
* Conditionally restarts the server based on the settings in the plugin configuration of the server.
@@ -677,22 +465,6 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
}
}
- @NotNull
- private File resolvePathRelativeToServerRoot(@NotNull String path) {
- return resolvePathRelativeToServerRoot(this.resourceContext.getPluginConfiguration(), path);
- }
-
- //TODO this needs to go...
- @NotNull
- static File resolvePathRelativeToServerRoot(Configuration pluginConfig, @NotNull String path) {
- File file = new File(path);
- if (!file.isAbsolute()) {
- String serverRoot = getRequiredPropertyValue(pluginConfig, PLUGIN_CONFIG_PROP_SERVER_ROOT);
- file = new File(serverRoot, path);
- }
-
- return file;
- }
@NotNull
static String getRequiredPropertyValue(@NotNull Configuration config, @NotNull String propName) {
@@ -710,7 +482,7 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
Boolean enabled = Boolean.valueOf(pluginConfig
.getSimpleValue(PLUGIN_CONFIG_PROP_ERROR_LOG_EVENTS_ENABLED, null));
if (enabled) {
- File errorLogFile = resolvePathRelativeToServerRoot(pluginConfig.getSimpleValue(
+ File errorLogFile = config.resolvePathRelativeToServerRoot(pluginConfig,pluginConfig.getSimpleValue(
PLUGIN_CONFIG_PROP_ERROR_LOG_FILE_PATH, DEFAULT_ERROR_LOG_PATH));
ApacheErrorLogEntryProcessor processor = new ApacheErrorLogEntryProcessor(ERROR_LOG_ENTRY_EVENT_TYPE,
errorLogFile);
@@ -739,47 +511,28 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
private void stopEventPollers() {
Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
- File errorLogFile = resolvePathRelativeToServerRoot(pluginConfig.getSimpleValue(
+ File errorLogFile = config.resolvePathRelativeToServerRoot(pluginConfig,pluginConfig.getSimpleValue(
PLUGIN_CONFIG_PROP_ERROR_LOG_FILE_PATH, DEFAULT_ERROR_LOG_PATH));
this.eventContext.unregisterEventPoller(ERROR_LOG_ENTRY_EVENT_TYPE, errorLogFile.getPath());
}
- public HttpdAddressUtility getAddressUtility() {
- String version = resourceContext.getVersion();
- return HttpdAddressUtility.get(version);
- }
private String getNewVhostFileName(HttpdAddressUtility.Address address, String mask) {
String filename = address.host + "_" + address.port;
String fullPath = mask.replace("*", filename);
- File file = getFileRelativeToServerRoot(fullPath);
+ File file = config.getFileRelativeToServerRoot(fullPath);
int i = 1;
while (file.exists()) {
filename = address.host + "_" + address.port + "-" + (i++);
fullPath = mask.replace("*", filename);
- file = getFileRelativeToServerRoot(fullPath);
+ file = config.getFileRelativeToServerRoot(fullPath);
}
return file.getAbsolutePath();
}
- private File getFileRelativeToServerRoot(String path) {
- File f = new File(path);
- if (f.isAbsolute()) {
- return f;
- } else {
- return new File(getServerRoot(), path);
- }
- }
-
- public ApacheDirectiveTree loadParser() {
- ApacheDirectiveTree tree = new ApacheDirectiveTree();
- ApacheParser parser = new ApacheParserImpl(tree,getServerRoot().getAbsolutePath());
- ApacheConfigReader.buildTree(getHttpdConfFile().getAbsolutePath(), parser);
- return tree;
- }
-
+
public boolean saveParser(ApacheDirectiveTree tree){
ApacheConfigWriter writer = new ApacheConfigWriter(tree);
return writer.save(tree.getRootNode());
@@ -789,5 +542,13 @@ public class ApacheServerComponent implements ApacheConfigurationBase<PlatformCo
public ApacheDirective getNode(ApacheDirectiveTree tree) {
return tree.getRootNode();
}
+
+ @Override
+ public ApacheDirectiveTree loadParser() {
+ return config.loadParser();
+ }
+ public ApacheServerConfiguration getServerConfiguration(){
+ return config;
+ }
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerConfiguration.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerConfiguration.java
new file mode 100644
index 0000000..e79e01b
--- /dev/null
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerConfiguration.java
@@ -0,0 +1,236 @@
+package org.rhq.plugins.apache;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jetbrains.annotations.NotNull;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.system.OperatingSystemType;
+import org.rhq.core.system.SystemInfo;
+import org.rhq.plugins.apache.parser.ApacheConfigReader;
+import org.rhq.plugins.apache.parser.ApacheDirective;
+import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
+import org.rhq.plugins.apache.parser.ApacheParser;
+import org.rhq.plugins.apache.parser.ApacheParserImpl;
+import org.rhq.plugins.apache.util.HttpdAddressUtility;
+import org.rhq.plugins.platform.PlatformComponent;
+
+public class ApacheServerConfiguration {
+
+ private final Log log = LogFactory.getLog(this.getClass());
+ public static final String PLUGIN_CONFIG_PROP_SERVER_ROOT = "serverRoot";
+ public static final String PLUGIN_CONFIG_PROP_EXECUTABLE_PATH = "executablePath";
+ public static final String PLUGIN_CONFIG_PROP_CONTROL_SCRIPT_PATH = "controlScriptPath";
+ public static final String PLUGIN_CONFIG_PROP_URL = "url";
+ public static final String PLUGIN_CONFIG_PROP_HTTPD_CONF = "configFile";
+ public static final String AUXILIARY_INDEX_PROP = "_index";
+ public static final String DEFAULT_EXECUTABLE_PATH = "bin" + File.separator
+ + ((File.separatorChar == '/') ? "httpd" : "Apache.exe");
+ public static final String DEFAULT_ERROR_LOG_PATH = "logs" + File.separator
+ + ((File.separatorChar == '/') ? "error_log" : "error.log");
+ private static final String[] CONTROL_SCRIPT_PATHS = { "bin/apachectl", "sbin/apachectl", "bin/apachectl2",
+ "sbin/apachectl2" };
+
+ private ResourceContext<PlatformComponent> resourceContext;
+
+ public ApacheServerConfiguration(ResourceContext<PlatformComponent> context){
+ this.resourceContext = context;
+ }
+ /**
+ * Return the absolute path of this Apache server's executable (e.g. "C:\Program Files\Apache
+ * Group\Apache2\bin\Apache.exe").
+ *
+ * @return the absolute path of this Apache server's executable (e.g. "C:\Program Files\Apache
+ * Group\Apache2\bin\Apache.exe")
+ */
+ @NotNull
+ public File getExecutablePath() {
+ Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
+ String executablePath = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_EXECUTABLE_PATH, null);
+ File executableFile;
+ if (executablePath != null) {
+ executableFile = resolvePathRelativeToServerRoot(pluginConfig,executablePath);
+ } else {
+ List<ApacheDirective> serverRootDirectives = loadParser().getRootNode().getChildByName("ServerRoot");
+ String serverRoot = serverRootDirectives.get(0).getValues().get(0);
+
+ SystemInfo systemInfo = this.resourceContext.getSystemInformation();
+ if (systemInfo.getOperatingSystemType() != OperatingSystemType.WINDOWS) // UNIX
+ {
+ // Try some combinations in turn
+ executableFile = new File(serverRoot, "bin/httpd");
+ if (!executableFile.exists()) {
+ executableFile = new File(serverRoot, "bin/apache2");
+ }
+ if (!executableFile.exists()) {
+ executableFile = new File(serverRoot, "bin/apache");
+ }
+ } else // Windows
+ {
+ executableFile = new File(serverRoot, "bin/Apache.exe");
+ }
+ }
+
+ return executableFile;
+ }
+
+ /**
+ * Return the absolute path of this Apache server's control script (e.g. "C:\Program Files\Apache
+ * Group\Apache2\bin\Apache.exe").
+ *
+ * On Unix we need to try various locations, as some unixes have bin/ conf/ .. all within one root
+ * and on others those are separated.
+ *
+ * @return the absolute path of this Apache server's control script (e.g. "C:\Program Files\Apache
+ * Group\Apache2\bin\Apache.exe")
+ */
+ @NotNull
+ public File getControlScriptPath() {
+ Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
+ String controlScriptPath = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_CONTROL_SCRIPT_PATH, null);
+ File controlScriptFile = null;
+ if (controlScriptPath != null) {
+ controlScriptFile = resolvePathRelativeToServerRoot(pluginConfig,controlScriptPath);
+ } else {
+ SystemInfo systemInfo = this.resourceContext.getSystemInformation();
+ if (systemInfo.getOperatingSystemType() != OperatingSystemType.WINDOWS) // UNIX
+ {
+ boolean found = false;
+ // First try server root as base
+ List<ApacheDirective> serverRootDirectives = loadParser().getRootNode().getChildByName("ServerRoot");
+ String serverRoot = serverRootDirectives.get(0).getValues().get(0);
+
+ for (String path : CONTROL_SCRIPT_PATHS) {
+ controlScriptFile = new File(serverRoot, path);
+ if (controlScriptFile.exists()) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ String executablePath = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_EXECUTABLE_PATH, null);
+ if (executablePath != null) {
+ // this is now somethig like /usr/sbin/httpd .. trim off the last 2 parts
+ int i = executablePath.lastIndexOf('/');
+ executablePath = executablePath.substring(0, i);
+ i = executablePath.lastIndexOf('/');
+ executablePath = executablePath.substring(0, i);
+ for (String path : CONTROL_SCRIPT_PATHS) {
+ controlScriptFile = new File(executablePath, path);
+ if (controlScriptFile.exists()) {
+ found = true;
+ break;
+ }
+ }
+ }
+ }
+ if (!found) {
+ controlScriptFile = getExecutablePath(); // fall back to the httpd binary
+ }
+ } else // Windows
+ {
+ controlScriptFile = getExecutablePath();
+ }
+ }
+
+ return controlScriptFile;
+ }
+
+ //TODO this needs to go...
+ @NotNull
+ static File resolvePathRelativeToServerRoot(Configuration pluginConfig, @NotNull String path) {
+ File file = new File(path);
+ if (!file.isAbsolute()) {
+ String serverRoot = getRequiredPropertyValue(pluginConfig, PLUGIN_CONFIG_PROP_SERVER_ROOT);
+ file = new File(serverRoot, path);
+ }
+
+ return file;
+ }
+
+ @NotNull
+ static String getRequiredPropertyValue(@NotNull Configuration config, @NotNull String propName) {
+ String propValue = config.getSimpleValue(propName, null);
+ if (propValue == null) {
+ // Something's not right - neither autodiscovery, nor the config edit GUI, should ever allow this.
+ throw new IllegalStateException("Required property '" + propName + "' is not set.");
+ }
+
+ return propValue;
+ }
+
+ public HttpdAddressUtility getAddressUtility() {
+ String version = resourceContext.getVersion();
+ return HttpdAddressUtility.get(version);
+ }
+
+ public File getFileRelativeToServerRoot(String path) {
+ File f = new File(path);
+ if (f.isAbsolute()) {
+ return f;
+ } else {
+ return new File(getServerRoot(), path);
+ }
+ }
+
+ public ApacheDirectiveTree loadParser() {
+ ApacheDirectiveTree tree = new ApacheDirectiveTree();
+ ApacheParser parser = new ApacheParserImpl(tree,getServerRoot().getAbsolutePath());
+ ApacheConfigReader.buildTree(getHttpdConfFile().getAbsolutePath(), parser);
+ return tree;
+ }
+
+ /**
+ * Returns the httpd.conf file
+ * @return A File object that represents the httpd.conf file or null in case of error
+ */
+ public File getHttpdConfFile() {
+ Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
+ PropertySimple prop = pluginConfig.getSimple(PLUGIN_CONFIG_PROP_HTTPD_CONF);
+ if (prop == null || prop.getStringValue() == null)
+ return null;
+ return resolvePathRelativeToServerRoot(pluginConfig, prop.getStringValue());
+ }
+
+ /**
+ * Return the absolute path of this Apache server's server root (e.g. "C:\Program Files\Apache Group\Apache2").
+ *
+ * @return the absolute path of this Apache server's server root (e.g. "C:\Program Files\Apache Group\Apache2")
+ */
+ @NotNull
+ public File getServerRoot() {
+ Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
+ String serverRoot = getRequiredPropertyValue(pluginConfig, PLUGIN_CONFIG_PROP_SERVER_ROOT);
+ return new File(serverRoot);
+ }
+
+ public URL getUrl(){
+ Configuration pluginConfig = resourceContext.getPluginConfiguration();
+ String urlStr = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PROP_URL, null);
+ if (urlStr != null) {
+ try {
+ URL url = new URL(urlStr);
+ if (url.getPort() == 0) {
+ log
+ .error("The 'url' connection property is invalid - 0 is not a valid port; please change the value to the "
+ + "port the \"main\" Apache server is listening on. NOTE: If the 'url' property was set this way "
+ + "after autodiscovery, you most likely did not include the port in the ServerName directive for "
+ + "the \"main\" Apache server in httpd.conf.");
+ } else {
+ return url;
+ }
+ } catch (MalformedURLException e) {
+ throw new InvalidPluginConfigurationException("Value of '" + PLUGIN_CONFIG_PROP_URL
+ + "' connection property ('" + urlStr + "') is not a valid URL.");
+ }
+ }
+ return null;
+ }
+}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
index 5d8548e..e6321cb 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
@@ -110,14 +110,14 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
Configuration pluginConfig = discoveryContext.getDefaultPluginConfiguration();
PropertySimple executablePathProp = new PropertySimple(
- ApacheServerComponent.PLUGIN_CONFIG_PROP_EXECUTABLE_PATH, executablePath);
+ ApacheServerConfiguration.PLUGIN_CONFIG_PROP_EXECUTABLE_PATH, executablePath);
pluginConfig.put(executablePathProp);
PropertySimple serverRootProp = new PropertySimple(
- ApacheServerComponent.PLUGIN_CONFIG_PROP_SERVER_ROOT, serverRoot);
+ ApacheServerConfiguration.PLUGIN_CONFIG_PROP_SERVER_ROOT, serverRoot);
pluginConfig.put(serverRootProp);
- PropertySimple configFile = new PropertySimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_HTTPD_CONF,
+ PropertySimple configFile = new PropertySimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_HTTPD_CONF,
serverConfigFile);
pluginConfig.put(configFile);
@@ -140,7 +140,7 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
vhostsGlobInclude = scanForGlobInclude(serverConfig);
if (serverUrl != null) {
- Property urlProp = new PropertySimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_URL, serverUrl);
+ Property urlProp = new PropertySimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_URL, serverUrl);
pluginConfig.put(urlProp);
}
@@ -168,9 +168,9 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
validateServerRootAndServerConfigFile(pluginConfig);
String executablePath = pluginConfig
- .getSimpleValue(ApacheServerComponent.PLUGIN_CONFIG_PROP_EXECUTABLE_PATH,
- ApacheServerComponent.DEFAULT_EXECUTABLE_PATH);
- String absoluteExecutablePath = ApacheServerComponent.resolvePathRelativeToServerRoot(pluginConfig,
+ .getSimpleValue(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_EXECUTABLE_PATH,
+ ApacheServerConfiguration.DEFAULT_EXECUTABLE_PATH);
+ String absoluteExecutablePath = ApacheServerConfiguration.resolvePathRelativeToServerRoot(pluginConfig,
executablePath).getPath();
ApacheBinaryInfo binaryInfo;
try {
@@ -178,7 +178,7 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
} catch (Exception e) {
throw new InvalidPluginConfigurationException("'" + absoluteExecutablePath
+ "' is not a valid Apache executable (" + e + "). Please make sure the '"
- + ApacheServerComponent.PLUGIN_CONFIG_PROP_EXECUTABLE_PATH
+ + ApacheServerConfiguration.PLUGIN_CONFIG_PROP_EXECUTABLE_PATH
+ "' connection property is set correctly.");
}
@@ -205,9 +205,9 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
private DiscoveredResourceDetails createResourceDetails(ResourceDiscoveryContext<PlatformComponent> discoveryContext,
Configuration pluginConfig, ProcessInfo processInfo, ApacheBinaryInfo binaryInfo) throws Exception {
- String httpdConf = pluginConfig.getSimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_HTTPD_CONF).getStringValue();
+ String httpdConf = pluginConfig.getSimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_HTTPD_CONF).getStringValue();
String version = binaryInfo.getVersion();
- String serverUrl = pluginConfig.getSimpleValue(ApacheServerComponent.PLUGIN_CONFIG_PROP_URL, null);
+ String serverUrl = pluginConfig.getSimpleValue(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_URL, null);
//use the server url if we could detect it, otherwise use something unique
String name;
if (serverUrl == null) {
@@ -342,7 +342,7 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
}
private static void validateServerRootAndServerConfigFile(Configuration pluginConfig) {
- String serverRoot = pluginConfig.getSimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_SERVER_ROOT).getStringValue();
+ String serverRoot = pluginConfig.getSimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_SERVER_ROOT).getStringValue();
File serverRootFile;
try {
serverRootFile = new File(serverRoot).getCanonicalFile(); // this will resolve symlinks
@@ -353,9 +353,9 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
if (serverRootFile == null || !serverRootFile.isDirectory()) {
throw new InvalidPluginConfigurationException("'" + serverRoot
+ "' does not exist or is not a directory. Please make sure the '"
- + ApacheServerComponent.PLUGIN_CONFIG_PROP_SERVER_ROOT + "' connection property is set correctly.");
+ + ApacheServerConfiguration.PLUGIN_CONFIG_PROP_SERVER_ROOT + "' connection property is set correctly.");
}
- String httpdConf = pluginConfig.getSimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_HTTPD_CONF).getStringValue();
+ String httpdConf = pluginConfig.getSimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_HTTPD_CONF).getStringValue();
File httpdConfFile;
try {
httpdConfFile = new File(httpdConf).getCanonicalFile(); // this will resolve symlinks
@@ -366,7 +366,7 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
if (httpdConfFile == null || !httpdConfFile.isFile()) {
throw new InvalidPluginConfigurationException("'" + httpdConf
+ "' does not exist or is not a regular file. Please make sure the '"
- + ApacheServerComponent.PLUGIN_CONFIG_PROP_HTTPD_CONF + "' connection property is set correctly.");
+ + ApacheServerConfiguration.PLUGIN_CONFIG_PROP_HTTPD_CONF + "' connection property is set correctly.");
}
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java
index 12564ea..1083d4e 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java
@@ -68,7 +68,7 @@ public class ApacheServerOperationsDelegate implements OperationFacet {
// Continue with generic operations
Operation operation = getOperation(name);
- File controlScriptPath = this.serverComponent.getControlScriptPath();
+ File controlScriptPath = this.serverComponent.getServerConfiguration().getControlScriptPath();
validateScriptFile(controlScriptPath);
ProcessExecution processExecution = ProcessExecutionUtility.createProcessExecution(controlScriptPath);
processExecution.setWaitForCompletion(1000 * 30); // 30 seconds - should be plenty
@@ -148,13 +148,13 @@ public class ApacheServerOperationsDelegate implements OperationFacet {
private static void validateScriptFile(File scriptFile) {
if (!scriptFile.exists()) {
throw new IllegalStateException("Script (" + scriptFile + ") specified via '"
- + ApacheServerComponent.PLUGIN_CONFIG_PROP_CONTROL_SCRIPT_PATH
+ + ApacheServerConfiguration.PLUGIN_CONFIG_PROP_CONTROL_SCRIPT_PATH
+ "' connection property does not exist.");
}
if (scriptFile.isDirectory()) {
throw new IllegalStateException("Script (" + scriptFile + ") specified via '"
- + ApacheServerComponent.PLUGIN_CONFIG_PROP_CONTROL_SCRIPT_PATH
+ + ApacheServerConfiguration.PLUGIN_CONFIG_PROP_CONTROL_SCRIPT_PATH
+ "' connection property is a directory, not a file.");
}
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
index 719e3d8..86bf1a9 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
@@ -32,9 +32,7 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.MeasurementReport;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
@@ -42,30 +40,24 @@ import org.rhq.core.domain.measurement.calltime.CallTimeData;
import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
import org.rhq.core.pluginapi.inventory.CreateResourceReport;
import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.util.ResponseTimeConfiguration;
import org.rhq.core.pluginapi.util.ResponseTimeLogParser;
-import org.rhq.plugins.apache.parser.ApacheConfigWriter;
import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
import org.rhq.plugins.apache.parser.mapping.ApacheAugeasMapping;
-import org.rhq.plugins.apache.util.AugeasNodeSearch;
import org.rhq.plugins.apache.util.AugeasNodeValueUtil;
import org.rhq.plugins.apache.util.ConfigurationTimestamp;
import org.rhq.plugins.apache.util.HttpdAddressUtility;
+import org.rhq.plugins.apache.util.WWWUtils;
import org.rhq.plugins.www.snmp.SNMPException;
import org.rhq.plugins.www.snmp.SNMPSession;
import org.rhq.plugins.www.snmp.SNMPValue;
-import org.rhq.plugins.www.util.WWWUtils;
-
-
/**
* @author Ian Springer
@@ -75,7 +67,6 @@ public class ApacheVirtualHostServiceComponent extends ApacheConfigurationBaseCo
ConfigurationFacet, DeleteResourceFacet, CreateChildResourceFacet {
private final Log log = LogFactory.getLog(this.getClass());
- public static final String URL_CONFIG_PROP = "url";
public static final String MAIN_SERVER_RESOURCE_KEY = "MainServer";
public static final String REGEXP_PROP = "regexp";
public static final String RESPONSE_TIME_LOG_FILE_CONFIG_PROP = ResponseTimeConfiguration.RESPONSE_TIME_LOG_FILE_CONFIG_PROP;
@@ -99,7 +90,7 @@ public class ApacheVirtualHostServiceComponent extends ApacheConfigurationBaseCo
public void start(ResourceContext context) throws Exception {
super.start(context);
Configuration pluginConfig = resourceContext.getPluginConfiguration();
- String url = pluginConfig.getSimple(URL_CONFIG_PROP).getStringValue();
+ String url = pluginConfig.getSimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_URL).getStringValue();
if (url != null) {
try {
this.url = new URL(url);
@@ -111,7 +102,7 @@ public class ApacheVirtualHostServiceComponent extends ApacheConfigurationBaseCo
+ "this virtual host in httpd.conf.");
}
} catch (MalformedURLException e) {
- throw new Exception("Value of '" + URL_CONFIG_PROP + "' connection property ('" + url
+ throw new Exception("Value of '" + ApacheServerConfiguration.PLUGIN_CONFIG_PROP_URL + "' connection property ('" + url
+ "') is not a valid URL.");
}
}
@@ -230,13 +221,12 @@ public class ApacheVirtualHostServiceComponent extends ApacheConfigurationBaseCo
saveParser(tree);
tree = loadParser();
- String key = AugeasNodeSearch.getNodeKey(myNode, directoryNode);
+ String key = tree.getNodeKey(myNode, directoryNode);
report.setResourceKey(key);
report.setResourceName(directoryName);
report.setStatus(CreateResourceStatus.SUCCESS);
-
- ApacheServerComponent server = (ApacheServerComponent) this.resourceContext.getParentResourceComponent();
- server.finishChildResourceCreate(report);
+
+ conditionalRestart();
} catch (Exception e) {
report.setException(e);
report.setStatus(CreateResourceStatus.FAILURE);
@@ -387,7 +377,7 @@ public class ApacheVirtualHostServiceComponent extends ApacheConfigurationBaseCo
*/
private int getWwwServiceIndex() throws Exception {
ApacheServerComponent server = (ApacheServerComponent) this.resourceContext.getParentResourceComponent();
- ConfigurationTimestamp currentTimestamp = server.getConfigurationTimestamp();
+ ConfigurationTimestamp currentTimestamp = new ConfigurationTimestamp(loadParser().getIncludedFiles());
if (!lastConfigurationTimeStamp.equals(currentTimestamp)) {
snmpWwwServiceIndex = -1;
//don't go through this configuration again even if we fail further below.. we'd fail again.
@@ -424,10 +414,10 @@ public class ApacheVirtualHostServiceComponent extends ApacheConfigurationBaseCo
vhostAddressStrings.length);
if (vhostAddressStrings.length == 1 && MAIN_SERVER_RESOURCE_KEY.equals(vhostAddressStrings[0])) {
- vhostAddresses.add(server.getAddressUtility().getMainServerSampleAddress(tree));
+ vhostAddresses.add(server.getServerConfiguration().getAddressUtility().getMainServerSampleAddress(tree));
} else {
for (int i = 0; i < vhostAddressStrings.length; ++i) {
- vhostAddresses.add(server.getAddressUtility().getVirtualHostSampleAddress(tree, vhostAddressStrings[i],
+ vhostAddresses.add(server.getServerConfiguration().getAddressUtility().getVirtualHostSampleAddress(tree, vhostAddressStrings[i],
vhostServerName));
}
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
index f8f4853..1c9415e 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
@@ -65,7 +65,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
ResourceType resourceType = context.getResourceType();
- File configPath = serverComponent.getServerRoot();
+ File configPath = serverComponent.getServerConfiguration().getServerRoot();
File logsDir = new File(configPath, LOGS_DIRECTORY_NAME);
List<ApacheDirective> virtualHosts = tree.search("/<VirtualHost");
@@ -95,11 +95,11 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
Configuration pluginConfiguration = context.getDefaultPluginConfiguration();
- Address address = serverComponent.getAddressUtility().getVirtualHostSampleAddress(tree, firstAddress, serverName);
+ Address address = serverComponent.getServerConfiguration().getAddressUtility().getVirtualHostSampleAddress(tree, firstAddress, serverName);
if (address != null) {
String url = "http://" + address.host + ":" + address.port + "/";
- PropertySimple urlProp = new PropertySimple(ApacheVirtualHostServiceComponent.URL_CONFIG_PROP, url);
+ PropertySimple urlProp = new PropertySimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_URL, url);
pluginConfiguration.put(urlProp);
}
@@ -130,13 +130,13 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
ResourceType resourceType = context.getResourceType();
Configuration mainServerPluginConfig = context.getDefaultPluginConfiguration();
- File configPath = context.getParentResourceComponent().getServerRoot();
+ File configPath = context.getParentResourceComponent().getServerConfiguration().getServerRoot();
File logsDir = new File(configPath, LOGS_DIRECTORY_NAME);
String mainServerUrl = context.getParentResourceContext().getPluginConfiguration().getSimple(
- ApacheServerComponent.PLUGIN_CONFIG_PROP_URL).getStringValue();
+ ApacheServerConfiguration.PLUGIN_CONFIG_PROP_URL).getStringValue();
if (mainServerUrl != null && !"null".equals(mainServerUrl)) {
- PropertySimple mainServerUrlProp = new PropertySimple(ApacheVirtualHostServiceComponent.URL_CONFIG_PROP,
+ PropertySimple mainServerUrlProp = new PropertySimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_URL,
mainServerUrl);
mainServerPluginConfig.put(mainServerUrlProp);
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ModJKComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ModJKComponent.java
index 40d0f87..221d369 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ModJKComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ModJKComponent.java
@@ -74,7 +74,7 @@ public class ModJKComponent implements ResourceComponent<ApacheServerComponent>
boolean needUriWorkers = false;
// First see (what) if stuff is present
- File httpdConf = serverComponent.getHttpdConfFile();
+ File httpdConf = serverComponent.getServerConfiguration().getHttpdConfFile();
String confPath = httpdConf.getAbsolutePath();
// If we can't update the file, then there is nothing left to do.
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ModJKDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ModJKDiscoveryComponent.java
index 64b7810..28547db 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ModJKDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ModJKDiscoveryComponent.java
@@ -33,7 +33,7 @@ import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.plugins.apache.util.HttpdConfParser;
-import org.rhq.plugins.www.util.WWWUtils;
+import org.rhq.plugins.apache.util.WWWUtils;
/**
* Discovery of an installed mod_jk module in the parents component apache server
@@ -59,7 +59,7 @@ public class ModJKDiscoveryComponent implements ResourceDiscoveryComponent<Apach
Configuration parentConfig = context.getParentResourceContext().getPluginConfiguration();
// Try to determine the presence of mod_jk and its version via a http request
- PropertySimple urlString = parentConfig.getSimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_URL);
+ PropertySimple urlString = parentConfig.getSimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_URL);
String modJkVersion = null;
if (urlString!=null) {
try {
@@ -81,7 +81,7 @@ public class ModJKDiscoveryComponent implements ResourceDiscoveryComponent<Apach
}
}
- PropertySimple confPathProp = parentConfig.getSimple(ApacheServerComponent.PLUGIN_CONFIG_PROP_HTTPD_CONF);
+ PropertySimple confPathProp = parentConfig.getSimple(ApacheServerConfiguration.PLUGIN_CONFIG_PROP_HTTPD_CONF);
if (confPathProp == null || confPathProp.getStringValue() == null) {
log.error("Path to httpd.conf is not given - can't discover mod_jk");
return null;
@@ -90,7 +90,7 @@ public class ModJKDiscoveryComponent implements ResourceDiscoveryComponent<Apach
//TODO the can be simplified using augeas...
String confPath = confPathProp.getStringValue();
if (!confPath.startsWith("/")) { // TODO implement for Windows too
- String basePath = context.getParentResourceComponent().getServerRoot().getAbsolutePath();
+ String basePath = context.getParentResourceComponent().getServerConfiguration().getServerRoot().getAbsolutePath();
confPath = basePath + "/" + confPath;
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java
index d18f353..3526ced 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java
@@ -92,4 +92,119 @@ public class ApacheDirectiveTree {
includedFiles.add(file);
}
+
+ public static String [] NESTED_DIRECTIVES = {"<IfModule","<Directive","<VirtualHost","<Files"};
+
+ /**
+ * Searches for all nodes in parent nodes's subtree which matches specified criteria.
+ *
+ * @param parentNodeNames
+ * @param nodeName
+ * @param startNode
+ * @return
+ */
+ public List<ApacheDirective> searchNode(String [] parentNodeNames,String nodeName,ApacheDirective startNode){
+ List<ApacheDirective> nodes = new ArrayList<ApacheDirective>();
+ search(nodes,parentNodeNames,startNode,nodeName);
+ return nodes;
+ }
+
+ private void search(List<ApacheDirective>nodes,String [] parentNodeNames,ApacheDirective node,String name){
+
+ nodes.addAll(node.getChildByName(name));
+
+ for (String parentNodeName : parentNodeNames){
+ List<ApacheDirective> nds = node.getChildByName(parentNodeName);
+ for (ApacheDirective tempNode : nds){
+ search(nodes,parentNodeNames,tempNode, name);
+ }
+ }
+ }
+
+
+
+ /**
+ * If there is a more nodes which have the same node name and the same value of parameters than we need index
+ * for identification of Node.
+ *
+ * @param node
+ * @return
+ */
+ public int getNodeIndex(ApacheDirective node){
+ List<ApacheDirective> nodes = node.getParentNode().getChildByName(node.getName());
+ String param = node.getValuesAsString();
+ int index = 1;
+
+ for(ApacheDirective nd : nodes){
+ if (nd.getValuesAsString().equals(param)){
+ if (node.equals(nd))
+ return index;
+ else
+ index++;
+ }
+ }
+ return index;
+ }
+ /**
+ * Returns the unique identifier of node. By this string we can identify node from parentNode's child nodes.
+ * @param node
+ * @return
+ */
+ public String getNodeKeyFromParent(ApacheDirective node){
+
+ String param = node.getValuesAsString();
+ int index = getNodeIndex(node);
+ return (node.getName()+"|"+param+"|"+String.valueOf(index)+";");
+
+ }
+
+ /**
+ * Returns the unique identifier of node. By this string we can identify the node in parent node's subtree.
+ * @param node
+ * @param parentNode
+ * @return
+ */
+ public String getNodeKey(ApacheDirective node,ApacheDirective parentNode){
+ ApacheDirective pNode = node;
+ StringBuilder str = new StringBuilder();
+ while (pNode!=null & !pNode.equals(parentNode))
+ {
+ str.append(getNodeKeyFromParent(pNode));
+ pNode = pNode.getParentNode();
+ }
+ return str.toString();
+ }
+ /**
+ * Finds the ApacheDirective node indentified by params.
+ * @param parentNode
+ * @param params
+ * @return
+ */
+ public ApacheDirective findNodeById(ApacheDirective parentNode,String params){
+
+ ApacheDirective tempNode=parentNode;
+ String [] ids = params.split(";");
+ for (int i=ids.length-1;i>=0;i--){
+ tempNode = getNodeFromParentById(tempNode,ids[i]);
+ }
+ return tempNode;
+ }
+
+ public ApacheDirective getNodeFromParentById(ApacheDirective parentNode,String params){
+ String nodeName;
+ String [] paramsArray = params.split("\\|");
+ if (paramsArray.length != 3)
+ throw new RuntimeException("Node with id "+params +" was not found.");
+
+ nodeName = paramsArray[0];
+
+ for (ApacheDirective nd : parentNode.getChildByName(nodeName)){
+ String ndParam = getNodeKeyFromParent(nd);
+ if (ndParam.equals(params+";")){
+ return nd;
+ }
+ }
+
+ throw new RuntimeException("Searched node with id " + params+ " was not found.");
}
+}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/mapping/load/ApacheToConfigurationBase.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/mapping/load/ApacheToConfigurationBase.java
index e9850ec..10aeb29 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/mapping/load/ApacheToConfigurationBase.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/mapping/load/ApacheToConfigurationBase.java
@@ -29,6 +29,7 @@ import org.rhq.plugins.apache.parser.mapping.ApacheToConfiguration;
*/
public class ApacheToConfigurationBase implements ApacheToConfiguration {
private final Log log = LogFactory.getLog(this.getClass());
+
protected ApacheDirectiveTree tree;
public ApacheToConfigurationBase() {
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/mapping/load/MappingPositionToConfiguration.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/mapping/load/MappingPositionToConfiguration.java
index c0f45d2..9948452 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/mapping/load/MappingPositionToConfiguration.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/mapping/load/MappingPositionToConfiguration.java
@@ -45,7 +45,6 @@ public class MappingPositionToConfiguration extends ApacheToConfigurationBase {
Configuration resourceConfig = new Configuration();
String nodeName = startNode.getName();
ApacheDirective parentNode = getParentName(startNode);
- //List<String> params = ApacheDirectiveSearch.getParams(startNode, parentNode);
List<String> params = startNode.getValues();
if (nodeName.equals("<Directory"))
if (params.size()>0)
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/AugeasNodeSearch.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/AugeasNodeSearch.java
deleted file mode 100644
index 98be4cd..0000000
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/AugeasNodeSearch.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package org.rhq.plugins.apache.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.rhq.plugins.apache.parser.ApacheDirective;
-
-public class AugeasNodeSearch {
- public static String [] NESTED_DIRECTIVES = {"<IfModule","<Directive","<VirtualHost","<Files"};
-
- /**
- * Searches for all nodes in parent nodes's subtree which matches specified criteria.
- *
- * @param parentNodeNames
- * @param nodeName
- * @param startNode
- * @return
- */
- public static List<ApacheDirective> searchNode(String [] parentNodeNames,String nodeName,ApacheDirective startNode){
- List<ApacheDirective> nodes = new ArrayList<ApacheDirective>();
- search(nodes,parentNodeNames,startNode,nodeName);
- return nodes;
- }
-
- private static void search(List<ApacheDirective>nodes,String [] parentNodeNames,ApacheDirective node,String name){
-
- nodes.addAll(node.getChildByName(name));
-
- for (String parentNodeName : parentNodeNames){
- List<ApacheDirective> nds = node.getChildByName(parentNodeName);
- for (ApacheDirective tempNode : nds){
- search(nodes,parentNodeNames,tempNode, name);
- }
- }
- }
-
-
-
- /**
- * If there is a more nodes which have the same node name and the same value of parameters than we need index
- * for identification of Node.
- *
- * @param node
- * @return
- */
- public static int getNodeIndex(ApacheDirective node){
- List<ApacheDirective> nodes = node.getParentNode().getChildByName(node.getName());
- String param = node.getValuesAsString();
- int index = 1;
-
- for(ApacheDirective nd : nodes){
- if (nd.getValuesAsString().equals(param)){
- if (node.equals(nd))
- return index;
- else
- index++;
- }
- }
- return index;
- }
- /**
- * Returns the unique identifier of node. By this string we can identify node from parentNode's child nodes.
- * @param node
- * @return
- */
- public static String getNodeKeyFromParent(ApacheDirective node){
-
- String param = node.getValuesAsString();
- int index = getNodeIndex(node);
- return (node.getName()+"|"+param+"|"+String.valueOf(index)+";");
-
- }
-
- /**
- * Returns the unique identifier of node. By this string we can identify the node in parent node's subtree.
- * @param node
- * @param parentNode
- * @return
- */
- public static String getNodeKey(ApacheDirective node,ApacheDirective parentNode){
- ApacheDirective pNode = node;
- StringBuilder str = new StringBuilder();
- while (pNode!=null & !pNode.equals(parentNode))
- {
- str.append(getNodeKeyFromParent(pNode));
- pNode = pNode.getParentNode();
- }
- return str.toString();
- }
- /**
- * Finds the ApacheDirective node indentified by params.
- * @param parentNode
- * @param params
- * @return
- */
- public static ApacheDirective findNodeById(ApacheDirective parentNode,String params){
-
- ApacheDirective tempNode=parentNode;
- String [] ids = params.split(";");
- for (int i=ids.length-1;i>=0;i--){
- tempNode = getNodeFromParentById(tempNode,ids[i]);
- }
- return tempNode;
- }
-
- public static ApacheDirective getNodeFromParentById(ApacheDirective parentNode,String params){
- String nodeName;
- String parameters;
- int index=1;
-
- String [] paramsArray = params.split("\\|");
- if (paramsArray.length != 3)
- throw new RuntimeException("Node with id "+params +" was not found.");
-
- nodeName = paramsArray[0];
- parameters = paramsArray[1];
-
- index = Integer.valueOf(paramsArray[2]);
-
- for (ApacheDirective nd : parentNode.getChildByName(nodeName)){
- String ndParam = getNodeKeyFromParent(nd);
- if (ndParam.equals(params+";")){
- return nd;
- }
- }
-
- throw new RuntimeException("Searched node with id " + params+ " was not found.");
- }
-}
-
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/OsProcessUtility.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/OsProcessUtility.java
index cccb19d..415356b 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/OsProcessUtility.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/OsProcessUtility.java
@@ -22,7 +22,6 @@ import java.io.File;
import java.util.Collections;
import java.util.List;
-import org.hyperic.sigar.Sigar;
import org.hyperic.sigar.SigarException;
import org.hyperic.sigar.SigarProxy;
import org.jetbrains.annotations.NotNull;
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/WWWUtils.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/WWWUtils.java
new file mode 100644
index 0000000..f8785eb
--- /dev/null
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/WWWUtils.java
@@ -0,0 +1,73 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 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.plugins.apache.util;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+/**
+ * Helper class that contains methods that send http requests and evaluate results
+ * @author Ian Springer
+ */
+public abstract class WWWUtils {
+
+ /**
+ * Sends a HEAD request to the passed url and returns if the server was reachable
+ * @param httpURL a http or https URL to check
+ * @return true if connecting to the URL succeeds, or false otherwise
+ */
+ public static boolean isAvailable(URL httpURL) {
+ try {
+ HttpURLConnection connection = (HttpURLConnection) httpURL.openConnection();
+ connection.setRequestMethod("HEAD");
+ connection.setConnectTimeout(3000);
+ connection.connect();
+ // get the respone code to actually trigger sending the Request.
+ connection.getResponseCode();
+ } catch (IOException e) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Get the content of the 'Server:' header
+ * @param httpURL a http or https URL to get the header from
+ * @return The contents of the header or null if anything went wrong or the field was not present.
+ */
+ public static String getServerHeader(URL httpURL) {
+ String ret;
+
+ try {
+ HttpURLConnection connection = (HttpURLConnection) httpURL.openConnection();
+ connection.setRequestMethod("HEAD");
+ connection.setConnectTimeout(3000);
+ connection.connect();
+ // get the respone code to actually trigger sending the Request.
+ connection.getResponseCode();
+ ret = connection.getHeaderField("Server");
+ }
+ catch (IOException e) {
+ ret = null;
+ }
+ return ret;
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/www/util/WWWUtils.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/www/util/WWWUtils.java
deleted file mode 100644
index 8e9f709..0000000
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/www/util/WWWUtils.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.plugins.www.util;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-/**
- * Helper class that contains methods that send http requests and evaluate results
- * @author Ian Springer
- */
-public abstract class WWWUtils {
-
- /**
- * Sends a HEAD request to the passed url and returns if the server was reachable
- * @param httpURL a http or https URL to check
- * @return true if connecting to the URL succeeds, or false otherwise
- */
- public static boolean isAvailable(URL httpURL) {
- try {
- HttpURLConnection connection = (HttpURLConnection) httpURL.openConnection();
- connection.setRequestMethod("HEAD");
- connection.setConnectTimeout(3000);
- connection.connect();
- // get the respone code to actually trigger sending the Request.
- connection.getResponseCode();
- } catch (IOException e) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Get the content of the 'Server:' header
- * @param httpURL a http or https URL to get the header from
- * @return The contents of the header or null if anything went wrong or the field was not present.
- */
- public static String getServerHeader(URL httpURL) {
- String ret;
-
- try {
- HttpURLConnection connection = (HttpURLConnection) httpURL.openConnection();
- connection.setRequestMethod("HEAD");
- connection.setConnectTimeout(3000);
- connection.connect();
- // get the respone code to actually trigger sending the Request.
- connection.getResponseCode();
- ret = connection.getHeaderField("Server");
- }
- catch (IOException e) {
- ret = null;
- }
- return ret;
- }
-}
\ No newline at end of file
13 years, 10 months
[rhq] 2 commits - pom.xml
by Heiko W. Rupp
pom.xml | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 84b7bda95f895864671f515285923186475638be
Merge: 484719e... a13c17d...
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Aug 11 15:49:10 2010 +0200
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit 484719eea50ab62afc6938632b0861b87712458d
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Aug 10 22:50:17 2010 +0200
Put some more developer URLs in there.
diff --git a/pom.xml b/pom.xml
index ed621bf..bc895da 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1139,6 +1139,7 @@
<developer>
<name>Greg Hinkle</name>
<timezone>-5</timezone>
+ <url>http://www.jroller.com/ghinkle/</url>
</developer>
<developer>
<name>Lukas Krejci</name>
@@ -1159,6 +1160,7 @@
<developer>
<name>John 'Mazz' Mazzitelli</name>
<timezone>-5</timezone>
+ <url>http://management-platform.blogspot.com</url>
</developer>
<developer>
<name>Simeon Pinder</name>
13 years, 10 months
[rhq] 10 commits - modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java | 156 +--
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/alert-plain-navigation.xml | 183 +++
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/content-plain-navigation.xml | 491 ++++++++++
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/events-plain-navigation.xml | 26
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/measurement-plain-navigation.xml | 73 +
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/operation-plain-navigation.xml | 89 +
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml | 6
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/events/history-plain.xhtml | 23
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml | 173 +++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/tables-plain.xhtml | 46
modules/enterprise/gui/portal-war/src/main/webapp/rhq/entity/layout/main-plain.xhtml | 39
modules/enterprise/gui/portal-war/src/main/webapp/rhq/layout/main-plain-layout.xhtml | 310 ++++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions-plain.xhtml | 161 +++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertHistory-plain.xhtml | 210 ++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/deploy-plain.xhtml | 27
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-plain.xhtml | 23
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/installed_package_details-plain.xhtml | 27
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml | 33
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/view-plain.xhtml | 37
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/events/history-plain.xhtml | 20
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/include/pagination-plain.xhtml | 112 ++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/layout/main-plain.xhtml | 17
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/availabilityHistory-plain.xhtml | 31
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/response-plain.xhtml | 14
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/schedules-plain.xhtml | 38
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/traits-plain.xhtml | 27
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistory-plain.xhtml | 270 +++++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml | 122 ++
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationScheduleDetails-plain.xhtml | 73 +
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationSchedules-plain.xhtml | 104 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java | 10
modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml | 4
32 files changed, 2692 insertions(+), 283 deletions(-)
New commits:
commit a13c17de245205bc8b5703ab6b45fa8300942b3e
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:21:50 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished resource > operation tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 88e1abd..ea7b88e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -157,7 +157,17 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
inventoryTab.updateSubTab("Children", ResourceSearchView.getChildrenOf(resource.getId()));
inventoryTab.updateSubTab("Connection Settings", new PluginConfigurationEditView(resource)); // new ConfigurationEditor(resource.getId(), resource.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
- operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
+ // comment out GWT-based operation history until...
+ // 1) user can delete history if they possess the appropriate permissions
+ // 2) user can see both operation arguments and results in the history details pop-up
+ // 3) operation arguments/results become read-only configuration data in the history details pop-up
+ // 4) user can navigate to the group operation that spawned this resource operation history, if appropriate
+ //operationsTab.updateSubTab("History", OperationHistoryView.getResourceHistoryView(resource));
+ // note: enabled operation execution/schedules from left-nav, if it doesn't already exist
+ operationsTab.updateSubTab("History", new FullHTMLPane(
+ "/rhq/resource/operation/resourceOperationHistory-plain.xhtml?id=" + resource.getId()));
+ operationsTab.updateSubTab("Scheduled", new FullHTMLPane(
+ "/rhq/resource/operation/resourceOperationSchedules-plain.xhtml?id=" + resource.getId()));
configurationTab.updateSubTab("Current", new ResourceConfigurationEditView(resource));
configurationTab.updateSubTab("History", ConfigurationHistoryView.getHistoryOf(resource.getId()));
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistory-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistory-plain.xhtml
new file mode 100644
index 0000000..13ee0b0
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistory-plain.xhtml
@@ -0,0 +1,270 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <!--
+ Resource Operation Pending History
+ -->
+
+ <ui:param name="currentOperation"
+ value="#{ResourceOperationPendingHistoryUIBean.oldestInProgressResourceOperation}" />
+
+ <h:form id="pendingForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">In Progress Operations</f:facet>
+
+ <a4j:keepAlive beanName="ResourceOperationPendingHistoryUIBean"/>
+
+ <ui:param name="resourceOperationPendingHistoryDataModel" value="#{ResourceOperationPendingHistoryUIBean.dataModel}"/>
+
+ <a4j:poll id="resourceOperationPendingHistoryDataTableReRenderer"
+ oncomplete="disableConditionalButtons();"
+ interval="60000"
+ ignoreDupResponses="true"
+ actionListener="#{ResourceOperationPendingHistoryUIBean.clearDataModel}"
+ reRender="resourceOperationPendingHistoryDataTable" />
+ <rich:dataTable id="resourceOperationPendingHistoryDataTable"
+ rows="#{PageControl.ResourceOperationPendingHistory.pageSize}"
+ value="#{resourceOperationPendingHistoryDataModel}"
+ var="pendingItem"
+ width="100%"
+ columnsWidth="1%, 15%, 15%, 20%, 30%, 19%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceOperationPendingHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="pendingSelectedItems" />
+ </f:facet>
+
+ <onc:select name="pendingSelectedItems" value="#{pendingItem.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.createdTime">
+ <h:outputText styleClass="headerText" value="Date Submitted" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml" >
+ <f:param name="id" value="#{param.id}" />
+ <f:param name="opId" value="#{pendingItem.id}" />
+ <h:outputText value="#{pendingItem.operationDefinition.displayName}"/>
+ </h:outputLink>
+
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.operationDefinition.description}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.status}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{pendingItem.subjectName}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6">
+ <onc:selectCommandButton action="#{ResourceOperationPendingHistoryUIBean.cancel}"
+ value="CANCEL SELECTED" target="pendingSelectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.control}"/>
+
+ <ui:param name="paginationDataTableName" value="resourceOperationPendingHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{resourceOperationPendingHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ResourceOperationPendingHistory}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ <!--
+ Resource Operation Completed History
+ -->
+
+ <h:form id="historyForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Completed Operations</f:facet>
+
+ <a4j:keepAlive beanName="ResourceOperationCompletedHistoryUIBean"/>
+
+ <ui:param name="resourceOperationCompletedHistoryDataModel" value="#{ResourceOperationCompletedHistoryUIBean.dataModel}"/>
+
+ <a4j:poll id="resourceOperationCompletedHistoryDataTableReRenderer"
+ oncomplete="disableConditionalButtons();"
+ interval="60000"
+ ignoreDupResponses="true"
+ actionListener="#{ResourceOperationCompletedHistoryUIBean.clearDataModel}"
+ reRender="resourceOperationCompletedHistoryDataTable" />
+ <rich:dataTable id="resourceOperationCompletedHistoryDataTable"
+ rows="#{PageControl.ResourceOperationCompletedHistory.pageSize}"
+ value="#{resourceOperationCompletedHistoryDataModel}"
+ var="historyItem"
+ width="100%"
+ columnsWidth="1%, 12%, 12%, 17%, 37%, 11%, 11%"
+ rowKeyVar="rowIndex"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="ResourceOperationCompletedHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="completedSelectedItems" />
+ </f:facet>
+
+ <onc:select name="completedSelectedItems" value="#{historyItem.id}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.createdTime">
+ <h:outputText styleClass="headerText" value="Date Submitted" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.modifiedTime">
+ <h:outputText styleClass="headerText" value="Date Completed" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.modifiedTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml" >
+ <f:param name="id" value="#{param.id}" />
+ <f:param name="opId" value="#{historyItem.id}" />
+ <h:outputText value="#{historyItem.operationDefinition.displayName}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Description" />
+ </f:facet>
+
+ <h:outputText value="#{historyItem.operationDefinition.description}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.status">
+ <h:outputText styleClass="headerText" value="Status" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText rendered="#{historyItem.status ne 'FAILURE'}" value="#{historyItem.status}"/>
+ <onc:errorPopup popupId="completed-#{historyItem.id}" errorMessage="#{historyItem.errorMessage}" rendered="#{historyItem.status eq 'FAILURE'}">Failure</onc:errorPopup>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="h.subjectName">
+ <h:outputText styleClass="headerText" value="User" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{historyItem.subjectName}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="7" width="100%">
+ <onc:selectCommandButton action="#{ResourceOperationCompletedHistoryUIBean.delete}"
+ value="DELETE SELECTED" target="completedSelectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.control}"/>
+
+ <ui:param name="paginationDataTableName" value="resourceOperationCompletedHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{resourceOperationCompletedHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.ResourceOperationCompletedHistory}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <!-- use a hidden button trick (which sends the same action a column click would) so request params aren't lost -->
+ <h:commandButton id="hiddenHistoryButton" style="visibility: hidden;" action="#{TableSorter.obtainFromOutcome}" />
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml
new file mode 100644
index 0000000..d7d9f27
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml
@@ -0,0 +1,122 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+ <br/>
+ <ui:param name="item" value="#{ResourceOperationHistoryDetailsUIBean.history}" />
+
+ <h:form id="operationHistoryDetailsForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+ <input type="hidden" name="opId" value="${param.opId}"/>
+
+ <a4j:keepAlive beanName="ResourceOperationHistoryDetailsUIBean" ajaxOnly="true"/>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationHistory-plain.xhtml">
+ <f:param name="id" value="#{param.id}" />
+ <h:outputText value="< Return to Operation History"/>
+ </h:outputLink>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Details</f:facet>
+ <table>
+ <tr>
+ <td align="right" style="width: 150px;">Operation:</td>
+ <td align="left">
+ <h:outputText value="#{item.operationDefinition.displayName}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Date Submitted:</td>
+ <td align="left">
+ <h:outputText value="#{item.createdTime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Date Completed:</td>
+ <td align="left">
+ <h:outputText value="#{item.modifiedTime}" rendered="#{item.status ne 'INPROGRESS'}" >
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Requester:</td>
+ <td align="left">
+ <h:outputText value="#{item.subjectName}" rendered="#{!(empty item.subjectName)}" />
+ <h:outputText value="(unknown)" rendered="#{empty item.subjectName}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Status:</td>
+ <td align="left">
+ <h:outputText rendered="#{item.status eq 'SUCCESS' or item.status eq 'INPROGRESS'}"
+ value="#{item.status}"/>
+ <h:outputLink rendered="#{item.status ne 'SUCCESS' and item.status ne 'INPROGRESS'}"
+ value="#" id="resultsLink">
+ <h:outputText value="#{item.status}"/>
+ <rich:componentControl for="resultsModalPanel" attachTo="resultsLink" operation="show" event="onclick"/>
+ </h:outputLink>
+ <rich:modalPanel id="resultsModalPanel" width="600" height="400"
+ style="overflow: auto;">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Results" />
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="controls">
+ <h:panelGroup>
+ <h:graphicImage value="/images/close.png" style="cursor:pointer" id="resultsModelPanelHideLink"/>
+ <rich:componentControl for="resultsModalPanel" attachTo="resultsModelPanelHideLink" operation="hide" event="onclick"/>
+ </h:panelGroup>
+ </f:facet>
+ <div class="ErrorModalBody">
+ <h:outputText value="#{item.errorMessage}" />
+ </div>
+ </rich:modalPanel>
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Parameters</f:facet>
+ <onc:config configurationDefinition="#{ResourceOperationHistoryDetailsUIBean.parameters.configurationDefinition}"
+ configuration="#{ResourceOperationHistoryDetailsUIBean.parameters.configuration}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="#{ResourceOperationHistoryDetailsUIBean.parameters.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{ResourceOperationHistoryDetailsUIBean.parameters.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"/>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Results</f:facet>
+ <onc:config configurationDefinition="#{ResourceOperationHistoryDetailsUIBean.results.configurationDefinition}"
+ configuration="#{ResourceOperationHistoryDetailsUIBean.results.configuration}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="#{ResourceOperationHistoryDetailsUIBean.results.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{ResourceOperationHistoryDetailsUIBean.results.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"
+ rendered="#{item.status ne 'INPROGRESS'}" />
+ </rich:panel>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationHistory-plain.xhtml">
+ <f:param name="id" value="#{param.id}" />
+ <h:outputText value="< Return to Operation History"/>
+ </h:outputLink>
+
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationScheduleDetails-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationScheduleDetails-plain.xhtml
new file mode 100644
index 0000000..95f9a96
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationScheduleDetails-plain.xhtml
@@ -0,0 +1,73 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+ <br/>
+ <!-- Resource Operation Schedules -->
+ <h:form id="scheduleForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationSchedules-plain.xhtml">
+ <f:param name="id" value="#{param.id}" />
+ <h:outputText value="< Return to Operation Schedules"/>
+ </h:outputLink>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">General Info</f:facet>
+ <table>
+ <tr>
+ <td align="right" style="width: 125px;">Operation:</td>
+ <td align="left">
+ <h:outputText value="#{item.operationDisplayName}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right" style="width: 125px;">Scheduled By:</td>
+ <td align="left">
+ <h:outputText value="#{item.subject.name}" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right" style="width: 125px;">Notes:</td>
+ <td align="left">
+ <h:outputText value="#{item.description}" />
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Parameters</f:facet>
+ <onc:config configurationDefinition="#{ResourceOperationScheduleDetailsUIBean.parameters.configurationDefinition}"
+ configuration="#{ResourceOperationScheduleDetailsUIBean.parameters.configuration}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="#{ResourceOperationScheduleDetailsUIBean.parameters.nullConfigurationDefinitionMessage}"
+ nullConfigurationMessage="#{ResourceOperationScheduleDetailsUIBean.parameters.nullConfigurationMessage}"
+ nullConfigurationStyle="InfoBlock"/>
+ </rich:panel>
+
+ <rich:panel styleClass="BlockContent">
+ <f:facet name="header">Schedule Details</f:facet>
+
+ <onc:operationScheduler scheduleDetails="#{ResourceOperationScheduleDetailsUIBean.operationDetails}" readOnly="true"/>
+ </rich:panel>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationSchedules-plain.xhtml">
+ <f:param name="id" value="#{param.id}" />
+ <h:outputText value="< Return to Operation Schedules"/>
+ </h:outputLink>
+
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationSchedules-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationSchedules-plain.xhtml
new file mode 100644
index 0000000..ef0b83f
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/operation/resourceOperationSchedules-plain.xhtml
@@ -0,0 +1,104 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <!-- Resource Operation Schedules -->
+ <h:form id="scheduleForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <!-- Operation Schedule Table -->
+ <rich:panel styleClass="BlockContent">
+
+ <ui:param name="resourceOperationScheduleDataModel" value="#{ResourceOperationScheduleUIBean.dataModel}"/>
+ <rich:dataTable id="resourceOperationScheduleDataTable"
+ rows="0"
+ value="#{resourceOperationScheduleDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 30%, 39%, 30%"
+ styleClass="resources-table"
+ headerClass="tableRowHeader"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="NONE" />
+ </f:facet>
+
+ <rich:column style="width: 1px;">
+ <f:facet name="header">
+ <onc:allSelect target="selectedItems" />
+ </f:facet>
+ <onc:select name="selectedItems" value="#{item.jobId}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Job ID" />
+ </f:facet>
+ <h:commandLink action="#{ResourceOperationScheduleUIBean.selectScheduleToView}">
+ <h:outputText value="#{item.jobId}" />
+ </h:commandLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Name" />
+ </f:facet>
+
+ <h:outputLink value="/rhq/resource/operation/resourceOperationScheduleDetails-plain.xhtml" >
+ <f:param name="id" value="#{param.id}" />
+ <f:param name="jobId" value="#{item.jobId}" />
+ <h:outputText value="#{item.operationDisplayName}"/>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Notes" />
+ </f:facet>
+ <h:outputText value="#{item.description}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="User" />
+ </f:facet>
+ <h:outputText value="#{item.subject.name}"/>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="4" width="100%">
+ <onc:selectCommandButton action="#{ResourceOperationScheduleUIBean.unschedule}"
+ value="UNSCHEDULE" target="selectedItems"
+ styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.control}"/>
+ <onc:selectCommandButton action="#{ResourceOperationScheduleUIBean.executeNow}"
+ value="EXECUTE NOW" target="selectedItems"
+ styleClass="on-pager-button buttonsmall"
+ low="1" high="1"
+ rendered="#{ResourceUIBean.permissions.control}"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+
+</ui:composition>
commit 4274e4c27857fec55a502d90ba0675bcf398f290
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:21:31 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished resource > alerts tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index bd39bfc..88e1abd 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -162,9 +162,17 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
configurationTab.updateSubTab("Current", new ResourceConfigurationEditView(resource));
configurationTab.updateSubTab("History", ConfigurationHistoryView.getHistoryOf(resource.getId()));
- alertsTab.updateSubTab("History", new ResourceAlertHistoryView(resource.getId()));
- alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
-
+ // comment out GWT-based alert definitions/history views until...
+ // 1) new workflow is implement for alert definition creation, with particular attention to interaction model for alert notifications
+ // 2) user can delete/ack/purgeAll alerts if they possess the appropriate permissions
+ // 3) user can enable/disable/delete alert definitions if they possess the appropriate permissions
+ // 4) user can search alert history by: date alert was fired, alert priority, or alert definition
+ //alertsTab.updateSubTab("History", new ResourceAlertHistoryView(resource.getId()));
+ //alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
+ alertsTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/alert/listAlertHistory-plain.xhtml?id="
+ + resource.getId()));
+ alertsTab.updateSubTab("Definitions", new FullHTMLPane(
+ "/rhq/resource/alert/listAlertDefinitions-plain.xhtml?id=" + resource.getId()));
// comment out GWT-based view until...
// 1) user can search event history by: metric display range, event source, event details, event severity
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions-plain.xhtml
new file mode 100644
index 0000000..746eb4a
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertDefinitions-plain.xhtml
@@ -0,0 +1,161 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="alertDefinitionsListForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <rich:panel styleClass="BlockContent">
+
+ <a4j:keepAlive beanName="ListAlertDefinitionsUIBean"/>
+
+ <ui:param name="alertDefinitionsDataModel" value="#{ListAlertDefinitionsUIBean.dataModel}"/>
+ <rich:dataTable id="alertDefinitionsDataTable"
+ rows="#{PageControl.AlertDefinitionsList.pageSize}"
+ value="#{alertDefinitionsDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 25%, 30%, 20%, 5%, 14%, 5%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+
+ <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>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.name">
+ <h:outputText styleClass="headerText" value="Name" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Config.do">
+ <f:param name="mode" value="viewRoles"/>
+ <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">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.ctime}">
+ <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>
+
+ <rich:column>
+ <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"/>
+ <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}"/>
+ <f:param name="from" value="#{item.id}"/>
+ <f:param name="ad" value="#{item.groupAlertDefinition.id}"/>
+ <h:outputText value="View Group Definition" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <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>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="7" width="100%">
+ <h:commandButton action="#{ListAlertDefinitionsUIBean.createNewAlertDefinition}"
+ value="NEW DEFINITION" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" >
+ <f:param name="id" value="${param.id}"/>
+ <f:param name="mode" value="new"/>
+ </h:commandButton>
+ <onc:selectCommandButton action="#{ListAlertDefinitionsUIBean.enableSelectedAlertDefinitions}"
+ value="ENABLE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListAlertDefinitionsUIBean.disableSelectedAlertDefinitions}"
+ value="DISABLE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListAlertDefinitionsUIBean.deleteSelectedAlertDefinitions}"
+ value="DELETE SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListAlertDefinitionsUIBean.copySelectedAlertDefinitions}"
+ value="COPY SELECTED" target="selectedAlertDefinitions" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert and param.debug}" />
+
+ <ui:param name="paginationDataTableName" value="alertDefinitionsDataTable"/>
+ <ui:param name="paginationDataModel" value="#{alertDefinitionsDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AlertDefinitionsList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertHistory-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertHistory-plain.xhtml
new file mode 100644
index 0000000..a6cb1fb
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/alert/listAlertHistory-plain.xhtml
@@ -0,0 +1,210 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <h:form id="alertHistoryForm">
+ <input type="hidden" name="id" value="${param.id}"/>
+
+ <rich:panel styleClass="BlockContent">
+
+ <h:panelGrid columns="4" cellspacing="3">
+ <h:outputLabel for="alertDefinitionFilter" value="Alert Definition Filter: " />
+ <h:selectOneMenu id="alertDefinitionFilter" value="#{ListAlertHistoryUIBean.alertDefinitionFilter}"
+ style="width: 300px;">
+ <a4j:support event="onchange"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListAlertHistoryUIBean.clearDataModel}" />
+
+ <f:selectItems value="#{ListAlertHistoryUIBean.alertDefinitionSelectItems}"/>
+ </h:selectOneMenu>
+ <rich:spacer/>
+ <rich:spacer/>
+
+ <h:outputLabel for="alertPriorityFilter" value="Alert Priority Filter: " />
+ <h:selectOneMenu id="alertPriorityFilter" value="#{ListAlertHistoryUIBean.alertPriorityFilter}"
+ style="width: 300px;">
+ <a4j:support event="onchange"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListAlertHistoryUIBean.clearDataModel}" />
+
+ <f:selectItems value="#{ListAlertHistoryUIBean.alertPrioritySelectItems}"/>
+ </h:selectOneMenu>
+ <rich:spacer/>
+ <rich:spacer/>
+
+ <h:outputLabel for="dateFilter" value="Date Filter: " />
+ <h:inputText id="dateFilter" value="#{ListAlertHistoryUIBean.dateFilter}"
+ onkeypress="return ignoreEnterKey(event);"
+ style="width: 300px;" />
+ <a4j:commandButton value="GO"
+ reRender="alertHistoryDataTable, alertHistoryDataTableScroller, dateErrors"
+ actionListener="#{ListAlertHistoryUIBean.clearDataModel}"
+ styleClass="buttonmed">
+ <s:defaultAction />
+ </a4j:commandButton>
+ <h:outputText id="dateErrors" value="#{ListAlertHistoryUIBean.dateErrors}" />
+ </h:panelGrid>
+
+ <br/>
+
+ <ui:param name="alertHistoryDataModel" value="#{ListAlertHistoryUIBean.dataModel}"/>
+ <rich:dataTable id="alertHistoryDataTable"
+ rows="#{PageControl.AlertHistoryList.pageSize}"
+ value="#{alertHistoryDataModel}"
+ var="item"
+ width="100%"
+ columnsWidth="1%, 15%, 20%, 20%, 20%, 7%, 8%, 9%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="AlertHistoryList" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:allSelect target="selectedAlerts" />
+ </f:facet>
+
+ <onc:select name="selectedAlerts" value="#{item.alert.id}" />
+ </rich:column>
+
+ <rich:column rendered="#{param.debug}">
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.id">
+ <h:outputText styleClass="headerText" value="ID" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.alert.id}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.alertDefinition.priority">
+ <h:outputText styleClass="headerText" value="Priority" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:graphicImage value="/images/icons/Flag_blue_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'LOW'}"/>
+ <h:graphicImage value="/images/icons/Flag_yellow_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'MEDIUM'}"/>
+ <h:graphicImage value="/images/icons/Flag_red_16.png" rendered="#{item.alert.alertDefinition.priority.name == 'HIGH'}"/>
+
+ <h:outputText value="#{item.alert.alertDefinition.priority.name}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.ctime">
+ <h:outputText styleClass="headerText" value="Date Created" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Alerts.do">
+ <f:param name="mode" value="viewAlert" />
+ <f:param name="id" value="#{Resource.id}" />
+ <f:param name="a" value="#{item.alert.id}" />
+ <h:outputText value="#{item.alert.ctime}">
+ <f:converter converterId="UserDateTimeConverter" />
+ </h:outputText>
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.alertDefinition.name">
+ <h:outputText styleClass="headerText" value="Alert Definition" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputLink value="/alerts/Config.do">
+ <f:param name="mode" value="viewRoles" />
+ <f:param name="id" value="#{Resource.id}"/>
+ <f:param name="ad" value="#{item.alert.alertDefinition.id}"/>
+ <h:outputText value="#{item.alert.alertDefinition.name}" />
+ </h:outputLink>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Alert Condition" />
+ </f:facet>
+ <h:outputText value="#{item.conditionText}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Actual Value" />
+ </f:facet>
+ <h:outputText value="#{item.conditionValue}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Ack by" />
+ </f:facet>
+ <h:outputText value="#{item.alert.acknowledgingSubject}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="a.acknowledgeTime">
+ <h:outputText styleClass="headerText" value="Ack date" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.alert.acknowledgeTime}">
+ <f:converter converterId="RelativeDurationConverter" />
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Recovery Info" />
+ </f:facet>
+ <h:outputText value="#{item.recoveryInfo}" />
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="9" width="100%">
+ <onc:selectCommandButton action="#{ListAlertHistoryUIBean.deleteSelectedAlerts}"
+ value="DELETE SELECTED" target="selectedAlerts" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+ <h:commandButton action="#{ListAlertHistoryUIBean.purgeAllAlerts}"
+ value="PURGE ALL" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+ <onc:selectCommandButton action="#{ListAlertHistoryUIBean.acknowledgeSelectedAlerts}"
+ value="ACKNOWLEDGE SELECTED" target="selectedAlerts" styleClass="on-pager-button buttonsmall"
+ rendered="#{ResourceUIBean.permissions.alert}" />
+
+
+
+ <ui:param name="paginationDataTableName" value="alertHistoryDataTable"/>
+ <ui:param name="paginationDataModel" value="#{alertHistoryDataModel}"/>
+ <ui:param name="paginationPageControl" value="#{PageControl.AlertHistoryList}"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <a4j:keepAlive beanName="ListAlertHistoryUIBean"/>
+
+ </rich:panel>
+ </h:form>
+
+ </ui:define>
+</ui:composition>
commit 0245ea3ea921514be30422fa5a6c62340f1a6736
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:20:41 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished resource > content tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 8944436..bd39bfc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -166,10 +166,6 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
- contentTab.updateSubTab("Deployed", new FullHTMLPane("/rhq/resource/content/view-plain.xhtml?id=" + resource.getId()));
- contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()));
- contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
- contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
// comment out GWT-based view until...
// 1) user can search event history by: metric display range, event source, event details, event severity
// 2) user can delete events if they possess the appropriate permissions
@@ -177,6 +173,14 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
eventsTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/events/history-plain.xhtml?id="
+ resource.getId()));
+ contentTab.updateSubTab("Deployed", new FullHTMLPane("/rhq/resource/content/view-plain.xhtml?id="
+ + resource.getId()));
+ contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id="
+ + resource.getId()));
+ contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id="
+ + resource.getId()));
+ contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id="
+ + resource.getId()));
// topTabSet.setSelectedTab(selectedTab);
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/deploy-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/deploy-plain.xhtml
index ef85b15..28cc396 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/deploy-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/deploy-plain.xhtml
@@ -1,34 +1,27 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
+ <ui:define name="content">
<h:form id="currentPackageVersionsForm">
<input type="hidden" name="id" value="${param.id}"/>
<rich:panel styleClass="BlockContent">
- <f:facet name="header"><h:outputText value="Packages Eligible for Deployment"/></f:facet>
<p>The following packages were found from the repositories currently subscribed to by this resource. In order
to enable more existing packages for deployment, use the subscriptions sub-tab to subscribe this resource
to more repositories.</p>
- <a4j:keepAlive beanName="ResourcePackageVersionsUIBean"/>
+ <a4j:keepAlive beanName="ResourcePackageVersionsUIBean"/>
<ui:param name="resourcePackageVersionsDataModel" value="#{ResourcePackageVersionsUIBean.dataModel}"/>
<rich:dataTable id="resourcePackageVersionsDataTable"
@@ -37,7 +30,7 @@
var="item"
width="100%"
columnsWidth="1%, 15%, 10%, 10%, 10%, 54%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -113,7 +106,7 @@
value="DEPLOY SELECTED" target="selectedPackages" styleClass="on-pager-button buttonsmall"
rendered="${ResourceUIBean.permissions.content}"/>
- <ui:include src="/rhq/resource/include/pagination.xhtml">
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml">
<ui:param name="paginationDataTableName" value="resourcePackageVersionsDataTable"/>
<ui:param name="paginationDataModel" value="#{resourcePackageVersionsDataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.ResourcePackageVersionsList}"/>
@@ -144,5 +137,5 @@
</rich:panel>
</h:form>
-</body>
-</html>
+ </ui:define>
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-plain.xhtml
index 01ae31c..a237c26 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/history-plain.xhtml
@@ -24,7 +24,7 @@
<h:form id="contentaRequestsForm">
<input type="hidden" name="id" value="${param.id}"/>
-<rich:panel>
+<rich:panel styleClass="BlockContent">
<f:facet name="header"><h:outputText value="Currently Executing Requests"/></f:facet>
<i><h:outputText value="There are no currently executing content requests"
@@ -37,7 +37,7 @@
var="item"
width="100%"
columnsWidth="16%, 17%, 16%, 16%, 16%, 16%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -124,7 +124,7 @@
<ui:param name="paginationDataTableName" value="contentInProgressRequestsDataTable"/>
<ui:param name="paginationDataModel" value="#{ListInProgressContentRequestsUIBean.dataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.ContentInProgressRequestsList}"/>
- <ui:include src="../include/pagination.xhtml"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
</rich:column>
</rich:columnGroup>
</f:facet>
@@ -134,13 +134,12 @@
</rich:panel>
-<rich:panel>
+<rich:panel styleClass="BlockContent">
<f:facet name="header"><h:outputText value="Completed Requests"/></f:facet>
<i><h:outputText value="There are no completed content requests"
rendered="#{ListCompletedContentRequestsUIBean.dataModel.rowCount eq 0}"/></i>
-
<rich:dataTable rendered="#{ListCompletedContentRequestsUIBean.dataModel.rowCount gt 0}"
binding="#{ListCompletedContentRequestsUIBean.dataTable}"
id="contentCompletedRequestsDataTable"
@@ -149,7 +148,7 @@
var="item"
width="100%"
columnsWidth="16%, 17%, 16%, 16%, 16%, 16%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -236,18 +235,16 @@
<ui:param name="paginationDataTableName" value="contentCompletedRequestsDataTable"/>
<ui:param name="paginationDataModel" value="#{ListCompletedContentRequestsUIBean.dataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.ContentCompletedRequestsList}"/>
- <ui:include src="../include/pagination.xhtml"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
</rich:column>
</rich:columnGroup>
</f:facet>
</rich:dataTable>
-
-
</rich:panel>
-<rich:panel>
+<rich:panel styleClass="BlockContent">
<f:facet name="header"><h:outputText value="Full Package Audit Trail"/></f:facet>
<p>The following is a complete listing of all of the package operations that have occurred on this resource.
@@ -266,7 +263,7 @@
var="item"
width="100%"
columnsWidth="20%, 20%, 20%, 10%, 20%, 10%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -346,15 +343,13 @@
<ui:param name="paginationDataTableName" value="auditTrailDataTable"/>
<ui:param name="paginationDataModel" value="#{AuditTrailUIBean.dataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.AuditTrailList}"/>
- <ui:include src="../include/pagination.xhtml"/>
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml"/>
</rich:column>
</rich:columnGroup>
</f:facet>
-
</rich:dataTable>
-
</rich:panel>
</h:form>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/installed_package_details-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/installed_package_details-plain.xhtml
index cf93350..61d62b0 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/installed_package_details-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/installed_package_details-plain.xhtml
@@ -1,24 +1,16 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
- xmlns:rich="http://richfaces.ajax4jsf.org/rich"
- xmlns:a4j="http://richfaces.org/a4j">
-
-
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
+ <ui:define name="content">
<a4j:keepAlive beanName="ListPackageHistoryUIBean"/>
@@ -73,7 +65,6 @@
var="item"
width="100%"
columnsWidth="20%, 20%, 20%, 20%, 20%"
- headerClass="tableRowHeader"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -153,5 +144,5 @@
<h:outputLink value="/rhq/resource/content/view-plain.xhtml?id=#{param.id}">
<h:outputText value="Return to Packages"/>
</h:outputLink>
-</body>
-</html>
+ </ui:define>
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml
index c5fb200..c5e970d 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml
@@ -1,30 +1,24 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
+ <ui:define name="content">
+
<!-- CURRENT REPOS -->
<h:form id="currentRepoForm">
<input type="hidden" name="id" value="${param.id}"/>
<rich:panel styleClass="BlockContent">
<f:facet name="header"><h:outputText value="Current Resource Subscriptions"/></f:facet>
- <a4j:keepAlive beanName="ResourceReposUIBean"/>
+ <a4j:keepAlive beanName="ResourceReposUIBean"/>
<ui:param name="resourceReposDataModel" value="#{ResourceReposUIBean.dataModel}"/>
<rich:dataTable id="resourceReposDataTable"
@@ -33,7 +27,7 @@
var="item"
width="100%"
columnsWidth="1%, 25%, 40%, 5%, 15%, 15%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -115,7 +109,7 @@
styleClass="on-pager-button buttonsmall"
rendered="${GlobalPermissionsUIBean.inventory}"/>
- <ui:include src="/rhq/resource/include/pagination.xhtml">
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml">
<ui:param name="paginationDataTableName" value="resourceReposDataTable"/>
<ui:param name="paginationDataModel" value="#{resourceReposDataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.ResourceReposList}"/>
@@ -137,7 +131,7 @@
<rich:panel styleClass="BlockContent">
<f:facet name="header"><h:outputText value="Available Repositories"/></f:facet>
- <a4j:keepAlive beanName="AvailableResourceReposUIBean"/>
+ <a4j:keepAlive beanName="AvailableResourceReposUIBean"/>
<ui:param name="availableResourceReposDataModel" value="#{AvailableResourceReposUIBean.dataModel}"/>
<rich:dataTable id="availableResourceReposDataTable"
@@ -146,7 +140,7 @@
var="item"
width="100%"
columnsWidth="1%, 25%, 40%, 5%, 15%, 15%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -228,7 +222,7 @@
styleClass="on-pager-button buttonsmall"
rendered="${GlobalPermissionsUIBean.inventory}"/>
- <ui:include src="/rhq/resource/include/pagination.xhtml">
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml">
<ui:param name="paginationDataTableName" value="availableResourceReposDataTable"/>
<ui:param name="paginationDataModel" value="#{availableResourceReposDataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.AvailableResourceReposList}"/>
@@ -254,6 +248,5 @@
</h:form>
-</body>
-
-</html>
+ </ui:define>
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/view-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/view-plain.xhtml
index 918c3ce..7ff59f3 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/view-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/view-plain.xhtml
@@ -1,41 +1,28 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
+ <ui:define name="content">
+
<!-- Content Table -->
<h:form id="contentForm">
<input type="hidden" name="id" value="${param.id}"/>
<rich:panel styleClass="BlockContent">
-
- <f:facet name="header"><h:outputText value="Deployed Content"/></f:facet>
-
- <a4j:log level="debug" width="400"/>
-
-
<h:panelGrid columns="3" width="100%">
<h:panelGroup>
<h:outputText value="Filter: " />
<h:inputText id="search" value="#{ListPackagesUIBean.search}">
<a4j:support event="onchange"
- status="commonStatus"
reRender="packagesDataTable, packagesDataTableScroller"
actionListener="#{ListPackagesUIBean.clearDataModel}"/>
</h:inputText>
@@ -46,7 +33,6 @@
<h:selectOneMenu id="packageTypeFilter"
value="#{ListPackagesUIBean.packageTypeFilter}">
<a4j:support event="onchange"
- status="commonStatus"
reRender="packagesDataTable, packagesDataTableScroller"
actionListener="#{ListPackagesUIBean.clearDataModel}"/>
<f:selectItems value="#{ListPackagesUIBean.packageTypes}" />
@@ -58,7 +44,6 @@
<h:selectOneMenu id="packageVersionFilter"
value="#{ListPackagesUIBean.packageVersionFilter}">
<a4j:support event="onchange"
- status="commonStatus"
reRender="packagesDataTable, packagesDataTableScroller"
actionListener="#{ListPackagesUIBean.clearDataModel}"/>
<f:selectItems value="#{ListPackagesUIBean.packageVersions}" />
@@ -66,9 +51,9 @@
</h:panelGroup>
</h:panelGrid>
+ <br/>
- <a4j:keepAlive beanName="ListPackagesUIBean"/>
-
+ <a4j:keepAlive beanName="ListPackagesUIBean"/>
<ui:param name="packagesDataModel" value="#{ListPackagesUIBean.dataModel}"/>
<rich:dataTable id="packagesDataTable"
@@ -77,7 +62,7 @@
var="item"
width="100%"
columnsWidth="1%, 35%, 30%, 15%, 19%"
- headerClass="tableRowHeader"
+ styleClass="resources-table"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -153,7 +138,7 @@
<onc:selectCommandButton action="#{DeletePackagesUIBean.beginDeleteWorkflow}"
value="DELETE SELECTED" target="selectedPackages" styleClass="on-pager-button buttonsmall"/>
- <ui:include src="../include/pagination.xhtml">
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml">
<ui:param name="paginationDataTableName" value="packagesDataTable"/>
<ui:param name="paginationDataModel" value="#{packagesDataModel}"/>
<ui:param name="paginationPageControl" value="#{PageControl.InstalledPackagesList}"/>
@@ -166,5 +151,5 @@
</rich:panel>
</h:form>
-</body>
-</html>
+ </ui:define>
+</ui:composition>
commit 6c658cc0dbcff6b9090e71d05349e5b71e170fcd
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:19:59 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished resource > events tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 63e34e8..8944436 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -165,12 +165,17 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
alertsTab.updateSubTab("History", new ResourceAlertHistoryView(resource.getId()));
alertsTab.updateSubTab("Definitions", AlertDefinitionsView.getResourceView(resource));
- eventsTab.updateSubTab("History", EventHistoryView.createResourceHistoryView(resource.getId())); //new FullHTMLPane("/rhq/common/events/history-plain.xhtml?id=" + resource.getId()));
contentTab.updateSubTab("Deployed", new FullHTMLPane("/rhq/resource/content/view-plain.xhtml?id=" + resource.getId()));
contentTab.updateSubTab("New", new FullHTMLPane("/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()));
contentTab.updateSubTab("Subscriptions", new FullHTMLPane("/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()));
contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
+ // comment out GWT-based view until...
+ // 1) user can search event history by: metric display range, event source, event details, event severity
+ // 2) user can delete events if they possess the appropriate permissions
+ //eventsTab.updateSubTab("History", EventHistoryView.createResourceHistoryView(resource.getId()));
+ eventsTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/events/history-plain.xhtml?id="
+ + resource.getId()));
// topTabSet.setSelectedTab(selectedTab);
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/events/history-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/events/history-plain.xhtml
index fc68398..21bbc81 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/events/history-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/events/history-plain.xhtml
@@ -1,5 +1,5 @@
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
@@ -10,11 +10,6 @@
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css" />
-</head>
-<body>
-
<h:form id="eventHistoryForm" >
<a4j:keepAlive beanName="EventHistoryUIBean"/>
@@ -36,16 +31,12 @@
</c:if>
<rich:panel styleClass="BlockContent">
- <f:facet name="header">
- <h:outputText value="Events" />
- </f:facet>
<h:panelGrid columns="3" cellspacing="3">
<h:outputLabel for="sourceFilter" value="Source Filter: " />
<h:inputText id="sourceFilter" value="#{EventHistoryUIBean.sourceFilter}"
style="width: 300px;">
<a4j:support event="onchange"
- status="commonStatus"
reRender="eventHistoryDataTable, eventHistoryDataTableScroller"
actionListener="#{EventHistoryUIBean.clearDataModel}" />
</h:inputText>
@@ -56,7 +47,6 @@
onkeypress="return ignoreEnterKey(event);"
style="width: 300px;" />
<a4j:support event="onchange"
- status="commonStatus"
reRender="eventHistoryDataTable, eventHistoryDataTableScroller"
actionListener="#{EventHistoryUIBean.clearDataModel}" />
<rich:spacer/>
@@ -65,7 +55,6 @@
<h:selectManyCheckbox id="severityFilter" value="#{EventHistoryUIBean.severityFilter}"
style="width: 300px;">
<a4j:support event="onchange"
- status="commonStatus"
reRender="eventHistoryDataTable,eventHistoryDataTableScroller"
actionListener="#{EventHistoryUIBean.clearDataModel}" />
@@ -73,7 +62,6 @@
</h:selectManyCheckbox>
<a4j:commandButton value="GO"
- status="commonStatus"
reRender="eventHistoryDataTable,eventHistoryDataTableScroller"
actionListener="#{EventHistoryUIBean.clearDataModel}"
styleClass="buttonmed">
@@ -91,7 +79,6 @@
var="item"
width="100%"
styleClass="resources-table"
- headerClass="tableRowHeader"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -178,7 +165,7 @@
<ui:param name="paginationDataTableName" value="eventHistoryDataTable" />
<ui:param name="paginationDataModel" value="#{eventHistoryDataModel}" />
<ui:param name="paginationPageControl" value="#{PageControl.EventsHistoryList}" />
- <ui:include src="/rhq/resource/include/pagination.xhtml" />
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml" />
</rich:column>
</rich:columnGroup>
</f:facet>
@@ -252,6 +239,4 @@
</rich:modalPanel>
</h:form>
-</body>
-</html>
-
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/events/history-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/events/history-plain.xhtml
new file mode 100644
index 0000000..4cc4ca4
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/events/history-plain.xhtml
@@ -0,0 +1,20 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <ui:include src="/rhq/common/events/history-plain.xhtml"/>
+
+ </ui:define>
+
+</ui:composition>
+
commit 74ac7e6a4910b36c67e211350d2a84e3ba6c80ff
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:19:04 2010 -0400
implement "plain" scheme using iframed-facelets for unfinished resource > monitor tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index e4cec95..63e34e8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -143,12 +143,16 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
+ resource.getId()));
monitoringTab.updateSubTab("Graphs", new GraphListView(resource)); // new FullHTMLPane("/rhq/common/monitor/graphs.xhtml?id=" + resource.getId()));
- monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/common/monitor/tables-plain.xhtml?id=" + resource.getId()));
- monitoringTab.updateSubTab("Traits", new FullHTMLPane("/rhq/resource/monitor/traits-plain.xhtml?id=" + resource.getId()));
- monitoringTab.updateSubTab("Availability", new FullHTMLPane("/rhq/resource/monitor/availabilityHistory-plain.xhtml?id=" + resource.getId()));
- monitoringTab.updateSubTab("Schedules", new FullHTMLPane("/rhq/resource/monitor/schedules-plain.xhtml?id=" + resource.getId()));
- monitoringTab.updateSubTab("Call Time", new CallTimeView(resource));
-
+ monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/common/monitor/tables-plain.xhtml?id="
+ + resource.getId()));
+ monitoringTab.updateSubTab("Traits", new FullHTMLPane("/rhq/resource/monitor/traits-plain.xhtml?id="
+ + resource.getId()));
+ monitoringTab.updateSubTab("Availability", new FullHTMLPane(
+ "/rhq/resource/monitor/availabilityHistory-plain.xhtml?id=" + resource.getId()));
+ monitoringTab.updateSubTab("Schedules", new FullHTMLPane("/rhq/resource/monitor/schedules-plain.xhtml?id="
+ + resource.getId()));
+ monitoringTab.updateSubTab("Call Time", new FullHTMLPane("/rhq/resource/monitor/response-plain.xhtml?id="
+ + resource.getId()));
inventoryTab.updateSubTab("Children", ResourceSearchView.getChildrenOf(resource.getId()));
inventoryTab.updateSubTab("Connection Settings", new PluginConfigurationEditView(resource)); // new ConfigurationEditor(resource.getId(), resource.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin));
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml
new file mode 100644
index 0000000..aa6576f
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/response-plain.xhtml
@@ -0,0 +1,173 @@
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+
+ <rich:panel styleClass="BlockContent">
+
+ <c:if test="#{!ResourceUIBean.facets.callTime}">
+ <c:if test="#{CallTimeUIBean.context.resourceId != -1}">
+ Response Time Metrics are not supported for this resource.
+ </c:if>
+ <c:if test="#{CallTimeUIBean.context.groupId != -1}">
+ Response Time Metrics are not supported for this compatible group.
+ </c:if>
+ <c:if test="#{CallTimeUIBean.context.parentResourceId != -1 and CallTimeUIBean.context.resourceTypeId != -1}">
+ Response Time Metrics are not supported for this auto-group.
+ </c:if>
+
+ </c:if>
+
+ <c:if test="#{ResourceUIBean.facets.callTime}">
+ <h:form id="callTimeForm">
+ <a4j:keepAlive beanName="CallTimeUIBean"/>
+
+ <!-- On submit make sure these are provided for the context of any new instance of the UI beans -->
+ <c:if test="#{CallTimeUIBean.context.resourceId != -1}">
+ <input type="hidden" name="id" value="#{CallTimeUIBean.context.resourceId}" />
+ </c:if>
+ <c:if test="#{CallTimeUIBean.context.groupId != -1}">
+ <input type="hidden" name="groupId" value="#{CallTimeUIBean.context.groupId}" />
+ </c:if>
+ <c:if
+ test="#{CallTimeUIBean.context.parentResourceId != -1}">
+ <input type="hidden" name="parent" value="#{CallTimeUIBean.context.parentResourceId}" />
+ </c:if>
+ <c:if test="#{CallTimeUIBean.context.resourceTypeId != -1}">
+ <input type="hidden" name="type" value="#{CallTimeUIBean.context.resourceTypeId}" />
+ </c:if>
+
+ <h:panelGrid columns="3" cellspacing="3">
+ <h:outputLabel for="destinationFilter" value="Destination Filter: " />
+ <h:inputText id="destinationFilter" value="#{CallTimeUIBean.destinationFilter}"
+ onkeypress="return ignoreEnterKey(event);"
+ style="width: 300px;" />
+ <a4j:commandButton value="GO" reRender="callTimeDataTable, callTimeDataTableScroller"
+ actionListener="#{CallTimeUIBean.clearDataModel}"
+ styleClass="buttonmed">
+ <s:defaultAction/>
+ </a4j:commandButton>
+ </h:panelGrid>
+
+ <ui:param name="callTimeDataModel" value="#{CallTimeUIBean.dataModel}" />
+ <rich:dataTable id="callTimeDataTable"
+ value="#{callTimeDataModel}"
+ rows="#{PageControl.CallTimeHistory.pageSize}"
+ var="item"
+ width="100%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
+ onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+
+ <f:facet name="PageControlView">
+ <onc:paginationControl id="CallTimeHistory" />
+ </f:facet>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="calltimedatavalue.key.callDestination">
+ <h:outputText value="Destination" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{onf:elideString(item.callDestination, 50, 'left')}" title="#{item.callDestination}"/>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="SUM(calltimedatavalue.count)">
+ <h:outputText value="Request Count" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.count}" />
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="MIN(calltimedatavalue.minimum)">
+ <h:outputText value="Minimum" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.minimum}">
+ <f:converter converterId="ShortDurationConverter"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="SUM(calltimedatavalue.total)/SUM(calltimedatavalue.count)">
+ <h:outputText value="Average" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.average}">
+ <f:converter converterId="ShortDurationConverter"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="MAX(calltimedatavalue.maximum)">
+ <h:outputText value="Maximum" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.maximum}">
+ <f:converter converterId="ShortDurationConverter"/>
+ </h:outputText>
+ </rich:column>
+
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="SUM(calltimedatavalue.total)">
+ <h:outputText value="Total" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+ <h:outputText value="#{item.total}">
+ <f:converter converterId="ShortDurationConverter"/>
+ </h:outputText>
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:columnGroup>
+ <rich:column colspan="6" width="100%">
+ <ui:param name="paginationDataTableName" value="callTimeDataTable" />
+ <ui:param name="paginationDataModel" value="#{callTimeDataModel}" />
+ <ui:param name="paginationPageControl" value="#{PageControl.CallTimeHistory}" />
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <table>
+ <tr>
+ <td><onc:metric optionList="m,h,d" /></td>
+ <td>
+ <h:commandLink rendered="#{not MetricComponentUtilityUIBean.readOnly}"
+ action="#{MetricComponentUtilityUIBean.update}" >
+ <img src="/images/dash-button_go-arrow.gif" alt="Apply Metric Settings "/>
+ </h:commandLink>
+ <h:commandLink rendered="#{MetricComponentUtilityUIBean.readOnly}"
+ action="#{MetricComponentUtilityUIBean.switchToSimpleMode}">
+ <h:outputText value="Switch to Simple Mode" />
+ </h:commandLink>
+ </td>
+ </tr>
+ </table>
+
+ </h:form>
+ </c:if>
+
+ </rich:panel>
+
+ </ui:define>
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/tables-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/tables-plain.xhtml
index b75b9b2..b6664e3 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/tables-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/monitor/tables-plain.xhtml
@@ -1,28 +1,19 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:c="http://java.sun.com/jstl/core"
- xmlns:onc="http://jboss.org/on/component"
- xmlns:onf="http://jboss.org/on/function"
- xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
- xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-
-<ui:composition>
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
<rich:panel styleClass="BlockContent">
- <f:facet name="header" styleClass="BlockTitle">
- <a name="Numeric Metrics" />
- Numeric Metrics
- </f:facet>
-
<h:form id="metricsTableForm">
<!-- On submit make sure these are provided for the context of any new instance of the UI beans -->
<c:if test="#{MetricsTableUIBean.context.resourceId != -1}">
@@ -43,11 +34,12 @@
value="#{MetricsTableUIBean.context.resourceTypeId}" />
</c:if>
-
<rich:dataTable value="#{MetricsTableUIBean.metricSummaries}"
width="100%"
var="metric"
- columnsWidth="1%"
+ columnsWidth="1%,40%,12%,12%,12%,12%,12%"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -159,10 +151,10 @@
</td>
</tr>
</table>
+
</h:form>
</rich:panel>
-</ui:composition>
-
-</html>
+ </ui:define>
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/availabilityHistory-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/availabilityHistory-plain.xhtml
index 545e523..27f9d7a 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/availabilityHistory-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/availabilityHistory-plain.xhtml
@@ -1,29 +1,16 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-
-<body>
- <f:facet name="header" styleClass="BlockTitle">
- <a name="AvailabilityHistory"/>
- Availability History
- </f:facet>
-
+ <ui:define name="content">
<h:panelGroup layout="block" rendered="#{ListAvailabilityHistoryUIBean.dataModel.rowCount == 0}">
This resource does not currently have any availability history.
@@ -135,8 +122,7 @@
rendered="#{availability.availabilityType == 'DOWN'}"/>
<h:graphicImage value="/images/icons/availability_grey_16.png" alt="Unknown" title="Unknown"
rendered="#{availability.availabilityType == null}"/>
-
- <h:outputText value="#{availability.availabilityType}"/>
+ <h:outputText value=" #{availability.availabilityType}"/>
</rich:column>
<rich:column
@@ -181,7 +167,7 @@
<rich:columnGroup>
<rich:column colspan="4">
- <ui:include src="../include/pagination.xhtml">
+ <ui:include src="/rhq/resource/include/pagination-plain.xhtml">
<ui:param name="paginationDataTableName" value="availabilityHistoryDataTable"/>
<ui:param name="paginationDataModel" value="#{availabilityHistoryDataModel}"/>
<ui:param name="paginationPageControl"
@@ -195,6 +181,7 @@
</h:form>
</rich:panel>
-</body>
-</html>
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/response-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/response-plain.xhtml
new file mode 100644
index 0000000..e19932a
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/response-plain.xhtml
@@ -0,0 +1,14 @@
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:include src="/rhq/common/monitor/response-plain.xhtml" />
+
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/schedules-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/schedules-plain.xhtml
index a9d1ab3..8854225 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/schedules-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/schedules-plain.xhtml
@@ -1,10 +1,5 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
@@ -14,13 +9,13 @@
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
- <h:outputText rendered="#{not ResourceUIBean.permissions.measure}" value="You don't have the measure permission for this resource and therefore can not change metric schedules"/>
+ <ui:define name="content">
+ <rich:panel styleClass="BlockContent">
+
+ <h:outputText rendered="#{not ResourceUIBean.permissions.measure}"
+ value="You don't have the measure permission for this resource and therefore can not change metric schedules"/>
<h:form id="resourceSchedulesForm">
<!-- hack to override the default button on the page, make this button pseudo-first in the form,
@@ -33,13 +28,6 @@
rendered="#{ResourceUIBean.permissions.measure}" />
</div>
<input type="hidden" name="id" value="${param.id}"/>
-
- <rich:panel styleClass="BlockContent">
- <f:facet name="header">
- <h:outputText value="Configure Metric Collection Schedules"/>
- </f:facet>
-
- <h:panelGrid columns="1" styleClass="data-table">
<ui:param name="resourceSchedulesDataModel" value="#{ListResourceMeasurementScheduleUIBean.dataModel}"/>
<rich:dataTable id="resourceSchedulesDataTable"
@@ -49,7 +37,6 @@
width="100%"
columnsWidth="1%, 20%, 30%, 20%, 9%, 20%"
styleClass="resources-table"
- headerClass="tableRowHeader"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -163,10 +150,9 @@
</f:facet>
</rich:dataTable>
-
- </h:panelGrid>
-
- </rich:panel>
</h:form>
-</body>
-</html>
+
+ </rich:panel>
+
+ </ui:define>
+</ui:composition>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/traits-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/traits-plain.xhtml
index 9038116..61a1014 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/traits-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/monitor/traits-plain.xhtml
@@ -1,30 +1,19 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
+<ui:composition template="/rhq/resource/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:onc="http://jboss.org/on/component"
xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-<head>
- <link rel="stylesheet" href="/css/win.css" type="text/css"/>
-</head>
-<body>
+ <ui:define name="content">
+
<rich:panel styleClass="BlockContent">
- <f:facet name="header" styleClass="BlockTitle">
- <a name="Traits"/>
- Traits
- </f:facet>
-
<rich:dataTable value="#{ResourceMetricsTableUIBean.traitSummaries}"
width="100%"
var="metric"
@@ -80,6 +69,8 @@
<rich:dataTable value="#{ResourceMetricsTableUIBean.traitHistory}"
width="100%"
var="history"
+ styleClass="resources-table"
+ footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
@@ -101,5 +92,5 @@
</rich:dataTable>
</rich:panel>
-</body>
-</html>
+ </ui:define>
+</ui:composition>
diff --git a/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml b/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml
index b3079dd..0ea6e12 100644
--- a/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml
+++ b/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml
@@ -759,10 +759,6 @@
<position
name="Monitor.Schedules"
placement="after" />
- <activators>
- <facet
- name="call_time" />
- </activators>
</tab>
<!-- Inventory Subtabs -->
commit 8ff2464dbb943f9e87f7ad57d0dd87b53c2d94fb
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:15:25 2010 -0400
reformat, cosmetic
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 7415ba7..e4cec95 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -32,9 +32,7 @@ import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.composite.ResourcePermission;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.ViewId;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
-import org.rhq.enterprise.gui.coregui.client.alert.definitions.AlertDefinitionsView;
import org.rhq.enterprise.gui.coregui.client.components.FullHTMLPane;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTab;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedEvent;
@@ -43,14 +41,10 @@ import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSet;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSearchView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSelectListener;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.alert.ResourceAlertHistoryView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.configuration.ConfigurationHistoryView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.configuration.ResourceConfigurationEditView;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.event.EventHistoryView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.inventory.PluginConfigurationEditView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.GraphListView;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.calltime.CallTimeView;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.operation.OperationHistoryView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.overview.ResourceOverviewView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
@@ -59,7 +53,8 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTyp
*
* @author Greg Hinkle
*/
-public class ResourceDetailView extends VLayout implements BookmarkableView, ResourceSelectListener, TwoLevelTabSelectedHandler {
+public class ResourceDetailView extends VLayout implements BookmarkableView, ResourceSelectListener,
+ TwoLevelTabSelectedHandler {
private static final String DEFAULT_TAB_NAME = "Summary";
@@ -80,7 +75,6 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
private ResourceTitleBar titleBar;
-
public void setResource(Resource resource) {
this.resource = resource;
}
@@ -92,7 +86,6 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
setWidth100();
setHeight100();
-
// The Tabs section
topTabSet = new TwoLevelTabSet();
@@ -126,8 +119,8 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
contentTab = new TwoLevelTab("Content", "/images/icons/Content_grey_16.png");
contentTab.registerSubTabs("Deployed", "New", "Subscriptions", "History");
- topTabSet.setTabs(summaryTab, monitoringTab, inventoryTab, operationsTab, alertsTab, configurationTab, eventsTab, contentTab);
-
+ topTabSet.setTabs(summaryTab, monitoringTab, inventoryTab, operationsTab, alertsTab, configurationTab,
+ eventsTab, contentTab);
topTabSet.addTwoLevelTabSelectedHandler(this);
@@ -136,7 +129,7 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
addMember(topTabSet);
-// CoreGUI.addBreadCrumb(getPlace());
+ // CoreGUI.addBreadCrumb(getPlace());
}
public void onResourceSelected(Resource resource) {
@@ -144,11 +137,10 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
this.resource = resource;
titleBar.setResource(resource);
-
- FullHTMLPane timelinePane = new FullHTMLPane("/rhq/resource/summary/timeline-plain.xhtml?id=" + resource.getId());
- summaryTab.updateSubTab("Overview", new ResourceOverviewView(resource));
- summaryTab.updateSubTab("Timeline", timelinePane);
+ summaryTab.updateSubTab("Overview", new ResourceOverviewView(resource));
+ summaryTab.updateSubTab("Timeline", new FullHTMLPane("/rhq/resource/summary/timeline-plain.xhtml?id="
+ + resource.getId()));
monitoringTab.updateSubTab("Graphs", new GraphListView(resource)); // new FullHTMLPane("/rhq/common/monitor/graphs.xhtml?id=" + resource.getId()));
monitoringTab.updateSubTab("Tables", new FullHTMLPane("/rhq/common/monitor/tables-plain.xhtml?id=" + resource.getId()));
@@ -177,45 +169,42 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
contentTab.updateSubTab("History", new FullHTMLPane("/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()));
-// topTabSet.setSelectedTab(selectedTab);
+ // topTabSet.setSelectedTab(selectedTab);
updateTabStatus();
topTabSet.markForRedraw();
}
-
private void updateTabStatus() {
// Go and get the type with all needed metadata
// and then get the permissions for this resource
- ResourceTypeRepository.Cache.getInstance().getResourceTypes(resource.getResourceType().getId(),
- EnumSet.of(ResourceTypeRepository.MetadataType.content,
- ResourceTypeRepository.MetadataType.operations,
- ResourceTypeRepository.MetadataType.events,
- ResourceTypeRepository.MetadataType.resourceConfigurationDefinition),
- new ResourceTypeRepository.TypeLoadedCallback() {
- public void onTypesLoaded(ResourceType type) {
-
- ResourceDetailView.this.type = type;
-
- GWTServiceLookup.getAuthorizationService().
- getImplicitResourcePermissions(ResourceDetailView.this.resource.getId(),
- new AsyncCallback<Set<Permission>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load resource permissions", caught);
- }
-
- public void onSuccess(Set<Permission> result) {
- ResourceDetailView.this.permissions = new ResourcePermission(result);
- completeTabUpdate();
- }
- });
- }
- });
+ ResourceTypeRepository.Cache.getInstance().getResourceTypes(
+ resource.getResourceType().getId(),
+ EnumSet.of(ResourceTypeRepository.MetadataType.content, ResourceTypeRepository.MetadataType.operations,
+ ResourceTypeRepository.MetadataType.events,
+ ResourceTypeRepository.MetadataType.resourceConfigurationDefinition),
+ new ResourceTypeRepository.TypeLoadedCallback() {
+ public void onTypesLoaded(ResourceType type) {
+
+ ResourceDetailView.this.type = type;
+
+ GWTServiceLookup.getAuthorizationService().getImplicitResourcePermissions(
+ ResourceDetailView.this.resource.getId(), new AsyncCallback<Set<Permission>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to load resource permissions", caught);
+ }
+
+ public void onSuccess(Set<Permission> result) {
+ ResourceDetailView.this.permissions = new ResourcePermission(result);
+ completeTabUpdate();
+ }
+ });
+ }
+ });
}
-
private void completeTabUpdate() {
if (!permissions.isMeasure()) {
@@ -224,13 +213,13 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
topTabSet.enableTab(monitoringTab);
}
- if (type.getOperationDefinitions() == null || type.getOperationDefinitions().isEmpty() || !permissions.isControl()) {
+ if (type.getOperationDefinitions() == null || type.getOperationDefinitions().isEmpty()
+ || !permissions.isControl()) {
topTabSet.disableTab(operationsTab);
} else {
topTabSet.enableTab(operationsTab);
}
-
if (!permissions.isAlert()) {
topTabSet.disableTab(alertsTab);
} else {
@@ -255,14 +244,12 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
topTabSet.enableTab(contentTab);
}
-
if (topTabSet.getSelectedTab().getDisabled()) {
topTabSet.selectTab(0);
}
}
-
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
// Switch tabs directly, rather than letting the history framework do it, to avoid redrawing the outer views.
selectTab(tabSelectedEvent.getId(), tabSelectedEvent.getSubTabId());
@@ -273,24 +260,22 @@ public class ResourceDetailView extends VLayout implements BookmarkableView, Res
History.newItem(path, false);
}
-
public void renderView(ViewPath viewPath) {
// e.g. #Resource/10010/Inventory/Overview
- String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
+ String tabName = (!viewPath.isEnd()) ? viewPath.getCurrent().getPath() : null; // e.g. "Inventory"
String subTabName = (viewPath.viewsLeft() >= 1) ? viewPath.getNext().getPath() : null; // e.g. "Overview"
selectTab(tabName, subTabName);
}
-
public void selectTab(String tabName, String subtabName) {
if (tabName == null) {
tabName = DEFAULT_TAB_NAME;
}
- TwoLevelTab tab = (TwoLevelTab)this.topTabSet.getTabByTitle(tabName);
+ TwoLevelTab tab = (TwoLevelTab) this.topTabSet.getTabByTitle(tabName);
if (tab == null) {
CoreGUI.getErrorHandler().handleError("Invalid tab name: " + tabName);
// TODO: Should we fire a history event here to redirect to a valid bookmark?
- tab = (TwoLevelTab)this.topTabSet.getTabByTitle(DEFAULT_TAB_NAME);
+ tab = (TwoLevelTab) this.topTabSet.getTabByTitle(DEFAULT_TAB_NAME);
}
this.topTabSet.selectTab(tab);
if (subtabName != null) {
commit e666b220a74d9784863570d292662fc5259781b1
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:10:53 2010 -0400
prepare "plain" navigation scheme for iframed-facelets
* copy/paste entire XXX-navigation.xml file to XXX-plain-navigation.xml
* search/replace *.xhtml with *-plain.xhtml inside each
* do this for the follow resource subsystems:
** alerts, content, events, measurement, operations
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/alert-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/alert-plain-navigation.xml
new file mode 100644
index 0000000..2bbef2d
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/alert-plain-navigation.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- Alert Definition List -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/alert/listAlertDefinitions-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/alert/listAlertDefinitions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createNewAlertDefinition</from-outcome>
+ <to-view-id>/alerts/Config.do?id=#{param.id}&mode=new&nomenu=true</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/alert/listAlertDefinitions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Alert Templates List -->
+ <navigation-rule>
+ <from-view-id>/rhq/admin/listAlertTemplates-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/admin/listAlertTemplates-plain.xhtml?type=#{param.type}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createNewAlertTemplate</from-outcome>
+ <to-view-id>/alerts/Config.do?type=#{param.type}&mode=new&nomenu=true</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/admin/listAlertTemplates-plain.xhtml?type=#{param.type}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Alert History List -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/alert/listAlertHistory-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>dateFilter</from-outcome>
+ <to-view-id>/rhq/resource/alert/listAlertHistory-plain.xhtml?id=#{param.id}&date=#{param.date}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/alert/listAlertHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/alert/listAlertHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- CRUD for alert notification templates -->
+ <navigation-rule>
+ <from-view-id>/rhq/admin/alert/template/notification/list-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>create</from-outcome>
+ <to-view-id>/rhq/admin/alert/template/notification/new-plain.xhtml</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/admin/alert/template/notification/list-plain.xhtml</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/admin/alert/template/notification/new-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/admin/alert/template/notification/details-plain.xhtml?mode=view&templateId=#{NewAlertNotificationTemplateUIBean.createdTemplateId}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/admin/alert/template/notification/list-plain.xhtml</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/admin/alert/template/notification/details-plain.xhtml</from-view-id>
+
+ <!-- navigation cases for CRUD of general properties -->
+ <navigation-case>
+ <from-action>#{AlertNotificationTemplateDetailsUIBean.edit}</from-action>
+ <to-view-id>/rhq/admin/alert/template/notification/details-plain.xhtml?mode=edit&templateId=#{param.templateId}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{AlertNotificationTemplateDetailsUIBean.save}</from-action>
+ <to-view-id>/rhq/admin/alert/template/notification/details-plain.xhtml?mode=view&templateId=#{param.templateId}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{AlertNotificationTemplateDetailsUIBean.cancel}</from-action>
+ <to-view-id>/rhq/admin/alert/template/notification/details-plain.xhtml?mode=view&templateId=#{param.templateId}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <!-- navigation case to go to the common page for editing alert notifications -->
+ <navigation-case>
+ <from-action>#{AlertNotificationTemplateDetailsUIBean.editNotifications}</from-action>
+ <to-view-id>/rhq/common/alert/notification/details-plain.xhtml?context=template&contextId=#{param.templateId}</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- alert notifications and custom sender UI -->
+ <navigation-rule>
+ <from-view-id>/rhq/common/alert/notification/details-plain.xhtml</from-view-id>
+
+ <!-- refresh *with* notification ID when: -->
+ <!-- 1) selecting an alert notification element from the table -->
+ <!-- 2) save alert notifications that use a configuration-based rendering schemes -->
+ <!-- 3) save alert notifications that use custom rendering schemes -->
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/common/alert/notification/details-plain.xhtml?context=#{param.context}&contextId=#{param.contextId}&contextSubId=#{param.contextSubId}&nid=#{alertNotificationsUIBean.activeNotification.id}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+
+ <!-- clicking remove button should refresh but deselect the active notification -->
+ <navigation-case>
+ <from-action>#{alertNotificationsUIBean.removeSelected}</from-action>
+ <to-view-id>/rhq/common/alert/notification/details-plain.xhtml?context=#{param.context}&contextId=#{param.contextId}&contextSubId=#{param.contextSubId}</to-view-id>
+
+ <redirect />
+ </navigation-case>
+ </navigation-rule>
+
+</faces-config>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/content-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/content-plain-navigation.xml
new file mode 100644
index 0000000..14db2d7
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/content-plain-navigation.xml
@@ -0,0 +1,491 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/subscription-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/content/subscription-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{ResourceReposUIBean.deleteSelectedResourceRepos}</from-action>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/content/subscription-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{AvailableResourceReposUIBean.subscribeSelectedResourceRepos}</from-action>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/content/subscription-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/view-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/content/view-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+<!--
+ <navigation-case>
+ <from-action>#{ListPackagesUIBean.deleteSelectedInstalledPackages}</from-action>
+ <from-outcome>successOrFailure</from-outcome>
+ <to-view-id>/rhq/resource/content/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+-->
+
+ <navigation-case>
+ <from-action>#{DeletePackagesUIBean.beginDeleteWorkflow}</from-action>
+ <from-outcome>beginDeleteWorkflow</from-outcome>
+ <to-view-id>/rhq/resource/content/confirm-delete-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/deploy-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>uploadNew</from-outcome>
+ <to-view-id>/rhq/resource/content/create-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{CreateNewPackageUIBean.deployExisting}</from-action>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/content/confirm-create-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ </navigation-rule>
+
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/update-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>uploadNew</from-outcome>
+ <to-view-id>/rhq/resource/content/create-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{CreateNewPackageUIBean.deployExisting}</from-action>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/content/confirm-create-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ </navigation-rule>
+
+
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/history-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>showContentServiceRequestDetails</from-outcome>
+ <to-view-id>/rhq/resource/content/history-request-plain.xhtml?id=#{param.id}&selectedRequestId=#{param.selectedRequestId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>showHistoryItem</from-outcome>
+ <to-view-id>/rhq/resource/content/audit-trail-item-plain.xhtml?id=#{param.id}&selectedHistoryId=#{param.selectedHistoryId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/history-request-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>showHistoryItem</from-outcome>
+ <to-view-id>/rhq/resource/content/history-request-item-plain.xhtml?id=#{param.id}&selectedHistoryId=#{param.selectedHistoryId}&selectedRequestId=#{param.selectedRequestId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>returnToAllRequests</from-outcome>
+ <to-view-id>/rhq/resource/content/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/history-request-item-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>returnToRequest</from-outcome>
+ <to-view-id>/rhq/resource/content/history-request-plain.xhtml?id=#{param.id}&selectedRequestId=#{param.selectedRequestId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>stepDetails</from-outcome>
+ <to-view-id>/rhq/resource/content/history-request-step-details-plain.xhtml?id=#{param.id}&selectedHistoryId=#{param.selectedHistoryId}&selectedRequestId=#{param.selectedRequestId}&stepId=#{param.stepId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/history-request-step-details-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>returnToHistory</from-outcome>
+ <to-view-id>/rhq/resource/content/history-request-item-plain.xhtml?id=#{param.id}&selectedHistoryId=#{param.selectedHistoryId}&selectedRequestId=#{param.selectedRequestId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/create-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-action>#{CreateNewPackageUIBean.createPackage}</from-action>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/content/confirm-create-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/resource/content/deploy-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/confirm-create-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>successOrFailure</from-outcome>
+ <to-view-id>/rhq/resource/content/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/resource/content/deploy-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/content/confirm-delete-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>successOrFailure</from-outcome>
+ <to-view-id>/rhq/resource/content/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/resource/content/deploy-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Repo List -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/listRepos-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/listRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createNewRepo</from-outcome>
+ <to-view-id>/rhq/content/createRepo-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>importRepos</from-outcome>
+ <to-view-id>/rhq/content/importRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/listRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/importRepos-plain.xhtml</from-view-id>
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/listRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ <navigation-case>
+ <!-- import failed -->
+ <from-outcome>failed</from-outcome>
+ <to-view-id>/rhq/content/importRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/importRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Repo View -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/repo-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/repo-plain.xhtml?mode=view&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>edit</from-outcome>
+ <to-view-id>/rhq/content/repo-plain.xhtml?mode=edit&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>associateWithContentProviders</from-outcome>
+ <to-view-id>/rhq/content/repoAssociations-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>subscribeResources</from-outcome>
+ <to-view-id>/rhq/content/repoSubscriptions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/repo-plain.xhtml?mode=view&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Content Source List -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/listContentProviders-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/listContentProviders-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>createNewContentSource</from-outcome>
+ <to-view-id>/rhq/content/createContentProvider-plain.xhtml?mode=new</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/listContentProviders-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Content Source View -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/contentProvider-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml?mode=view&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>edit</from-outcome>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml?mode=edit&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml?mode=view&id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.accessMap}</from-action>
+ <to-view-id>/rhq/content/contentProvider-view-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.accessMap}</from-action>
+ <to-view-id>/rhq/content/contentProvider-edit-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.addNewMap}</from-action>
+ <to-view-id>/rhq/content/contentProvider-add-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Content Source Creation -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/createContentProvider-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.accessMap}</from-action>
+ <to-view-id>/rhq/content/createContentProvider-edit-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.addNewMap}</from-action>
+ <to-view-id>/rhq/content/createContentProvider-add-map-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>save</from-outcome>
+ <to-view-id>/rhq/content/listContentProviders-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/content/listContentProviders-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/createContentProvider-edit-map-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/content/createContentProvider-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/createContentProvider-add-map-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/content/createContentProvider-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/contentProvider-view-map-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/contentProvider-edit-map-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/content/contentProvider-add-map-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <to-view-id>/rhq/content/contentProvider-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Repo Creation -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/createRepo-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>save</from-outcome>
+ <to-view-id>/rhq/content/listRepos-plain.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/rhq/content/listRepos-plain.xhtml</to-view-id>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Repo Associations With Content Sources -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/repoAssociations-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/repoAssociations-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/repoAssociations-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- Repo Subscriptions -->
+ <navigation-rule>
+ <from-view-id>/rhq/content/repoSubscriptions-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/content/repoSubscriptions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>search</from-outcome>
+ <to-view-id>/rhq/content/repoSubscriptions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/content/repoSubscriptions-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/events-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/events-plain-navigation.xml
new file mode 100644
index 0000000..ef6b120
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/events-plain-navigation.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <navigation-rule>
+
+ <from-view-id>/rhq/resource/events/history-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/events/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/events/history-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
+
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/measurement-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/measurement-plain-navigation.xml
new file mode 100644
index 0000000..9578b33
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/measurement-plain-navigation.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- Resource Measurement Schedules -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/monitor/schedules-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/monitor/schedules-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/monitor/schedules-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Graphs -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/monitor/graphs-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/monitor/graphs-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Tables -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/monitor/tables-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/monitor/tables-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+ <!-- changing metric display range on Monitor > Response -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/monitor/response-plain.xhtml</from-view-id>
+
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/monitor/response-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/monitor/response-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/operation-plain-navigation.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/operation-plain-navigation.xml
new file mode 100644
index 0000000..9750c4c
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-navigation/operation-plain-navigation.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<faces-config version="1.2"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- New Resource Operation Schedule -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/operation/resourceOperationScheduleNew-plain.xhtml</from-view-id>
+ <navigation-case>
+ <!-- schedule an operation for deferred execution -->
+ <from-outcome>viewOperationSchedules</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationSchedules-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- schedule an operation for immediate execution -->
+ <from-outcome>viewOperationHistory</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go back here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationScheduleNew-plain.xhtml?id=#{param.id}&opId=#{param.opId}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go back here -->
+ <from-outcome>validationError</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationScheduleNew-plain.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationScheduleNew-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Resource Operation Schedules -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/operation/resourceOperationSchedules-plain.xhtml</from-view-id>
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationSchedules-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationSchedules-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- schedule an operation for immediate execution -->
+ <from-outcome>viewOperationHistory</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- Resource Operation History -->
+ <navigation-rule>
+ <from-view-id>/rhq/resource/operation/resourceOperationHistory-plain.xhtml</from-view-id>
+ <navigation-case>
+ <!-- catch all navigation-case: if any actions return 'success', go here -->
+ <from-outcome>success</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ <navigation-case>
+ <!-- sorting rule -->
+ <from-outcome>sort</from-outcome>
+ <to-view-id>/rhq/resource/operation/resourceOperationHistory-plain.xhtml?id=#{param.id}</to-view-id>
+ <redirect />
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/rhq/resource/operation/resourceOperationHistoryDetails-plain.xhtml</from-view-id>
+ <navigation-case>
+ <from-action>#{ConfigHelperUIBean.accessMap}</from-action>
+ <to-view-id>/rhq/resource/operation/view-results-map-plain.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+</faces-config>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
index 8d69a36..03f80f0 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
@@ -161,6 +161,12 @@
/WEB-INF/jsf-navigation/measurement-navigation.xml,
/WEB-INF/jsf-navigation/summary-navigation.xml,
/WEB-INF/jsf-navigation/test-navigation.xml,
+
+ /WEB-INF/jsf-navigation/alert-plain-navigation.xml,
+ /WEB-INF/jsf-navigation/content-plain-navigation.xml,
+ /WEB-INF/jsf-navigation/events-plain-navigation.xml,
+ /WEB-INF/jsf-navigation/operation-plain-navigation.xml,
+ /WEB-INF/jsf-navigation/measurement-plain-navigation.xml,
/WEB-INF/jsf-navigation-definition/group-definition-navigation.xml,
commit d5dfe2ed9d42af51c6c3d3793f79e315c52ed092
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:08:28 2010 -0400
create a "plain" pagination scheme for iframed-facelets
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/include/pagination-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/include/pagination-plain.xhtml
new file mode 100644
index 0000000..8a4debb
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/include/pagination-plain.xhtml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:onf="http://jboss.org/on/function">
+
+ <body>
+
+ <f:view>
+
+ Usage: The following parameters must be set in the calling page
+
+ paginationDataTableName - Name of the data table to be controlled
+ paginationDataModel - Data model of the underlying table being controlled (used for total row count)
+ paginationPageControl - Page control value to set when changing the number of rows per page
+
+ <ui:composition>
+
+ <h:panelGroup layout="block" style="float: right; margin-right: 30px">
+ <ui:param name="paginationDataScrollerName" value="#{paginationDataTableName}Scroller"/>
+ <c:if test="#{empty paginationUIBean}">
+ <ui:param name="paginationSettingUIBean" value="#{PageControlSettingsUIBean}" />
+ </c:if>
+ <c:if test="#{not empty paginationUIBean}">
+ <ui:param name="paginationSettingUIBean" value="#{paginationUIBean}" />
+ </c:if>
+
+ <table>
+ <tr>
+ <td nowrap="nowrap">
+
+
+ <h:outputText value="Total: #{paginationDataModel.rowCount}"
+ style="margin-right: 1em; font-weight: bold; "/>
+ <h:outputText value="Items Per Page: #{paginationPageControl.pageSize}"
+ style="font-weight: bold; "
+ rendered="#{paginationDataModel.rowCount gt paginationSettingUIBean.minimumPageSize
+ and not paginationPageControl.unlimited
+ and not (onf:length(paginationSettingUIBean.pageSizes) gt 1)}" />
+ <h:outputText value="Items Per Page:"
+ style="margin-right: 1em; font-weight: bold; "
+ rendered="#{paginationDataModel.rowCount gt paginationSettingUIBean.minimumPageSize
+ and not paginationPageControl.unlimited
+ and (onf:length(paginationSettingUIBean.pageSizes) gt 1)}"/>
+ <h:selectOneListbox id="currentPageSize"
+ size="1"
+ value="#{paginationPageControl.pageSize}"
+ rendered="#{paginationDataModel.rowCount gt paginationSettingUIBean.minimumPageSize
+ and not paginationPageControl.unlimited
+ and (onf:length(paginationSettingUIBean.pageSizes) gt 1)}">
+ <a4j:support event="onchange"
+ reRender="#{paginationDataTableName}, #{paginationDataScrollerName}"/>
+ <f:selectItems value="#{paginationSettingUIBean.pageSizes}" />
+ </h:selectOneListbox>
+
+ </td>
+ <td nowrap="nowrap">
+
+ <!-- Limit to 7 pages until e find a general fix for RHQ-1813 -->
+ <rich:datascroller id="#{paginationDataScrollerName}"
+ for="#{paginationDataTableName}"
+ rendered="#{not paginationPageControl.unlimited}"
+ selectedStyle="font-weight: bold;"
+ inactiveStyle="font-weight: normal;"
+ stepControls="show"
+ fastControls="hide"
+ boundaryControls="hide"
+ maxPages="7"
+ page="#{paginationPageControl.pageNumber}">
+ <f:facet name="next">
+ <h:panelGroup>
+ <h:graphicImage value="/images/tbb_pageright.gif" style="padding: 0px 5px 0px 7px;" />
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="next_disabled">
+ <h:panelGroup>
+ <h:graphicImage value="/images/tbb_pageright_gray.gif" style="padding: 0px 5px 0px 7px;" />
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="previous">
+ <h:panelGroup>
+ <h:graphicImage value="/images/tbb_pageleft.gif" style="padding: 0px 5px 0px 7px;" />
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="previous_disabled">
+ <h:panelGroup>
+ <h:graphicImage value="/images/tbb_pageleft_gray.gif" style="padding: 0px 5px 0px 7px;" />
+ </h:panelGroup>
+ </f:facet>
+ </rich:datascroller>
+
+ </td>
+ </tr>
+ </table>
+
+
+ </h:panelGroup>
+
+ <div style="clear: both;"/>
+
+ </ui:composition>
+ </f:view>
+
+ </body>
+</html>
\ No newline at end of file
commit 5a37b80f0cee3cf67c9aea9ca386019555ece295
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:08:08 2010 -0400
create a "plain" layout scheme for iframed-facelets
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/entity/layout/main-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/entity/layout/main-plain.xhtml
new file mode 100644
index 0000000..157b598
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/entity/layout/main-plain.xhtml
@@ -0,0 +1,39 @@
+<ui:composition template="/rhq/layout/main-plain-layout.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <ui:define name="body-area">
+
+ <!-- work around for IE and its broken box model. Without the concrete height value, the nav pane will shrink on hover. -->
+ <!--[if IE]>
+ <div id="contentParent" style="height: 100%">
+ <![endif]-->
+ <!--[if !IE]><!-->
+ <div id="contentParent">
+ <!--<![endif]-->
+ <div id="centerContentWrapper" class="content-right">
+ <div style="left: 0; right: 0; height: 100%;">
+
+ <!-- Shows the results of the last action executed. -->
+ <h:messages showSummary="true"
+ showDetail="true"
+ infoClass="InfoBlock"
+ warnClass="WarnBlock"
+ errorClass="ErrorBlock"
+ fatalClass="FatalBlock"
+ globalOnly="true"
+ layout="table"
+ width="100%" />
+
+ <ui:insert name="content"><p>Default Entity Content</p></ui:insert>
+ </div>
+ </div>
+ </div>
+
+ </ui:define>
+
+</ui:composition>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/layout/main-plain-layout.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/layout/main-plain-layout.xhtml
new file mode 100644
index 0000000..ffb0bda
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/layout/main-plain-layout.xhtml
@@ -0,0 +1,310 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+<head>
+ <title>${msg["product.shortName"]} - #{(!empty pageTitle) ? pageTitle : defaultPageTitle}</title>
+
+ <meta http-equiv="Expires" content="-1"/>
+ <meta http-equiv="Pragma" content="no-cache"/>
+ <meta http-equiv="Max-Age" content="0"/>
+ <meta http-equiv="Cache-Control" content="no-cache"/>
+ <ui:insert name="metaHeaders"></ui:insert>
+
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/win.css"/>
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/form-style.css"/>
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/menu.css"/>
+
+ <script type="text/javascript" src="/js/functions.js"></script>
+ <script type="text/javascript" src="/js/prototype.js"></script>
+ <script type="text/javascript" src="/js/window.js"></script>
+ <script type="text/javascript" src="/js/effects.js"></script>
+ <!--<script type="text/javascript" src="/js/debug.js"></script>-->
+ <script type="text/javascript" src="/js/formValues.js"></script>
+ <script type="text/javascript" src="/js/rhq.js"></script>
+ <script type="text/javascript" src="/js/popup.js"></script>
+ <link href="/css/theme/default.css" rel="stylesheet" type="text/css"/>
+ <link href="/css/theme/alphacube.css" rel="stylesheet" type="text/css"/>
+ <link href="/css/theme/debug.css" rel="stylesheet" type="text/css"/>
+
+ <link rel="icon" type="image/png" href="/images/favicon.png"/>
+ <link rel="apple-touch-icon" href="/images/favicon.png"/>
+
+ <!-- Trims up the headers of RF toggle panel headers -->
+ <style type="text/css">
+ .BlockTitle {
+ padding-top: 3px;
+ padding-bottom: 3px;
+ }
+ HTML, BODY { overflow: hidden; }
+ </style>
+
+
+<style type="text/css">
+
+.dr-pnl {
+ border-style: none;
+ padding: 0;
+}
+
+.dr-pnl-b {
+ border-color: white;
+ padding: 0;
+ margin: 0;
+}
+
+.dr-pnl-h { /* Files */
+ background-image: none;
+ background-color: rgb(164, 178, 185);
+ font-family: sans-serif;
+ font-size: 10px;
+}
+
+.dr-pmenu-group-self-label { /* filename */
+ color: rgb(109, 120, 124);
+ font-family: sans-serif;
+ font-size: 9px;
+ white-space: nowrap;
+}
+
+.rich-pmenu { /* Defines styles for panel menu */
+
+}
+.rich-pmenu-disabled-element { /* Defines styles for panel menu disabled element */
+
+}
+.rich-pmenu-group { /* styles for panel menu group */
+ background-image: none;
+ background-color: rgb(217, 223, 227);
+}
+
+.rich-pmenu-group-self-label { /* directory - Defines styles for panel menu group label */
+ font-family: sans-serif;
+ font-size: 9px;
+ color: rgb(102, 102, 102);
+ white-space: nowrap;
+}
+.rich-pmenu-item { /* Defines styles for panel menu item */
+ background-color: rgb(223, 228, 232);
+ color: rgb(217, 223, 227);
+ border-style: none;
+ margin: 0;
+ padding: 0;
+ padding-left: 15px;
+
+}
+.rich-pmenu-nowrap { /* Defines styles for panel menu wrapper */
+
+}
+.rich-pmenu-selected-element { /* Defines styles for panel menu selected element */
+ background-color: white;
+ font-style: normal;
+ font-weight: bold;
+ color: #00ff99;
+
+}
+.rich-pmenu-top-group { /* Defines styles for panel menu top group element */
+ padding-left: 15px;
+}
+.rich-pmenu-top-group-div { /* Defines styles for panel menu top group div element */
+ border-style: none;
+ border-bottom-style: dotted;
+ border-bottom-color: white;
+ margin: 0;
+ padding: 0;
+}
+
+.raw-outer-table-left-col {
+ background-color: rgb(217, 223, 227);
+}
+
+.raw-outer-table-left-col-footer {
+ background-color: rgb(217, 223, 227);
+ width: 100%;
+}
+
+.raw-outer-table-left-col-footer-content {
+ font-family: sans-serif;
+ font-size: 9px;
+ font-weight: bold;
+ color: gray;
+ padding-left: 10px;
+}
+
+.rawConfigUndoButton {
+ font-size: 9px;
+ font-weight: bold;
+ color: #666666;
+ background-color: #FFFFFF;
+ border: 1px solid #B0B0B0;
+ padding: 0px 5px;
+ cursor: pointer;
+ text-decoration: none
+}
+
+.rawCancelButton {
+ font-size: 11px;
+ font-weight: bold;
+ color: #E6E8ED;
+ background-color: #828CA3;
+ border: 1px outset #626C83;
+ padding: 1px 10px;
+ cursor: pointer;
+ text-decoration: none;
+ margin-left: 5px;
+}
+
+.rawConfigFileNameCol {
+ color: rgb(109, 120, 124);
+ font-family: sans-serif;
+ font-size: 9px;
+ white-space: nowrap;
+}
+
+.rawConfigUndoCol {
+ width: 25%;
+ text-align: right;
+}
+
+.rawConfigFileHeader {
+ color: gray;
+ white-space: nowrap;
+ font-weight: bold;
+ font-family: sans-serif;
+}
+
+.rawConfigFileContents {
+ font-family: sans-serif;
+ color: gray;
+ background-color: white;
+ border-style: solid;
+ border-width: thin;
+ border-color: rgb(102, 102, 102);
+ width: 100%;
+ height: 300px;
+ overflow-x: auto;
+ overflow-y: scroll;
+}
+
+
+
+ </style>
+
+
+
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/tabular.css"/>
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/layout.css"/>
+
+ <script type="text/javascript">
+ var imagePath = "/images/";
+ </script>
+
+</head>
+
+<body bgcolor="#FFFFFF" style="height: 100%;">
+
+<ui:remove>
+ <!-- Set the content type to "text/html" (overriding the default of "application/xhtml+xml") to force
+Firefox and other Gecko-based browsers to render the page in "Almost Standards" (i.e. transitional) mode. -->
+</ui:remove>
+<f:view contentType="text/html">
+
+
+ <f:loadBundle basename="ApplicationResources" var="msg"/>
+
+ <!-- =================== PAGE HEADER =================== -->
+
+ <script language="javascript" type="text/javascript">
+ //this has to be defined before the resize trackers inside
+ //the PageBody element because they depend on the values
+ //computed inside this tracker function.
+ WindowResizeTracker.addListener(function() {
+ var header = $('PageHeader');
+ var borderHeight = 2; //set in the inline style of div PageHeader
+
+ if (Prototype.Browser.IE) {
+ header.style.height = WindowResizeTracker.currentSizes.windowHeight + 'px';
+ } else {
+ header.style.height = (WindowResizeTracker.currentSizes.windowHeight - borderHeight) + 'px';
+ }
+ header.style.width = WindowResizeTracker.currentSizes.windowWidth + 'px';
+
+ var body = $('PageBody');
+ //0 = menu height (and the top position of PageBody)
+ body.style.height = (WindowResizeTracker.currentSizes.windowHeight - 0 - borderHeight) + 'px';
+ body.style.width = header.style.width;
+
+ document.body.style.height = WindowResizeTracker.currentSizes.windowHeight + 'px';
+ });
+ </script>
+ <!-- work around for IE and its broken box model. Without the concrete height value, the nav pane will shrink on hover. -->
+ <!--[if IE]>
+ <div id="PageHeader" style="border-bottom: 2px solid #999; position: absolute; top: 0; bottom: 0; left: 0; right: 0; height: 100%">
+ <![endif]-->
+ <!--[if !IE]><!-->
+ <div id="PageHeader" style="border-bottom: 2px solid #999; position: absolute; top: 0; bottom: 0; left: 0; right: 0;">
+ <!--<![endif]-->
+
+ <!-- work around for IE and its broken box model. Without the concrete height value, the nav pane will shrink on hover. -->
+ <!--[if IE]>
+ <div id="PageBody" style="width: 100%; position: absolute; top: 0px; bottom: 0; height: 100%;">
+ <![endif]-->
+ <!--[if !IE]><!-->
+ <div id="PageBody" style="width: 100%; position: absolute; top: 0px; bottom: 0;">
+ <!--<![endif]-->
+ <ui:insert name="body-area">Default Page Body</ui:insert>
+ </div>
+
+ </div>
+
+
+
+ <!-- =================== BODY =================== -->
+
+
+ <div id="about" class="dialog" style="display: none; position: absolute; top: 0; left: 0;">
+ <div class="DisplayContent" style="margin: 0;">
+ <div style="margin:5px">
+ <p class="compact">
+ <span class="DisplaySubhead">${msg['footer.aboutLink']}</span><br/>
+ <span class="DisplayLabel">${msg['footer.version']}: ${msg['product.version']}</span><br/>
+ <span class="DisplayLabel">${msg['footer.buildNumber']}: ${msg['product.buildNumber']}</span>
+ </p>
+
+ <p class="compact">
+ <f:verbatim>${msg['footer.copyright']}</f:verbatim> ${msg['about.Copyright.Content']}
+ </p>
+
+ <p class="compact">
+ ${msg['about.MoreInfo.Label']}<br/>
+ <a href="mailto:${msg['about.MoreInfo.LinkSales']}">${msg['about.MoreInfo.LinkSales']}</a><br/>
+ <a href="mailto:${msg['about.MoreInfo.LinkSupport']}">${msg['about.MoreInfo.LinkSupport']}</a>
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <!-- work-around to enable us to embed richfaces components inside the onc:simpleTrigger;
+without this, the page will throw a javascript error "{blah} is not defined" or
+"{yadda} is not a constructor", and the pop-up action will not work -->
+ <rich:calendar rendered="false"/>
+ <rich:inputNumberSpinner rendered="false"/>
+
+</f:view>
+
+<script type="text/javascript">
+ addWindowOnLoadEvent(disableConditionalButtons);
+</script>
+
+</body>
+</html>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/layout/main-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/layout/main-plain.xhtml
new file mode 100644
index 0000000..6f2cd02
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/layout/main-plain.xhtml
@@ -0,0 +1,17 @@
+<ui:composition template="/rhq/entity/layout/main-plain.xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:onc="http://jboss.org/on/component"
+ xmlns:onf="http://jboss.org/on/function"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+ <ui:define name="content">
+ <h1>Default Resource Content</h1>
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
commit b0cac99b444d86edc047a3a1bc031907207c2350
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Aug 11 07:00:40 2010 -0400
criteria objects with customized sorting should not get LEFT JOIN treatment
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
index 3216ec7..82ffd48 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/CriteriaQueryGenerator.java
@@ -342,6 +342,12 @@ public final class CriteriaQueryGenerator {
boolean doNotPrefixAlias = isNumber(suffix) || criteria.hasCustomizedSorting();
String sortFragment = doNotPrefixAlias ? suffix : (alias + "." + suffix);
+ if (criteria.hasCustomizedSorting()) {
+ // customized sorting does not get LEFT JOIN expressions added
+ orderingFieldTokens.add(sortFragment + " " + ordering);
+ continue;
+ }
+
int lastDelimiterIndex = sortFragment.lastIndexOf('.');
if (lastDelimiterIndex == -1) {
// does not require joins, just add the ordering field token directly
@@ -568,8 +574,8 @@ public final class CriteriaQueryGenerator {
try {
Class<?> entityClass = criteria.getPersistentClass();
- SearchTranslationManager searchManager = new SearchTranslationManager(subject,
- SearchSubsystem.get(entityClass));
+ SearchTranslationManager searchManager = new SearchTranslationManager(subject, SearchSubsystem
+ .get(entityClass));
searchManager.setExpression(searchExpression);
// translate first, if there was an error we won't add the dangling 'AND' to the where clause
13 years, 10 months