modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
| 53 +++++-----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOobsPortlet.java
| 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
| 14 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
| 12 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
| 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
| 6 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceOperationsPortlet.java
| 6 +
7 files changed, 72 insertions(+), 27 deletions(-)
New commits:
commit 08da74a83a3122f2df503fe87532dcf660515e9f
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Mon Apr 4 17:24:38 2011 -0400
update default message for resource ops portlet.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceOperationsPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceOperationsPortlet.java
index a0ef80ffba..9ca8f5c 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceOperationsPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceOperationsPortlet.java
@@ -253,6 +253,12 @@ class ResourceOperationsCriteriaHistoryListView extends
protected String getBasePath() {
return "Resource/" + resourceComposite.getResource().getId() +
"/Operations/History";
}
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+ getListGrid().setEmptyMessage(MSG.view_portlet_results_empty());
+ }
}
/** Provide implementation of ResourceOperationHistoryDataSource that dynamically
commit 9c5652e29fda9c0bbf5ed880616ecd3620b9ed26
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Mon Apr 4 16:36:06 2011 -0400
i)several refresh issues
ii)BZ:636733: platform util portlet always scrolling.
iii)BZ:636723: Platform util not refreshing.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
index 7c0f8d3..256f9c1 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
@@ -404,7 +404,6 @@ public class GroupConfigurationUpdatesPortlet extends LocatableVLayout
implement
public GroupConfigurationHistoryCriteriaTable(String locatorId,
ResourceGroupComposite groupComposite) {
super(locatorId, groupComposite);
- getListGrid().setEmptyMessage(MSG.view_portlet_results_empty());
}
@Override
@@ -416,6 +415,13 @@ public class GroupConfigurationUpdatesPortlet extends
LocatableVLayout implement
MSG.view_table_matchingRows(String.valueOf(getListGrid().getTotalRows()),
String.valueOf(count)));
}
}
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+ getListGrid().setEmptyMessage(MSG.view_portlet_results_empty());
+ }
+
}
class GroupConfigurationUdpatesCriteriaDataSource extends
GroupResourceConfigurationDataSource {
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
index a0171c2..6f38d63 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
@@ -25,6 +25,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.Autofit;
+import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.HTMLFlow;
import com.smartgwt.client.widgets.Img;
@@ -79,7 +80,6 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements
Portlet
public PlatformSummaryPortlet(String locatorId) {
super(locatorId);
-
setWidth100();
setHeight100();
@@ -89,7 +89,8 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements
Portlet
setShowRecordComponentsByCell(true);
setUseAllDataSourceFields(true);
- setAutoFitData(Autofit.HORIZONTAL);
+ setAutoFitData(Autofit.VERTICAL);
+ setOverflow(Overflow.AUTO);
setDataSource(new PlatformMetricDataSource(this));
setInitialCriteria(new Criteria(ResourceDataSourceField.CATEGORY.propertyName(),
ResourceCategory.PLATFORM
@@ -387,4 +388,13 @@ public class PlatformSummaryPortlet extends LocatableListGrid
implements Portlet
return new PlatformSummaryPortlet(locatorId);
}
}
+
+ /** Custom refresh operation as we are not directly extending Table
+ */
+ @Override
+ public void redraw() {
+ super.redraw();
+ invalidateCache();
+ markForRedraw();
+ }
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
index 1ffacf6..4519b95 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
@@ -68,9 +68,6 @@ public abstract class AbstractRecentAlertsPortlet extends
AlertHistoryView imple
setOverflow(Overflow.VISIBLE);
setShowFooterRefresh(false); //disable footer refresh button as redundant for
portlets
setShowHeader(false);//disable header for portlets
- if (getListGrid() != null) {
- getListGrid().setEmptyMessage(MSG.view_portlet_results_empty());
- }
}
public Timer getRefreshTimer() {
@@ -396,4 +393,10 @@ public abstract class AbstractRecentAlertsPortlet extends
AlertHistoryView imple
return criteria;
}
}
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+ getListGrid().setEmptyMessage(MSG.view_portlet_results_empty());
+ }
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
index 7eac876..e739098 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
@@ -353,6 +353,11 @@ public class ProblemResourcesPortlet extends
Table<ProblemResourcesDataSource> i
return false;
}
+ @Override
+ public void redraw() {
+ super.refresh();
+ markForRedraw();
+ }
}
/**Construct table widget Label to display timerange settings used with latest datasource
query.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
index a4a6e67..bd5c4ac 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
@@ -195,6 +195,12 @@ public class ResourceConfigurationUpdatesPortlet extends
GroupConfigurationUpdat
protected String getBasePath() {
return "Resource/" + resourceComposite.getResource().getId() +
"/Configuration/History";
}
+
+ @Override
+ protected void onInit() {
+ super.onInit();
+ getListGrid().setEmptyMessage(MSG.view_portlet_results_empty());
+ }
}
class ConfigurationUdpatesCriteriaDataSource extends ConfigurationHistoryDataSource
{
commit 3f6374cf07943d7403752d4a5367d7b0ce0e59ac
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Mon Apr 4 15:03:35 2011 -0400
adding npe check.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
index af95e7a..1ffacf6 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
@@ -68,7 +68,9 @@ public abstract class AbstractRecentAlertsPortlet extends
AlertHistoryView imple
setOverflow(Overflow.VISIBLE);
setShowFooterRefresh(false); //disable footer refresh button as redundant for
portlets
setShowHeader(false);//disable header for portlets
- getListGrid().setEmptyMessage(MSG.view_portlet_results_empty());
+ if (getListGrid() != null) {
+ getListGrid().setEmptyMessage(MSG.view_portlet_results_empty());
+ }
}
public Timer getRefreshTimer() {
commit 2009d4df168098b31cc6e833392a5ed8cd40c133
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Mon Apr 4 12:53:44 2011 -0400
i)modify table empty/populated messages for portlets to indicate matching results.
ii)enable auto-refresh for Alert* portlets.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
index f002795..7c0f8d3 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
@@ -112,7 +112,7 @@ public class GroupConfigurationUpdatesPortlet extends LocatableVLayout
implement
protected boolean portletConfigInitialized = false;
protected boolean currentlyLoading = false;
protected String baseViewPath = "";
- private HistoryGroupResourceConfigurationTable groupHistoryTable;
+ private GroupConfigurationHistoryCriteriaTable groupHistoryTable;
protected static HashMap<String, String> updatedMapping = new
HashMap<String, String>();
static {
@@ -300,16 +300,6 @@ public class GroupConfigurationUpdatesPortlet extends
LocatableVLayout implement
loadData();
}
- // @Override
- // protected void refreshTableInfo() {
- // super.refreshTableInfo();
- // if (getTableInfo() != null) {
- // int count = getListGrid().getSelection().length;
- // getTableInfo().setContents(
- //
MSG.view_table_matchingRows(String.valueOf(getListGrid().getTotalRows()),
String.valueOf(count)));
- // }
- // }
-
@Override
public boolean isRefreshing() {
return this.currentlyLoading;
@@ -370,29 +360,18 @@ public class GroupConfigurationUpdatesPortlet extends
LocatableVLayout implement
filterResourceGroupIds.add(groupId);
criteria.addFilterResourceGroupIds(filterResourceGroupIds);
- groupHistoryTable = new
HistoryGroupResourceConfigurationTable(extendLocatorId("Table"),
+ groupHistoryTable = new
GroupConfigurationHistoryCriteriaTable(extendLocatorId("Table"),
groupComposite);
- // groupHistoryTable.setDataSource(new
GroupConfigurationUdpatesCriteriaDataSource(portletConfig,
- // groupId));
- //
groupHistoryTable.setShowHeader(false);
- //
groupHistoryTable.setShowFooterRefresh(false);
} else {
- //TODO: spinder fix for empties
- // Criteria criteria = new Criteria();
ResourceGroup emptyGroup = new ResourceGroup("");
emptyGroup.setId(-1);
Long zero = new Long(0);
groupComposite = new ResourceGroupComposite(zero, zero, zero,
zero, emptyGroup);
- // groupOperations = new
GroupOperationsCriteriaHistoryListView(locatorId,
- // new
GroupOperationsCriteriaDataSource(portletConfig), null, criteria, groupComposite);
- groupHistoryTable = new
HistoryGroupResourceConfigurationTable(extendLocatorId("Table"),
+ groupHistoryTable = new
GroupConfigurationHistoryCriteriaTable(extendLocatorId("Table"),
groupComposite);
- // groupHistoryTable.setDataSource(new
GroupConfigurationUdpatesCriteriaDataSource(portletConfig,
- // groupId));
- //
groupHistoryTable.setShowHeader(false);
- //
groupHistoryTable.setShowFooterRefresh(false);
}
+ //update table for portlet display.
groupHistoryTable.setDataSource(new
GroupConfigurationUdpatesCriteriaDataSource(portletConfig,
groupId));
groupHistoryTable.setShowHeader(false);
@@ -421,6 +400,24 @@ public class GroupConfigurationUpdatesPortlet extends
LocatableVLayout implement
return baseViewPath;
}
+ class GroupConfigurationHistoryCriteriaTable extends
HistoryGroupResourceConfigurationTable {
+
+ public GroupConfigurationHistoryCriteriaTable(String locatorId,
ResourceGroupComposite groupComposite) {
+ super(locatorId, groupComposite);
+ getListGrid().setEmptyMessage(MSG.view_portlet_results_empty());
+ }
+
+ @Override
+ protected void refreshTableInfo() {
+ super.refreshTableInfo();
+ if (getTableInfo() != null) {
+ int count = getListGrid().getSelection().length;
+ getTableInfo().setContents(
+
MSG.view_table_matchingRows(String.valueOf(getListGrid().getTotalRows()),
String.valueOf(count)));
+ }
+ }
+ }
+
class GroupConfigurationUdpatesCriteriaDataSource extends
GroupResourceConfigurationDataSource {
public GroupConfigurationUdpatesCriteriaDataSource(Configuration portletConfig,
int groupId) {
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOobsPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOobsPortlet.java
index 008c34b..b06c9a4 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOobsPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOobsPortlet.java
@@ -240,6 +240,7 @@ public class GroupOobsPortlet extends LocatableVLayout implements
CustomSettings
recentOobContent.addChild(column);
recentOobContent.markForRedraw();
currentlyLoading = false;
+ markForRedraw();
}
});
}
@@ -247,6 +248,7 @@ public class GroupOobsPortlet extends LocatableVLayout implements
CustomSettings
public void startRefreshCycle() {
refreshTimer = AutoRefreshPortletUtil.startRefreshCycle(this, this,
refreshTimer);
recentOobContent.markForRedraw();
+ markForRedraw();
}
@Override
@@ -263,6 +265,7 @@ public class GroupOobsPortlet extends LocatableVLayout implements
CustomSettings
@Override
public void redraw() {
super.redraw();
+ //spinder 4/3/11: although screen does not flash autorefresh is being called on
time. Too fast for user to notice.
loadData();
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
index 188b2a1..af95e7a 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
@@ -68,6 +68,7 @@ public abstract class AbstractRecentAlertsPortlet extends
AlertHistoryView imple
setOverflow(Overflow.VISIBLE);
setShowFooterRefresh(false); //disable footer refresh button as redundant for
portlets
setShowHeader(false);//disable header for portlets
+ getListGrid().setEmptyMessage(MSG.view_portlet_results_empty());
}
public Timer getRefreshTimer() {
@@ -273,6 +274,12 @@ public abstract class AbstractRecentAlertsPortlet extends
AlertHistoryView imple
super.onDestroy();
}
+ @Override
+ public void redraw() {
+ super.refresh();
+ markForRedraw();
+ }
+
static public class AlertsPortletDataSource extends AlertDataSource {
private Configuration configuration;