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

View File

@@ -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());
};
}

View File

@@ -71,7 +71,7 @@ export class DataSourceDashboards extends PureComponent<Props> {
};
onRemove = (dashboard: PluginDashboard) => {
this.props.removeDashboard(dashboard.importedUri);
this.props.removeDashboard(dashboard.uid);
};
render() {