Fixing delete dashboard url form datasource configuration (#46637) (#46739)

(cherry picked from commit c3ee98a9b6)

Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-03-18 12:39:25 -03:00
committed by GitHub
co-authored by lean.dev
parent 1a0ee53cdb
commit 403438c53d
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) => {
await getBackendSrv().delete(`/api/dashboards/${uri}`);
await getBackendSrv().delete(`/api/dashboards/uid/${uid}`);
dispatch(loadPluginDashboards());
};
}
@@ -71,7 +71,7 @@ export class DataSourceDashboards extends PureComponent<Props> {
};
onRemove = (dashboard: PluginDashboard) => {
this.props.removeDashboard(dashboard.importedUri);
this.props.removeDashboard(dashboard.uid);
};
render() {