diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/UserSettingsDialog/UserSettingsDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/UserSettingsDialog/UserSettingsDialog.tsx index 65a335a6b8744..48fe170cbe02a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/app/UserSettingsDialog/UserSettingsDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/app/UserSettingsDialog/UserSettingsDialog.tsx @@ -1,6 +1,7 @@ import { Box, Button, + ButtonLink, Checkbox, Colors, Dialog, @@ -15,6 +16,7 @@ import {FeatureFlag} from 'shared/app/FeatureFlags.oss'; import {UserPreferences} from 'shared/app/UserSettingsDialog/UserPreferences.oss'; import {CodeLinkProtocolSelect} from '../../code-links/CodeLinkProtocol'; +import {showCustomAlert} from '../CustomAlertProvider'; import {getFeatureFlags, setFeatureFlags} from '../Flags'; type OnCloseFn = (event: React.SyntheticEvent) => void; @@ -128,12 +130,45 @@ const UserSettingsDialogContent = ({onClose, visibleFlags}: DialogContentProps) - + Experimental features {experimentalSettings} + + { + indexedDB.databases().then((databases) => { + databases.forEach((db) => { + db.name && indexedDB.deleteDatabase(db.name); + }); + }); + showCustomAlert({ + title: 'Caches reset', + body: ( + + IndexedDB cache has been reset. + { + window.location.reload(); + }} + > + Click here to reload the page + + + ), + }); + }} + > + + Reset IndexedDB cache + + + + + +