Fixing delete dashboard url form datasource configuration (#46637)

This commit is contained in:
lean.dev
2022-03-18 11:47:57 -03:00
committed by GitHub
parent 64d4e6fcaa
commit c3ee98a9b6
2 changed files with 3 additions and 3 deletions
@@ -106,9 +106,9 @@ export function importDashboard(data: any, dashboardTitle: string): ThunkResult<
}; };
} }
export function removeDashboard(uri: string): ThunkResult<void> { export function removeDashboard(uid: string): ThunkResult<void> {
return async (dispatch) => { return async (dispatch) => {
await getBackendSrv().delete(`/api/dashboards/${uri}`); await getBackendSrv().delete(`/api/dashboards/uid/${uid}`);
dispatch(loadPluginDashboards()); dispatch(loadPluginDashboards());
}; };
} }
@@ -71,7 +71,7 @@ export class DataSourceDashboards extends PureComponent<Props> {
}; };
onRemove = (dashboard: PluginDashboard) => { onRemove = (dashboard: PluginDashboard) => {
this.props.removeDashboard(dashboard.importedUri); this.props.removeDashboard(dashboard.uid);
}; };
render() { render() {