Fix inherited dashboard links
When navigating to a project's list of dashboards and selecting an inherited dashboard, the link pointed to the project from which the dashboard is inherited. While this did not actually prevent stable links, it likely prevented users from getting the correct stable link for a project dashboard by copying it from this page without paying attention to the fact that the dashboard was inherited. The correct link still worked, but if they bookmarked the link from the dashboard list, it would be an incorrect long term link and it would no longer point to the correct dashboard if this dashboard were later overridden and no longer inherited. Change-Id: Ibf6e69c4185387f97a3dc023cb8dd21b1e25eff0
This commit is contained in:
@@ -19,6 +19,7 @@ import com.google.gwt.core.client.JavaScriptObject;
|
||||
public class DashboardInfo extends JavaScriptObject {
|
||||
public final native String id() /*-{ return this.id; }-*/;
|
||||
public final native String project() /*-{ return this.project; }-*/;
|
||||
public final native String definingProject() /*-{ return this.defining_project; }-*/;
|
||||
public final native String ref() /*-{ return this.ref; }-*/;
|
||||
public final native String path() /*-{ return this.path; }-*/;
|
||||
public final native String description() /*-{ return this.description; }-*/;
|
||||
|
@@ -125,10 +125,9 @@ public class DashboardsTable extends NavigationTable<DashboardInfo> {
|
||||
table.setWidget(row, 2, new Anchor(k.path(), "#"
|
||||
+ PageLinks.toProjectDashboard(new Project.NameKey(k.project()), k.id())));
|
||||
table.setText(row, 3, k.description());
|
||||
if (k.project() != null && !project.get().equals(k.project())) {
|
||||
table.setWidget(row, 4, new Anchor(k.project(), "#"
|
||||
+ PageLinks.toProjectDashboards(new Project.NameKey(k
|
||||
.project()))));
|
||||
if (k.definingProject() != null && !k.definingProject().equals(k.project())) {
|
||||
table.setWidget(row, 4, new Anchor(k.definingProject(), "#"
|
||||
+ PageLinks.toProjectDashboards(new Project.NameKey(k.definingProject()))));
|
||||
}
|
||||
setRowItem(row, k);
|
||||
}
|
||||
|
Reference in New Issue
Block a user