.classpath
| 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeDatasource.java
| 21 ++++++++--
modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
| 4 -
modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml
| 4 -
modules/plugins/platform/src/main/resources/META-INF/rhq-plugin.xml
| 4 -
5 files changed, 24 insertions(+), 10 deletions(-)
New commits:
commit a65ee3a2aff51ebba00fc897839d4719467830c0
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu Nov 3 11:20:18 2011 -0400
[751091 - Resource tree fails to render for non inventory manager]
Remove use of ResourceCriteria.fetchParentResource(true) to support
AutoGroup naming. Instead, make use of the fact that the needed
resource information is available in an ancestral ResourceTreeNode.
This approach avoids the need for inventory manager perm (required
for fetchParentResource) and also the potential inabaility to
query for the resource on-demand, as it could be unavailable (locked)
to the user (but the locked resource tree node has what we need).
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeDatasource.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeDatasource.java
index 87e5fa3..8938062 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeDatasource.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeDatasource.java
@@ -145,7 +145,6 @@ public class ResourceTreeDatasource extends DataSource {
ResourceCriteria criteria = new ResourceCriteria();
criteria.addFilterParentResourceId(Integer.parseInt(parentResourceId));
- criteria.fetchParentResource(true);
resourceService.findResourcesByCriteria(criteria, new
AsyncCallback<PageList<Resource>>() {
public void onFailure(Throwable caught) {
@@ -266,6 +265,17 @@ public class ResourceTreeDatasource extends DataSource {
// If the parent node is an autogroup node, make sure the autogroup node
is in the
// tree prior to the resource node.
+ // First we need to ensure we have a properly populated parentResource
(id and name, minimally),
+ // get this from the parent ResourceTreeNode as resource.parentResource
may not be set with
+ // anything more than the id.
+
+ String parentResourceNodeId =
ResourceTreeNode.idOf(resource.getParentResource());
+ for (ResourceTreeNode node : resourceNodes) {
+ if (node.getID().equals(parentResourceNodeId)) {
+ resource.setParentResource(node.getResource());
+ }
+ }
+
String autoGroupNodeID = resourceNode.getParentID();
if (!allNodeIds.contains(autoGroupNodeID)) {
AutoGroupTreeNode autogroupNode = new AutoGroupTreeNode(resource);
@@ -334,8 +344,10 @@ public class ResourceTreeDatasource extends DataSource {
/**
* The parentID will be set to the parent resource at construction. It can be
changed
* later (prior to tree linkage) if the resource node should logically be set to
an
- * autogroup or subcategory parent.
- * @param resource
+ * autogroup or subcategory parent.
+ *
+ * @param resource The resource must have, minimally, id, name, description set.
And, if parent is not null,
+ * parentResource.id must be set as well. Also, resourceType.childresourceTypes.
* @param isLocked
*/
private ResourceTreeNode(Resource resource, boolean isLocked) {
@@ -442,7 +454,8 @@ public class ResourceTreeDatasource extends DataSource {
private boolean parentSubcategory = false;
/**
- * @param resource requires resourceType field be set. requires parentResource
field be set (null for no parent)
+ * @param resource.id must be set. resource.parentResource.id, .name must be
set.
+ * resource.resourceType.id, .name, .description, .subCategory must be set.
*/
private AutoGroupTreeNode(Resource resource) {
this.parentResource = resource.getParentResource();
commit 003597d92f284c56a0bc85b602e34cd6f86023bf
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Nov 2 11:30:42 2011 -0400
eclipse: add new itests module's src into project source
diff --git a/.classpath b/.classpath
index 195902e..51e7ca7 100644
--- a/.classpath
+++ b/.classpath
@@ -125,6 +125,7 @@
<classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/resteasy/resteasy-jettison-provider/2.2.1.GA/resteasy-jettison-provider-2.2.1.GA.jar"/>
<classpathentry exported="true" kind="var"
path="M2_REPO/org/jboss/resteasy/jaxrs-api/2.2.1.GA/jaxrs-api-2.2.1.GA.jar"/>
<classpathentry kind="src"
path="modules/common/ant-bundle/src/main/java"/>
+ <classpathentry kind="src"
path="modules/enterprise/server/itests/src/test/java"/>
<classpathentry kind="src"
path="modules/enterprise/server/plugins/drift-mongodb/src/main/java"/>
<classpathentry kind="src"
path="modules/enterprise/server/plugins/drift-mongodb/src/test/java"/>
<classpathentry kind="src"
path="modules/common/drift/src/main/java"/>
commit fa2e8a784761623d8446db70cef7be5bd8cd6946
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Nov 2 10:11:01 2011 -0400
Remove the ":" character from the plugin defined drift template names as
it is actually an illegal character (must only contain valid file-name
chars). The new template name convention is "Template-Some Name". Also
improved the descriptions slightly.
diff --git a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
index 2ae0e71..d6efd88 100644
--- a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
@@ -1195,8 +1195,8 @@
</configuration>
</content>
- <drift-definition name="Template: Base Files"
- description="A template for monitoring base application
server files for drift. It defines monitoring for some standard sub-directories of the
HOME directory. Note, it is not recommeded to monitor all files for an application
server. There are many files, and many temp files.">
+ <drift-definition name="Template-Base Files"
+ description="Monitor base application server files for
drift. It defines monitoring for some standard sub-directories of the HOME directory.
Note, it is not recommeded to monitor all files for an application server. There are many
files, and many temp files.">
<basedir>
<value-context>pluginConfiguration</value-context>
<value-name>homeDir</value-name>
diff --git a/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml
b/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml
index 2536cb5..f697574 100644
--- a/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml
@@ -259,8 +259,8 @@
</configuration>
</content>
- <drift-definition name="Template: Base Files"
- description="A template for monitoring base application
server files for drift. It defines monitoring for some standard sub-directories of the
HOME directory. Note, it is not recommeded to monitor all files for an application
server. There are many files, and many temp files.">
+ <drift-definition name="Template-Base Files"
+ description="Monitor base application server files for
drift. It defines monitoring for some standard sub-directories of the HOME directory.
Note, it is not recommeded to monitor all files for an application server. There are many
files, and many temp files.">
<basedir>
<value-context>pluginConfiguration</value-context>
<value-name>jbossHomeDir</value-name>
diff --git a/modules/plugins/platform/src/main/resources/META-INF/rhq-plugin.xml
b/modules/plugins/platform/src/main/resources/META-INF/rhq-plugin.xml
index 10ddc0b..fc9e119 100644
--- a/modules/plugins/platform/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/platform/src/main/resources/META-INF/rhq-plugin.xml
@@ -40,8 +40,8 @@
</bundle-target>
'>
<!ENTITY driftConfig '
- <drift-definition name="Template: File System"
- description="A template for monitoring the file system for
drift. It is expected that definitions will set a more specific base directory as the file
system root is not recommended.">
+ <drift-definition name="Template-File System"
+ description="Monitor the file system for drift. Definitions
should set a more specific base directory as the file system root is not
recommended.">
<basedir>
<value-context>fileSystem</value-context>
<value-name>/</value-name>
Show replies by date