modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java | 15 +++-- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/destination/BundleDestinationView.java | 11 +++- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java | 10 ++- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionView.java | 26 +++++----- 4 files changed, 40 insertions(+), 22 deletions(-)
New commits: commit a449c64328ab7c4b729e83adc3505fdf6ec34b90 Author: Simeon Pinder spinder@redhat.com Date: Thu Dec 22 17:57:02 2011 -0500
[BZ 767734] conditionally disabling remaining tags references from Bundles.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java index 5ac460c..bbc4175 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java @@ -124,7 +124,11 @@ public class BundleDeploymentView extends LocatableVLayout implements Bookmarkab + deployment.getDestination().getName(), LinkManager.getBundleDestinationLink(version.getBundle().getId(), deployment.getDestination().getId()))); addMember(new HeaderLabel(Canvas.getImgURL("subsystems/bundle/BundleDeployment_24.png"), deployment.getName())); - addMember(createTagEditor()); + + //conditionally add tags. Defaults to true, not available in JON builds. + if (CoreGUI.isTagsEnabledForUI()) { + addMember(createTagEditor()); + } addMember(createSummaryForm()); addMemberDeploymentsTable();
@@ -219,8 +223,8 @@ public class BundleDeploymentView extends LocatableVLayout implements Bookmarkab // deployment represents content on the remote machines, showing purge only for live // deployments makes sense). if (deployment.isLive()) { - IButton revertButton = new LocatableIButton(actionLayout.extendLocatorId("Revert"), MSG - .view_bundle_revert()); + IButton revertButton = new LocatableIButton(actionLayout.extendLocatorId("Revert"), + MSG.view_bundle_revert()); revertButton.setIcon("subsystems/bundle/BundleAction_Revert_16.png"); revertButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) { @@ -252,8 +256,9 @@ public class BundleDeploymentView extends LocatableVLayout implements Bookmarkab new Message(MSG.view_bundle_dest_purgeSuccessful(destinationName), Message.Severity.Info)); // Bundle destination is purged, go back to bundle deployment view - it is not live anymore - CoreGUI.goToView(LinkManager.getBundleDeploymentLink(bundle.getId(), deployment - .getId()), true); + CoreGUI.goToView( + LinkManager.getBundleDeploymentLink(bundle.getId(), deployment.getId()), + true); } }); } 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 1e47427..d0966f2 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 @@ -101,7 +101,12 @@ public class BundleDestinationView extends LocatableVLayout implements Bookmarka
addMember(backButton); addMember(header); - addMember(createTagEditor()); + + //conditionally add tags. Defaults to true, not available in JON builds. + if (CoreGUI.isTagsEnabledForUI()) { + addMember(createTagEditor()); + } + addMember(createSummaryForm()); addMember(createDeploymentsTable()); addMember(detail); @@ -223,8 +228,8 @@ 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 destination view - CoreGUI.goToView(LinkManager.getBundleDestinationLink(bundle.getId(), destination - .getId()), true); + CoreGUI.goToView( + LinkManager.getBundleDestinationLink(bundle.getId(), destination.getId()), true); } }); } diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java index e8eabfa..7a39e5a 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java @@ -108,7 +108,11 @@ public class BundleView extends LocatableVLayout implements BookmarkableView {
addMember(backButton); addMember(headerLabel); - addMember(createTagEditor()); + + //conditionally add tags. Defaults to true, not available in JON builds. + if (CoreGUI.isTagsEnabledForUI()) { + addMember(createTagEditor()); + } addMember(createSummaryForm()); addMember(tabs);
@@ -184,8 +188,8 @@ public class BundleView extends LocatableVLayout implements BookmarkableView { StaticTextItem versionCountItem = new StaticTextItem("versionCount", MSG.view_bundle_list_versionsCount()); versionCountItem.setValue(bundle.getBundleVersions() != null ? bundle.getBundleVersions().size() : 0);
- StaticTextItem destinationsCountItem = new StaticTextItem("destinationsCount", MSG - .view_bundle_list_destinationsCount()); + StaticTextItem destinationsCountItem = new StaticTextItem("destinationsCount", + MSG.view_bundle_list_destinationsCount()); destinationsCountItem.setValue(bundle.getDestinations() != null ? bundle.getDestinations().size() : 0);
StaticTextItem descriptionItem = new StaticTextItem("description", MSG.common_title_description()); diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionView.java index 19116bb..5737a9c 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/version/BundleVersionView.java @@ -93,7 +93,10 @@ public class BundleVersionView extends LocatableVLayout implements BookmarkableV addMember(new HeaderLabel(Canvas.getImgURL("subsystems/bundle/BundleVersion_24.png"), version.getName() + ": " + version.getVersion()));
- addMember(createTagEditor()); + //conditionally add tags. Defaults to true, not available in JON builds. + if (CoreGUI.isTagsEnabledForUI()) { + addMember(createTagEditor()); + }
addMember(createSummaryForm());
@@ -268,16 +271,17 @@ public class BundleVersionView extends LocatableVLayout implements BookmarkableV criteria.fetchConfigurationDefinition(true); criteria.fetchTags(true);
- bundleManager.findBundleVersionsByCriteriaWithDestinationFilter(criteria, new AsyncCallback<PageList<BundleVersion>>() { - public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError(MSG.view_bundle_version_loadFailure(), caught); - } + bundleManager.findBundleVersionsByCriteriaWithDestinationFilter(criteria, + new AsyncCallback<PageList<BundleVersion>>() { + public void onFailure(Throwable caught) { + CoreGUI.getErrorHandler().handleError(MSG.view_bundle_version_loadFailure(), caught); + }
- public void onSuccess(PageList<BundleVersion> result) { - BundleVersion version = result.get(0); - ViewId nextPath = viewPath.next().getCurrent(); - viewBundleVersion(version, nextPath); - } - }); + public void onSuccess(PageList<BundleVersion> result) { + BundleVersion version = result.get(0); + ViewId nextPath = viewPath.next().getCurrent(); + viewBundleVersion(version, nextPath); + } + }); } }
rhq-commits@lists.fedorahosted.org