modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationView.java
| 2 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
| 12 ++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 4bb0d3d34ea5758d6360a38b12c872cd999c257a
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jan 24 14:04:54 2011 -0500
refresh the tree
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationView.java
index e01ae47..71d5e06 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationView.java
@@ -219,7 +219,7 @@ public class BundleDestinationView extends LocatableVLayout implements
Bookmarka
new
Message(MSG.view_bundle_dest_purgeSuccessful(destination.getName()),
Message.Severity.Info));
// Bundle destination is purged, go back to bundle
destinations root view
-
CoreGUI.goToView(LinkManager.getBundleDestinationLink(bundle.getId(), 0));
+
CoreGUI.goToView(LinkManager.getBundleDestinationLink(bundle.getId(), 0), true);
}
});
}
commit 4aaf0e861d4538640de7ae062aa7a61a564e19e6
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jan 24 12:51:35 2011 -0500
put the username in the audit trail before purging
make sure we load all the data needed by the plugin container
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
index 909c6ae..a81ded5 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
@@ -808,6 +808,11 @@ public class BundleManagerBean implements BundleManagerLocal,
BundleManagerRemot
bvc.fetchBundle(true); // will eagerly fetch the bundle type
PageList<BundleVersion> bvs =
bundleManager.findBundleVersionsByCriteria(subject, bvc);
liveDeployment.setBundleVersion(bvs.get(0)); // wire up the full bundle version
back into the live deployment
+ // the bundle type doesn't eagerly load the resource type - the remote plugin
container needs that too
+ ResourceTypeCriteria rtc = new ResourceTypeCriteria();
+
rtc.addFilterBundleTypeId(liveDeployment.getBundleVersion().getBundle().getBundleType().getId());
+ PageList<ResourceType> rts =
resourceTypeManager.findResourceTypesByCriteria(subject, rtc);
+
liveDeployment.getBundleVersion().getBundle().getBundleType().setResourceType(rts.get(0));
// we need to obtain the resources for all resource deployments - our first
criteria can't fetch this deep, we have to do another query.
List<Integer> resourceDeployIds = new ArrayList<Integer>();
@@ -831,6 +836,13 @@ public class BundleManagerBean implements BundleManagerLocal,
BundleManagerRemot
Map<BundleResourceDeployment, String> failedToPurge = new
HashMap<BundleResourceDeployment, String>();
for (BundleResourceDeployment resourceDeploy : resourceDeploys) {
try {
+ // first put the user name that requested the purge in the audit trail
+ BundleResourceDeploymentHistory history = new
BundleResourceDeploymentHistory(subject.getName(),
+ "Purge Requested", "User [" + subject.getName() +
"] requested to purge this deployment", null,
+ BundleResourceDeploymentHistory.Status.SUCCESS, null, null);
+ bundleManager.addBundleResourceDeploymentHistory(subject,
resourceDeploy.getId(), history);
+
+ // get a connection to the agent and tell it to purge the bundle from the
file system
Subject overlord = subjectManager.getOverlord();
AgentClient agentClient = agentManager.getAgentClient(overlord,
resourceDeploy.getResource().getId());
BundleAgentService bundleAgentService =
agentClient.getBundleAgentService();
Show replies by date