@postgres.ai/shared 3.5.0-pr-1027 → 3.5.0-pr-1035.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AlertSnackbar/index.d.ts +2 -0
- package/components/AlertSnackbar/index.js +8 -0
- package/components/AlertSnackbar/useAlertSnackbar.d.ts +16 -0
- package/components/AlertSnackbar/useAlertSnackbar.js +37 -0
- package/components/Button/index.d.ts +7 -0
- package/components/Button/index.js +40 -0
- package/components/Button2/index.d.ts +13 -0
- package/components/Button2/index.js +10 -0
- package/components/DestroyCloneModal/index.d.ts +9 -0
- package/components/DestroyCloneModal/index.js +23 -0
- package/components/DestroyCloneRestrictionModal/index.d.ts +11 -0
- package/components/DestroyCloneRestrictionModal/index.js +16 -0
- package/components/ErrorStub/index.d.ts +11 -0
- package/components/ErrorStub/index.js +42 -0
- package/components/FormattedText/index.d.ts +7 -0
- package/components/FormattedText/index.js +23 -0
- package/components/GatewayLink/index.d.ts +4 -0
- package/components/GatewayLink/index.js +13 -0
- package/components/HorizontalScrollContainer/index.d.ts +13 -0
- package/components/HorizontalScrollContainer/index.js +72 -0
- package/components/HorizontalScrollContainer/types.d.ts +5 -0
- package/components/HorizontalScrollContainer/{types.ts → types.js} +1 -6
- package/components/HorizontalScrollContainer/utils.d.ts +3 -0
- package/components/HorizontalScrollContainer/utils.js +12 -0
- package/components/ImportantText/index.d.ts +6 -0
- package/components/ImportantText/index.js +12 -0
- package/components/Link2/index.d.ts +7 -0
- package/components/Link2/index.js +17 -0
- package/components/MenuButton/index.d.ts +24 -0
- package/components/MenuButton/index.js +16 -0
- package/components/Modal/index.d.ts +15 -0
- package/components/Modal/index.js +35 -0
- package/components/PageSpinner/index.d.ts +2 -0
- package/components/PageSpinner/{index.tsx → index.js} +5 -11
- package/components/ResetCloneModal/index.d.ts +13 -0
- package/components/ResetCloneModal/index.js +87 -0
- package/components/SectionTitle/index.d.ts +12 -0
- package/components/SectionTitle/index.js +31 -0
- package/components/Select/index.d.ts +18 -0
- package/components/Select/index.js +9 -0
- package/components/SimpleModalControls/index.d.ts +11 -0
- package/components/SimpleModalControls/index.js +19 -0
- package/components/Spinner/icon.d.ts +4 -0
- package/components/Spinner/icon.js +2 -0
- package/components/Spinner/index.d.ts +7 -0
- package/components/Spinner/index.js +8 -0
- package/components/Status/index.d.ts +12 -0
- package/components/Status/index.js +23 -0
- package/components/StubContainer/index.d.ts +7 -0
- package/components/StubContainer/index.js +14 -0
- package/components/StubSpinner/index.d.ts +8 -0
- package/components/StubSpinner/index.js +29 -0
- package/components/StubSpinnerFlex/index.d.ts +9 -0
- package/components/StubSpinnerFlex/index.js +8 -0
- package/components/SyntaxHighlight/index.d.ts +7 -0
- package/components/SyntaxHighlight/index.js +65 -0
- package/components/Table/RowMenu/index.d.ts +14 -0
- package/components/Table/RowMenu/index.js +50 -0
- package/components/Table/index.d.ts +12 -0
- package/components/Table/index.js +58 -0
- package/components/Text/index.d.ts +6 -0
- package/components/Text/index.js +11 -0
- package/components/TextField/index.d.ts +27 -0
- package/components/TextField/index.js +43 -0
- package/components/Tooltip/index.d.ts +12 -0
- package/components/Tooltip/index.js +19 -0
- package/config/index.d.ts +8 -0
- package/config/index.js +23 -0
- package/config/links.d.ts +6 -0
- package/config/links.js +6 -0
- package/helpers/getEntropy.d.ts +3 -0
- package/helpers/getEntropy.js +212 -0
- package/helpers/localStorage.d.ts +6 -0
- package/helpers/localStorage.js +13 -0
- package/helpers/request.d.ts +7 -0
- package/helpers/request.js +35 -0
- package/hooks/useWindowDimensions.d.ts +1 -0
- package/hooks/useWindowDimensions.js +12 -0
- package/icons/ArrowDropDown/index.d.ts +6 -0
- package/icons/ArrowDropDown/index.js +6 -0
- package/icons/Circle/index.d.ts +6 -0
- package/icons/Circle/index.js +5 -0
- package/icons/External/index.d.ts +4 -0
- package/icons/External/index.js +2 -0
- package/icons/Info/index.d.ts +4 -0
- package/icons/Info/index.js +2 -0
- package/icons/Renewable/index.d.ts +6 -0
- package/icons/Renewable/index.js +12 -0
- package/icons/Shield/index.d.ts +6 -0
- package/icons/Shield/index.js +12 -0
- package/icons/Warning/index.d.ts +6 -0
- package/icons/Warning/index.js +6 -0
- package/package.json +5 -13
- package/pages/Clone/Status/index.d.ts +8 -0
- package/pages/Clone/Status/index.js +38 -0
- package/pages/Clone/context.d.ts +19 -0
- package/pages/Clone/context.js +3 -0
- package/pages/Clone/index.d.ts +7 -0
- package/pages/Clone/index.js +221 -0
- package/pages/Clone/stores/Main.d.ts +45 -0
- package/pages/Clone/stores/Main.js +141 -0
- package/pages/Clone/useCreatedStores.d.ts +6 -0
- package/pages/Clone/useCreatedStores.js +5 -0
- package/pages/Configuration/Header/index.d.ts +11 -0
- package/pages/Configuration/Header/index.js +17 -0
- package/pages/Configuration/InputWithTooltip/index.d.ts +32 -0
- package/pages/Configuration/InputWithTooltip/index.js +60 -0
- package/pages/Configuration/ResponseMessage/index.d.ts +5 -0
- package/pages/Configuration/ResponseMessage/index.js +43 -0
- package/pages/Configuration/configOptions.d.ts +9 -0
- package/pages/Configuration/configOptions.js +59 -0
- package/pages/Configuration/index.d.ts +9 -0
- package/pages/Configuration/index.js +544 -0
- package/pages/Configuration/tooltipText.d.ts +20 -0
- package/pages/Configuration/tooltipText.js +21 -0
- package/pages/Configuration/useForm.d.ts +82 -0
- package/pages/Configuration/useForm.js +74 -0
- package/pages/Configuration/utils/index.d.ts +22 -0
- package/pages/Configuration/utils/index.js +105 -0
- package/pages/CreateClone/index.d.ts +17 -0
- package/pages/CreateClone/index.js +90 -0
- package/pages/CreateClone/stores/Main.d.ts +26 -0
- package/pages/CreateClone/stores/Main.js +61 -0
- package/pages/CreateClone/useCreatedStores.d.ts +6 -0
- package/pages/CreateClone/useCreatedStores.js +5 -0
- package/pages/CreateClone/useForm.d.ts +54 -0
- package/pages/CreateClone/useForm.js +25 -0
- package/pages/Instance/Clones/Header/Item/index.d.ts +7 -0
- package/pages/Instance/Clones/Header/Item/index.js +5 -0
- package/pages/Instance/Clones/Header/index.d.ts +9 -0
- package/pages/Instance/Clones/Header/index.js +16 -0
- package/pages/Instance/Clones/index.d.ts +4 -0
- package/pages/Instance/Clones/index.js +66 -0
- package/pages/Instance/ClonesModal/index.d.ts +4 -0
- package/pages/Instance/ClonesModal/index.js +38 -0
- package/pages/Instance/ClonesModal/utils.d.ts +7 -0
- package/pages/Instance/ClonesModal/utils.js +14 -0
- package/pages/Instance/InactiveInstance/index.d.ts +6 -0
- package/pages/Instance/InactiveInstance/index.js +65 -0
- package/pages/Instance/InactiveInstance/utils.d.ts +2 -0
- package/pages/Instance/InactiveInstance/utils.js +7 -0
- package/pages/Instance/Info/Connection/ConnectModal/Content/index.d.ts +4 -0
- package/pages/Instance/Info/Connection/ConnectModal/Content/index.js +73 -0
- package/pages/Instance/Info/Connection/ConnectModal/Content/utils.d.ts +3 -0
- package/pages/Instance/Info/Connection/ConnectModal/Content/utils.js +20 -0
- package/pages/Instance/Info/Connection/ConnectModal/index.d.ts +6 -0
- package/pages/Instance/Info/Connection/ConnectModal/index.js +17 -0
- package/pages/Instance/Info/Connection/index.d.ts +4 -0
- package/pages/Instance/Info/Connection/index.js +44 -0
- package/pages/Instance/Info/Details/index.d.ts +2 -0
- package/pages/Instance/Info/Details/index.js +6 -0
- package/pages/Instance/Info/Disks/Disk/ActionsMenu/index.d.ts +8 -0
- package/pages/Instance/Info/Disks/Disk/ActionsMenu/index.js +47 -0
- package/pages/Instance/Info/Disks/Disk/Marker/index.d.ts +6 -0
- package/pages/Instance/Info/Disks/Disk/Marker/index.js +15 -0
- package/pages/Instance/Info/Disks/Disk/ProgressBar/PointerIcon.d.ts +5 -0
- package/pages/Instance/Info/Disks/Disk/ProgressBar/PointerIcon.js +2 -0
- package/pages/Instance/Info/Disks/Disk/ProgressBar/index.d.ts +8 -0
- package/pages/Instance/Info/Disks/Disk/ProgressBar/index.js +45 -0
- package/pages/Instance/Info/Disks/Disk/Status/index.d.ts +6 -0
- package/pages/Instance/Info/Disks/Disk/Status/index.js +52 -0
- package/pages/Instance/Info/Disks/Disk/index.d.ts +15 -0
- package/pages/Instance/Info/Disks/Disk/index.js +69 -0
- package/pages/Instance/Info/Disks/index.d.ts +4 -0
- package/pages/Instance/Info/Disks/index.js +24 -0
- package/pages/Instance/Info/Icons/index.d.ts +7 -0
- package/pages/Instance/Info/Icons/index.js +3 -0
- package/pages/Instance/Info/Retrieval/RefreshFailedAlert/index.d.ts +4 -0
- package/pages/Instance/Info/Retrieval/RefreshFailedAlert/index.js +15 -0
- package/pages/Instance/Info/Retrieval/RetrievalModal/index.d.ts +10 -0
- package/pages/Instance/Info/Retrieval/RetrievalModal/index.js +15 -0
- package/pages/Instance/Info/Retrieval/RetrievalTable/index.d.ts +6 -0
- package/pages/Instance/Info/Retrieval/RetrievalTable/index.js +6 -0
- package/pages/Instance/Info/Retrieval/index.d.ts +4 -0
- package/pages/Instance/Info/Retrieval/index.js +49 -0
- package/pages/Instance/Info/Retrieval/utils.d.ts +2 -0
- package/pages/Instance/Info/Retrieval/utils.js +12 -0
- package/pages/Instance/Info/Snapshots/Calendar/Day/index.d.ts +11 -0
- package/pages/Instance/Info/Snapshots/Calendar/Day/index.js +71 -0
- package/pages/Instance/Info/Snapshots/Calendar/index.d.ts +8 -0
- package/pages/Instance/Info/Snapshots/Calendar/index.js +67 -0
- package/pages/Instance/Info/Snapshots/Calendar/utils.d.ts +23 -0
- package/pages/Instance/Info/Snapshots/Calendar/utils.js +41 -0
- package/pages/Instance/Info/Snapshots/TimeLine/Day/index.d.ts +6 -0
- package/pages/Instance/Info/Snapshots/TimeLine/Day/index.js +58 -0
- package/pages/Instance/Info/Snapshots/TimeLine/index.d.ts +2 -0
- package/pages/Instance/Info/Snapshots/TimeLine/index.js +32 -0
- package/pages/Instance/Info/Snapshots/index.d.ts +4 -0
- package/pages/Instance/Info/Snapshots/index.js +35 -0
- package/pages/Instance/Info/Snapshots/utils.d.ts +23 -0
- package/pages/Instance/Info/Snapshots/utils.js +16 -0
- package/pages/Instance/Info/Status/InstanceResponseModal/index.d.ts +9 -0
- package/pages/Instance/Info/Status/InstanceResponseModal/index.js +12 -0
- package/pages/Instance/Info/Status/index.d.ts +4 -0
- package/pages/Instance/Info/Status/index.js +31 -0
- package/pages/Instance/Info/Status/utils.d.ts +8 -0
- package/pages/Instance/Info/Status/utils.js +23 -0
- package/pages/Instance/Info/components/Property/index.d.ts +11 -0
- package/pages/Instance/Info/components/Property/index.js +14 -0
- package/pages/Instance/Info/components/Section/index.d.ts +8 -0
- package/pages/Instance/Info/components/Section/index.js +18 -0
- package/pages/Instance/Info/components/ValueStatus/index.d.ts +9 -0
- package/pages/Instance/Info/components/ValueStatus/index.js +18 -0
- package/pages/Instance/Info/index.d.ts +2 -0
- package/pages/Instance/Info/index.js +75 -0
- package/pages/Instance/SnapshotsModal/index.d.ts +4 -0
- package/pages/Instance/SnapshotsModal/index.js +81 -0
- package/pages/Instance/SnapshotsModal/utils.d.ts +7 -0
- package/{components/HorizontalScrollContainer/utils.ts → pages/Instance/SnapshotsModal/utils.js} +8 -9
- package/pages/Instance/Tabs/index.d.ts +9 -0
- package/pages/Instance/Tabs/index.js +40 -0
- package/pages/Instance/components/ClonesList/ConnectionModal/index.d.ts +10 -0
- package/pages/Instance/components/ClonesList/ConnectionModal/index.js +74 -0
- package/pages/Instance/components/ClonesList/MenuCell/index.d.ts +11 -0
- package/pages/Instance/components/ClonesList/MenuCell/index.js +49 -0
- package/pages/Instance/components/ClonesList/MenuCell/utils.d.ts +3 -0
- package/pages/Instance/components/ClonesList/MenuCell/utils.js +18 -0
- package/pages/Instance/components/ClonesList/index.d.ts +9 -0
- package/pages/Instance/components/ClonesList/index.js +52 -0
- package/pages/Instance/components/ErrorStub/index.d.ts +9 -0
- package/pages/Instance/components/ErrorStub/index.js +42 -0
- package/pages/Instance/components/ModalReloadButton/index.d.ts +7 -0
- package/pages/Instance/components/ModalReloadButton/index.js +22 -0
- package/pages/Instance/components/Tags/Tag/index.d.ts +7 -0
- package/pages/Instance/components/Tags/Tag/index.js +35 -0
- package/pages/Instance/components/Tags/index.d.ts +8 -0
- package/pages/Instance/components/Tags/index.js +16 -0
- package/pages/Instance/context.d.ts +31 -0
- package/pages/Instance/{ClonesModal/utils.ts → context.js} +5 -15
- package/pages/Instance/index.d.ts +8 -0
- package/pages/Instance/index.js +93 -0
- package/pages/Instance/stores/ClonesModal.d.ts +13 -0
- package/pages/Instance/stores/ClonesModal.js +24 -0
- package/pages/Instance/stores/Main.d.ts +115 -0
- package/pages/Instance/stores/Main.js +243 -0
- package/pages/Instance/stores/SnapshotsModal.d.ts +13 -0
- package/pages/Instance/stores/SnapshotsModal.js +24 -0
- package/pages/Instance/useCreatedStores.d.ts +10 -0
- package/pages/Instance/useCreatedStores.js +9 -0
- package/pages/Logs/Icons/PlusIcon.d.ts +2 -0
- package/pages/Logs/Icons/PlusIcon.js +2 -0
- package/pages/Logs/constants/index.d.ts +5 -0
- package/pages/Logs/constants/index.js +5 -0
- package/pages/Logs/hooks/useWsScroll.d.ts +1 -0
- package/pages/Logs/hooks/useWsScroll.js +39 -0
- package/pages/Logs/index.d.ts +5 -0
- package/pages/Logs/index.js +189 -0
- package/pages/Logs/utils/index.d.ts +2 -0
- package/pages/Logs/utils/index.js +15 -0
- package/pages/Logs/wsLogs.d.ts +2 -0
- package/pages/Logs/wsLogs.js +76 -0
- package/pages/Logs/wsSnackbar.d.ts +1 -0
- package/pages/Logs/wsSnackbar.js +25 -0
- package/stores/Snapshots.d.ts +15 -0
- package/stores/Snapshots.js +35 -0
- package/styles/colors.d.ts +60 -0
- package/styles/colors.js +66 -0
- package/styles/icons.d.ts +63 -0
- package/styles/icons.js +69 -0
- package/styles/styles.d.ts +1 -0
- package/styles/styles.js +83 -0
- package/styles/theme.d.ts +1 -0
- package/styles/theme.js +50 -0
- package/styles/vars.d.ts +25 -0
- package/styles/{vars.ts → vars.js} +20 -28
- package/types/api/endpoints/createClone.d.ts +12 -0
- package/types/api/endpoints/createClone.js +1 -0
- package/types/api/endpoints/destroyClone.d.ts +7 -0
- package/types/api/endpoints/destroyClone.js +1 -0
- package/types/api/endpoints/getClone.d.ts +8 -0
- package/types/api/endpoints/getClone.js +1 -0
- package/types/api/endpoints/getConfig.d.ts +5 -0
- package/types/api/endpoints/getConfig.js +1 -0
- package/types/api/endpoints/getEngine.d.ts +10 -0
- package/types/api/endpoints/getEngine.js +1 -0
- package/types/api/endpoints/getFullConfig.d.ts +4 -0
- package/types/api/endpoints/getFullConfig.js +1 -0
- package/types/api/endpoints/getInstance.d.ts +7 -0
- package/types/api/endpoints/getInstance.js +1 -0
- package/types/api/endpoints/getInstanceRetrieval.d.ts +7 -0
- package/types/api/endpoints/getInstanceRetrieval.js +1 -0
- package/types/api/endpoints/getSeImages.d.ts +19 -0
- package/types/api/endpoints/getSeImages.js +1 -0
- package/types/api/endpoints/getSnapshots.d.ts +7 -0
- package/types/api/endpoints/getSnapshots.js +1 -0
- package/types/api/endpoints/getWSToken.d.ts +7 -0
- package/types/api/endpoints/getWSToken.js +1 -0
- package/types/api/endpoints/initWS.d.ts +1 -0
- package/types/api/endpoints/initWS.js +1 -0
- package/types/api/endpoints/refreshInstance.d.ts +6 -0
- package/types/api/endpoints/refreshInstance.js +1 -0
- package/types/api/endpoints/resetClone.d.ts +8 -0
- package/types/api/endpoints/resetClone.js +1 -0
- package/types/api/endpoints/testDbSource.d.ts +22 -0
- package/types/api/endpoints/testDbSource.js +23 -0
- package/types/api/endpoints/updateClone.d.ts +10 -0
- package/types/api/endpoints/updateClone.js +1 -0
- package/types/api/endpoints/updateConfig.d.ts +5 -0
- package/types/api/endpoints/updateConfig.js +1 -0
- package/types/api/entities/clone.d.ts +50 -0
- package/{components/Text/index.tsx → types/api/entities/clone.js} +8 -22
- package/types/api/entities/config.d.ts +72 -0
- package/types/api/entities/config.js +35 -0
- package/types/api/entities/dbSource.d.ts +12 -0
- package/types/api/entities/dbSource.js +1 -0
- package/types/api/entities/instance.d.ts +109 -0
- package/types/api/entities/instance.js +31 -0
- package/types/api/entities/instanceRetrieval.d.ts +42 -0
- package/types/api/entities/instanceRetrieval.js +19 -0
- package/types/api/entities/instanceState.d.ts +109 -0
- package/types/api/entities/instanceState.js +42 -0
- package/types/api/entities/pool.d.ts +18 -0
- package/{utils/numbers.ts → types/api/entities/pool.js} +1 -5
- package/types/api/entities/snapshot.d.ts +19 -0
- package/types/api/entities/snapshot.js +6 -0
- package/types/api/entities/wsToken.d.ts +5 -0
- package/types/api/entities/wsToken.js +1 -0
- package/utils/api.d.ts +1 -0
- package/utils/api.js +28 -0
- package/utils/clone.d.ts +13 -0
- package/utils/clone.js +21 -0
- package/utils/connection.d.ts +5 -0
- package/utils/connection.js +28 -0
- package/utils/date.d.ts +16 -0
- package/utils/date.js +33 -0
- package/utils/instance.d.ts +5 -0
- package/utils/instance.js +11 -0
- package/utils/numbers.d.ts +1 -0
- package/utils/{strings.ts → numbers.js} +4 -5
- package/utils/react.d.ts +5 -0
- package/utils/react.js +8 -0
- package/utils/snapshot.d.ts +2 -0
- package/utils/snapshot.js +1 -0
- package/utils/strings.d.ts +1 -0
- package/utils/strings.js +10 -0
- package/utils/units.d.ts +5 -0
- package/utils/units.js +15 -0
- package/.gitlab-ci.yml +0 -64
- package/components/AlertSnackbar/index.tsx +0 -23
- package/components/AlertSnackbar/useAlertSnackbar.tsx +0 -65
- package/components/Button/index.tsx +0 -79
- package/components/Button2/index.tsx +0 -43
- package/components/DestroyCloneModal/index.tsx +0 -56
- package/components/DestroyCloneRestrictionModal/index.tsx +0 -50
- package/components/ErrorStub/index.tsx +0 -83
- package/components/FormattedText/index.tsx +0 -44
- package/components/GatewayLink/index.tsx +0 -33
- package/components/HorizontalScrollContainer/index.tsx +0 -131
- package/components/ImportantText/index.tsx +0 -29
- package/components/Link2/index.tsx +0 -31
- package/components/MenuButton/index.tsx +0 -80
- package/components/Modal/index.tsx +0 -93
- package/components/ResetCloneModal/index.tsx +0 -154
- package/components/SectionTitle/index.tsx +0 -74
- package/components/Select/index.tsx +0 -42
- package/components/SimpleModalControls/index.tsx +0 -56
- package/components/Spinner/icon.tsx +0 -29
- package/components/Spinner/index.tsx +0 -16
- package/components/Status/index.tsx +0 -61
- package/components/StubContainer/index.tsx +0 -41
- package/components/StubSpinner/index.tsx +0 -49
- package/components/StubSpinnerFlex/index.tsx +0 -20
- package/components/SyntaxHighlight/index.tsx +0 -107
- package/components/Table/RowMenu/index.tsx +0 -111
- package/components/Table/index.tsx +0 -140
- package/components/TextField/index.tsx +0 -117
- package/components/Tooltip/index.tsx +0 -52
- package/config/index.ts +0 -32
- package/config/links.ts +0 -6
- package/craco.config.js +0 -80
- package/helpers/getEntropy.ts +0 -232
- package/helpers/localStorage.ts +0 -15
- package/helpers/request.ts +0 -47
- package/hooks/useWindowDimensions.ts +0 -16
- package/icons/ArrowDropDown/index.tsx +0 -29
- package/icons/Circle/index.tsx +0 -27
- package/icons/External/index.tsx +0 -14
- package/icons/Info/index.tsx +0 -12
- package/icons/Renewable/index.tsx +0 -65
- package/icons/Shield/index.tsx +0 -33
- package/icons/Warning/index.tsx +0 -29
- package/pages/Clone/Status/index.tsx +0 -73
- package/pages/Clone/context.ts +0 -22
- package/pages/Clone/index.tsx +0 -634
- package/pages/Clone/stores/Main.ts +0 -206
- package/pages/Clone/useCreatedStores.ts +0 -11
- package/pages/Configuration/Header/index.tsx +0 -84
- package/pages/Configuration/InputWithTooltip/index.tsx +0 -240
- package/pages/Configuration/ResponseMessage/index.tsx +0 -71
- package/pages/Configuration/configOptions.ts +0 -60
- package/pages/Configuration/index.tsx +0 -1184
- package/pages/Configuration/tooltipText.tsx +0 -157
- package/pages/Configuration/useForm.ts +0 -108
- package/pages/Configuration/utils/index.ts +0 -153
- package/pages/CreateClone/index.tsx +0 -311
- package/pages/CreateClone/stores/Main.ts +0 -107
- package/pages/CreateClone/useCreatedStores.ts +0 -11
- package/pages/CreateClone/useForm.ts +0 -36
- package/pages/Instance/Clones/Header/Item/index.tsx +0 -15
- package/pages/Instance/Clones/Header/index.tsx +0 -74
- package/pages/Instance/Clones/index.tsx +0 -135
- package/pages/Instance/ClonesModal/index.tsx +0 -71
- package/pages/Instance/InactiveInstance/index.tsx +0 -165
- package/pages/Instance/InactiveInstance/utils.ts +0 -9
- package/pages/Instance/Info/Connection/ConnectModal/Content/index.tsx +0 -176
- package/pages/Instance/Info/Connection/ConnectModal/Content/utils.ts +0 -24
- package/pages/Instance/Info/Connection/ConnectModal/index.tsx +0 -36
- package/pages/Instance/Info/Connection/index.tsx +0 -81
- package/pages/Instance/Info/Details/index.tsx +0 -20
- package/pages/Instance/Info/Disks/Disk/ActionsMenu/index.tsx +0 -100
- package/pages/Instance/Info/Disks/Disk/Marker/index.tsx +0 -26
- package/pages/Instance/Info/Disks/Disk/ProgressBar/PointerIcon.tsx +0 -20
- package/pages/Instance/Info/Disks/Disk/ProgressBar/index.tsx +0 -73
- package/pages/Instance/Info/Disks/Disk/Status/index.tsx +0 -75
- package/pages/Instance/Info/Disks/Disk/index.tsx +0 -168
- package/pages/Instance/Info/Disks/index.tsx +0 -65
- package/pages/Instance/Info/Icons/index.tsx +0 -39
- package/pages/Instance/Info/Retrieval/RefreshFailedAlert/index.tsx +0 -32
- package/pages/Instance/Info/Retrieval/RetrievalModal/index.tsx +0 -49
- package/pages/Instance/Info/Retrieval/RetrievalTable/index.tsx +0 -53
- package/pages/Instance/Info/Retrieval/index.tsx +0 -95
- package/pages/Instance/Info/Retrieval/utils.ts +0 -10
- package/pages/Instance/Info/Snapshots/Calendar/Day/index.tsx +0 -125
- package/pages/Instance/Info/Snapshots/Calendar/index.tsx +0 -133
- package/pages/Instance/Info/Snapshots/Calendar/utils.ts +0 -74
- package/pages/Instance/Info/Snapshots/TimeLine/Day/index.tsx +0 -79
- package/pages/Instance/Info/Snapshots/TimeLine/index.tsx +0 -57
- package/pages/Instance/Info/Snapshots/index.tsx +0 -97
- package/pages/Instance/Info/Snapshots/utils.ts +0 -18
- package/pages/Instance/Info/Status/InstanceResponseModal/index.tsx +0 -32
- package/pages/Instance/Info/Status/index.tsx +0 -85
- package/pages/Instance/Info/Status/utils.ts +0 -24
- package/pages/Instance/Info/components/Property/index.tsx +0 -32
- package/pages/Instance/Info/components/Section/index.tsx +0 -50
- package/pages/Instance/Info/components/ValueStatus/index.tsx +0 -51
- package/pages/Instance/Info/index.tsx +0 -129
- package/pages/Instance/SnapshotsModal/index.tsx +0 -169
- package/pages/Instance/SnapshotsModal/utils.ts +0 -17
- package/pages/Instance/Tabs/index.tsx +0 -98
- package/pages/Instance/components/ClonesList/ConnectionModal/index.tsx +0 -196
- package/pages/Instance/components/ClonesList/MenuCell/index.tsx +0 -98
- package/pages/Instance/components/ClonesList/MenuCell/utils.ts +0 -21
- package/pages/Instance/components/ClonesList/index.tsx +0 -189
- package/pages/Instance/components/ErrorStub/index.tsx +0 -77
- package/pages/Instance/components/ModalReloadButton/index.tsx +0 -43
- package/pages/Instance/components/Tags/Tag/index.tsx +0 -60
- package/pages/Instance/components/Tags/index.tsx +0 -42
- package/pages/Instance/context.ts +0 -39
- package/pages/Instance/index.tsx +0 -235
- package/pages/Instance/stores/ClonesModal.ts +0 -35
- package/pages/Instance/stores/Main.ts +0 -335
- package/pages/Instance/stores/SnapshotsModal.ts +0 -35
- package/pages/Instance/useCreatedStores.ts +0 -14
- package/pages/Logs/Icons/PlusIcon.tsx +0 -8
- package/pages/Logs/constants/index.ts +0 -7
- package/pages/Logs/hooks/useWsScroll.tsx +0 -44
- package/pages/Logs/index.tsx +0 -267
- package/pages/Logs/utils/index.ts +0 -20
- package/pages/Logs/wsLogs.ts +0 -110
- package/pages/Logs/wsSnackbar.ts +0 -27
- package/postgres.ai-shared-3.5.0.tgz +0 -0
- package/scripts/copy-assets.js +0 -30
- package/scripts/pack.js +0 -70
- package/stores/Snapshots.ts +0 -54
- package/styles/colors.ts +0 -67
- package/styles/icons.tsx +0 -1917
- package/styles/styles.ts +0 -87
- package/styles/theme.ts +0 -53
- package/types/api/endpoints/createClone.ts +0 -10
- package/types/api/endpoints/destroyClone.ts +0 -7
- package/types/api/endpoints/getClone.ts +0 -6
- package/types/api/endpoints/getConfig.ts +0 -6
- package/types/api/endpoints/getEngine.ts +0 -13
- package/types/api/endpoints/getFullConfig.ts +0 -4
- package/types/api/endpoints/getInstance.ts +0 -6
- package/types/api/endpoints/getInstanceRetrieval.ts +0 -6
- package/types/api/endpoints/getSeImages.ts +0 -22
- package/types/api/endpoints/getSnapshots.ts +0 -6
- package/types/api/endpoints/getWSToken.ts +0 -6
- package/types/api/endpoints/initWS.ts +0 -1
- package/types/api/endpoints/refreshInstance.ts +0 -4
- package/types/api/endpoints/resetClone.ts +0 -8
- package/types/api/endpoints/testDbSource.ts +0 -48
- package/types/api/endpoints/updateClone.ts +0 -10
- package/types/api/endpoints/updateConfig.ts +0 -6
- package/types/api/entities/clone.ts +0 -42
- package/types/api/entities/config.ts +0 -114
- package/types/api/entities/dbSource.ts +0 -13
- package/types/api/entities/instance.ts +0 -67
- package/types/api/entities/instanceRetrieval.ts +0 -46
- package/types/api/entities/instanceState.ts +0 -102
- package/types/api/entities/pool.ts +0 -27
- package/types/api/entities/snapshot.ts +0 -18
- package/types/api/entities/wsToken.ts +0 -7
- package/types/byte-size/index.d.ts +0 -22
- package/utils/api.ts +0 -30
- package/utils/clone.ts +0 -31
- package/utils/connection.ts +0 -38
- package/utils/date.ts +0 -87
- package/utils/instance.ts +0 -10
- package/utils/react.ts +0 -10
- package/utils/snapshot.ts +0 -4
- package/utils/units.ts +0 -23
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2019-2021, Postgres.ai, Nikolay Samokhvalov nik@postgres.ai
|
|
3
|
-
* All Rights Reserved. Proprietary and confidential.
|
|
4
|
-
* Unauthorized copying of this file, via any medium is strictly prohibited
|
|
5
|
-
*--------------------------------------------------------------------------
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
Tooltip as TooltipBase,
|
|
10
|
-
TooltipProps,
|
|
11
|
-
makeStyles,
|
|
12
|
-
} from '@material-ui/core'
|
|
13
|
-
|
|
14
|
-
type Props = {
|
|
15
|
-
children: JSX.Element
|
|
16
|
-
content: string | JSX.Element
|
|
17
|
-
disableTouchListener?: boolean
|
|
18
|
-
placement?: TooltipProps['placement']
|
|
19
|
-
interactive?: TooltipProps['interactive']
|
|
20
|
-
enterTouchDelay?: TooltipProps['enterTouchDelay']
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const useStyles = makeStyles(
|
|
24
|
-
{
|
|
25
|
-
tooltip: {
|
|
26
|
-
fontSize: '10px',
|
|
27
|
-
padding: '4px 8px',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{ index: 1 },
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
export const Tooltip = (props: Props) => {
|
|
34
|
-
const {
|
|
35
|
-
content,
|
|
36
|
-
placement = 'top',
|
|
37
|
-
enterTouchDelay = 0,
|
|
38
|
-
...otherProps
|
|
39
|
-
} = props
|
|
40
|
-
|
|
41
|
-
const classes = useStyles()
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<TooltipBase
|
|
45
|
-
{...otherProps}
|
|
46
|
-
enterTouchDelay={enterTouchDelay}
|
|
47
|
-
placement={placement}
|
|
48
|
-
title={content}
|
|
49
|
-
classes={{ tooltip: classes.tooltip }}
|
|
50
|
-
/>
|
|
51
|
-
)
|
|
52
|
-
}
|
package/config/index.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Locale } from 'date-fns'
|
|
2
|
-
import { enUS } from 'date-fns/locale'
|
|
3
|
-
import { getUserLocale } from 'get-user-locale'
|
|
4
|
-
|
|
5
|
-
type Config = {
|
|
6
|
-
dateFnsLocale: Locale
|
|
7
|
-
appName: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const config: Config = {
|
|
11
|
-
dateFnsLocale: enUS,
|
|
12
|
-
appName: 'Postgres.ai',
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const loadDateFnsLocale = async () => {
|
|
16
|
-
const userLocale = getUserLocale()
|
|
17
|
-
|
|
18
|
-
// We are already using this locale.
|
|
19
|
-
if (userLocale === config.dateFnsLocale.code) return
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
const locale = await import(`date-fns/locale/${userLocale}`)
|
|
23
|
-
config.dateFnsLocale = locale.default
|
|
24
|
-
return
|
|
25
|
-
} catch (e) {
|
|
26
|
-
// Unavailable locale.
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const initConfig = async () => {
|
|
31
|
-
await loadDateFnsLocale()
|
|
32
|
-
}
|
package/config/links.ts
DELETED
package/craco.config.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
const path = require('path')
|
|
2
|
-
|
|
3
|
-
const {
|
|
4
|
-
getLoader,
|
|
5
|
-
loaderByName,
|
|
6
|
-
getPlugin,
|
|
7
|
-
pluginByName,
|
|
8
|
-
addPlugins,
|
|
9
|
-
whenProd,
|
|
10
|
-
} = require('@craco/craco')
|
|
11
|
-
|
|
12
|
-
const CreateFilePlugin = require('create-file-webpack')
|
|
13
|
-
|
|
14
|
-
const SHARED_PACKAGE_PATH = path.join(__dirname, '../shared')
|
|
15
|
-
|
|
16
|
-
const buildTimestamp = Date.now()
|
|
17
|
-
|
|
18
|
-
module.exports = (context) => ({
|
|
19
|
-
webpack: {
|
|
20
|
-
configure: (webpackConfig) => {
|
|
21
|
-
// Add shared to resolve.
|
|
22
|
-
const forkTsCheckerWebpackPlugin = getPlugin(
|
|
23
|
-
webpackConfig,
|
|
24
|
-
pluginByName('ForkTsCheckerWebpackPlugin'),
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
if (forkTsCheckerWebpackPlugin.isFound) {
|
|
28
|
-
forkTsCheckerWebpackPlugin.match.reportFiles = []
|
|
29
|
-
forkTsCheckerWebpackPlugin.match.options.reportFiles = []
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const babelLoader = getLoader(webpackConfig, loaderByName('babel-loader'))
|
|
33
|
-
|
|
34
|
-
if (babelLoader.isFound) {
|
|
35
|
-
if (Array.isArray(babelLoader.match.loader.include)) {
|
|
36
|
-
babelLoader.match.loader.include.push(SHARED_PACKAGE_PATH)
|
|
37
|
-
} else {
|
|
38
|
-
babelLoader.match.loader.include = [
|
|
39
|
-
babelLoader.match.loader.include,
|
|
40
|
-
SHARED_PACKAGE_PATH,
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Generating meta.json
|
|
46
|
-
whenProd(() =>
|
|
47
|
-
addPlugins(webpackConfig, [
|
|
48
|
-
new CreateFilePlugin({
|
|
49
|
-
path: context.paths.appBuild,
|
|
50
|
-
fileName: './meta.json',
|
|
51
|
-
content: JSON.stringify({
|
|
52
|
-
buildTimestamp,
|
|
53
|
-
// Backward compatibility with prev versions UI.
|
|
54
|
-
buildDate: buildTimestamp,
|
|
55
|
-
}),
|
|
56
|
-
}),
|
|
57
|
-
]),
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
// Passing build timestamp.
|
|
61
|
-
const { match: definePlugin } = getPlugin(
|
|
62
|
-
webpackConfig,
|
|
63
|
-
pluginByName('DefinePlugin'),
|
|
64
|
-
)
|
|
65
|
-
if (definePlugin)
|
|
66
|
-
definePlugin.definitions[
|
|
67
|
-
'process.env'
|
|
68
|
-
].BUILD_TIMESTAMP = `${buildTimestamp}`
|
|
69
|
-
|
|
70
|
-
// Resolve polyfills.
|
|
71
|
-
webpackConfig.resolve.fallback = {
|
|
72
|
-
...webpackConfig.resolve.fallback,
|
|
73
|
-
crypto: require.resolve('crypto-browserify'),
|
|
74
|
-
stream: require.resolve('stream-browserify'),
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return webpackConfig
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
})
|
package/helpers/getEntropy.ts
DELETED
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
const replaceChars = '!@$&*'
|
|
2
|
-
const sepChars = '_-., '
|
|
3
|
-
const otherSpecialChars = '“#%"()+/:;<=>?[\\]^{|}~'
|
|
4
|
-
const lowerChars = 'abcdefghijklmnopqrstuvwxyz'
|
|
5
|
-
const upperChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
|
6
|
-
const digitsChars = '0123456789'
|
|
7
|
-
export const MIN_ENTROPY = 60
|
|
8
|
-
|
|
9
|
-
function getBase(password: string): number {
|
|
10
|
-
let uniqueChars: string[] = []
|
|
11
|
-
for (const c of password) {
|
|
12
|
-
if (!uniqueChars.includes(c)) {
|
|
13
|
-
uniqueChars.push(c)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
let hasReplace = false
|
|
17
|
-
let hasSep = false
|
|
18
|
-
let hasOtherSpecial = false
|
|
19
|
-
let hasLower = false
|
|
20
|
-
let hasUpper = false
|
|
21
|
-
let hasDigits = false
|
|
22
|
-
let base = 0
|
|
23
|
-
|
|
24
|
-
for (let i = 0; i < uniqueChars.length; i++) {
|
|
25
|
-
switch (true) {
|
|
26
|
-
case replaceChars.includes(uniqueChars[i]):
|
|
27
|
-
hasReplace = true
|
|
28
|
-
break
|
|
29
|
-
case sepChars.includes(uniqueChars[i]):
|
|
30
|
-
hasSep = true
|
|
31
|
-
break
|
|
32
|
-
case otherSpecialChars.includes(uniqueChars[i]):
|
|
33
|
-
hasOtherSpecial = true
|
|
34
|
-
break
|
|
35
|
-
case lowerChars.includes(uniqueChars[i]):
|
|
36
|
-
hasLower = true
|
|
37
|
-
break
|
|
38
|
-
case upperChars.includes(uniqueChars[i]):
|
|
39
|
-
hasUpper = true
|
|
40
|
-
break
|
|
41
|
-
case digitsChars.includes(uniqueChars[i]):
|
|
42
|
-
hasDigits = true
|
|
43
|
-
break
|
|
44
|
-
default:
|
|
45
|
-
base++
|
|
46
|
-
break
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (hasReplace) {
|
|
50
|
-
base += replaceChars.length
|
|
51
|
-
}
|
|
52
|
-
if (hasSep) {
|
|
53
|
-
base += sepChars.length
|
|
54
|
-
}
|
|
55
|
-
if (hasOtherSpecial) {
|
|
56
|
-
base += otherSpecialChars.length
|
|
57
|
-
}
|
|
58
|
-
if (hasLower) {
|
|
59
|
-
base += lowerChars.length
|
|
60
|
-
}
|
|
61
|
-
if (hasUpper) {
|
|
62
|
-
base += upperChars.length
|
|
63
|
-
}
|
|
64
|
-
if (hasDigits) {
|
|
65
|
-
base += digitsChars.length
|
|
66
|
-
}
|
|
67
|
-
return base
|
|
68
|
-
}
|
|
69
|
-
const seqNums = '0123456789'
|
|
70
|
-
const seqKeyboard0 = 'qwertyuiop'
|
|
71
|
-
const seqKeyboard1 = 'asdfghjkl'
|
|
72
|
-
const seqKeyboard2 = 'zxcvbnm'
|
|
73
|
-
const seqAlphabet = 'abcdefghijklmnopqrstuvwxyz'
|
|
74
|
-
function removeMoreThanTwoFromSequence(s: string, seq: string): string {
|
|
75
|
-
const seqRunes: string[] = Array.from(seq)
|
|
76
|
-
let runes: string[] = Array.from(s)
|
|
77
|
-
let matches = 0
|
|
78
|
-
for (let i = 0; i < runes.length; i++) {
|
|
79
|
-
for (let j = 0; j < seqRunes.length; j++) {
|
|
80
|
-
if (i >= runes.length) {
|
|
81
|
-
break
|
|
82
|
-
}
|
|
83
|
-
const r = runes[i]
|
|
84
|
-
const r2 = seqRunes[j]
|
|
85
|
-
if (r !== r2) {
|
|
86
|
-
matches = 0
|
|
87
|
-
continue
|
|
88
|
-
}
|
|
89
|
-
// found a match, advance the counter
|
|
90
|
-
matches++
|
|
91
|
-
if (matches > 2) {
|
|
92
|
-
runes.splice(i, 1)
|
|
93
|
-
} else {
|
|
94
|
-
i++
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return runes.join('')
|
|
99
|
-
}
|
|
100
|
-
function getReversedString(s: string): string {
|
|
101
|
-
const rune: string[] = Array.from(s)
|
|
102
|
-
const n = rune.length
|
|
103
|
-
for (let i = 0; i < Math.floor(n / 2); i++) {
|
|
104
|
-
;[rune[i], rune[n - 1 - i]] = [rune[n - 1 - i], rune[i]]
|
|
105
|
-
}
|
|
106
|
-
return rune.join('')
|
|
107
|
-
}
|
|
108
|
-
function removeMoreThanTwoRepeatingChars(s: string): string {
|
|
109
|
-
let prevPrev: string = ''
|
|
110
|
-
let prev: string = ''
|
|
111
|
-
const runes: string[] = Array.from(s)
|
|
112
|
-
for (let i = 0; i < runes.length; i++) {
|
|
113
|
-
const r = runes[i]
|
|
114
|
-
if (r === prev && r === prevPrev) {
|
|
115
|
-
runes.splice(i, 1)
|
|
116
|
-
i--
|
|
117
|
-
}
|
|
118
|
-
prevPrev = prev
|
|
119
|
-
prev = r
|
|
120
|
-
}
|
|
121
|
-
return runes.join('')
|
|
122
|
-
}
|
|
123
|
-
function getLength(password: string): number {
|
|
124
|
-
password = removeMoreThanTwoRepeatingChars(password)
|
|
125
|
-
password = removeMoreThanTwoFromSequence(password, seqNums)
|
|
126
|
-
password = removeMoreThanTwoFromSequence(password, seqKeyboard0)
|
|
127
|
-
password = removeMoreThanTwoFromSequence(password, seqKeyboard1)
|
|
128
|
-
password = removeMoreThanTwoFromSequence(password, seqKeyboard2)
|
|
129
|
-
password = removeMoreThanTwoFromSequence(password, seqAlphabet)
|
|
130
|
-
password = removeMoreThanTwoFromSequence(password, getReversedString(seqNums))
|
|
131
|
-
password = removeMoreThanTwoFromSequence(
|
|
132
|
-
password,
|
|
133
|
-
getReversedString(seqKeyboard0),
|
|
134
|
-
)
|
|
135
|
-
password = removeMoreThanTwoFromSequence(
|
|
136
|
-
password,
|
|
137
|
-
getReversedString(seqKeyboard1),
|
|
138
|
-
)
|
|
139
|
-
password = removeMoreThanTwoFromSequence(
|
|
140
|
-
password,
|
|
141
|
-
getReversedString(seqKeyboard2),
|
|
142
|
-
)
|
|
143
|
-
password = removeMoreThanTwoFromSequence(
|
|
144
|
-
password,
|
|
145
|
-
getReversedString(seqAlphabet),
|
|
146
|
-
)
|
|
147
|
-
return password.length
|
|
148
|
-
}
|
|
149
|
-
export function getEntropy(password: string): number {
|
|
150
|
-
return getEntropyInternal(password)
|
|
151
|
-
}
|
|
152
|
-
function getEntropyInternal(password: string): number {
|
|
153
|
-
const base = getBase(password)
|
|
154
|
-
const length = getLength(password)
|
|
155
|
-
// calculate log2(base^length)
|
|
156
|
-
return logPow(base, length, 2)
|
|
157
|
-
}
|
|
158
|
-
function logX(base: number, n: number): number {
|
|
159
|
-
if (base == 0) {
|
|
160
|
-
return 0
|
|
161
|
-
} else {
|
|
162
|
-
return Math.log2(n) / Math.log2(base)
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
function logPow(expBase: number, pow: number, logBase: number): number {
|
|
166
|
-
let total = 0
|
|
167
|
-
for (let i = 0; i < pow; i++) {
|
|
168
|
-
total += logX(logBase, expBase)
|
|
169
|
-
}
|
|
170
|
-
return total
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export function validatePassword(password: string, minEntropy: number): string {
|
|
174
|
-
const entropy: number = getEntropy(password)
|
|
175
|
-
if (entropy >= minEntropy) {
|
|
176
|
-
return ''
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
let hasReplace: boolean = false
|
|
180
|
-
let hasSep: boolean = false
|
|
181
|
-
let hasOtherSpecial: boolean = false
|
|
182
|
-
let hasLower: boolean = false
|
|
183
|
-
let hasUpper: boolean = false
|
|
184
|
-
let hasDigits: boolean = false
|
|
185
|
-
|
|
186
|
-
for (const c of password) {
|
|
187
|
-
switch (true) {
|
|
188
|
-
case replaceChars.includes(c):
|
|
189
|
-
hasReplace = true
|
|
190
|
-
break
|
|
191
|
-
case sepChars.includes(c):
|
|
192
|
-
hasSep = true
|
|
193
|
-
break
|
|
194
|
-
case otherSpecialChars.includes(c):
|
|
195
|
-
hasOtherSpecial = true
|
|
196
|
-
break
|
|
197
|
-
case lowerChars.includes(c):
|
|
198
|
-
hasLower = true
|
|
199
|
-
break
|
|
200
|
-
case upperChars.includes(c):
|
|
201
|
-
hasUpper = true
|
|
202
|
-
break
|
|
203
|
-
case digitsChars.includes(c):
|
|
204
|
-
hasDigits = true
|
|
205
|
-
break
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const allMessages: string[] = []
|
|
210
|
-
|
|
211
|
-
if (!hasOtherSpecial || !hasSep || !hasReplace) {
|
|
212
|
-
allMessages.push('including more special characters')
|
|
213
|
-
}
|
|
214
|
-
if (!hasLower) {
|
|
215
|
-
allMessages.push('using lowercase letters')
|
|
216
|
-
}
|
|
217
|
-
if (!hasUpper) {
|
|
218
|
-
allMessages.push('using uppercase letters')
|
|
219
|
-
}
|
|
220
|
-
if (!hasDigits) {
|
|
221
|
-
allMessages.push('using numbers')
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
if (allMessages.length > 0) {
|
|
225
|
-
const errorMessage: string = `Weak password, try ${allMessages.join(
|
|
226
|
-
', ',
|
|
227
|
-
)} or using a longer password`
|
|
228
|
-
return errorMessage
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return 'Weak password, try using a longer password'
|
|
232
|
-
}
|
package/helpers/localStorage.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const keys = {
|
|
2
|
-
// Keep this name.
|
|
3
|
-
authToken: 'token',
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export class LocalStorage {
|
|
7
|
-
// Auth token.
|
|
8
|
-
getAuthToken = () => window.localStorage.getItem(keys.authToken)
|
|
9
|
-
|
|
10
|
-
setAuthToken = (value: string) => window.localStorage.setItem(keys.authToken, value)
|
|
11
|
-
|
|
12
|
-
removeAuthToken = () => window.localStorage.removeItem(keys.authToken)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const localStorage = new LocalStorage()
|
package/helpers/request.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import 'whatwg-fetch'
|
|
2
|
-
|
|
3
|
-
type RequestParams = Record<string, unknown>
|
|
4
|
-
|
|
5
|
-
export type RequestOptions = RequestInit & {
|
|
6
|
-
params?: RequestParams
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const serializeParams = (params: RequestParams | null) => {
|
|
10
|
-
if (!params) return null
|
|
11
|
-
|
|
12
|
-
const searchParams = new URLSearchParams()
|
|
13
|
-
|
|
14
|
-
Object.entries(params).map((param) => {
|
|
15
|
-
const [key, value] = param
|
|
16
|
-
searchParams.append(key, String(value))
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
return searchParams.toString()
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const createUrl = (path: string, params: RequestParams | null) => {
|
|
23
|
-
const serializedParams = serializeParams(params)
|
|
24
|
-
const queryString = serializedParams ? `?${serializedParams}` : ''
|
|
25
|
-
return `${path}${queryString}`
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const request = async (path: string, options?: RequestOptions) => {
|
|
29
|
-
const { params = null, ...requestInit } = options ?? {}
|
|
30
|
-
|
|
31
|
-
const url = createUrl(path, params)
|
|
32
|
-
|
|
33
|
-
try {
|
|
34
|
-
return await window.fetch(url, {
|
|
35
|
-
...requestInit,
|
|
36
|
-
headers: {
|
|
37
|
-
'Content-Type': 'application/json',
|
|
38
|
-
...requestInit?.headers,
|
|
39
|
-
},
|
|
40
|
-
})
|
|
41
|
-
} catch (e) {
|
|
42
|
-
return new Response(null, {
|
|
43
|
-
status: 500,
|
|
44
|
-
statusText: `Unknown error`,
|
|
45
|
-
})
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react'
|
|
2
|
-
|
|
3
|
-
export const useWindowDimensions = () => {
|
|
4
|
-
const [windowDimensions, setWindowDimensions] = useState(window.innerWidth)
|
|
5
|
-
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
const handleResize = () => {
|
|
8
|
-
setWindowDimensions(window.innerWidth)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
window.addEventListener('resize', handleResize)
|
|
12
|
-
return () => window.removeEventListener('resize', handleResize)
|
|
13
|
-
}, [])
|
|
14
|
-
|
|
15
|
-
return windowDimensions
|
|
16
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2019-2021, Postgres.ai, Nikolay Samokhvalov nik@postgres.ai
|
|
3
|
-
* All Rights Reserved. Proprietary and confidential.
|
|
4
|
-
* Unauthorized copying of this file, via any medium is strictly prohibited
|
|
5
|
-
*--------------------------------------------------------------------------
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React from 'react'
|
|
9
|
-
|
|
10
|
-
type Props = {
|
|
11
|
-
className?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const ArrowDropDownIcon = (props: Props) => {
|
|
15
|
-
return (
|
|
16
|
-
<svg
|
|
17
|
-
className={props.className}
|
|
18
|
-
viewBox="0 0 8 6"
|
|
19
|
-
fill="none"
|
|
20
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
-
>
|
|
22
|
-
<path
|
|
23
|
-
// eslint-disable-next-line max-len
|
|
24
|
-
d="M7.8515 0.898419C7.75261 0.799446 7.63538 0.75 7.49994 0.75H0.500038C0.364534 0.75 0.247392 0.799446 0.148419 0.898419C0.0494455 0.997501 0 1.11464 0 1.25006C0 1.38546 0.0494455 1.5026 0.148419 1.6016L3.64838 5.10156C3.74746 5.20054 3.86461 5.25009 4 5.25009C4.13539 5.25009 4.25265 5.20054 4.35154 5.10156L7.8515 1.60157C7.95036 1.5026 8 1.38546 8 1.25004C8 1.11464 7.95036 0.997501 7.8515 0.898419Z"
|
|
25
|
-
fill="currentColor"
|
|
26
|
-
/>
|
|
27
|
-
</svg>
|
|
28
|
-
)
|
|
29
|
-
}
|
package/icons/Circle/index.tsx
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2019-2021, Postgres.ai, Nikolay Samokhvalov nik@postgres.ai
|
|
3
|
-
* All Rights Reserved. Proprietary and confidential.
|
|
4
|
-
* Unauthorized copying of this file, via any medium is strictly prohibited
|
|
5
|
-
*--------------------------------------------------------------------------
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React from 'react'
|
|
9
|
-
|
|
10
|
-
type Props = {
|
|
11
|
-
className?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const CircleIcon = (props: Props) => {
|
|
15
|
-
const { className } = props
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<svg
|
|
19
|
-
className={className}
|
|
20
|
-
viewBox="0 0 10 10"
|
|
21
|
-
version="1.1"
|
|
22
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
-
>
|
|
24
|
-
<circle cx="5" cy="5" r="5" fill="currentColor"></circle>
|
|
25
|
-
</svg>
|
|
26
|
-
)
|
|
27
|
-
}
|
package/icons/External/index.tsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const ExternalIcon = ({ className }: { className: string }) => (
|
|
2
|
-
<svg
|
|
3
|
-
width="24px"
|
|
4
|
-
height="24px"
|
|
5
|
-
viewBox="0 0 24 24"
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
className={className}
|
|
8
|
-
>
|
|
9
|
-
<path
|
|
10
|
-
fill="#551A8B"
|
|
11
|
-
d="M18,10.82a1,1,0,0,0-1,1V19a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V8A1,1,0,0,1,5,7h7.18a1,1,0,0,0,0-2H5A3,3,0,0,0,2,8V19a3,3,0,0,0,3,3H16a3,3,0,0,0,3-3V11.82A1,1,0,0,0,18,10.82Zm3.92-8.2a1,1,0,0,0-.54-.54A1,1,0,0,0,21,2H15a1,1,0,0,0,0,2h3.59L8.29,14.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L20,5.41V9a1,1,0,0,0,2,0V3A1,1,0,0,0,21.92,2.62Z"
|
|
12
|
-
/>
|
|
13
|
-
</svg>
|
|
14
|
-
)
|
package/icons/Info/index.tsx
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export const InfoIcon = ({ className }: { className?: string }) => (
|
|
2
|
-
<svg
|
|
3
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
-
viewBox="0 0 12 12"
|
|
5
|
-
className={className}
|
|
6
|
-
>
|
|
7
|
-
<g fill="currentColor" fillRule="nonzero">
|
|
8
|
-
<path d="M6 0C2.692 0 0 2.692 0 6s2.692 6 6 6 6-2.692 6-6-2.692-6-6-6Zm0 10.91A4.915 4.915 0 0 1 1.09 6 4.915 4.915 0 0 1 6 1.09 4.915 4.915 0 0 1 10.91 6 4.915 4.915 0 0 1 6 10.91Z" />
|
|
9
|
-
<path d="M6 2.545A.728.728 0 0 0 6 4a.728.728 0 0 0 0-1.455ZM6 5.09a.545.545 0 0 0-.545.546V8.91a.545.545 0 0 0 1.09 0V5.636A.545.545 0 0 0 6 5.091Z" />
|
|
10
|
-
</g>
|
|
11
|
-
</svg>
|
|
12
|
-
)
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2019-2021, Postgres.ai, Nikolay Samokhvalov nik@postgres.ai
|
|
3
|
-
* All Rights Reserved. Proprietary and confidential.
|
|
4
|
-
* Unauthorized copying of this file, via any medium is strictly prohibited
|
|
5
|
-
*--------------------------------------------------------------------------
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React from 'react'
|
|
9
|
-
|
|
10
|
-
type Props = {
|
|
11
|
-
className?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const RenewableIcon = React.forwardRef<SVGSVGElement, Props>(
|
|
15
|
-
(props, ref) => {
|
|
16
|
-
const { className, ...hiddenProps } = props
|
|
17
|
-
return (
|
|
18
|
-
<svg
|
|
19
|
-
{...hiddenProps}
|
|
20
|
-
ref={ref}
|
|
21
|
-
className={className}
|
|
22
|
-
viewBox="0 0 10 10"
|
|
23
|
-
fill="none"
|
|
24
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
25
|
-
>
|
|
26
|
-
<path
|
|
27
|
-
fillRule="evenodd"
|
|
28
|
-
clipRule="evenodd"
|
|
29
|
-
d="M6.14337 0L8.19809 2.9755L4.59387 3.26718L5.16139 2.07055C4.22847 2.10806 3.3161 2.48386 2.66614 3.18795L2.20594 2.76312C3.05679 1.84141 4.26977 1.40592 5.45883 1.44339L6.14337 0Z"
|
|
30
|
-
fill="currentColor"
|
|
31
|
-
/>
|
|
32
|
-
<path
|
|
33
|
-
fillRule="evenodd"
|
|
34
|
-
clipRule="evenodd"
|
|
35
|
-
d="M9.7343 9.13905L6.12728 9.39371L7.71025 6.14261L8.45158 7.24009C8.89401 6.4179 9.03479 5.44126 8.75942 4.52346L9.35931 4.34347C9.71979 5.54495 9.47743 6.81074 8.8401 7.81527L9.7343 9.13905Z"
|
|
36
|
-
fill="currentColor"
|
|
37
|
-
/>
|
|
38
|
-
<path
|
|
39
|
-
fillRule="evenodd"
|
|
40
|
-
clipRule="evenodd"
|
|
41
|
-
d="M0 7.57495L1.61898 4.34163L3.60962 7.36037L2.28757 7.43896C2.76953 8.23862 3.53811 8.85742 4.46813 9.08819L4.3173 9.69607C3.09983 9.39397 2.13422 8.54041 1.59468 7.48015L0 7.57495Z"
|
|
42
|
-
fill="currentColor"
|
|
43
|
-
/>
|
|
44
|
-
<path
|
|
45
|
-
fillRule="evenodd"
|
|
46
|
-
clipRule="evenodd"
|
|
47
|
-
d="M6.26612 2.51078C5.07868 2.17637 3.73747 2.48899 2.89616 3.40036L1.97575 2.55072C3.17071 1.25624 5.01514 0.857134 6.60567 1.30506L6.26612 2.51078Z"
|
|
48
|
-
fill="currentColor"
|
|
49
|
-
/>
|
|
50
|
-
<path
|
|
51
|
-
fillRule="evenodd"
|
|
52
|
-
clipRule="evenodd"
|
|
53
|
-
d="M7.33938 8.11969C8.34588 7.28131 8.83847 5.87691 8.45939 4.61345L9.65917 4.25348C10.1969 6.04581 9.49312 7.95595 8.14107 9.08215L7.33938 8.11969Z"
|
|
54
|
-
fill="currentColor"
|
|
55
|
-
/>
|
|
56
|
-
<path
|
|
57
|
-
fillRule="evenodd"
|
|
58
|
-
clipRule="evenodd"
|
|
59
|
-
d="M2.07072 5.82736C2.20416 7.20026 3.19328 8.44922 4.54348 8.78425L4.24181 10C2.32911 9.5254 1.00387 7.79934 0.823976 5.94853L2.07072 5.82736Z"
|
|
60
|
-
fill="currentColor"
|
|
61
|
-
/>
|
|
62
|
-
</svg>
|
|
63
|
-
)
|
|
64
|
-
},
|
|
65
|
-
)
|
package/icons/Shield/index.tsx
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2019-2021, Postgres.ai, Nikolay Samokhvalov nik@postgres.ai
|
|
3
|
-
* All Rights Reserved. Proprietary and confidential.
|
|
4
|
-
* Unauthorized copying of this file, via any medium is strictly prohibited
|
|
5
|
-
*--------------------------------------------------------------------------
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React from 'react'
|
|
9
|
-
|
|
10
|
-
type Props = {
|
|
11
|
-
className?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const ShieldIcon = React.forwardRef<SVGSVGElement, Props>(
|
|
15
|
-
(props, ref) => {
|
|
16
|
-
const { className, ...hiddenProps } = props
|
|
17
|
-
return (
|
|
18
|
-
<svg
|
|
19
|
-
{...hiddenProps}
|
|
20
|
-
ref={ref}
|
|
21
|
-
className={className}
|
|
22
|
-
viewBox="0 0 8 10"
|
|
23
|
-
fill="none"
|
|
24
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
25
|
-
>
|
|
26
|
-
<path
|
|
27
|
-
d="M4.00195 0L0.251953 1.66667V4.16667C0.251953 6.47917 1.85195 8.64167 4.00195 9.16667C6.15195 8.64167 7.75195 6.47917 7.75195 4.16667V1.66667L4.00195 0ZM3.16862 6.66667L1.50195 5L2.08945 4.4125L3.16862 5.4875L5.91445 2.74167L6.50195 3.33333L3.16862 6.66667Z"
|
|
28
|
-
fill="currentColor"
|
|
29
|
-
/>
|
|
30
|
-
</svg>
|
|
31
|
-
)
|
|
32
|
-
},
|
|
33
|
-
)
|