modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
| 14 +++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/event/EventCompositeHistoryView.java
| 35 +++++++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/InventoryView.java
| 5 -
3 files changed, 46 insertions(+), 8 deletions(-)
New commits:
commit 941fa0bcc0d7c177f7c0c2094a63a22c87727453
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Sep 30 01:53:39 2010 -0400
EventCompositeHistoryView: disable flexRowDisplay and fix column widths
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
index a0487db..c933047 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
@@ -90,6 +90,7 @@ public class Table extends LocatableHLayout {
private SortSpecifier[] sortSpecifiers;
private String[] excludedFieldNames;
private boolean autoFetchData;
+ private boolean flexRowDisplay = true;
private RPCDataSource dataSource;
@@ -165,6 +166,10 @@ public class Table extends LocatableHLayout {
this.autoFetchData = autoFetchData;
}
+ public void setFlexRowDisplay(boolean flexRowDisplay) {
+ this.flexRowDisplay = flexRowDisplay;
+ }
+
@Override
protected void onInit() {
super.onInit();
@@ -183,11 +188,14 @@ public class Table extends LocatableHLayout {
}
listGrid.setWidth100();
listGrid.setHeight100();
- listGrid.setAutoFitData(Autofit.HORIZONTAL);
listGrid.setAlternateRecordStyles(true);
listGrid.setResizeFieldsInRealTime(false);
- listGrid.setWrapCells(true);
- listGrid.setFixedRecordHeights(false);
+
+ if (flexRowDisplay) {
+ listGrid.setAutoFitData(Autofit.HORIZONTAL);
+ listGrid.setWrapCells(true);
+ listGrid.setFixedRecordHeights(false);
+ }
// By default, SmartGWT will disable any rows that have a record named
"enabled" with a value of false - setting
// these fields to a bogus field name will disable this behavior. Note, setting
them to null does *not* disable
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/event/EventCompositeHistoryView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/event/EventCompositeHistoryView.java
index 954bac7..28e91f6 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/event/EventCompositeHistoryView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/event/EventCompositeHistoryView.java
@@ -32,6 +32,7 @@ import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.common.EntityContext;
@@ -78,6 +79,13 @@ public class EventCompositeHistoryView extends TableSection {
}
@Override
+ protected void onInit() {
+ setFlexRowDisplay(false);
+
+ super.onInit();
+ }
+
+ @Override
protected void configureTableFilters() {
final TextItem sourceFilter = new TextItem("source", "Source
Filter");
final TextItem detailsFilter = new TextItem("details", "Details
Filter");
@@ -90,11 +98,31 @@ public class EventCompositeHistoryView extends TableSection {
protected void configureTable() {
ListGrid grid = getListGrid();
- grid.setWrapCells(true);
- grid.setFixedRecordHeights(true);
-
// getListGrid().getField("id").setWidth(60);
+ ListGridField timestampField = new ListGridField("timestamp",
"ID", 125);
+ ListGridField severityField = new ListGridField("severity",
"Severity", 75);
+ severityField.setCellFormatter(new CellFormatter() {
+ public String format(Object o, ListGridRecord listGridRecord, int i, int i1)
{
+ return Canvas.imgHTML("subsystems/event/" + o +
"_16.png", 16, 16) + o;
+ }
+ });
+ ListGridField detailsField = new ListGridField("details-highlight",
"Details");
+ ListGridField sourceField = new ListGridField("source", "Source
Location", 275);
+ sourceField.setCellFormatter(new CellFormatter() {
+ public String format(Object o, ListGridRecord listGridRecord, int i, int i1)
{
+ String sourceLocation = (String) o;
+ int length = sourceLocation.length();
+ if (length > 40) {
+ return "..." + sourceLocation.substring(length - 40); //
the last 40 chars
+ }
+ return sourceLocation;
+ }
+ });
+
+ grid.setFields(timestampField, severityField, detailsField, sourceField);
+
+ /*
grid.getField("timestamp").setWidth(125);
grid.getField("severity").setWidth(75);
@@ -115,6 +143,7 @@ public class EventCompositeHistoryView extends TableSection {
return sourceLocation;
}
});
+ */
setupTableInteractions();
}
commit 9a77ce49fda241fc70ce3730ac21500fca584bf6
Author: Joseph Marques <joseph(a)redhat.com>
Date: Thu Sep 30 01:45:09 2010 -0400
InventoryView: tidy up labels, add tree node icons, add table header icons
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 335d23c..a1683dc 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
@@ -70,7 +70,7 @@ public class InventoryView extends LocatableHLayout implements
BookmarkableView
private static final String PAGE_COMPATIBLE_GROUPS = "CompatibleGroups";
private static final String PAGE_DOWN = "DownServers";
private static final String PAGE_GROUPS = "AllGroups";
- private static final String PAGE_GROUP_DEFINITIONS =
"DynamicGroupDefinitions";
+ private static final String PAGE_GROUP_DEFINITIONS = "DynagroupManager";
private static final String PAGE_MIXED_GROUPS = "MixedGroups";
private static final String PAGE_PLATFORMS = "Platforms";
private static final String PAGE_PROBLEM_GROUPS = "ProblemGroups";
@@ -203,6 +203,7 @@ public class InventoryView extends LocatableHLayout implements
BookmarkableView
final TreeNode inventory = new EnhancedTreeNode(SUBSECTION_GROUP_INVENTORY,
onlyCompatible, onlyMixed);
final TreeNode problemGroups = new EnhancedTreeNode(PAGE_PROBLEM_GROUPS);
+ problemGroups.setIcon("types/Cluster_down_16.png");
final TreeNode savedSearches = new EnhancedTreeNode(SUBSECTION_SAVED_SEARCHES,
problemGroups);
TreeGrid treeGrid = new LocatableTreeGrid(GROUPS_SECTION_VIEW_ID);
@@ -272,7 +273,7 @@ public class InventoryView extends LocatableHLayout implements
BookmarkableView
//TODO - there is no underlying support for this criteria. Also, there
should not be an active
// new button on this page.
content = new
ResourceGroupListView(extendLocatorId("DownGroups"),
- new Criteria("availability", "down"),
PAGE_PROBLEM_GROUPS);
+ new Criteria("availability", "down"),
PAGE_PROBLEM_GROUPS, "types/Cluster_down_16.png");
} else { // selected the Inventory node itself
content = new
ResourceGroupListView(extendLocatorId("AllGroups"), null, PAGE_GROUPS,
"types/Cluster_up_24.png",
"types/Group_up_24.png");