Skip to content

Commit

Permalink
Add toast notification on deletion error
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Romero <[email protected]>
  • Loading branch information
joshuarrrr authored Apr 18, 2023
1 parent 942ffa4 commit 47c066b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plugins/dashboard/public/application/legacy_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,13 @@ export function initDashboardApp(app, deps) {
ids.map(({ id, appId }) => {
return deps.savedObjectsClient.delete(appId, id);
})
);
).catch((error) => {
toastNotifications.addError(error, {
title: i18n.translate('dashboard.dashboardListingDeleteErrorTitle', {
defaultMessage: 'Error deleting dashboard',
}),
});
});
};
$scope.hideWriteControls = dashboardConfig.getHideWriteControls();
$scope.initialFilter = parse(history.location.search).filter || EMPTY_FILTER;
Expand Down

0 comments on commit 47c066b

Please sign in to comment.