modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/queue/AutodiscoveryPortlet.java
| 6 +++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/FavoriteResourcesPortlet.java
| 6 +++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/RecentAlertsPortlet.java
| 6 +++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/imported/RecentlyAddedResourcesPortlet.java
| 6 +++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
| 6 +++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
| 6 +++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryPortlet.java
| 6 +++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/preferences/UserPreferences.java
| 9 ++-------
8 files changed, 37 insertions(+), 14 deletions(-)
New commits:
commit 35b1680ff655706712cf4feecc016b05a5f0c4bf
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Thu Dec 23 01:04:38 2010 -0500
i)fix build compilation problem
ii)update portlets to return same instance
iii)fix refresh issue with default page refresh value.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/queue/AutodiscoveryPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/queue/AutodiscoveryPortlet.java
index 14e4d4f..e31ea1d 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/queue/AutodiscoveryPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/queue/AutodiscoveryPortlet.java
@@ -180,9 +180,13 @@ public class AutodiscoveryPortlet extends ResourceAutodiscoveryView
implements C
public static final class Factory implements PortletViewFactory {
public static PortletViewFactory INSTANCE = new Factory();
+ private static Portlet reference = null;
public final Portlet getInstance(String locatorId) {
- return new AutodiscoveryPortlet(locatorId);
+ if (reference == null) {
+ reference = new AutodiscoveryPortlet(locatorId);
+ }
+ return reference;
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/FavoriteResourcesPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/FavoriteResourcesPortlet.java
index 40311ff..1681d58 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/FavoriteResourcesPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/FavoriteResourcesPortlet.java
@@ -107,10 +107,14 @@ public class FavoriteResourcesPortlet extends ResourceSearchView
implements Auto
public static final class Factory implements PortletViewFactory {
public static PortletViewFactory INSTANCE = new Factory();
+ private static Portlet reference;
public final Portlet getInstance(String locatorId) {
//return GWT.create(FavoriteResourcesPortlet.class);
- return new FavoriteResourcesPortlet(locatorId);
+ if (reference == null) {
+ reference = new FavoriteResourcesPortlet(locatorId);
+ }
+ return reference;
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/RecentAlertsPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/RecentAlertsPortlet.java
index 1ebf65e..a9a801d 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/RecentAlertsPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/RecentAlertsPortlet.java
@@ -531,9 +531,13 @@ public class RecentAlertsPortlet extends AlertHistoryView implements
CustomSetti
public static final class Factory implements PortletViewFactory {
public static PortletViewFactory INSTANCE = new Factory();
+ private static Portlet reference;
public final Portlet getInstance(String locatorId) {
- return new RecentAlertsPortlet(locatorId);
+ if (reference == null) {
+ reference = new RecentAlertsPortlet(locatorId);
+ }
+ return reference;
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/imported/RecentlyAddedResourcesPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/imported/RecentlyAddedResourcesPortlet.java
index 46d376a..b80f0d3 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/imported/RecentlyAddedResourcesPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/imported/RecentlyAddedResourcesPortlet.java
@@ -208,9 +208,13 @@ public class RecentlyAddedResourcesPortlet extends LocatableVLayout
implements C
public static final class Factory implements PortletViewFactory {
public static PortletViewFactory INSTANCE = new Factory();
+ private Portlet reference;
public final Portlet getInstance(String locatorId) {
- return new RecentlyAddedResourcesPortlet(locatorId);
+ if (reference == null) {
+ reference = new RecentlyAddedResourcesPortlet(locatorId);
+ }
+ return reference;
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
index 4c46860..8ae6ee3 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
@@ -366,9 +366,13 @@ public class OperationsPortlet extends LocatableVLayout implements
CustomSetting
public static final class Factory implements PortletViewFactory {
public static PortletViewFactory INSTANCE = new Factory();
+ private Portlet reference;
public final Portlet getInstance(String locatorId) {
- return new OperationsPortlet(locatorId);
+ if (reference == null) {
+ reference = new OperationsPortlet(locatorId);
+ }
+ return reference;
}
}
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 658257f..8c6f106 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
@@ -239,9 +239,13 @@ public class ProblemResourcesPortlet extends Table implements
CustomSettingsPort
public static final class Factory implements PortletViewFactory {
public static PortletViewFactory INSTANCE = new Factory();
+ private Portlet reference;
public final Portlet getInstance(String locatorId) {
- return new ProblemResourcesPortlet(locatorId);
+ if (reference == null) {
+ reference = new ProblemResourcesPortlet(locatorId);
+ }
+ return reference;
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryPortlet.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryPortlet.java
index 62bcf15..adb7911 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryPortlet.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryPortlet.java
@@ -163,10 +163,14 @@ public class InventorySummaryPortlet extends LocatableVLayout
implements AutoRef
public static final class Factory implements PortletViewFactory {
public static PortletViewFactory INSTANCE = new Factory();
+ private Portlet reference;
public final Portlet getInstance(String locatorId) {
// return GWT.create(InventorySummaryView.class);
- return new InventorySummaryPortlet(locatorId);
+ if (reference == null) {
+ reference = new InventorySummaryPortlet(locatorId);
+ }
+ return reference;
}
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/preferences/UserPreferences.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/preferences/UserPreferences.java
index 7fde8e7..f5c936d 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/preferences/UserPreferences.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/preferences/UserPreferences.java
@@ -75,19 +75,14 @@ public class UserPreferences {
public int getPageRefreshInterval() {
if ((getPreference(UserPreferenceNames.PAGE_REFRESH_PERIOD) == null)
- || (Long.valueOf(getPreference(UserPreferenceNames.PAGE_REFRESH_PERIOD)) <
MeasurementUtility.MINUTES)) {
- //default to 60 seconds
+ || (Integer.valueOf(getPreference(UserPreferenceNames.PAGE_REFRESH_PERIOD))
== 60)) {//default to 60 seconds
setPreference(UserPreferenceNames.PAGE_REFRESH_PERIOD,
String.valueOf(MeasurementUtility.MINUTES));
}
return getPreferenceAsInteger(UserPreferenceNames.PAGE_REFRESH_PERIOD);
}
public void setPageRefreshInterval(int refreshInterval, AsyncCallback<Subject>
callback) {
- if (refreshInterval >= MeasurementUtility.MINUTES) {
- setPreference(UserPreferenceNames.PAGE_REFRESH_PERIOD,
String.valueOf(refreshInterval));
- } else {
- setPreference(UserPreferenceNames.PAGE_REFRESH_PERIOD,
String.valueOf(MeasurementUtility.MINUTES));
- }
+ setPreference(UserPreferenceNames.PAGE_REFRESH_PERIOD,
String.valueOf(refreshInterval));
store(callback);
}
Show replies by date