mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
(cherry picked from commit 8692f574c9
)
Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
This commit is contained in:
parent
b25038df2e
commit
cd17f65a05
@ -30,8 +30,8 @@ export function saveFolder(folder: FolderState): ThunkResult<void> {
|
||||
}
|
||||
|
||||
export function deleteFolder(uid: string): ThunkResult<void> {
|
||||
return async (dispatch) => {
|
||||
await backendSrv.delete(`/api/folders/${uid}?forceDeleteRules=true`);
|
||||
return async () => {
|
||||
await backendSrv.delete(`/api/folders/${uid}?forceDeleteRules=false`);
|
||||
locationService.push('/dashboards');
|
||||
};
|
||||
}
|
||||
|
@ -277,8 +277,8 @@ export function saveDashboard(options: SaveDashboardOptions) {
|
||||
function deleteFolder(uid: string, showSuccessAlert: boolean) {
|
||||
return getBackendSrv().request({
|
||||
method: 'DELETE',
|
||||
url: `/api/folders/${uid}?forceDeleteRules=true`,
|
||||
showSuccessAlert: showSuccessAlert === true,
|
||||
url: `/api/folders/${uid}?forceDeleteRules=false`,
|
||||
showSuccessAlert: showSuccessAlert,
|
||||
});
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ export function deleteDashboard(uid: string, showSuccessAlert: boolean) {
|
||||
return getBackendSrv().request({
|
||||
method: 'DELETE',
|
||||
url: `/api/dashboards/uid/${uid}`,
|
||||
showSuccessAlert: showSuccessAlert === true,
|
||||
showSuccessAlert: showSuccessAlert,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user