Fix diplay of project name for inherited dashboards
The project field in DashboardInfo should contain the name of the project that defines the dashboard, but currently it is always set to the name of the project for which the dashboards are retrieved. This means that the value is wrong for all inherited dashboards. As result the 'Inherited From' column in the DashboardsTable is always empty. Change-Id: Ic6924db7ba594f92564a265737a79dfb3b412827 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -68,14 +68,12 @@ class ListDashboards implements RestReadView<ProjectResource> {
|
||||
|
||||
List<List<DashboardInfo>> all = Lists.newArrayList();
|
||||
ProjectControl ctl = resource.getControl();
|
||||
String myProject = ctl.getProject().getName();
|
||||
Set<Project.NameKey> seen = Sets.newHashSet();
|
||||
boolean setDefault = true;
|
||||
for (;;) {
|
||||
if (ctl.isVisible()) {
|
||||
List<DashboardInfo> list = scan(ctl, setDefault);
|
||||
for (DashboardInfo d : list) {
|
||||
d.project = myProject;
|
||||
if (d.isDefault != null && Boolean.TRUE.equals(d.isDefault)) {
|
||||
setDefault = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user