File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/compass-schema-validation/src/modules Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11import type { RootAction , RootState , SchemaValidationThunkAction } from '.' ;
2- import { EJSON } from 'bson' ;
2+ import { EJSON , ObjectId } from 'bson' ;
33import { parseFilter } from 'mongodb-query-parser' ;
44import { stringify as javascriptStringify } from 'javascript-stringify' ;
5+ import { openToast } from '@mongodb-js/compass-components' ;
56import { clearSampleDocuments } from './sample-documents' ;
67import { zeroStateChanged } from './zero-state' ;
78import { isLoadedChanged } from './is-loaded' ;
@@ -486,6 +487,11 @@ export const saveValidation = (
486487 }
487488 ) ;
488489 dispatch ( fetchValidation ( namespace ) ) ;
490+ const toastId = `schema-validation-update-${ new ObjectId ( ) . toString ( ) } ` ;
491+ openToast ( toastId , {
492+ title : 'New validation rules applied' ,
493+ variant : 'success' ,
494+ } ) ;
489495 } catch ( error ) {
490496 dispatch ( validationSaveFailed ( error as Error ) ) ;
491497 }
You can’t perform that action at this time.
0 commit comments