modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeNodeBuilder.java | 2 ++ modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java | 7 +++++-- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/UpdateExistingSchedulesWidget.java | 8 ++++++-- 3 files changed, 13 insertions(+), 4 deletions(-)
New commits: commit f362be20b579591491b59c4bfbbced1fa0394f5c Author: Ian Springer ian.springer@redhat.com Date: Sat Oct 30 12:21:38 2010 -0400
provide checkbox on metric templates view that allows user to choose whether or not the new template schedules should be applied to existing Resources
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeNodeBuilder.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeNodeBuilder.java index c038076..ed6ecd4 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeNodeBuilder.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeNodeBuilder.java @@ -36,6 +36,8 @@ import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup; import org.rhq.enterprise.gui.coregui.client.gwt.ResourceTypeGWTServiceAsync;
/** + * A helper class for {@link ResourceTypeTreeView}. + * * @author Greg Hinkle * @author John Mazzitelli */ diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java index 43d51a2..ae4b755 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java @@ -55,6 +55,9 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid; import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
/** + * A tree view of all known ResourceTypes, which includes summaries of metric schedule and alert definition templates + * and allows the user to edit those templates. + * * @author Greg Hinkle * @author John Mazzitelli */ @@ -426,8 +429,8 @@ public class ResourceTypeTreeView extends LocatableVLayout implements Bookmarkab
if (record instanceof TreeNode) { if (record instanceof ResourceTypeTreeNodeBuilder.ResourceTypeTreeNode) { - String c = record.getAttribute(ResourceTypeTreeNodeBuilder.ATTRIB_CATEGORY); - switch (ResourceCategory.valueOf(c)) { + String categoryName = record.getAttribute(ResourceTypeTreeNodeBuilder.ATTRIB_CATEGORY); + switch (ResourceCategory.valueOf(categoryName)) { case PLATFORM: return "types/Platform_up_16.png"; case SERVER: diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/UpdateExistingSchedulesWidget.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/UpdateExistingSchedulesWidget.java index 8ec63ae..3812cc0 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/UpdateExistingSchedulesWidget.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/UpdateExistingSchedulesWidget.java @@ -54,21 +54,25 @@ public class UpdateExistingSchedulesWidget extends LocatableHLayout implements T
DynamicForm form = new LocatableDynamicForm(this.getLocatorId()); form.setNumCols(3); + CheckboxItem checkboxItem = new CheckboxItem("updateExistingSchedules", "Update Existing Schedules"); checkboxItem.setDefaultValue(schedulesView.isUpdateExistingSchedules()); - + checkboxItem.setTooltip("Check this box to update the collection schedules for this metric on all existing " + + "Resources of this type. Otherwise, the template schedules will only be applied to Resources of this " + + "type that are added to inventory in the future."); checkboxItem.addChangedHandler(new ChangedHandler() { public void onChanged(ChangedEvent changedEvent) { boolean newValue = (Boolean)changedEvent.getValue(); schedulesView.setUpdateExistingSchedules(newValue); } }); + form.setFields(checkboxItem); addMember(form); }
@Override public void refresh(ListGrid listGrid) { - return; + // When new data arrives, we want to keep the state of our checkbox the same, so nothing to do here. } }
rhq-commits@lists.fedorahosted.org