Fixing delete dashboard url form datasource configuration (#46637)
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user