From 97af38a4a96cd8cf36aa9c52be1496e8e73dedca Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 5 Dec 2012 15:36:24 +0100 Subject: [PATCH] SONAR-3972 Default global dashboard name is now "Home", not "Projects" --- .../dashboards/GlobalDefaultDashboard.java | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/GlobalDefaultDashboard.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/GlobalDefaultDashboard.java index 4a84cd06756..d58987ec998 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/GlobalDefaultDashboard.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/GlobalDefaultDashboard.java @@ -43,35 +43,34 @@ public final class GlobalDefaultDashboard extends DashboardTemplate { this.filterDao = filterDao; } - @Override public Dashboard createDashboard() { Dashboard dashboard = Dashboard.create() - .setGlobal(true) - .setLayout(DashboardLayout.TWO_COLUMNS); + .setGlobal(true) + .setLayout(DashboardLayout.TWO_COLUMNS); dashboard.addWidget(WelcomeWidget.ID, 1); MeasureFilterDto filter = findSystemFilter(MyFavouritesFilter.NAME); if (filter != null) { dashboard - .addWidget(MeasureFilterListWidget.ID, 1) - .setProperty(MeasureFilterListWidget.FILTER_PROPERTY, filter.getId().toString()) - .setProperty(MeasureFilterListWidget.PAGE_SIZE_PROPERTY, "50"); + .addWidget(MeasureFilterListWidget.ID, 1) + .setProperty(MeasureFilterListWidget.FILTER_PROPERTY, filter.getId().toString()) + .setProperty(MeasureFilterListWidget.PAGE_SIZE_PROPERTY, "50"); } filter = findSystemFilter(ProjectFilter.NAME); if (filter != null) { dashboard - .addWidget(MeasureFilterListWidget.ID, 2) - .setProperty(MeasureFilterListWidget.FILTER_PROPERTY, filter.getId().toString()) - .setProperty(MeasureFilterListWidget.PAGE_SIZE_PROPERTY, "20"); + .addWidget(MeasureFilterListWidget.ID, 2) + .setProperty(MeasureFilterListWidget.FILTER_PROPERTY, filter.getId().toString()) + .setProperty(MeasureFilterListWidget.PAGE_SIZE_PROPERTY, "20"); dashboard - .addWidget(MeasureFilterTreemapWidget.ID, 2) - .setProperty(MeasureFilterListWidget.FILTER_PROPERTY, filter.getId().toString()) - .setProperty(MeasureFilterTreemapWidget.SIZE_METRIC_PROPERTY, "ncloc") - .setProperty(MeasureFilterTreemapWidget.COLOR_METRIC_PROPERTY, "violations_density"); + .addWidget(MeasureFilterTreemapWidget.ID, 2) + .setProperty(MeasureFilterListWidget.FILTER_PROPERTY, filter.getId().toString()) + .setProperty(MeasureFilterTreemapWidget.SIZE_METRIC_PROPERTY, "ncloc") + .setProperty(MeasureFilterTreemapWidget.COLOR_METRIC_PROPERTY, "violations_density"); } return dashboard; @@ -79,10 +78,10 @@ public final class GlobalDefaultDashboard extends DashboardTemplate { @Override public String getName() { - return "Projects"; + return "Home"; } private MeasureFilterDto findSystemFilter(String name) { return filterDao.findSystemFilterByName(name); } -} \ No newline at end of file +} -- 2.39.5