Skip to content

Commit ab43209

Browse files
subirjollySubir Jolly
andauthored
feat: add bucket delete success notification (#3483)
Co-authored-by: Subir Jolly <sjolly@influxdata.com>
1 parent da034de commit ab43209

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/buckets/actions/thunks.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import {
5656
measurementSchemaAdditionFailed,
5757
measurementSchemaUpdateFailed,
5858
measurementSchemaUpdateSuccessful,
59+
bucketDeleteSuccess,
5960
} from 'src/shared/copy/notifications'
6061

6162
type Action = BucketAction | NotifyAction
@@ -271,6 +272,7 @@ export const deleteBucket = (id: string, name: string) => async (
271272

272273
dispatch(removeBucket(id))
273274
dispatch(checkBucketLimits())
275+
dispatch(notify(bucketDeleteSuccess()))
274276
} catch (error) {
275277
console.error(error)
276278
dispatch(notify(bucketDeleteFailed(name)))

src/shared/copy/notifications.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,11 @@ export const bucketDeleteFailed = (bucketName: string): Notification => ({
785785
message: `Failed to delete bucket: "${bucketName}"`,
786786
})
787787

788+
export const bucketDeleteSuccess = (): Notification => ({
789+
...defaultSuccessNotification,
790+
message: 'Bucket was deleted successfully',
791+
})
792+
788793
export const predicateDeleteFailed = (): Notification => ({
789794
...defaultErrorNotification,
790795
message: 'Failed to delete data with predicate',

0 commit comments

Comments
 (0)