modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java | 11 +- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardsView.java | 50 ++++------ 2 files changed, 30 insertions(+), 31 deletions(-)
New commits: commit 14d86e3395a21291af195cf64841de29d421e0a5 Author: Jay Shaughnessy jshaughn@redhat.com Date: Mon Jan 3 14:07:43 2011 -0500
Rearrange the default dashboard for better initial layout. The left side now makes the AD portlet more prominent as well as grouping inventory management type portlets. The right side now groups inventory status/action portlets and makes alerts most prominent (after the welcome portlet, which presumable the user will delete). RHQ News is moved to the bottom right.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardsView.java index e9df895..3d20f3c 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardsView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardsView.java @@ -242,41 +242,31 @@ public class DashboardsView extends LocatableVLayout implements BookmarkableView dashboard.setColumnWidths("32%", "68%"); dashboard.getConfiguration().put(new PropertySimple(Dashboard.CFG_BACKGROUND, "#F1F2F3"));
- DashboardPortlet summary = new DashboardPortlet(InventorySummaryPortlet.NAME, InventorySummaryPortlet.KEY, 230); + // Left Column + DashboardPortlet summary = new DashboardPortlet(InventorySummaryPortlet.NAME, InventorySummaryPortlet.KEY, 210); dashboard.addPortlet(summary, 0, 0);
- DashboardPortlet tagCloud = new DashboardPortlet(TagCloudPortlet.NAME, TagCloudPortlet.KEY, 200); - dashboard.addPortlet(tagCloud, 0, 1); + DashboardPortlet discoveryQueue = new DashboardPortlet(AutodiscoveryPortlet.NAME, AutodiscoveryPortlet.KEY, 230); + dashboard.addPortlet(discoveryQueue, 0, 1);
- // Experimental - // StoredPortlet platformSummary = new StoredPortlet("Platform Summary", PlatformPortletView.KEY, 300); - // col2.add(platformSummary); + DashboardPortlet recentlyAdded = new DashboardPortlet(RecentlyAddedResourcesPortlet.NAME, + RecentlyAddedResourcesPortlet.KEY, 230); + dashboard.addPortlet(recentlyAdded, 0, 2); + + DashboardPortlet tagCloud = new DashboardPortlet(TagCloudPortlet.NAME, TagCloudPortlet.KEY, 230); + dashboard.addPortlet(tagCloud, 0, 3);
- DashboardPortlet welcome = new DashboardPortlet(MessagePortlet.NAME, MessagePortlet.KEY, 180); + // Right Column + DashboardPortlet welcome = new DashboardPortlet(MessagePortlet.NAME, MessagePortlet.KEY, 210); welcome.getConfiguration().put( new PropertySimple("message", MSG.view_dashboardsManager_message_title_details())); dashboard.addPortlet(welcome, 1, 0);
- DashboardPortlet news = new DashboardPortlet(MashupPortlet.NAME, MashupPortlet.KEY, 320); - news.getConfiguration().put( - new PropertySimple("address", "http://rhq-project.org/display/RHQ/RHQ+News?decorator=popup")); - dashboard.addPortlet(news, 1, 1); - // - DashboardPortlet discoveryQueue = new DashboardPortlet(AutodiscoveryPortlet.NAME, AutodiscoveryPortlet.KEY, 250); - dashboard.addPortlet(discoveryQueue, 1, 2); - - DashboardPortlet recentAlerts = new DashboardPortlet(RecentAlertsPortlet.NAME, RecentAlertsPortlet.KEY, 250); - dashboard.addPortlet(recentAlerts, 1, 3); - - DashboardPortlet recentlyAdded = new DashboardPortlet(RecentlyAddedResourcesPortlet.NAME, - RecentlyAddedResourcesPortlet.KEY, 250); - dashboard.addPortlet(recentlyAdded, 1, 4); - - DashboardPortlet operations = new DashboardPortlet(OperationsPortlet.NAME, OperationsPortlet.KEY, 500); - dashboard.addPortlet(operations, 1, 5); + DashboardPortlet recentAlerts = new DashboardPortlet(RecentAlertsPortlet.NAME, RecentAlertsPortlet.KEY, 230); + dashboard.addPortlet(recentAlerts, 1, 1);
DashboardPortlet problemResources = new DashboardPortlet(ProblemResourcesPortlet.NAME, - ProblemResourcesPortlet.KEY, 250); + ProblemResourcesPortlet.KEY, 230); //initialize config for the problemResources portlet. problemResources.getConfiguration() .put( @@ -286,7 +276,15 @@ public class DashboardsView extends LocatableVLayout implements BookmarkableView .put( new PropertySimple(ProblemResourcesPortlet.PROBLEM_RESOURCE_SHOW_HRS, ProblemResourcesPortlet.defaultValue)); - dashboard.addPortlet(problemResources, 1, 6); + dashboard.addPortlet(problemResources, 1, 2); + + DashboardPortlet operations = new DashboardPortlet(OperationsPortlet.NAME, OperationsPortlet.KEY, 420); + dashboard.addPortlet(operations, 1, 3); + + DashboardPortlet news = new DashboardPortlet(MashupPortlet.NAME, MashupPortlet.KEY, 350); + news.getConfiguration().put( + new PropertySimple("address", "http://rhq-project.org/display/RHQ/RHQ+News?decorator=popup")); + dashboard.addPortlet(news, 1, 4);
return dashboard;
commit aa6004e54b1e8f181b01cfc97914cb127c53e25f Author: Jay Shaughnessy jshaughn@redhat.com Date: Mon Jan 3 14:03:50 2011 -0500
All but the first portlet move were not correctly persisted because the portlet layout was referencing stale portlets. Ensure the latest portlets are being used after each persist.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java index 9631294..7092064 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java @@ -399,14 +399,16 @@ public class DashboardView extends LocatableVLayout { CoreGUI.getMessageCenter().notify( new Message(MSG.view_dashboardManager_saved(result.getName()), Message.Severity.Info));
- updateConfigs(result); + // The portlet definitions have been merged and updated, reset the portlet windows with the + // up to date portlets. + updatePortletWindows(result); storedDashboard = result; DashboardView.this.enable(); } }); }
- private void updateConfigs(Dashboard result) { + private void updatePortletWindows(Dashboard result) { if (result != null) { if (portletMap == null) { portletMap = new HashMap<String, PortletViewFactory>(); @@ -417,9 +419,9 @@ public class DashboardView extends LocatableVLayout { for (PortletWindow portletWindow : portlets) { for (DashboardPortlet portlet : result.getPortlets()) { if (portletWindow.getDashboardPortlet().equals(portlet)) { - portletWindow.getDashboardPortlet().setConfiguration(portlet.getConfiguration()); + portletWindow.setDashboardPortlet(portlet);
- //restarting port auto-refresh with newest settings + //restarting portlet auto-refresh with newest settings PortletViewFactory viewFactory = portletMap.get(portlet.getPortletKey());
// TODO: Note, we're using a sequence generated ID here as a locatorId. This is not optimal for repeatable @@ -428,7 +430,6 @@ public class DashboardView extends LocatableVLayout { Portlet view = viewFactory.getInstance(SeleniumUtility.getSafeId(portlet.getPortletKey() + "-" + Integer.toString(portlet.getId())));
- //add code to re-initialize refresh cycle for portlets if (view instanceof AutoRefreshPortlet) { ((AutoRefreshPortlet) view).startRefreshCycle(); }
rhq-commits@lists.fedorahosted.org