diff --git a/public/app/features/dashboard/state/actions.ts b/public/app/features/dashboard/state/actions.ts index 9ae183fc475..e6c070c2c1b 100644 --- a/public/app/features/dashboard/state/actions.ts +++ b/public/app/features/dashboard/state/actions.ts @@ -106,9 +106,9 @@ export function importDashboard(data: any, dashboardTitle: string): ThunkResult< }; } -export function removeDashboard(uri: string): ThunkResult { +export function removeDashboard(uid: string): ThunkResult { return async (dispatch) => { - await getBackendSrv().delete(`/api/dashboards/${uri}`); + await getBackendSrv().delete(`/api/dashboards/uid/${uid}`); dispatch(loadPluginDashboards()); }; } diff --git a/public/app/features/datasources/DataSourceDashboards.tsx b/public/app/features/datasources/DataSourceDashboards.tsx index 425402ba3b2..f035776ddae 100644 --- a/public/app/features/datasources/DataSourceDashboards.tsx +++ b/public/app/features/datasources/DataSourceDashboards.tsx @@ -71,7 +71,7 @@ export class DataSourceDashboards extends PureComponent { }; onRemove = (dashboard: PluginDashboard) => { - this.props.removeDashboard(dashboard.importedUri); + this.props.removeDashboard(dashboard.uid); }; render() {