Fixing delete dashboard url form datasource configuration (#46637)

pull/46743/head
lean.dev 3 years ago committed by GitHub
parent 64d4e6fcaa
commit c3ee98a9b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      public/app/features/dashboard/state/actions.ts
  2. 2
      public/app/features/datasources/DataSourceDashboards.tsx

@ -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() {

Loading…
Cancel
Save