ProjectApi: Add method to set the default dashboard
Change-Id: I8e4b36b456b3c34b8fcd4347d1fe546095c875c2
This commit is contained in:
@@ -485,6 +485,15 @@ public class ProjectApiImpl implements ProjectApi {
|
||||
return dashboard(DEFAULT_DASHBOARD_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defaultDashboard(String name) throws RestApiException {
|
||||
try {
|
||||
dashboardApi.create(checkExists(), name).setDefault();
|
||||
} catch (Exception e) {
|
||||
throw asRestApiException("Cannot set default dashboard", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListDashboardsRequest dashboards() throws RestApiException {
|
||||
return new ListDashboardsRequest() {
|
||||
|
Reference in New Issue
Block a user