@postgres.ai/shared 3.5.1-pr-1027.0 → 4.0.0-pr-1028
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 +26 -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 +89 -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 +7 -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/PostgresSQL/index.d.ts +2 -0
- package/icons/PostgresSQL/index.js +40 -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/Branches/Branch/context.d.ts +22 -0
- package/pages/Branches/Branch/context.js +3 -0
- package/pages/Branches/Branch/index.d.ts +9 -0
- package/pages/Branches/Branch/index.js +172 -0
- package/pages/Branches/Branch/stores/Main.d.ts +37 -0
- package/pages/Branches/Branch/stores/Main.js +90 -0
- package/pages/Branches/Branch/useCreatedStores.d.ts +6 -0
- package/pages/Branches/Branch/useCreatedStores.js +5 -0
- package/pages/Branches/components/BranchesTable/index.d.ts +10 -0
- package/pages/Branches/components/BranchesTable/index.js +107 -0
- package/pages/Branches/components/Modals/DeleteBranchModal/index.d.ts +11 -0
- package/pages/Branches/components/Modals/DeleteBranchModal/index.js +49 -0
- package/pages/Branches/components/Modals/types.d.ts +4 -0
- package/pages/Branches/components/Modals/types.js +1 -0
- package/pages/Branches/index.d.ts +6 -0
- package/pages/Branches/index.js +60 -0
- package/pages/Clone/Status/index.d.ts +8 -0
- package/pages/Clone/Status/index.js +38 -0
- package/pages/Clone/context.d.ts +21 -0
- package/pages/Clone/context.js +3 -0
- package/pages/Clone/index.d.ts +9 -0
- package/pages/Clone/index.js +252 -0
- package/pages/Clone/stores/Main.d.ts +47 -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/Clone/utils/index.d.ts +4 -0
- package/pages/Clone/utils/index.js +12 -0
- package/pages/CreateBranch/index.d.ts +17 -0
- package/pages/CreateBranch/index.js +135 -0
- package/pages/CreateBranch/stores/Main.d.ts +43 -0
- package/pages/CreateBranch/stores/Main.js +59 -0
- package/pages/CreateBranch/useCreatedStores.d.ts +6 -0
- package/pages/CreateBranch/useCreatedStores.js +5 -0
- package/pages/CreateBranch/useForm.d.ts +51 -0
- package/pages/CreateBranch/useForm.js +30 -0
- package/pages/CreateBranch/utils/index.d.ts +2 -0
- package/pages/CreateBranch/utils/index.js +10 -0
- package/pages/CreateClone/index.d.ts +19 -0
- package/pages/CreateClone/index.js +142 -0
- package/pages/CreateClone/stores/Main.d.ts +49 -0
- package/pages/CreateClone/stores/Main.js +85 -0
- package/pages/CreateClone/styles.module.scss +47 -4
- package/pages/CreateClone/useCreatedStores.d.ts +6 -0
- package/pages/CreateClone/useCreatedStores.js +5 -0
- package/pages/CreateClone/useForm.d.ts +55 -0
- package/pages/CreateClone/useForm.js +26 -0
- package/pages/CreateClone/utils/index.d.ts +3 -0
- package/pages/CreateClone/utils/index.js +17 -0
- package/pages/CreateSnapshot/index.d.ts +17 -0
- package/pages/CreateSnapshot/index.js +117 -0
- package/pages/CreateSnapshot/stores/Main.d.ts +21 -0
- package/pages/CreateSnapshot/stores/Main.js +31 -0
- package/pages/CreateSnapshot/useCreatedStores.d.ts +6 -0
- package/pages/CreateSnapshot/useCreatedStores.js +5 -0
- package/pages/CreateSnapshot/useForm.d.ts +53 -0
- package/pages/CreateSnapshot/useForm.js +25 -0
- package/pages/CreateSnapshot/utils/index.d.ts +1 -0
- package/pages/CreateSnapshot/utils/index.js +3 -0
- package/pages/Instance/Clones/ClonesList/ConnectionModal/index.d.ts +10 -0
- package/pages/Instance/Clones/ClonesList/ConnectionModal/index.js +74 -0
- package/pages/Instance/Clones/ClonesList/MenuCell/index.d.ts +11 -0
- package/pages/Instance/Clones/ClonesList/MenuCell/index.js +49 -0
- package/pages/Instance/Clones/ClonesList/MenuCell/utils.d.ts +3 -0
- package/pages/Instance/Clones/ClonesList/MenuCell/utils.js +18 -0
- package/pages/Instance/Clones/ClonesList/index.d.ts +9 -0
- package/pages/Instance/Clones/ClonesList/index.js +96 -0
- package/pages/Instance/{components → Clones}/ClonesList/styles.module.scss +10 -0
- package/pages/Instance/Clones/ClonesModal/index.d.ts +4 -0
- package/pages/Instance/Clones/ClonesModal/index.js +38 -0
- package/pages/Instance/Clones/ClonesModal/utils.d.ts +7 -0
- package/pages/Instance/Clones/ClonesModal/utils.js +14 -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/Header/styles.module.scss +4 -1
- package/pages/Instance/Clones/index.d.ts +8 -0
- package/pages/Instance/Clones/index.js +64 -0
- package/pages/Instance/Configuration/Header/index.d.ts +11 -0
- package/pages/Instance/Configuration/Header/index.js +17 -0
- package/pages/Instance/Configuration/InputWithTooltip/index.d.ts +32 -0
- package/pages/Instance/Configuration/InputWithTooltip/index.js +64 -0
- package/pages/Instance/Configuration/ResponseMessage/index.d.ts +5 -0
- package/pages/Instance/Configuration/ResponseMessage/index.js +43 -0
- package/pages/Instance/Configuration/configOptions.d.ts +9 -0
- package/pages/Instance/Configuration/configOptions.js +59 -0
- package/pages/Instance/Configuration/index.d.ts +10 -0
- package/pages/Instance/Configuration/index.js +547 -0
- package/pages/Instance/Configuration/tooltipText.d.ts +20 -0
- package/pages/Instance/Configuration/tooltipText.js +21 -0
- package/pages/Instance/Configuration/useForm.d.ts +82 -0
- package/pages/Instance/Configuration/useForm.js +74 -0
- package/pages/Instance/Configuration/utils/index.d.ts +22 -0
- package/pages/Instance/Configuration/utils/index.js +105 -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 +71 -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 +11 -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 +47 -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 +27 -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 +40 -0
- package/pages/Instance/Info/Snapshots/utils.d.ts +34 -0
- package/pages/Instance/Info/Snapshots/utils.js +26 -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 +76 -0
- package/pages/Instance/Snapshots/components/SnapshotHeader/index.d.ts +11 -0
- package/pages/Instance/Snapshots/components/SnapshotHeader/index.js +36 -0
- package/pages/Instance/Snapshots/components/SnapshotsList/index.d.ts +11 -0
- package/pages/Instance/Snapshots/components/SnapshotsList/index.js +157 -0
- package/pages/Instance/Snapshots/components/SnapshotsModal/utils.d.ts +7 -0
- package/{components/HorizontalScrollContainer/utils.ts → pages/Instance/Snapshots/components/SnapshotsModal/utils.js} +8 -9
- package/pages/Instance/Snapshots/components/SnapshotsTable/index.d.ts +6 -0
- package/pages/Instance/Snapshots/components/SnapshotsTable/index.js +125 -0
- package/pages/Instance/Snapshots/index.d.ts +6 -0
- package/pages/Instance/Snapshots/index.js +92 -0
- package/pages/Instance/Snapshots/utils/index.d.ts +16 -0
- package/pages/Instance/Snapshots/utils/index.js +30 -0
- package/pages/Instance/SnapshotsModal/index.d.ts +4 -0
- package/pages/Instance/SnapshotsModal/index.js +81 -0
- package/pages/Instance/Tabs/PlatformTabs.d.ts +10 -0
- package/pages/Instance/Tabs/PlatformTabs.js +51 -0
- package/pages/Instance/Tabs/index.d.ts +26 -0
- package/pages/Instance/Tabs/index.js +75 -0
- package/pages/Instance/Tabs/styles.d.ts +1 -0
- package/pages/Instance/Tabs/styles.js +62 -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 +38 -0
- package/pages/Instance/{ClonesModal/utils.ts → context.js} +5 -15
- package/pages/Instance/index.d.ts +8 -0
- package/pages/Instance/index.js +94 -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 +141 -0
- package/pages/Instance/stores/Main.js +302 -0
- package/pages/Instance/stores/SnapshotsModal.d.ts +13 -0
- package/pages/Instance/stores/SnapshotsModal.js +24 -0
- package/pages/Instance/styles.scss +1 -4
- 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 +37 -0
- package/pages/Logs/index.d.ts +6 -0
- package/pages/Logs/index.js +200 -0
- package/pages/Logs/utils/index.d.ts +2 -0
- package/pages/Logs/utils/index.js +15 -0
- package/pages/Logs/wsLogs.d.ts +3 -0
- package/pages/Logs/wsLogs.js +92 -0
- package/pages/Logs/wsSnackbar.d.ts +1 -0
- package/pages/Logs/wsSnackbar.js +25 -0
- package/pages/Snapshots/Snapshot/DestorySnapshotModal/index.d.ts +12 -0
- package/pages/Snapshots/Snapshot/DestorySnapshotModal/index.js +69 -0
- package/pages/Snapshots/Snapshot/context.d.ts +23 -0
- package/pages/Snapshots/Snapshot/context.js +3 -0
- package/pages/Snapshots/Snapshot/index.d.ts +9 -0
- package/pages/Snapshots/Snapshot/index.js +171 -0
- package/pages/Snapshots/Snapshot/stores/Main.d.ts +33 -0
- package/pages/Snapshots/Snapshot/stores/Main.js +71 -0
- package/pages/Snapshots/Snapshot/useCreatedStores.d.ts +6 -0
- package/pages/Snapshots/Snapshot/useCreatedStores.js +5 -0
- package/stores/Snapshots.d.ts +24 -0
- package/stores/Snapshots.js +59 -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/createBranch.d.ts +12 -0
- package/types/api/endpoints/createBranch.js +1 -0
- package/types/api/endpoints/createClone.d.ts +13 -0
- package/types/api/endpoints/createClone.js +1 -0
- package/types/api/endpoints/createSnapshot.d.ts +5 -0
- package/types/api/endpoints/createSnapshot.js +1 -0
- package/types/api/endpoints/deleteBranch.d.ts +4 -0
- package/types/api/endpoints/deleteBranch.js +1 -0
- package/types/api/endpoints/destroyClone.d.ts +7 -0
- package/types/api/endpoints/destroyClone.js +1 -0
- package/types/api/endpoints/destroySnapshot.d.ts +4 -0
- package/types/api/endpoints/destroySnapshot.js +1 -0
- package/types/api/endpoints/getBranchSnapshot.d.ts +5 -0
- package/types/api/endpoints/getBranchSnapshot.js +1 -0
- package/types/api/endpoints/getBranches.d.ts +18 -0
- package/types/api/endpoints/getBranches.js +5 -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/getSnapshotList.d.ts +10 -0
- package/types/api/endpoints/getSnapshotList.js +1 -0
- package/types/api/endpoints/getSnapshots.d.ts +8 -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/branchSnapshot.d.ts +6 -0
- package/types/api/entities/branchSnapshot.js +1 -0
- package/types/api/entities/branchSnapshots.d.ts +15 -0
- package/types/api/entities/branchSnapshots.js +7 -0
- package/types/api/entities/clone.d.ts +56 -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/createBranch.d.ts +5 -0
- package/types/api/entities/createBranch.js +1 -0
- package/types/api/entities/createSnapshot.d.ts +5 -0
- package/types/api/entities/createSnapshot.js +1 -0
- package/types/api/entities/dbSource.d.ts +13 -0
- package/types/api/entities/dbSource.js +1 -0
- package/types/api/entities/instance.d.ts +114 -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 +114 -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 +27 -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 +18 -0
- package/utils/date.js +40 -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 +5 -0
- package/utils/snapshot.js +6 -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 -60
- 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
- /package/pages/{Configuration → Instance/Configuration}/styles.module.scss +0 -0
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/*--------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) 2019-2021, Postgres.ai, Nikolay Samokhvalov nik@postgres.ai
|
|
4
|
+
* All Rights Reserved. Proprietary and confidential.
|
|
5
|
+
* Unauthorized copying of this file, via any small is strictly prohibited
|
|
6
|
+
*--------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { useState, useEffect } from 'react';
|
|
9
|
+
import { observer } from 'mobx-react-lite';
|
|
10
|
+
import Editor from '@monaco-editor/react';
|
|
11
|
+
import { Checkbox, FormControlLabel, Typography, Snackbar, makeStyles, Button, } from '@material-ui/core';
|
|
12
|
+
import Box from '@mui/material/Box';
|
|
13
|
+
import { Modal } from '@postgres.ai/shared/components/Modal';
|
|
14
|
+
import { StubSpinner } from '@postgres.ai/shared/components/StubSpinner';
|
|
15
|
+
import { ExternalIcon } from '@postgres.ai/shared/icons/External';
|
|
16
|
+
import { Spinner } from '@postgres.ai/shared/components/Spinner';
|
|
17
|
+
import { useStores } from '@postgres.ai/shared/pages/Instance/context';
|
|
18
|
+
import { tooltipText } from './tooltipText';
|
|
19
|
+
import { useForm } from './useForm';
|
|
20
|
+
import { ResponseMessage } from './ResponseMessage';
|
|
21
|
+
import { ConfigSectionTitle, Header, ModalTitle } from './Header';
|
|
22
|
+
import { dockerImageOptions, imagePgOptions } from './configOptions';
|
|
23
|
+
import { uniqueChipValue, customOrGenericImage, genericDockerImages, } from './utils';
|
|
24
|
+
import { SelectWithTooltip, InputWithChip, InputWithTooltip, } from './InputWithTooltip';
|
|
25
|
+
import styles from './styles.module.scss';
|
|
26
|
+
import { formatTuningParams, formatTuningParamsToObj, } from '@postgres.ai/shared/types/api/endpoints/testDbSource';
|
|
27
|
+
const NON_LOGICAL_RETRIEVAL_MESSAGE = 'Configuration editing is only available in logical mode';
|
|
28
|
+
const PREVENT_MODIFYING_MESSAGE = 'Editing is disabled by admin';
|
|
29
|
+
const useStyles = makeStyles({
|
|
30
|
+
checkboxRoot: {
|
|
31
|
+
padding: '9px 10px',
|
|
32
|
+
},
|
|
33
|
+
grayText: {
|
|
34
|
+
color: '#8a8a8a',
|
|
35
|
+
fontSize: '12px',
|
|
36
|
+
},
|
|
37
|
+
}, { index: 1 });
|
|
38
|
+
export const Configuration = observer(({ instanceId, switchActiveTab, reload, isConfigurationActive, disableConfigModification, }) => {
|
|
39
|
+
const classes = useStyles();
|
|
40
|
+
const stores = useStores();
|
|
41
|
+
const { config, isConfigurationLoading, updateConfig, getSeImages, fullConfig, testDbSource, configError, getFullConfig, getFullConfigError, getEngine, } = stores.main;
|
|
42
|
+
const configData = config && JSON.parse(JSON.stringify(config));
|
|
43
|
+
const isConfigurationDisabled = !isConfigurationActive || disableConfigModification;
|
|
44
|
+
const [dleEdition, setDledition] = useState('');
|
|
45
|
+
const isCeEdition = dleEdition === 'community';
|
|
46
|
+
const filteredDockerImageOptions = isCeEdition
|
|
47
|
+
? dockerImageOptions.filter((option) => option.type === 'custom' || option.type === 'Generic Postgres')
|
|
48
|
+
: dockerImageOptions;
|
|
49
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
50
|
+
const [submitState, setSubmitState] = useState({
|
|
51
|
+
status: '',
|
|
52
|
+
response: '',
|
|
53
|
+
});
|
|
54
|
+
const [dockerState, setDockerState] = useState({
|
|
55
|
+
loading: false,
|
|
56
|
+
error: '',
|
|
57
|
+
tags: [],
|
|
58
|
+
locations: [],
|
|
59
|
+
images: [],
|
|
60
|
+
preloadLibraries: '',
|
|
61
|
+
data: [],
|
|
62
|
+
});
|
|
63
|
+
const [testConnectionState, setTestConnectionState] = useState({
|
|
64
|
+
default: {
|
|
65
|
+
loading: false,
|
|
66
|
+
error: '',
|
|
67
|
+
message: {
|
|
68
|
+
status: '',
|
|
69
|
+
message: '',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
dockerImage: {
|
|
73
|
+
loading: false,
|
|
74
|
+
error: '',
|
|
75
|
+
message: {
|
|
76
|
+
status: '',
|
|
77
|
+
message: '',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
fetchTuning: {
|
|
81
|
+
loading: false,
|
|
82
|
+
error: '',
|
|
83
|
+
message: {
|
|
84
|
+
status: '',
|
|
85
|
+
message: '',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
const switchTab = async () => {
|
|
90
|
+
reload();
|
|
91
|
+
switchActiveTab(null, 0);
|
|
92
|
+
};
|
|
93
|
+
const onSubmit = async (values) => {
|
|
94
|
+
setSubmitState({
|
|
95
|
+
...submitState,
|
|
96
|
+
response: '',
|
|
97
|
+
});
|
|
98
|
+
await updateConfig({
|
|
99
|
+
...values,
|
|
100
|
+
tuningParams: formatTuningParamsToObj(values.tuningParams),
|
|
101
|
+
}, instanceId).then((response) => {
|
|
102
|
+
if (response === null || response === void 0 ? void 0 : response.ok) {
|
|
103
|
+
setSubmitState({
|
|
104
|
+
status: 'success',
|
|
105
|
+
response: (_jsxs("p", { children: ["Changes applied.", ' ', _jsx("span", { className: styles.underline, onClick: switchTab, children: "Switch to Overview" }), ' ', "to see details and to work with clones"] })),
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
const [{ formik, connectionData, isConnectionDataValid }] = useForm(onSubmit);
|
|
111
|
+
const scrollToField = () => {
|
|
112
|
+
const errorElement = document.querySelector('.Mui-error');
|
|
113
|
+
if (errorElement) {
|
|
114
|
+
errorElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
115
|
+
const inputElement = errorElement.querySelector('input');
|
|
116
|
+
if (inputElement) {
|
|
117
|
+
setTimeout(() => {
|
|
118
|
+
inputElement.focus();
|
|
119
|
+
}, 1000);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const onTestConnectionClick = async ({ type, }) => {
|
|
124
|
+
Object.keys(connectionData).map(function (key) {
|
|
125
|
+
if (key !== 'password' && key !== 'db_list') {
|
|
126
|
+
formik.validateField(key).then(() => {
|
|
127
|
+
scrollToField();
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
if (isConnectionDataValid) {
|
|
132
|
+
setTestConnectionState({
|
|
133
|
+
...testConnectionState,
|
|
134
|
+
[type]: {
|
|
135
|
+
...testConnectionState[type],
|
|
136
|
+
loading: true,
|
|
137
|
+
error: '',
|
|
138
|
+
message: {
|
|
139
|
+
status: '',
|
|
140
|
+
message: '',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
testDbSource({
|
|
145
|
+
...connectionData,
|
|
146
|
+
instanceId,
|
|
147
|
+
})
|
|
148
|
+
.then((res) => {
|
|
149
|
+
var _a;
|
|
150
|
+
if (res === null || res === void 0 ? void 0 : res.response) {
|
|
151
|
+
setTestConnectionState({
|
|
152
|
+
...testConnectionState,
|
|
153
|
+
[type]: {
|
|
154
|
+
...testConnectionState[type],
|
|
155
|
+
message: {
|
|
156
|
+
status: res.response.status,
|
|
157
|
+
message: res.response.message,
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
if (type === 'fetchTuning') {
|
|
162
|
+
formik.setFieldValue('tuningParams', formatTuningParams(res.response.tuningParams));
|
|
163
|
+
}
|
|
164
|
+
if (type === 'dockerImage' && ((_a = res.response) === null || _a === void 0 ? void 0 : _a.dbVersion)) {
|
|
165
|
+
const currentDockerImage = dockerState.data.find((image) => { var _a; return Number(image.pg_major_version) === ((_a = res.response) === null || _a === void 0 ? void 0 : _a.dbVersion); });
|
|
166
|
+
if (currentDockerImage) {
|
|
167
|
+
formik.setValues({
|
|
168
|
+
...formik.values,
|
|
169
|
+
dockerImage: currentDockerImage.pg_major_version,
|
|
170
|
+
dockerPath: currentDockerImage.location,
|
|
171
|
+
dockerTag: currentDockerImage.tag,
|
|
172
|
+
});
|
|
173
|
+
setDockerState({
|
|
174
|
+
...dockerState,
|
|
175
|
+
tags: dockerState.data
|
|
176
|
+
.map((image) => image.tag)
|
|
177
|
+
.filter((tag) => tag.startsWith(currentDockerImage.pg_major_version)),
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else if (res === null || res === void 0 ? void 0 : res.error) {
|
|
183
|
+
setTestConnectionState({
|
|
184
|
+
...testConnectionState,
|
|
185
|
+
[type]: {
|
|
186
|
+
...testConnectionState[type],
|
|
187
|
+
message: {
|
|
188
|
+
status: 'error',
|
|
189
|
+
message: res.error.message,
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
})
|
|
195
|
+
.catch((err) => {
|
|
196
|
+
setTestConnectionState({
|
|
197
|
+
...testConnectionState,
|
|
198
|
+
[type]: {
|
|
199
|
+
...testConnectionState[type],
|
|
200
|
+
error: err.message,
|
|
201
|
+
loading: false,
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
const handleModalClick = async () => {
|
|
208
|
+
await getFullConfig(instanceId);
|
|
209
|
+
setIsModalOpen(true);
|
|
210
|
+
};
|
|
211
|
+
const handleDeleteChip = (_, uniqueValue, id) => {
|
|
212
|
+
if (formik.values[id]) {
|
|
213
|
+
let newValues = '';
|
|
214
|
+
const currentValues = uniqueChipValue(String(formik.values[id]));
|
|
215
|
+
const splitValues = currentValues.split(' ');
|
|
216
|
+
const curDividers = String(formik.values[id]).match(/[,(\s)(\n)(\r)(\t)(\r\n)]/gm);
|
|
217
|
+
for (let i in splitValues) {
|
|
218
|
+
if (curDividers && splitValues[i] !== uniqueValue) {
|
|
219
|
+
newValues =
|
|
220
|
+
newValues +
|
|
221
|
+
splitValues[i] +
|
|
222
|
+
(curDividers[i] ? curDividers[i] : '');
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
formik.setFieldValue(id, newValues);
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
const handleSelectPgOptions = (e, formikName) => {
|
|
229
|
+
let pgValue = formik.values[formikName];
|
|
230
|
+
formik.setFieldValue(formikName, configData && configData[formikName]);
|
|
231
|
+
const selectedPgOptions = imagePgOptions.filter((pg) => e.target.value === pg.optionType);
|
|
232
|
+
const setFormikPgValue = (name) => {
|
|
233
|
+
if (selectedPgOptions.length === 0) {
|
|
234
|
+
formik.setFieldValue(formikName, '');
|
|
235
|
+
}
|
|
236
|
+
selectedPgOptions.forEach((pg) => {
|
|
237
|
+
return pg[name].forEach((addOption) => {
|
|
238
|
+
var _a;
|
|
239
|
+
if (!((_a = String(pgValue)) === null || _a === void 0 ? void 0 : _a.includes(addOption))) {
|
|
240
|
+
const addOptionWithSpace = addOption + ' ';
|
|
241
|
+
formik.setFieldValue(formikName, (pgValue += addOptionWithSpace));
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
};
|
|
246
|
+
if (formikName === 'pgRestoreCustomOptions') {
|
|
247
|
+
setFormikPgValue('pgRestoreOptions');
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
setFormikPgValue('pgDumpOptions');
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
const fetchSeImages = async ({ dockerTag, packageGroup, initialRender, }) => {
|
|
254
|
+
setDockerState({
|
|
255
|
+
...dockerState,
|
|
256
|
+
loading: true,
|
|
257
|
+
});
|
|
258
|
+
await getSeImages({
|
|
259
|
+
packageGroup,
|
|
260
|
+
}).then((data) => {
|
|
261
|
+
var _a, _b, _c, _d;
|
|
262
|
+
if (data) {
|
|
263
|
+
const seImagesMajorVersions = data
|
|
264
|
+
.map((image) => image.pg_major_version)
|
|
265
|
+
.filter((value, index, self) => self.indexOf(value) === index)
|
|
266
|
+
.sort((a, b) => Number(a) - Number(b));
|
|
267
|
+
const currentDockerImage = initialRender
|
|
268
|
+
? formik.values.dockerImage
|
|
269
|
+
: seImagesMajorVersions.slice(-1)[0];
|
|
270
|
+
const currentPreloadLibraries = ((_b = (_a = data.find((image) => image.tag === dockerTag)) === null || _a === void 0 ? void 0 : _a.pg_config_presets) === null || _b === void 0 ? void 0 : _b.shared_preload_libraries) ||
|
|
271
|
+
((_d = (_c = data[0]) === null || _c === void 0 ? void 0 : _c.pg_config_presets) === null || _d === void 0 ? void 0 : _d.shared_preload_libraries);
|
|
272
|
+
setDockerState({
|
|
273
|
+
...(initialRender
|
|
274
|
+
? { images: seImagesMajorVersions }
|
|
275
|
+
: {
|
|
276
|
+
...dockerState,
|
|
277
|
+
}),
|
|
278
|
+
error: '',
|
|
279
|
+
tags: data
|
|
280
|
+
.map((image) => image.tag)
|
|
281
|
+
.filter((tag) => tag.startsWith(currentDockerImage)),
|
|
282
|
+
locations: data
|
|
283
|
+
.map((image) => image.location)
|
|
284
|
+
.filter((location) => location === null || location === void 0 ? void 0 : location.includes(currentDockerImage)),
|
|
285
|
+
loading: false,
|
|
286
|
+
preloadLibraries: currentPreloadLibraries,
|
|
287
|
+
images: seImagesMajorVersions,
|
|
288
|
+
data,
|
|
289
|
+
});
|
|
290
|
+
formik.setValues({
|
|
291
|
+
...formik.values,
|
|
292
|
+
dockerImage: currentDockerImage,
|
|
293
|
+
dockerImageType: packageGroup,
|
|
294
|
+
dockerTag: dockerTag
|
|
295
|
+
? dockerTag
|
|
296
|
+
: data.map((image) => image.tag)[0],
|
|
297
|
+
dockerPath: initialRender
|
|
298
|
+
? formik.values.dockerPath
|
|
299
|
+
: data.map((image) => image.location)[0],
|
|
300
|
+
sharedPreloadLibraries: currentPreloadLibraries || '',
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
setDockerState({
|
|
305
|
+
...dockerState,
|
|
306
|
+
loading: false,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
};
|
|
311
|
+
const handleDockerImageSelect = (e) => {
|
|
312
|
+
if (e.target.value === 'Generic Postgres') {
|
|
313
|
+
const genericImageVersions = genericDockerImages
|
|
314
|
+
.map((image) => image.pg_major_version)
|
|
315
|
+
.filter((value, index, self) => self.indexOf(value) === index)
|
|
316
|
+
.sort((a, b) => Number(a) - Number(b));
|
|
317
|
+
const currentDockerImage = genericImageVersions.slice(-1)[0];
|
|
318
|
+
setDockerState({
|
|
319
|
+
...dockerState,
|
|
320
|
+
tags: genericDockerImages
|
|
321
|
+
.map((image) => image.tag)
|
|
322
|
+
.filter((tag) => tag.startsWith(currentDockerImage)),
|
|
323
|
+
locations: genericDockerImages
|
|
324
|
+
.map((image) => image.location)
|
|
325
|
+
.filter((location) => location === null || location === void 0 ? void 0 : location.includes(currentDockerImage)),
|
|
326
|
+
images: genericImageVersions,
|
|
327
|
+
data: genericDockerImages,
|
|
328
|
+
});
|
|
329
|
+
formik.setValues({
|
|
330
|
+
...formik.values,
|
|
331
|
+
dockerImage: currentDockerImage,
|
|
332
|
+
dockerImageType: e.target.value,
|
|
333
|
+
dockerTag: genericDockerImages.map((image) => image.tag)[0],
|
|
334
|
+
dockerPath: genericDockerImages.map((image) => image.location)[0],
|
|
335
|
+
sharedPreloadLibraries: 'pg_stat_statements,pg_stat_kcache,pg_cron,pgaudit,anon',
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
else if (e.target.value === 'custom') {
|
|
339
|
+
formik.setValues({
|
|
340
|
+
...formik.values,
|
|
341
|
+
dockerImage: '',
|
|
342
|
+
dockerPath: '',
|
|
343
|
+
dockerTag: '',
|
|
344
|
+
sharedPreloadLibraries: '',
|
|
345
|
+
dockerImageType: e.target.value,
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
formik.setValues({
|
|
350
|
+
...formik.values,
|
|
351
|
+
dockerImageType: e.target.value,
|
|
352
|
+
});
|
|
353
|
+
fetchSeImages({
|
|
354
|
+
packageGroup: e.target.value,
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
handleSelectPgOptions(e, 'pgDumpCustomOptions');
|
|
358
|
+
handleSelectPgOptions(e, 'pgRestoreCustomOptions');
|
|
359
|
+
};
|
|
360
|
+
const handleDockerVersionSelect = (e) => {
|
|
361
|
+
var _a;
|
|
362
|
+
if (formik.values.dockerImageType !== 'custom') {
|
|
363
|
+
const updatedDockerTags = dockerState.data
|
|
364
|
+
.map((image) => image.tag)
|
|
365
|
+
.filter((tag) => tag.startsWith(e.target.value));
|
|
366
|
+
setDockerState({
|
|
367
|
+
...dockerState,
|
|
368
|
+
tags: updatedDockerTags,
|
|
369
|
+
});
|
|
370
|
+
const currentLocation = (_a = dockerState.data.find((image) => image.tag === updatedDockerTags[0])) === null || _a === void 0 ? void 0 : _a.location;
|
|
371
|
+
formik.setValues({
|
|
372
|
+
...formik.values,
|
|
373
|
+
dockerTag: updatedDockerTags[0],
|
|
374
|
+
dockerImage: e.target.value,
|
|
375
|
+
dockerPath: currentLocation,
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
formik.setValues({
|
|
380
|
+
...formik.values,
|
|
381
|
+
dockerImage: e.target.value,
|
|
382
|
+
dockerPath: e.target.value,
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
// Set initial data, empty string for password
|
|
387
|
+
useEffect(() => {
|
|
388
|
+
if (configData) {
|
|
389
|
+
for (const [key, value] of Object.entries(configData)) {
|
|
390
|
+
if (key !== 'password') {
|
|
391
|
+
formik.setFieldValue(key, value);
|
|
392
|
+
}
|
|
393
|
+
if (key === 'tuningParams') {
|
|
394
|
+
formik.setFieldValue(key, value);
|
|
395
|
+
}
|
|
396
|
+
if (customOrGenericImage(configData === null || configData === void 0 ? void 0 : configData.dockerImageType)) {
|
|
397
|
+
if ((configData === null || configData === void 0 ? void 0 : configData.dockerImageType) === 'Generic Postgres') {
|
|
398
|
+
const genericImageVersions = genericDockerImages
|
|
399
|
+
.map((image) => image.pg_major_version)
|
|
400
|
+
.filter((value, index, self) => self.indexOf(value) === index)
|
|
401
|
+
.sort((a, b) => Number(a) - Number(b));
|
|
402
|
+
const currentDockerImage = genericDockerImages.filter((image) => image.location === (configData === null || configData === void 0 ? void 0 : configData.dockerPath))[0] ||
|
|
403
|
+
genericDockerImages.filter((image) => { var _a; return (_a = configData === null || configData === void 0 ? void 0 : configData.dockerPath) === null || _a === void 0 ? void 0 : _a.includes(image.pg_major_version); })[0];
|
|
404
|
+
setDockerState({
|
|
405
|
+
...dockerState,
|
|
406
|
+
tags: genericDockerImages
|
|
407
|
+
.map((image) => image.tag)
|
|
408
|
+
.filter((tag) => tag.startsWith(currentDockerImage.pg_major_version)),
|
|
409
|
+
images: genericImageVersions,
|
|
410
|
+
data: genericDockerImages,
|
|
411
|
+
});
|
|
412
|
+
formik.setFieldValue('dockerTag', currentDockerImage === null || currentDockerImage === void 0 ? void 0 : currentDockerImage.tag);
|
|
413
|
+
formik.setFieldValue('dockerImage', currentDockerImage.pg_major_version);
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
formik.setFieldValue('dockerImage', configData === null || configData === void 0 ? void 0 : configData.dockerPath);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}, [config]);
|
|
422
|
+
useEffect(() => {
|
|
423
|
+
getEngine(instanceId).then((res) => {
|
|
424
|
+
setDledition(String(res === null || res === void 0 ? void 0 : res.edition));
|
|
425
|
+
});
|
|
426
|
+
}, []);
|
|
427
|
+
useEffect(() => {
|
|
428
|
+
const initialFetch = async () => {
|
|
429
|
+
if (formik.dirty &&
|
|
430
|
+
!isCeEdition &&
|
|
431
|
+
!customOrGenericImage(configData === null || configData === void 0 ? void 0 : configData.dockerImageType)) {
|
|
432
|
+
await getFullConfig(instanceId).then(async (data) => {
|
|
433
|
+
if (data) {
|
|
434
|
+
await fetchSeImages({
|
|
435
|
+
packageGroup: configData === null || configData === void 0 ? void 0 : configData.dockerImageType,
|
|
436
|
+
dockerTag: configData === null || configData === void 0 ? void 0 : configData.dockerTag,
|
|
437
|
+
initialRender: true,
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
initialFetch();
|
|
444
|
+
}, [
|
|
445
|
+
formik.dirty,
|
|
446
|
+
configData === null || configData === void 0 ? void 0 : configData.dockerImageType,
|
|
447
|
+
configData === null || configData === void 0 ? void 0 : configData.dockerTag,
|
|
448
|
+
isCeEdition,
|
|
449
|
+
]);
|
|
450
|
+
return (_jsxs("div", { className: styles.root, children: [_jsx(Snackbar, { onClick: () => {
|
|
451
|
+
Boolean(dockerState.error)
|
|
452
|
+
? setDockerState({
|
|
453
|
+
...dockerState,
|
|
454
|
+
error: '',
|
|
455
|
+
})
|
|
456
|
+
: undefined;
|
|
457
|
+
}, anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, open: (isConfigurationDisabled || Boolean(dockerState.error)) &&
|
|
458
|
+
!isModalOpen, message: Boolean(dockerState.error)
|
|
459
|
+
? dockerState.error
|
|
460
|
+
: disableConfigModification
|
|
461
|
+
? PREVENT_MODIFYING_MESSAGE
|
|
462
|
+
: NON_LOGICAL_RETRIEVAL_MESSAGE, className: styles.snackbar }), !config && isConfigurationLoading ? (_jsx("div", { className: styles.spinnerContainer, children: _jsx(Spinner, { size: "lg", className: styles.spinner }) })) : (_jsxs(Box, { children: [_jsx(Header, { retrievalMode: "logical", setOpen: handleModalClick }), _jsxs(Box, { children: [_jsx(Box, { children: _jsx(FormControlLabel, { control: _jsx(Checkbox, { name: "debug", checked: formik.values.debug, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('debug', e.target.checked), classes: {
|
|
463
|
+
root: classes.checkboxRoot,
|
|
464
|
+
} }), label: 'Debug mode' }) }), _jsxs(Box, { mb: 1, mt: 1, children: [_jsx(ConfigSectionTitle, { tag: "retrieval" }), _jsxs(Box, { mt: 1, children: [_jsx(Typography, { className: styles.subsection, children: "Subsection \"retrieval.spec.logicalDump\"" }), _jsx("span", { className: classes.grayText, children: "Source database credentials and dumping options." }), _jsx(InputWithTooltip, { label: "source.connection.host *", value: formik.values.host, error: formik.errors.host, tooltipText: tooltipText.host, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('host', e.target.value) }), _jsx(InputWithTooltip, { label: "source.connection.port *", value: formik.values.port, error: formik.errors.port, tooltipText: tooltipText.port, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('port', e.target.value) }), _jsx(InputWithTooltip, { label: "source.connection.username *", value: formik.values.username, error: formik.errors.username, tooltipText: tooltipText.username, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('username', e.target.value) }), _jsx(InputWithTooltip, { type: "password", value: formik.values.password, label: "source.connection.password", tooltipText: tooltipText.password, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('password', e.target.value) }), _jsx(InputWithTooltip, { label: "source.connection.dbname *", value: formik.values.dbname, error: formik.errors.dbname, tooltipText: tooltipText.dbname, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('dbname', e.target.value) }), _jsx(InputWithChip, { id: "databases", value: formik.values.databases, label: "Databases to copy", tooltipText: tooltipText.databases, handleDeleteChip: handleDeleteChip, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('databases', e.target.value) }), _jsxs(Box, { mt: 3, mb: 3, children: [_jsxs(Button, { variant: "outlined", color: "secondary", onClick: () => {
|
|
465
|
+
onTestConnectionClick({
|
|
466
|
+
type: 'default',
|
|
467
|
+
});
|
|
468
|
+
}, disabled: testConnectionState.default.loading ||
|
|
469
|
+
isConfigurationDisabled, children: ["Test connection", testConnectionState.default.loading && (_jsx(Spinner, { size: "sm", className: styles.spinner }))] }), testConnectionState.default.message.status ||
|
|
470
|
+
testConnectionState.default.error ? (_jsx(ResponseMessage, { type: testConnectionState.default.error
|
|
471
|
+
? 'error'
|
|
472
|
+
: testConnectionState.default.message.status
|
|
473
|
+
? testConnectionState.default.message.status
|
|
474
|
+
: '', message: testConnectionState.default.error ||
|
|
475
|
+
testConnectionState.default.message.message })) : null] }), _jsx(InputWithTooltip, { label: "pg_dump jobs", value: formik.values.dumpParallelJobs, tooltipText: tooltipText.dumpParallelJobs, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('dumpParallelJobs', e.target.value) }), _jsx(InputWithChip, { value: formik.values.pgDumpCustomOptions, label: "pg_dump customOptions", id: "pgDumpCustomOptions", tooltipText: tooltipText.pgDumpCustomOptions, handleDeleteChip: handleDeleteChip, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('pgDumpCustomOptions', e.target.value) }), _jsx(FormControlLabel, { style: { maxWidth: 'max-content' }, control: _jsx(Checkbox, { name: "dumpIgnoreErrors", checked: formik.values.dumpIgnoreErrors, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('dumpIgnoreErrors', e.target.checked), classes: {
|
|
476
|
+
root: classes.checkboxRoot,
|
|
477
|
+
} }), label: 'Ignore errors during logical data dump' })] })] }), _jsxs(Box, { mb: 2, mt: 1, children: [_jsx(ConfigSectionTitle, { tag: "databaseContainer" }), _jsx("span", { className: classes.grayText, style: { margin: '0.5rem 0 1rem 0', display: 'block' }, children: "DBLab manages various database containers, such as clones. This section defines default container settings." }), _jsxs("div", { children: [_jsx(SelectWithTooltip, { label: "dockerImage - choose from the list *", value: formik.values.dockerImageType, error: Boolean(formik.errors.dockerImageType), tooltipText: tooltipText.dockerImageType, disabled: isConfigurationDisabled || dockerState.loading, items: filteredDockerImageOptions.map((image) => {
|
|
478
|
+
return {
|
|
479
|
+
value: image.type,
|
|
480
|
+
children: image.name,
|
|
481
|
+
};
|
|
482
|
+
}), onChange: handleDockerImageSelect }), formik.values.dockerImageType === 'custom' ? (_jsx(InputWithTooltip, { label: "dockerImage *", value: formik.values.dockerImage, error: formik.errors.dockerImage, tooltipText: tooltipText.dockerImage, disabled: isConfigurationDisabled, onChange: (e) => {
|
|
483
|
+
formik.setValues({
|
|
484
|
+
...formik.values,
|
|
485
|
+
dockerImage: e.target.value,
|
|
486
|
+
dockerPath: e.target.value,
|
|
487
|
+
});
|
|
488
|
+
} })) : (_jsxs(_Fragment, { children: [_jsx(SelectWithTooltip, { label: "dockerImage - Postgres major version *", value: formik.values.dockerImage, error: Boolean(formik.errors.dockerImage), tooltipText: tooltipText.dockerImage, disabled: isConfigurationDisabled ||
|
|
489
|
+
dockerState.loading ||
|
|
490
|
+
!dockerState.images.length, loading: dockerState.loading, items: dockerState.images
|
|
491
|
+
.slice()
|
|
492
|
+
.reverse()
|
|
493
|
+
.map((image) => {
|
|
494
|
+
return {
|
|
495
|
+
value: image,
|
|
496
|
+
children: image,
|
|
497
|
+
};
|
|
498
|
+
}), onChange: handleDockerVersionSelect }), _jsxs(Box, { mt: 0.5, mb: 2, children: [_jsxs(Button, { variant: "outlined", color: "secondary", onClick: () => {
|
|
499
|
+
onTestConnectionClick({
|
|
500
|
+
type: 'dockerImage',
|
|
501
|
+
});
|
|
502
|
+
}, disabled: testConnectionState.dockerImage.loading ||
|
|
503
|
+
isConfigurationDisabled, children: ["Get version from source", testConnectionState.dockerImage.loading && (_jsx(Spinner, { size: "sm", className: styles.spinner }))] }), testConnectionState.dockerImage.message.status ===
|
|
504
|
+
'error' || testConnectionState.dockerImage.error ? (_jsx(ResponseMessage, { type: testConnectionState.dockerImage.error ||
|
|
505
|
+
testConnectionState.dockerImage.message
|
|
506
|
+
? 'error'
|
|
507
|
+
: '', message: testConnectionState.dockerImage.error ||
|
|
508
|
+
testConnectionState.dockerImage.message.message })) : null] }), _jsx(SelectWithTooltip, { label: "dockerImage - tag *", value: formik.values.dockerTag, error: Boolean(formik.errors.dockerTag), tooltipText: tooltipText.dockerTag, disabled: isConfigurationDisabled ||
|
|
509
|
+
dockerState.loading ||
|
|
510
|
+
!dockerState.tags.length, loading: dockerState.loading, onChange: (e) => {
|
|
511
|
+
var _a;
|
|
512
|
+
const currentLocation = (_a = dockerState.data.find((image) => image.tag === e.target.value)) === null || _a === void 0 ? void 0 : _a.location;
|
|
513
|
+
formik.setValues({
|
|
514
|
+
...formik.values,
|
|
515
|
+
dockerTag: e.target.value,
|
|
516
|
+
dockerPath: currentLocation,
|
|
517
|
+
});
|
|
518
|
+
}, items: dockerState.tags.map((image) => {
|
|
519
|
+
return {
|
|
520
|
+
value: image,
|
|
521
|
+
children: image,
|
|
522
|
+
};
|
|
523
|
+
}) })] })), _jsxs(Typography, { paragraph: true, children: ["Cannot find your image? Reach out to support:", ' ', _jsxs("a", { href: 'https://postgres.ai/contact', target: "_blank", className: styles.externalLink, children: ["https://postgres.ai/contact", _jsx(ExternalIcon, { className: styles.externalIcon })] })] })] })] }), _jsxs(Box, { mb: 3, children: [_jsx(ConfigSectionTitle, { tag: "databaseConfigs" }), _jsx("span", { className: classes.grayText, style: { marginTop: '0.5rem', display: 'block' }, children: "Default Postgres configuration used for all Postgres instances running in containers managed by DBLab." }), _jsx(InputWithTooltip, { type: "textarea", label: "shared_buffers parameter", value: formik.values.sharedBuffers, tooltipText: tooltipText.sharedBuffers, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('sharedBuffers', e.target.value) }), _jsx(InputWithTooltip, { type: "textarea", label: "shared_preload_libraries", value: formik.values.sharedPreloadLibraries, tooltipText: tooltipText.sharedPreloadLibraries, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('sharedPreloadLibraries', e.target.value) }), _jsx(InputWithTooltip, { type: "textarea", label: "Query tuning parameters", value: typeof formik.values.tuningParams === 'object'
|
|
524
|
+
? Object.entries(formik.values.tuningParams)
|
|
525
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
526
|
+
.join('\n')
|
|
527
|
+
: formik.values.tuningParams, tooltipText: tooltipText.tuningParams, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('tuningParams', e.target.value) }), _jsxs(Button, { variant: "outlined", color: "secondary", onClick: () => {
|
|
528
|
+
onTestConnectionClick({
|
|
529
|
+
type: 'fetchTuning',
|
|
530
|
+
});
|
|
531
|
+
}, disabled: testConnectionState.fetchTuning.loading ||
|
|
532
|
+
isConfigurationDisabled, children: ["Get from source database", testConnectionState.fetchTuning.loading && (_jsx(Spinner, { size: "sm", className: styles.spinner }))] }), testConnectionState.fetchTuning.message.status === 'error' ||
|
|
533
|
+
testConnectionState.fetchTuning.error ? (_jsx(ResponseMessage, { type: testConnectionState.fetchTuning.error ||
|
|
534
|
+
testConnectionState.fetchTuning.message
|
|
535
|
+
? 'error'
|
|
536
|
+
: '', message: testConnectionState.fetchTuning.error ||
|
|
537
|
+
testConnectionState.fetchTuning.message.message })) : null] }), _jsxs(Box, { children: [_jsxs(Box, { children: [_jsx(Typography, { className: styles.subsection, children: "Subsection \"retrieval.spec.logicalRestore\"" }), _jsx("span", { className: classes.grayText, children: "Restoring options." })] }), _jsx(InputWithTooltip, { label: "pg_restore jobs", value: formik.values.restoreParallelJobs, tooltipText: tooltipText.restoreParallelJobs, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('restoreParallelJobs', e.target.value) }), _jsx(InputWithChip, { value: formik.values.pgRestoreCustomOptions, label: "pg_restore customOptions", id: "pgRestoreCustomOptions", tooltipText: tooltipText.pgRestoreCustomOptions, handleDeleteChip: handleDeleteChip, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('pgRestoreCustomOptions', e.target.value) }), _jsx(FormControlLabel, { style: { maxWidth: 'max-content' }, control: _jsx(Checkbox, { name: "restoreIgnoreErrors", checked: formik.values.restoreIgnoreErrors, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('restoreIgnoreErrors', e.target.checked), classes: {
|
|
538
|
+
root: classes.checkboxRoot,
|
|
539
|
+
} }), label: 'Ignore errors during logical data restore' })] }), _jsx(Box, { mt: 1, children: _jsx(Typography, { className: styles.subsection, children: "Subsection \"retrieval.refresh\"" }) }), _jsxs("span", { className: classes.grayText, children: ["Define full data refresh on schedule. The process requires at least one additional filesystem mount point. The schedule is to be specified using", ' ', _jsxs("a", { href: "https://en.wikipedia.org/wiki/Cron#Overview", target: "_blank", className: styles.externalLink, children: ["crontab format", _jsx(ExternalIcon, { className: styles.externalIcon })] }), "."] }), _jsx(InputWithTooltip, { label: "timetable", value: formik.values.timetable, tooltipText: tooltipText.timetable, disabled: isConfigurationDisabled, onChange: (e) => formik.setFieldValue('timetable', e.target.value) })] }), _jsxs(Box, { mt: 2, mb: 2, sx: {
|
|
540
|
+
display: 'flex',
|
|
541
|
+
alignItems: 'center',
|
|
542
|
+
}, children: [_jsxs(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
543
|
+
formik.submitForm().then(() => {
|
|
544
|
+
scrollToField();
|
|
545
|
+
});
|
|
546
|
+
}, disabled: formik.isSubmitting || isConfigurationDisabled, children: ["Apply changes", formik.isSubmitting && (_jsx(Spinner, { size: "sm", className: styles.spinner }))] }), _jsx(Box, { sx: { px: 2 }, children: _jsx(Button, { variant: "outlined", color: "secondary", onClick: () => switchActiveTab(null, 0), children: "Cancel" }) })] }), (submitState.status && submitState.response) || configError ? (_jsx(ResponseMessage, { type: configError ? 'error' : submitState.status, message: configError || submitState.response })) : null] })), _jsx(Modal, { title: _jsx(ModalTitle, {}), onClose: () => setIsModalOpen(false), isOpen: isModalOpen, size: "xl", children: _jsx(Editor, { height: "70vh", width: "100%", defaultLanguage: "yaml", value: getFullConfigError ? getFullConfigError : fullConfig, loading: _jsx(StubSpinner, {}), theme: "vs-light", options: { domReadOnly: true, readOnly: true } }) })] }));
|
|
547
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const tooltipText: {
|
|
3
|
+
dockerTag: () => JSX.Element;
|
|
4
|
+
dockerImage: () => JSX.Element;
|
|
5
|
+
dockerImageType: () => JSX.Element;
|
|
6
|
+
sharedBuffers: () => JSX.Element;
|
|
7
|
+
sharedPreloadLibraries: () => JSX.Element;
|
|
8
|
+
host: () => JSX.Element;
|
|
9
|
+
port: () => JSX.Element;
|
|
10
|
+
username: () => JSX.Element;
|
|
11
|
+
password: () => JSX.Element;
|
|
12
|
+
dbname: () => JSX.Element;
|
|
13
|
+
databases: () => JSX.Element;
|
|
14
|
+
dumpParallelJobs: () => JSX.Element;
|
|
15
|
+
pgDumpCustomOptions: () => JSX.Element;
|
|
16
|
+
restoreParallelJobs: () => JSX.Element;
|
|
17
|
+
pgRestoreCustomOptions: () => JSX.Element;
|
|
18
|
+
timetable: () => JSX.Element;
|
|
19
|
+
tuningParams: () => JSX.Element;
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styles from './styles.module.scss';
|
|
3
|
+
export const tooltipText = {
|
|
4
|
+
dockerTag: () => (_jsx("div", { children: "Docker image version - latest ones listed first. If unsure, pick the top one" })),
|
|
5
|
+
dockerImage: () => (_jsxs("div", { children: ["Major PostgreSQL version (e.g., \"9.6\", \"15\"). For logical provisioning mode, the version used by DBLab doesn't need to match the version used on the source (although, it's recommended). ", _jsx("br", {}), "If you need a version that is not listed here, contact support."] })),
|
|
6
|
+
dockerImageType: () => (_jsxs("div", { children: ["Docker image used to run all database containers \u2013 clones, snapshot preparation containers, sync containers. Although such images are based on traditional Docker images for Postgres, DBLab expects slightly different behavior: e.g., Postgres is not the first process used to start container, so Postgres restarts are possible, they do not trigger container state change. For details, see", ' ', _jsx("a", { target: '_blank', href: 'https://postgres.ai/docs/database-lab/supported-databases', className: styles.externalLink, children: "the docs" }), "."] })),
|
|
7
|
+
sharedBuffers: () => (_jsxs("div", { children: ["Defines default buffer pool size of each Postgres instance managed by DBLab. Note, that this amount of RAM is immediately allocated at Postgres startup time. For example, if the machine running DBLab has 32 GiB of RAM, and the value used here is '1GB', then the theoretical limit of the number of clones is 32. Practically, this limit is even lower because some memory is consumed by various other processes. If you need more clones, reduce the value of", ' ', _jsx("span", { className: styles.firaCodeFont, children: "configs.shared_buffers" }), "."] })),
|
|
8
|
+
sharedPreloadLibraries: () => (_jsxs("div", { children: ["Specifies one or more shared libraries (comma-separated list) to be preloaded at Postgres server start (", _jsx("a", { target: '_blank', href: 'https://postgresqlco.nf/doc/en/param/shared_preload_libraries/', className: styles.externalLink, children: "details" }), "). If some libraries/extensions are missing, Postgres fails to start, so make sure that ", _jsx("span", { className: styles.firaCodeFont, children: "dockerImage" }), ' ', "used above contains all the needed extensions."] })),
|
|
9
|
+
host: () => (_jsx("div", { children: "Hostname/IP of database that will be used as source for data retrieval (full data refresh)." })),
|
|
10
|
+
port: () => (_jsx("div", { children: "Port of database that will be used as source for data retrieval (full data refresh)." })),
|
|
11
|
+
username: () => (_jsx("div", { children: "Username used to connect to database that will be used as source for data retrieval (full data refresh)." })),
|
|
12
|
+
password: () => (_jsx("div", { children: "Password used to connect to database that will be used as source for data retrieval (full data refresh)." })),
|
|
13
|
+
dbname: () => (_jsxs("div", { children: ["Database name used to connect to the source to run diagnostics queries. This database is not necesserarily to be copied (another field,", ' ', _jsx("span", { className: styles.firaCodeFont, children: "databases" }), ", defines which database to copy)."] })),
|
|
14
|
+
databases: () => (_jsx("div", { children: "Specifies list of databases Postgres server to copy at data retrieval (full data refresh). To specify multiple database names, provide each value in a separte line or use space as a divider. To copy all available databases, leave this value empty." })),
|
|
15
|
+
dumpParallelJobs: () => (_jsx("div", { children: "Number of parallel workers used to dump the source databases to disk. If the source is production server under load, it is not recommended to use more than 50% of its number of vCPUs. The higher number, the faster dumping is, but the higher risks of performance issues on the source (e.g., due to CPU or disk IO saturation)." })),
|
|
16
|
+
pgDumpCustomOptions: () => (_jsx("div", { children: "pg_dump options to be used to create a database dump, for example: '--exclude-schema=repack --exclude-schema=\"camelStyleSchemaName\"'. Note that due to security reasons, the current implementation supports only letters, numbers, hyphen, underscore, equal sign, and double quotes." })),
|
|
17
|
+
restoreParallelJobs: () => (_jsx("div", { children: "Number of parallel workers used to restore databases from dump to Postgres managed by DBLab. For initial data retrieval (very first data refresh), it is recommended to use the number of vCPUs available on machine running DBLab. With this approach, we have faster restore time, but we need to keep in mind that we can also have higher usage of CPU and disk IO on this machine (up to temporary saturation of resources). For subsequent refreshes, if DBLab is constantly used, it is recommended to reduce this value by 50% to keep some room for normal use of DBLab (such as work with clones)." })),
|
|
18
|
+
pgRestoreCustomOptions: () => (_jsx("div", { children: "pg_restore options to be used to restore from a database dump, for example: '--exclude-schema=repack --exclude-schema=\"camelStyleSchemaName\"'. Note that due to security reasons, the current implementation supports only letters, numbers, hyphen, underscore, equal sign, and double quotes." })),
|
|
19
|
+
timetable: () => (_jsxs("div", { children: ["Schedule for full data refreshes, in", ' ', _jsx("a", { target: '_blank', href: 'https://en.wikipedia.org/wiki/Cron#Overview', className: styles.externalLink, children: "crontab format" }), "."] })),
|
|
20
|
+
tuningParams: () => (_jsxs("div", { children: ["Query tuning parameters. This is essential to ensure that cloned PostgreSQL most likely generates the same plans as on the source (specifically, it is crutial for query performance troubleshooting and optimization, including working with EXPLAIN plans). For details, see the", ' ', _jsx("a", { target: '_blank', href: 'https://postgres.ai/docs/how-to-guides/administration/postgresql-configuration#postgresql-configuration-in-clones', className: styles.externalLink, children: "docs" }), "."] })),
|
|
21
|
+
};
|