Set default flag only for the effective default dashboard

When listing the dashboards for a project only the dashboard which is
the effective default of this project should be marked as default. At
the moment any dashboard which is the default dashboard for any
project in the parent line is marked as default. As result for a
project more than one dashboard might be marked as default in the UI.

Change-Id: I99dcb7950e93c7038438449043cffb5eb16dcc1b
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2012-11-20 23:34:13 +01:00
parent 84e4d0e729
commit 6594ef212a
3 changed files with 15 additions and 9 deletions

View File

@@ -58,7 +58,8 @@ class GetDashboard implements RestReadView<DashboardResource> {
resource.getControl().getProject(),
resource.getRefName().substring(REFS_DASHBOARDS.length()),
resource.getPathName(),
resource.getConfig());
resource.getConfig(),
true);
}
private DashboardResource defaultOf(ProjectControl ctl)