@prostgles/prostgles 2.3.6-dev.1786548258
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/.dockerignore +14 -0
- package/.eslintrc.common.js +71 -0
- package/.gitattributes +2 -0
- package/.github/ISSUE_TEMPLATE/BUG.yml +52 -0
- package/.github/ISSUE_TEMPLATE/CUSTOM.yml +13 -0
- package/.github/ISSUE_TEMPLATE/FEATURE.yml +27 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +9 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/ISSUE_TEMPLATE/custom.md +3 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +5 -0
- package/.github/workflows/docker_test.yml +46 -0
- package/.github/workflows/electron_build_linux.yml +40 -0
- package/.github/workflows/electron_build_macos.yml +36 -0
- package/.github/workflows/electron_build_windows.yml +34 -0
- package/.github/workflows/electron_linux_test.yml +24 -0
- package/.github/workflows/electron_macos_test.yml +25 -0
- package/.github/workflows/linux_test.yml +127 -0
- package/.github/workflows/macos_test.yml +63 -0
- package/.github/workflows/on_release.yml +185 -0
- package/.github/workflows/package_version_increased.yml +66 -0
- package/.github/workflows/publish_release.yml +67 -0
- package/.github/workflows/windows_test.yml +48 -0
- package/.prettierignore +5 -0
- package/.prettierrc +3 -0
- package/.vscode/settings.json +46 -0
- package/CODE_OF_CONDUCT +47 -0
- package/CONTRIBUTING +59 -0
- package/DB.Dockerfile +11 -0
- package/Dockerfile +31 -0
- package/LICENSE +661 -0
- package/PRIVACY +28 -0
- package/README.md +132 -0
- package/SECURITY.md +8 -0
- package/changelog/v1.0.0.md +5 -0
- package/changelog/v2.0.0.md +25 -0
- package/changelog/v2.2.0.md +13 -0
- package/changelog/v2.2.1.md +4 -0
- package/changelog/v2.2.2.md +3 -0
- package/changelog/v2.2.3.md +2 -0
- package/changelog/v2.2.4.md +3 -0
- package/changelog/v2.3.0.md +5 -0
- package/changelog/v2.3.1.md +1 -0
- package/changelog/v2.3.2.md +1 -0
- package/changelog/v2.3.3.md +2 -0
- package/changelog/v2.3.4.md +2 -0
- package/changelog/v2.3.5.md +2 -0
- package/changelog/v2.3.6.md +2 -0
- package/client/build.sh +1 -0
- package/client/eslint.config.mjs +114 -0
- package/client/package-lock.json +16513 -0
- package/client/package.json +108 -0
- package/client/public/manifest.json +12 -0
- package/client/public/robots.txt +3 -0
- package/client/setup-icons.js +59 -0
- package/client/src/App.css +31 -0
- package/client/src/App.tsx +364 -0
- package/client/src/Testing.ts +724 -0
- package/client/src/app/CommandPalette/CommandPalette.css +11 -0
- package/client/src/app/CommandPalette/CommandPalette.tsx +119 -0
- package/client/src/app/CommandPalette/Documentation.css +3 -0
- package/client/src/app/CommandPalette/Documentation.tsx +77 -0
- package/client/src/app/CommandPalette/DynamicComponent.tsx +87 -0
- package/client/src/app/CommandPalette/getDocumentation.ts +175 -0
- package/client/src/app/CommandPalette/getUIDocShortestPath.ts +62 -0
- package/client/src/app/CommandPalette/useCommandPaletteState.tsx +188 -0
- package/client/src/app/CommandPalette/useGoToUI.tsx +147 -0
- package/client/src/app/CommandPalette/useHighlightDocItem.ts +89 -0
- package/client/src/app/CommandPalette/utils.ts +111 -0
- package/client/src/app/UIDocs/UIInstallationUIDoc.ts +43 -0
- package/client/src/app/UIDocs/accountUIDoc.ts +128 -0
- package/client/src/app/UIDocs/commandPaletteUIDoc.ts +40 -0
- package/client/src/app/UIDocs/connection/AIAssistantUIDoc.ts +309 -0
- package/client/src/app/UIDocs/connection/agenticWorkflowsUIDoc.ts +37 -0
- package/client/src/app/UIDocs/connection/config/accessControlUIDoc.ts +44 -0
- package/client/src/app/UIDocs/connection/config/apiUIDoc.ts +95 -0
- package/client/src/app/UIDocs/connection/config/authentication.UIDoc.ts +96 -0
- package/client/src/app/UIDocs/connection/config/backupAndRestoreUIDoc.ts +238 -0
- package/client/src/app/UIDocs/connection/config/fileStorageUIDoc.ts +27 -0
- package/client/src/app/UIDocs/connection/connectionConfigUIDoc.ts +79 -0
- package/client/src/app/UIDocs/connection/dashboard/dashboardContentUIDoc.ts +27 -0
- package/client/src/app/UIDocs/connection/dashboard/dashboardMenuUIDoc.ts +189 -0
- package/client/src/app/UIDocs/connection/dashboard/mapUIDoc.ts +172 -0
- package/client/src/app/UIDocs/connection/dashboard/schemaGraphUIDoc.ts +66 -0
- package/client/src/app/UIDocs/connection/dashboard/serverSideFunctionUIDoc.ts +27 -0
- package/client/src/app/UIDocs/connection/dashboard/sqlEditorUIDoc.ts +284 -0
- package/client/src/app/UIDocs/connection/dashboard/table/addColumnMenuUIDoc.ts +250 -0
- package/client/src/app/UIDocs/connection/dashboard/table/columnMenuUIDoc.ts +123 -0
- package/client/src/app/UIDocs/connection/dashboard/table/paginationUIDoc.ts +56 -0
- package/client/src/app/UIDocs/connection/dashboard/table/smartFilterBarUIDoc.ts +126 -0
- package/client/src/app/UIDocs/connection/dashboard/table/smartFormUIDoc.ts +168 -0
- package/client/src/app/UIDocs/connection/dashboard/table/tableMenuUIDoc.ts +228 -0
- package/client/src/app/UIDocs/connection/dashboard/table/tableUIDoc.ts +90 -0
- package/client/src/app/UIDocs/connection/dashboard/timechartUIDoc.ts +169 -0
- package/client/src/app/UIDocs/connection/dashboardUIDoc.ts +176 -0
- package/client/src/app/UIDocs/connection/getCommonViewHeaderUIDoc.ts +146 -0
- package/client/src/app/UIDocs/connectionsUIDoc.ts +261 -0
- package/client/src/app/UIDocs/desktopInstallation.ts +32 -0
- package/client/src/app/UIDocs/editConnectionUIDoc.ts +131 -0
- package/client/src/app/UIDocs/navbarUIDoc.ts +145 -0
- package/client/src/app/UIDocs/overviewUIDoc.ts +31 -0
- package/client/src/app/UIDocs/serverSettingsUIDoc.ts +64 -0
- package/client/src/app/UIDocs.ts +274 -0
- package/client/src/app/XRealIpSpoofableAlert.tsx +39 -0
- package/client/src/app/domToSVG/SVGif/addSVGifCaption.ts +112 -0
- package/client/src/app/domToSVG/SVGif/addSVGifPointer.ts +59 -0
- package/client/src/app/domToSVG/SVGif/addSVGifTimelineControls.ts +94 -0
- package/client/src/app/domToSVG/SVGif/animations/getSVGifCursorAnimationHandler.ts +162 -0
- package/client/src/app/domToSVG/SVGif/animations/getSVGifCustomAnimation.ts +53 -0
- package/client/src/app/domToSVG/SVGif/animations/getSVGifPropertiesAnimation.ts +50 -0
- package/client/src/app/domToSVG/SVGif/animations/getSVGifTypeAnimation.ts +105 -0
- package/client/src/app/domToSVG/SVGif/animations/getSVGifZoomToAnimation.ts +114 -0
- package/client/src/app/domToSVG/SVGif/compressSVGif.ts +86 -0
- package/client/src/app/domToSVG/SVGif/getSVGif.ts +111 -0
- package/client/src/app/domToSVG/SVGif/getSVGifAnimations.ts +318 -0
- package/client/src/app/domToSVG/SVGif/getSVGifKeyframes.ts +42 -0
- package/client/src/app/domToSVG/SVGif/getSVGifParsedScenes.ts +52 -0
- package/client/src/app/domToSVG/SVGif/getSVGifRevealKeyframes.ts +73 -0
- package/client/src/app/domToSVG/SVGif/getSVGifTargetBBox.ts +36 -0
- package/client/src/app/domToSVG/addFragmentViewBoxes.ts +43 -0
- package/client/src/app/domToSVG/containers/addOverflowClipPath.ts +117 -0
- package/client/src/app/domToSVG/containers/bgAndBorderToSVG.ts +204 -0
- package/client/src/app/domToSVG/containers/deduplicateSVGPaths.ts +128 -0
- package/client/src/app/domToSVG/containers/elementToSVG.ts +231 -0
- package/client/src/app/domToSVG/containers/rectangleToSVG.ts +196 -0
- package/client/src/app/domToSVG/containers/shadowToSVG.ts +52 -0
- package/client/src/app/domToSVG/domToSVG.ts +263 -0
- package/client/src/app/domToSVG/domToSvg2.ts +129 -0
- package/client/src/app/domToSVG/domToThemeAwareSVG.ts +361 -0
- package/client/src/app/domToSVG/getCorrespondingDarkNode.ts +87 -0
- package/client/src/app/domToSVG/graphics/fontIconToSVG.ts +141 -0
- package/client/src/app/domToSVG/graphics/getForeignObject.ts +43 -0
- package/client/src/app/domToSVG/graphics/imgToSVG.ts +140 -0
- package/client/src/app/domToSVG/setThemeForSVGScreenshot.ts +82 -0
- package/client/src/app/domToSVG/text/getTextForSVG.ts +243 -0
- package/client/src/app/domToSVG/text/textToSVG.ts +264 -0
- package/client/src/app/domToSVG/utils/addNewChildren.ts +55 -0
- package/client/src/app/domToSVG/utils/canvasToDataURL.ts +6 -0
- package/client/src/app/domToSVG/utils/copyAnimationStylesToSvg.ts +127 -0
- package/client/src/app/domToSVG/utils/getWhatToRenderOnSVG.ts +218 -0
- package/client/src/app/domToSVG/utils/isElementVisible.ts +144 -0
- package/client/src/app/domToSVG/utils/toFixed.ts +3 -0
- package/client/src/appUtils.ts +135 -0
- package/client/src/components/AlertProvider.tsx +99 -0
- package/client/src/components/Animations.css +207 -0
- package/client/src/components/Animations.tsx +130 -0
- package/client/src/components/Btn.css +235 -0
- package/client/src/components/Btn.tsx +603 -0
- package/client/src/components/ButtonBar.tsx +29 -0
- package/client/src/components/ButtonGroup.tsx +135 -0
- package/client/src/components/Chat/Chat.css +116 -0
- package/client/src/components/Chat/Chat.tsx +200 -0
- package/client/src/components/Chat/ChatFileAttachments/ChatFileAttachments.tsx +126 -0
- package/client/src/components/Chat/ChatMessage.tsx +38 -0
- package/client/src/components/Chat/ChatSendControls.tsx +117 -0
- package/client/src/components/Chat/ChatSpeech/ChatSpeech.tsx +201 -0
- package/client/src/components/Chat/ChatSpeech/ChatSpeechSetup.tsx +75 -0
- package/client/src/components/Chat/ChatSpeech/hooks/SpeechRecorder.ts +295 -0
- package/client/src/components/Chat/ChatSpeech/hooks/renderSpeechAudioLevelsIcon.ts +67 -0
- package/client/src/components/Chat/ChatSpeech/hooks/useSpeechRecorder.ts +59 -0
- package/client/src/components/Chat/ChatSpeech/hooks/useSpeechToTextWeb.ts +125 -0
- package/client/src/components/Chat/ChatSpeech/useChatSpeechSetup.ts +106 -0
- package/client/src/components/Chat/Marked.tsx +258 -0
- package/client/src/components/Chat/MonacoCodeInMarkdown/MarkdownMonacoCodeHeader.tsx +179 -0
- package/client/src/components/Chat/MonacoCodeInMarkdown/MonacoCodeInMarkdown.tsx +162 -0
- package/client/src/components/Chat/MonacoCodeInMarkdown/useOnRunSQL.ts +70 -0
- package/client/src/components/Chat/useChatFileUpload.ts +167 -0
- package/client/src/components/Chat/useChatOnPaste.ts +102 -0
- package/client/src/components/Chat/useChatState.ts +118 -0
- package/client/src/components/Checkbox.css +24 -0
- package/client/src/components/Checkbox.tsx +152 -0
- package/client/src/components/Chip.css +78 -0
- package/client/src/components/Chip.tsx +150 -0
- package/client/src/components/ClickCatch.tsx +49 -0
- package/client/src/components/ClickCatchOverlay.css +7 -0
- package/client/src/components/ClickCatchOverlay.tsx +30 -0
- package/client/src/components/CodeFileBrowser/CodeFileBrowser.tsx +85 -0
- package/client/src/components/CodeFileBrowser/ProjectCodeEditor.tsx +89 -0
- package/client/src/components/CodeFileBrowser/WebAppFileBrowser.tsx +96 -0
- package/client/src/components/CompactTabs/CompactTabs.tsx +101 -0
- package/client/src/components/ConfirmationDialog.tsx +90 -0
- package/client/src/components/CopyToClipboardBtn.tsx +24 -0
- package/client/src/components/DragOverUpload/DragOverUpload.css +36 -0
- package/client/src/components/DragOverUpload/DragOverUpload.tsx +46 -0
- package/client/src/components/DraggableLI.tsx +182 -0
- package/client/src/components/ElectronSearchBar.tsx +335 -0
- package/client/src/components/ErrorComponent.tsx +240 -0
- package/client/src/components/ExpandSection.tsx +55 -0
- package/client/src/components/Expander.tsx +16 -0
- package/client/src/components/FileInput/DropZone.tsx +23 -0
- package/client/src/components/FileInput/FileInput.tsx +363 -0
- package/client/src/components/FileInput/FileInputMedia.tsx +144 -0
- package/client/src/components/FileInput/useFileDropZone.ts +51 -0
- package/client/src/components/FileTree/FILE_EXTENSION_TO_ICON_INFO.ts +687 -0
- package/client/src/components/FileTree/FileIcon.tsx +31 -0
- package/client/src/components/FileTree/FileTree.tsx +147 -0
- package/client/src/components/FileTree/FileTreeCurrentDirectory.tsx +135 -0
- package/client/src/components/FileTree/FileTreeNode.css +12 -0
- package/client/src/components/FileTree/FileTreeNode.tsx +264 -0
- package/client/src/components/FileTree/FileTreeNodeCheckbox.tsx +48 -0
- package/client/src/components/FileTree/FileTreeSearchBar.tsx +121 -0
- package/client/src/components/FileTree/FileTreeSelectedItems.tsx +73 -0
- package/client/src/components/FileTree/FolderIcon.tsx +18 -0
- package/client/src/components/FileTree/fileSystemTreeUtils.ts +15 -0
- package/client/src/components/FileTree/useFileTree.ts +255 -0
- package/client/src/components/FileTree/useFileTreeChecked.ts +158 -0
- package/client/src/components/FlashMessage.tsx +64 -0
- package/client/src/components/Flex.tsx +76 -0
- package/client/src/components/FormField/FormField.css +91 -0
- package/client/src/components/FormField/FormField.tsx +748 -0
- package/client/src/components/FormField/FormFieldCodeEditor.tsx +97 -0
- package/client/src/components/FormField/FormFieldDebounced.tsx +60 -0
- package/client/src/components/FormField/FormFieldSkeleton.tsx +206 -0
- package/client/src/components/FormField/onFormFieldKeyDown.ts +124 -0
- package/client/src/components/FullscreenWrapper/FullscreenWrapper.tsx +154 -0
- package/client/src/components/FullscreenWrapper/useFullscreen.ts +46 -0
- package/client/src/components/HeaderSection.tsx +36 -0
- package/client/src/components/Hotkey.css +12 -0
- package/client/src/components/Hotkey.tsx +26 -0
- package/client/src/components/IFrame/IFrame.tsx +54 -0
- package/client/src/components/Icon/Icon.tsx +138 -0
- package/client/src/components/IconPalette/IconPalette.tsx +194 -0
- package/client/src/components/InfoRow.tsx +64 -0
- package/client/src/components/Input.tsx +63 -0
- package/client/src/components/JSONBSchema/JSONBSchema.tsx +182 -0
- package/client/src/components/JSONBSchema/JSONBSchemaAllowedOptions.tsx +112 -0
- package/client/src/components/JSONBSchema/JSONBSchemaArray.tsx +172 -0
- package/client/src/components/JSONBSchema/JSONBSchemaLookup.tsx +249 -0
- package/client/src/components/JSONBSchema/JSONBSchemaObject.tsx +130 -0
- package/client/src/components/JSONBSchema/JSONBSchemaOneOfType.tsx +155 -0
- package/client/src/components/JSONBSchema/JSONBSchemaPrimitive.tsx +209 -0
- package/client/src/components/JSONBSchema/JSONBSchemaRecord.tsx +78 -0
- package/client/src/components/JSONBSchema/isCompleteJSONB.ts +54 -0
- package/client/src/components/Label.css +10 -0
- package/client/src/components/Label.tsx +152 -0
- package/client/src/components/LabeledRow.tsx +51 -0
- package/client/src/components/List.css +51 -0
- package/client/src/components/List.tsx +170 -0
- package/client/src/components/Loader/Loading.css +141 -0
- package/client/src/components/Loader/Loading.tsx +254 -0
- package/client/src/components/Loader/SpinnerV2.tsx +121 -0
- package/client/src/components/Loader/SpinnerV3.tsx +58 -0
- package/client/src/components/Loader/SpinnerV4.tsx +31 -0
- package/client/src/components/MarkdownWithPlugins/MarkdownWithPlugins.tsx +99 -0
- package/client/src/components/MarkdownWithPlugins/Marked.css +72 -0
- package/client/src/components/MarkdownWithPlugins/preserveDisallowedHtmlAsText.ts +76 -0
- package/client/src/components/MediaViewer/MediaViewer.tsx +252 -0
- package/client/src/components/MediaViewer/MediaViewerContent.tsx +223 -0
- package/client/src/components/MediaViewer/managedTableUtils.ts +99 -0
- package/client/src/components/MenuList.css +3 -0
- package/client/src/components/MenuList.tsx +237 -0
- package/client/src/components/MenuListItem.tsx +126 -0
- package/client/src/components/MonacoEditor/MonacoEditor.tsx +273 -0
- package/client/src/components/MonacoEditor/monacoHackyFixes.ts +56 -0
- package/client/src/components/MonacoEditor/useMonacoEditorAddActions.ts +56 -0
- package/client/src/components/MonacoEditor/useWhyDidYouUpdate.ts +80 -0
- package/client/src/components/MonacoLogs/MonacoLogs.tsx +98 -0
- package/client/src/components/MonacoLogs/MonacoLogsWithFullscreen.tsx +124 -0
- package/client/src/components/MonacoLogs/setAnsiLogContent.ts +163 -0
- package/client/src/components/NavBar/NavBar.css +110 -0
- package/client/src/components/NavBar/NavBar.tsx +152 -0
- package/client/src/components/NavBar/NavBarWrapper.tsx +55 -0
- package/client/src/components/NavBar/useNavBarItems.ts +40 -0
- package/client/src/components/Pan.tsx +63 -0
- package/client/src/components/PdfViewer/PdfViewer.css +58 -0
- package/client/src/components/PdfViewer/PdfViewer.tsx +126 -0
- package/client/src/components/PdfViewer/PdfViewerDoclingTextOverlay.tsx +44 -0
- package/client/src/components/PdfViewer/PdfViewerHeaderControls.tsx +82 -0
- package/client/src/components/PdfViewer/PdfViewerHighlights/PdfViewerHighlights.tsx +146 -0
- package/client/src/components/PdfViewer/PdfViewerHighlights/usePdfViewerHighlights.ts +212 -0
- package/client/src/components/PdfViewer/PdfViewerSearch/PdfViewerSearch.css +21 -0
- package/client/src/components/PdfViewer/PdfViewerSearch/PdfViewerSearch.tsx +323 -0
- package/client/src/components/PdfViewer/PdfViewerWithFileTableContext.tsx +209 -0
- package/client/src/components/PdfViewer/usePdfViewer.ts +215 -0
- package/client/src/components/Popup/Footer.tsx +41 -0
- package/client/src/components/Popup/FooterButtons.tsx +60 -0
- package/client/src/components/Popup/Popup.css +14 -0
- package/client/src/components/Popup/Popup.tsx +469 -0
- package/client/src/components/Popup/PopupHeader.tsx +113 -0
- package/client/src/components/Popup/getPopupPosition.ts +137 -0
- package/client/src/components/Popup/getPopupStyle.ts +57 -0
- package/client/src/components/Popup/popupCheckPosition.ts +280 -0
- package/client/src/components/PopupMenu.tsx +106 -0
- package/client/src/components/PopupMenuList.tsx +36 -0
- package/client/src/components/PostgresInstallationInstructions.tsx +112 -0
- package/client/src/components/ProgressBar.css +29 -0
- package/client/src/components/ProgressBar.tsx +131 -0
- package/client/src/components/QRCodeImage.tsx +57 -0
- package/client/src/components/Scheduler.css +7 -0
- package/client/src/components/Scheduler.tsx +149 -0
- package/client/src/components/ScrollFade/ScrollFade.css +4 -0
- package/client/src/components/ScrollFade/ScrollFade.tsx +177 -0
- package/client/src/components/ScrollFade/useAutoScrollToBottom.ts +31 -0
- package/client/src/components/ScrollFade/useResizeObserver.ts +96 -0
- package/client/src/components/SearchList/SearchInput.tsx +143 -0
- package/client/src/components/SearchList/SearchList.css +37 -0
- package/client/src/components/SearchList/SearchList.tsx +184 -0
- package/client/src/components/SearchList/SearchListContent.tsx +285 -0
- package/client/src/components/SearchList/SearchListItems.tsx +244 -0
- package/client/src/components/SearchList/SearchListRowContent.tsx +46 -0
- package/client/src/components/SearchList/getSearchListMatchAndHighlight.tsx +162 -0
- package/client/src/components/SearchList/hooks/useSearchListItems.tsx +113 -0
- package/client/src/components/SearchList/hooks/useSearchListItemsSorting.tsx +169 -0
- package/client/src/components/SearchList/hooks/useSearchListOnClick.ts +69 -0
- package/client/src/components/SearchList/hooks/useSearchListOnKeyUpDown.ts +128 -0
- package/client/src/components/SearchList/hooks/useSearchListSearch.ts +211 -0
- package/client/src/components/SearchList/searchMatchUtils/getItemSearchRank.ts +74 -0
- package/client/src/components/SearchList/searchMatchUtils/getSearchRanking.ts +18 -0
- package/client/src/components/Section.tsx +159 -0
- package/client/src/components/SegmentedToggle.tsx +57 -0
- package/client/src/components/Select/Select.css +18 -0
- package/client/src/components/Select/Select.tsx +629 -0
- package/client/src/components/Select/SelectTriggerButton.tsx +204 -0
- package/client/src/components/ShorterText.tsx +56 -0
- package/client/src/components/SidePanel.tsx +49 -0
- package/client/src/components/Slider.css +65 -0
- package/client/src/components/Slider.tsx +66 -0
- package/client/src/components/StatusChip.tsx +34 -0
- package/client/src/components/Stepper.tsx +92 -0
- package/client/src/components/Stopwatch.tsx +121 -0
- package/client/src/components/SvgIcon.tsx +181 -0
- package/client/src/components/SwitchToggle.css +136 -0
- package/client/src/components/SwitchToggle.tsx +141 -0
- package/client/src/components/Table/Pagination.tsx +178 -0
- package/client/src/components/Table/Table.css +97 -0
- package/client/src/components/Table/Table.tsx +216 -0
- package/client/src/components/Table/TableBody.tsx +146 -0
- package/client/src/components/Table/TableHeader.tsx +491 -0
- package/client/src/components/Table/TableRow.tsx +164 -0
- package/client/src/components/Table/useVirtualisedRows.ts +160 -0
- package/client/src/components/Tabs.tsx +320 -0
- package/client/src/components/Tooltip.tsx +47 -0
- package/client/src/dashboard/API/zip.ts +151 -0
- package/client/src/dashboard/AccessControl/AccessControl.tsx +164 -0
- package/client/src/dashboard/AccessControl/AccessControlRuleEditor.tsx +373 -0
- package/client/src/dashboard/AccessControl/AccessRuleEditorFooter.tsx +241 -0
- package/client/src/dashboard/AccessControl/AccessRuleSummary.tsx +159 -0
- package/client/src/dashboard/AccessControl/ContextDataSelector.tsx +89 -0
- package/client/src/dashboard/AccessControl/ContextFilter.tsx +161 -0
- package/client/src/dashboard/AccessControl/ExistingAccessRules.tsx +168 -0
- package/client/src/dashboard/AccessControl/Methods/MethodDefinition.tsx +156 -0
- package/client/src/dashboard/AccessControl/Methods/MethodDefinitionEditAsJson.tsx +73 -0
- package/client/src/dashboard/AccessControl/Methods/MethodFunctionDefinition.tsx +97 -0
- package/client/src/dashboard/AccessControl/Methods/ReferencesDefinition.tsx +155 -0
- package/client/src/dashboard/AccessControl/Methods/useCodeEditorTsTypes.ts +152 -0
- package/client/src/dashboard/AccessControl/OptionControllers/DynamicFields.tsx +145 -0
- package/client/src/dashboard/AccessControl/OptionControllers/FieldFilterControl.tsx +193 -0
- package/client/src/dashboard/AccessControl/OptionControllers/FilterControl.tsx +207 -0
- package/client/src/dashboard/AccessControl/PasswordlessSetup.tsx +90 -0
- package/client/src/dashboard/AccessControl/PermissionTypes/PAllTables.tsx +50 -0
- package/client/src/dashboard/AccessControl/PermissionTypes/PCustomTables.tsx +237 -0
- package/client/src/dashboard/AccessControl/PermissionTypes/PRunSQL.tsx +92 -0
- package/client/src/dashboard/AccessControl/PublishedWorkspaceSelector.tsx +290 -0
- package/client/src/dashboard/AccessControl/RuleTypeControls/ComparablePGPolicies.tsx +179 -0
- package/client/src/dashboard/AccessControl/RuleTypeControls/DeleteRuleControl.tsx +95 -0
- package/client/src/dashboard/AccessControl/RuleTypeControls/ExampleComparablePolicy.tsx +112 -0
- package/client/src/dashboard/AccessControl/RuleTypeControls/InsertRuleControl.tsx +115 -0
- package/client/src/dashboard/AccessControl/RuleTypeControls/RuleToggle.tsx +19 -0
- package/client/src/dashboard/AccessControl/RuleTypeControls/SelectRuleControl.tsx +186 -0
- package/client/src/dashboard/AccessControl/RuleTypeControls/SyncRuleControl.tsx +130 -0
- package/client/src/dashboard/AccessControl/RuleTypeControls/UpdateRuleControl.tsx +207 -0
- package/client/src/dashboard/AccessControl/RuleTypeControls/getComparablePGPolicy.ts +130 -0
- package/client/src/dashboard/AccessControl/TableRules/FileTableAccessControlInfo.tsx +161 -0
- package/client/src/dashboard/AccessControl/TableRules/TablePermissionControls.tsx +251 -0
- package/client/src/dashboard/AccessControl/TableRules/TableRulesPopup.tsx +167 -0
- package/client/src/dashboard/AccessControl/TableRules/useLocalTableRulesErrors.ts +27 -0
- package/client/src/dashboard/AccessControl/UserStats.tsx +83 -0
- package/client/src/dashboard/AccessControl/UserSyncConfig.tsx +168 -0
- package/client/src/dashboard/AccessControl/UserTypeSelect.tsx +86 -0
- package/client/src/dashboard/AccessControl/useAccessControlSearchParams.ts +81 -0
- package/client/src/dashboard/AccessControl/useEditedAccessRule.ts +293 -0
- package/client/src/dashboard/AskLLM/AskLLM.tsx +91 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChat.tsx +208 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatHeader.tsx +127 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/LLMChatMessage/LLMChatMessage.tsx +77 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/LLMChatMessage/LLMChatMessageContent.tsx +96 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/LLMChatMessage/LLMChatMessageContentText.tsx +57 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/LLMChatMessage/LLMChatMessageHeader.tsx +129 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/LLMChatMessage/LLMGroupedToolCallsMessage.tsx +122 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/LLMChatMessage/LLMSingleChatMessage.tsx +44 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/LLMChatMessage/LLMToolCallIcon.tsx +12 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/Agent/Agent.tsx +161 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/Agent/AgentGoalToolCall.tsx +59 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/AgentDefinition.tsx +206 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/AgenticWorkflow.tsx +242 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/AgenticWorkflowActions.tsx +245 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/AgenticWorkflowActivity/AgenticWorkflowActivity.tsx +225 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/AgenticWorkflowActivity/ToolCall.tsx +137 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/AgenticWorkflowActivity/useAgenticWorkflowActivityItems.ts +70 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/AgenticWorkflowDefinition.tsx +173 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/AgenticWorkflowDetails.tsx +141 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/AgenticWorkflowMessage.tsx +103 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/AgenticWorkflowSchemaDrift.tsx +146 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/ContainerConfigurationEditor.tsx +184 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/McpToolAccess.tsx +156 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/UserInput.tsx +393 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/UserInputColumnValues.tsx +61 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/hooks/useAgenticWorkflowState.ts +50 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AgenticWorkflow/hooks/useUserInput.ts +27 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/AskUserQuestions.tsx +249 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/CreateTables.tsx +32 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/DockerContainer.tsx +296 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/DoclingConvertedDocument/DoclingDocument.d.ts +154 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/DoclingConvertedDocument/DoclingDocumentViewer.tsx +98 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/DoclingConvertedDocument/DoclingDocumentViewerPage.tsx +42 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/DoclingConvertedDocument/DoclingTable.tsx +166 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/DoclingConvertedDocument/DoclingText.tsx +99 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/DoclingConvertedDocument/DoclingToolUseView.tsx +47 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/ExecuteSQL.tsx +34 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/LoadSuggestedDashboards.tsx +172 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/RequestToolAccess.tsx +272 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/RunCodeInSandbox.tsx +33 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/RunTypescriptInNodejs.tsx +48 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/ToolUseResultError.tsx +29 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/WebSearch/Favicon.tsx +34 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/WebSearch/Markdown.tsx +21 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/WebSearch/WebSearch.tsx +70 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/Webdev/CreateComponentQuickFeedbackPreview.tsx +104 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/common/DatabaseAccessPermissions.tsx +63 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/common/HeaderList.tsx +26 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/common/useJSONBParsedData.ts +16 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/common/useSendToolUseResult.ts +46 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/common/useToolUseResultString.ts +27 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesMCPTools/common/useTypedToolUseResultData.ts +85 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ProstglesToolUseMessage/ProstglesToolUseMessage.tsx +127 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ToolUseChatMessage/InChatToolApprover.tsx +82 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ToolUseChatMessage/ToolUseChatMessage.tsx +109 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ToolUseChatMessage/ToolUseChatMessageBtn.tsx +51 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ToolUseChatMessage/ToolUseChatMessageBtnTextSummary.tsx +45 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ToolUseChatMessage/ToolUseChatMessageJSONData.tsx +132 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ToolUseChatMessage/ToolUseChatMessageResult.tsx +57 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ToolUseChatMessage/ToolUseReRunBtn.tsx +71 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ToolUseChatMessage/useToolUseChatMessage.ts +51 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/ToolUseChatMessage/utils/getToolUseResult.ts +40 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/hooks/useLLMChatMessageGrouper.tsx +168 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/hooks/useLLMChatMessages.tsx +157 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatMessages/setChatPrompt.ts +116 -0
- package/client/src/dashboard/AskLLM/Chat/AskLLMChatSettings.tsx +88 -0
- package/client/src/dashboard/AskLLM/Chat/useAskLLMChatSend.ts +111 -0
- package/client/src/dashboard/AskLLM/Chat/useLLMChat.tsx +126 -0
- package/client/src/dashboard/AskLLM/Chat/useLLMSchemaStr.ts +207 -0
- package/client/src/dashboard/AskLLM/ChatActionBar/AskLLMChatActionBar.tsx +34 -0
- package/client/src/dashboard/AskLLM/ChatActionBar/AskLLMChatActionBarDatabaseAccess.tsx +273 -0
- package/client/src/dashboard/AskLLM/ChatActionBar/AskLLMChatActionBarMCPTools.tsx +102 -0
- package/client/src/dashboard/AskLLM/ChatActionBar/AskLLMChatActionBarMCPToolsBtn.tsx +167 -0
- package/client/src/dashboard/AskLLM/ChatActionBar/AskLLMChatActionBarModelSelector.tsx +238 -0
- package/client/src/dashboard/AskLLM/ChatActionBar/AskLLMChatActionBarPromptSelector.tsx +206 -0
- package/client/src/dashboard/AskLLM/ChatActionBar/PromptAndAllowedMcpToolsSchemaPreviews.tsx +85 -0
- package/client/src/dashboard/AskLLM/LLMModelSelector.tsx +270 -0
- package/client/src/dashboard/AskLLM/Setup/AddLLMPromptForm.tsx +33 -0
- package/client/src/dashboard/AskLLM/Setup/AskLLMAccessControl.tsx +246 -0
- package/client/src/dashboard/AskLLM/Setup/LLMProviderSetup.tsx +68 -0
- package/client/src/dashboard/AskLLM/Setup/LLMSetupProvider.tsx +111 -0
- package/client/src/dashboard/AskLLM/Setup/ProstglesSignup.tsx +108 -0
- package/client/src/dashboard/AskLLM/Setup/SetupLLMCredentials.tsx +89 -0
- package/client/src/dashboard/AskLLM/Tools/AskLLMToolApprover.tsx +279 -0
- package/client/src/dashboard/AskLLM/Tools/loadGeneratedWorkspaces/loadGeneratedBarchart.ts +126 -0
- package/client/src/dashboard/AskLLM/Tools/loadGeneratedWorkspaces/loadGeneratedMap.ts +58 -0
- package/client/src/dashboard/AskLLM/Tools/loadGeneratedWorkspaces/loadGeneratedTable.ts +159 -0
- package/client/src/dashboard/AskLLM/Tools/loadGeneratedWorkspaces/loadGeneratedTimechart.ts +78 -0
- package/client/src/dashboard/AskLLM/Tools/loadGeneratedWorkspaces/loadGeneratedWorkspaces.ts +168 -0
- package/client/src/dashboard/AskLLM/Tools/useAskLLMToolApprover.ts +99 -0
- package/client/src/dashboard/AskLLM/useLocalLLM.ts +84 -0
- package/client/src/dashboard/BackupAndRestore/AutomaticBackups.tsx +212 -0
- package/client/src/dashboard/BackupAndRestore/BackupsControls.tsx +291 -0
- package/client/src/dashboard/BackupAndRestore/BackupsInProgress.tsx +98 -0
- package/client/src/dashboard/BackupAndRestore/CloudStorageCredentialSelector.tsx +215 -0
- package/client/src/dashboard/BackupAndRestore/CodeConfirmation.tsx +205 -0
- package/client/src/dashboard/BackupAndRestore/CompletedBackups/DeleteAllBackups.tsx +58 -0
- package/client/src/dashboard/BackupAndRestore/CompletedBackups.tsx +276 -0
- package/client/src/dashboard/BackupAndRestore/DumpLocationOptions.tsx +40 -0
- package/client/src/dashboard/BackupAndRestore/DumpRestoreAlerts.tsx +82 -0
- package/client/src/dashboard/BackupAndRestore/PGDumpOptions.tsx +299 -0
- package/client/src/dashboard/BackupAndRestore/RenderBackupLogs.tsx +48 -0
- package/client/src/dashboard/BackupAndRestore/RenderBackupStatus.tsx +58 -0
- package/client/src/dashboard/BackupAndRestore/Restore/Restore.tsx +205 -0
- package/client/src/dashboard/BackupAndRestore/Restore/RestoreOptions.tsx +148 -0
- package/client/src/dashboard/BackupAndRestore/Restore/useRestoreDatabaseFromFile.ts +73 -0
- package/client/src/dashboard/BackupAndRestore/useBackupsControlsState.ts +39 -0
- package/client/src/dashboard/Charts/CanvasChart.ts +746 -0
- package/client/src/dashboard/Charts/TimeChart/TimeChart.tsx +232 -0
- package/client/src/dashboard/Charts/TimeChart/getBinValueLabels.ts +125 -0
- package/client/src/dashboard/Charts/TimeChart/getCssVariableValue.ts +6 -0
- package/client/src/dashboard/Charts/TimeChart/getTimeAxisTicks.ts +426 -0
- package/client/src/dashboard/Charts/TimeChart/getTimechartBinSize.ts +121 -0
- package/client/src/dashboard/Charts/TimeChart/getTimechartTooltipIntersections.ts +94 -0
- package/client/src/dashboard/Charts/TimeChart/getTimechartTooltipShapes.ts +318 -0
- package/client/src/dashboard/Charts/TimeChart/measureText.ts +34 -0
- package/client/src/dashboard/Charts/TimeChart/onDeltaTimechart.ts +65 -0
- package/client/src/dashboard/Charts/TimeChart/onRenderTimechart.ts +354 -0
- package/client/src/dashboard/Charts/TimeChart/prepareTimechartData.ts +185 -0
- package/client/src/dashboard/Charts/constants.ts +8 -0
- package/client/src/dashboard/Charts/createHiPPICanvas.ts +31 -0
- package/client/src/dashboard/Charts/drawMonotoneXCurve.ts +171 -0
- package/client/src/dashboard/Charts/drawShapes/drawLinkLine.ts +29 -0
- package/client/src/dashboard/Charts/drawShapes/drawShapes.ts +217 -0
- package/client/src/dashboard/Charts/drawShapes/drawShapesOnSVG.ts +481 -0
- package/client/src/dashboard/Charts/drawShapes/findShortestPathAroundRectangles.ts +241 -0
- package/client/src/dashboard/Charts/drawShapes/getLinkLinePoints.ts +124 -0
- package/client/src/dashboard/Charts/drawShapes/getTimechartGradientPeakSections.ts +27 -0
- package/client/src/dashboard/Charts/drawShapes/shortestLinkLineV2.ts +182 -0
- package/client/src/dashboard/Charts/roundRect.ts +42 -0
- package/client/src/dashboard/Charts.tsx +216 -0
- package/client/src/dashboard/CodeEditor/CodeEditor.tsx +288 -0
- package/client/src/dashboard/CodeEditor/CodeEditorWithSaveButton.tsx +208 -0
- package/client/src/dashboard/CodeEditor/registerLogLang.ts +128 -0
- package/client/src/dashboard/CodeEditor/utils/getMonacoJsonSchemas.ts +31 -0
- package/client/src/dashboard/CodeEditor/utils/installGoToDefinition.ts +40 -0
- package/client/src/dashboard/CodeEditor/utils/navigateTo.ts +61 -0
- package/client/src/dashboard/CodeEditor/utils/resolveDefinition..ts +33 -0
- package/client/src/dashboard/CodeEditor/utils/setMonacoErrorMarkers.ts +67 -0
- package/client/src/dashboard/CodeEditor/utils/useSetMonacoJsonSchemas.ts +60 -0
- package/client/src/dashboard/CodeEditor/utils/useSetMonacoTsLibraries.ts +157 -0
- package/client/src/dashboard/CodeExample.tsx +34 -0
- package/client/src/dashboard/ConnectionConfig/APIDetails/APICodeExamples.tsx +280 -0
- package/client/src/dashboard/ConnectionConfig/APIDetails/APIDetails.tsx +111 -0
- package/client/src/dashboard/ConnectionConfig/APIDetails/APIDetailsHttp.tsx +123 -0
- package/client/src/dashboard/ConnectionConfig/APIDetails/APIDetailsTokens.tsx +137 -0
- package/client/src/dashboard/ConnectionConfig/APIDetails/APIDetailsWs.tsx +98 -0
- package/client/src/dashboard/ConnectionConfig/APIDetails/AllowedOriginCheck.tsx +104 -0
- package/client/src/dashboard/ConnectionConfig/APIDetails/getApiEndpoint.ts +8 -0
- package/client/src/dashboard/ConnectionConfig/ConnectionConfig.tsx +267 -0
- package/client/src/dashboard/ConnectionConfig/ConnectionConfigSync.tsx +123 -0
- package/client/src/dashboard/ConnectionConfig/ServerSideFunctions.tsx +46 -0
- package/client/src/dashboard/ConnectionConfig/WebApp/WebAppConfig.tsx +90 -0
- package/client/src/dashboard/ConnectionConfig/WebApp/WebAppConfigComponents.tsx +47 -0
- package/client/src/dashboard/ConnectionConfig/WebApp/WebAppConfigFooterActions.tsx +137 -0
- package/client/src/dashboard/ConnectionConfig/WebApp/WebAppConfigSetup.tsx +135 -0
- package/client/src/dashboard/ConnectionConfig/WebApp/hooks/useWebAppConfigActiveSection.ts +12 -0
- package/client/src/dashboard/ConnectionConfig/WebApp/hooks/useWebAppConfigState.ts +76 -0
- package/client/src/dashboard/ConnectionConfig/useConnectionConfigSearchParams.ts +35 -0
- package/client/src/dashboard/ConnectionSelector.tsx +58 -0
- package/client/src/dashboard/Dashboard/CloseSaveSQLPopup.tsx +81 -0
- package/client/src/dashboard/Dashboard/DBS.ts +19 -0
- package/client/src/dashboard/Dashboard/Dashboard.tsx +667 -0
- package/client/src/dashboard/Dashboard/DashboardCenteredLayoutResizer.tsx +56 -0
- package/client/src/dashboard/Dashboard/PALETTE.ts +36 -0
- package/client/src/dashboard/Dashboard/ViewRenderer.tsx +498 -0
- package/client/src/dashboard/Dashboard/addChart.ts +261 -0
- package/client/src/dashboard/Dashboard/addLink.ts +48 -0
- package/client/src/dashboard/Dashboard/addWindow.ts +51 -0
- package/client/src/dashboard/Dashboard/cardLayout.ts +28 -0
- package/client/src/dashboard/Dashboard/cloneWorkspace.ts +102 -0
- package/client/src/dashboard/Dashboard/dashboardUtils.ts +377 -0
- package/client/src/dashboard/Dashboard/debuggingUtils.ts +112 -0
- package/client/src/dashboard/Dashboard/getTables.ts +31 -0
- package/client/src/dashboard/Dashboard/getViewRendererUtils.ts +108 -0
- package/client/src/dashboard/Dashboard/onLinkTable.ts +45 -0
- package/client/src/dashboard/Dashboard/useAddViewToWorkspace.ts +92 -0
- package/client/src/dashboard/DashboardMenu/CreateTable.tsx +307 -0
- package/client/src/dashboard/DashboardMenu/DashboardHotkeys.tsx +38 -0
- package/client/src/dashboard/DashboardMenu/DashboardMenu.tsx +183 -0
- package/client/src/dashboard/DashboardMenu/DashboardMenuContent.tsx +203 -0
- package/client/src/dashboard/DashboardMenu/DashboardMenuHeader.tsx +86 -0
- package/client/src/dashboard/DashboardMenu/DashboardMenuHotkeys.tsx +102 -0
- package/client/src/dashboard/DashboardMenu/DashboardMenuResizer.tsx +68 -0
- package/client/src/dashboard/DashboardMenu/DashboardMenuSettings.tsx +241 -0
- package/client/src/dashboard/DashboardMenu/NewTableMenu.tsx +121 -0
- package/client/src/dashboard/DashboardMenu/SavedAgenticWorkflowsAndContainers.tsx +149 -0
- package/client/src/dashboard/DashboardMenu/SettingsSection.tsx +22 -0
- package/client/src/dashboard/DashboardMenu/TableList.tsx +141 -0
- package/client/src/dashboard/DashboardMenu/useTableSizeInfo.ts +98 -0
- package/client/src/dashboard/DatabaseAccessEditor/DatabaseAccessEditor.tsx +174 -0
- package/client/src/dashboard/DatabaseAccessEditor/DatabaseAccessEditorCustomTables.tsx +149 -0
- package/client/src/dashboard/DatabaseAccessEditor/TableAccessAdvancedOptions.tsx +128 -0
- package/client/src/dashboard/DatabaseAccessEditor/TableAccessAdvancedOptionsMenu.tsx +65 -0
- package/client/src/dashboard/DatabaseAccessEditor/TableAccessDetails.tsx +163 -0
- package/client/src/dashboard/DatabaseAccessEditor/TableAccessEditor.tsx +229 -0
- package/client/src/dashboard/DatabaseAccessEditor/getTableSchemaDriftState.ts +65 -0
- package/client/src/dashboard/DatabaseAccessEditor/useDatabaseAccessEditorTables.tsx +99 -0
- package/client/src/dashboard/DetailedFilterControl/DetailedFilterBaseControl.tsx +139 -0
- package/client/src/dashboard/DetailedFilterControl/DetailedFilterBaseControlRouter.tsx +192 -0
- package/client/src/dashboard/DetailedFilterControl/DetailedFilterBaseTypes/AgeFilter.tsx +148 -0
- package/client/src/dashboard/DetailedFilterControl/DetailedFilterBaseTypes/GeoFilter.tsx +255 -0
- package/client/src/dashboard/DetailedFilterControl/DetailedFilterBaseTypes/ListFilter/ListFilter.tsx +235 -0
- package/client/src/dashboard/DetailedFilterControl/DetailedFilterBaseTypes/ListFilter/fetchListFilterOptions.ts +76 -0
- package/client/src/dashboard/DetailedFilterControl/DetailedFilterBaseTypes/NumberOrDateFilter.tsx +206 -0
- package/client/src/dashboard/DetailedFilterControl/DetailedFilterControl.tsx +157 -0
- package/client/src/dashboard/DetailedFilterControl/FTS_LANGUAGES.ts +35 -0
- package/client/src/dashboard/DetailedFilterControl/FilterWrapper.css +7 -0
- package/client/src/dashboard/DetailedFilterControl/FilterWrapper.tsx +339 -0
- package/client/src/dashboard/DetailedFilterControl/validateFilter.ts +46 -0
- package/client/src/dashboard/Feedback.tsx +145 -0
- package/client/src/dashboard/FileImporter/FileImporter.tsx +770 -0
- package/client/src/dashboard/FileImporter/FileImporterFooter.tsx +100 -0
- package/client/src/dashboard/FileImporter/checkCSVColumnDataTypes.tsx +139 -0
- package/client/src/dashboard/FileImporter/importFile.ts +303 -0
- package/client/src/dashboard/FileImporter/parseCSVFile.ts +123 -0
- package/client/src/dashboard/FileImporter/setFile.ts +251 -0
- package/client/src/dashboard/FileTableControls/CreateFileColumn.tsx +189 -0
- package/client/src/dashboard/FileTableControls/FileColumnConfigControls.tsx +191 -0
- package/client/src/dashboard/FileTableControls/FileColumnConfigEditor.tsx +251 -0
- package/client/src/dashboard/FileTableControls/FileStorageControls.tsx +294 -0
- package/client/src/dashboard/FileTableControls/FileStorageDelete.tsx +106 -0
- package/client/src/dashboard/FileTableControls/FileStorageReferencedTablesConfig.tsx +80 -0
- package/client/src/dashboard/FileTableControls/FileTableConfigControls.tsx +69 -0
- package/client/src/dashboard/FileTableControls/hooks/useFileTableConfigControls.ts +70 -0
- package/client/src/dashboard/FileTableControls/hooks/useSetFileStorage.ts +128 -0
- package/client/src/dashboard/JSONBColumnEditor.tsx +60 -0
- package/client/src/dashboard/LinkMenu.tsx +332 -0
- package/client/src/dashboard/Map/DeckGLFeatureEditor.tsx +645 -0
- package/client/src/dashboard/Map/DeckGLMap.css +45 -0
- package/client/src/dashboard/Map/DeckGLMap.tsx +576 -0
- package/client/src/dashboard/Map/DeckGLWrapped.ts +312 -0
- package/client/src/dashboard/Map/InMapControls.tsx +137 -0
- package/client/src/dashboard/Map/MVTLayerProps.ts +306 -0
- package/client/src/dashboard/Map/fitBounds.ts +63 -0
- package/client/src/dashboard/Map/mapDrawUtils.ts +129 -0
- package/client/src/dashboard/Map/mapUtils.ts +183 -0
- package/client/src/dashboard/RTComp.tsx +165 -0
- package/client/src/dashboard/RenderFilter.tsx +174 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/CommonMatchImports.ts +366 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/KEYWORDS.ts +448 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MacthCreate/MatchCreate.ts +294 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MacthCreate/MatchCreateView.ts +106 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MacthCreate/matchCreateIndex.ts +220 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MacthCreate/matchCreatePolicy.ts +108 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MacthCreate/matchCreateRule.tsx +99 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MacthCreate/matchCreateTable.ts +336 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MacthCreate/matchCreateTrigger.ts +84 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchAlter/MatchAlter.tsx +258 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchAlter/matchAlterPolicy.ts +50 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchAlter/matchAlterTable.ts +325 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchAlter/matchCreateOrAlterUser.tsx +192 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchComment.ts +86 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchCopy.ts +367 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchDrop.ts +161 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchFirst.ts +471 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchGrant.ts +331 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchInsert.tsx +123 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchLast.ts +10 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchPublication.ts +126 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchReassign.ts +35 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchReindex.ts +36 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchSelect.ts +623 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchSet.ts +183 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchSubscription.ts +231 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchUpdate.ts +79 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchVacuum.ts +86 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MatchWith.ts +222 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/MathDelete.ts +18 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/PSQL.ts +136 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/STARTING_KEYWORDS.ts +931 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/TableKWDs.ts +479 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/completionUtils/checkIfInsideDollarFunctionDefinition.ts +88 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/completionUtils/checkIfUnfinishedParenthesis.ts +74 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/completionUtils/getCodeBlock.ts +627 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/completionUtils/getQueryReturnType.ts +274 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/completionUtils/getTableExpressionReturnTypes.ts +243 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/completionUtils/getTabularExpressions.ts +428 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/completionUtils/getTokens.ts +239 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/getExpected.ts +176 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/getJoinSuggestions.ts +193 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/getMatch.ts +62 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/getPGObjects.ts +1270 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/getPrevTokensNoParantheses.ts +234 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/jsonbPathSuggest.ts +188 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/monacoSQLSetup/registerHover.ts +138 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/monacoSQLSetup/registerSuggestions.ts +549 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/suggestColumnLike.ts +251 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/suggestCondition.ts +320 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/suggestFuncArgs.ts +105 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/suggestTableLike.ts +104 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/suggestValue.ts +125 -0
- package/client/src/dashboard/SQLEditor/SQLCompletion/withKWDs.ts +507 -0
- package/client/src/dashboard/SQLEditor/SQLEditorSuggestions.ts +1883 -0
- package/client/src/dashboard/SQLEditor/SQLSmartEditor.tsx +124 -0
- package/client/src/dashboard/SQLEditor/SQL_SNIPPETS.ts +43 -0
- package/client/src/dashboard/SQLEditor/W_SQLEditor.css +15 -0
- package/client/src/dashboard/SQLEditor/W_SQLEditor.tsx +746 -0
- package/client/src/dashboard/SQLEditor/addSqlEditorFunctions.ts +74 -0
- package/client/src/dashboard/SQLEditor/defineCustomMonacoSQLTheme.ts +74 -0
- package/client/src/dashboard/SQLEditor/getFormattedSql.ts +154 -0
- package/client/src/dashboard/SQLEditor/registerFunctionSuggestions.ts +175 -0
- package/client/src/dashboard/SQLEditor/utils/scrollToLineIfNeeded.ts +17 -0
- package/client/src/dashboard/SQLEditor/utils/setMonacEditorError.ts +93 -0
- package/client/src/dashboard/SampleSchemas.tsx +50 -0
- package/client/src/dashboard/SchemaGraph/ERDSchema/ERDSchema.tsx +175 -0
- package/client/src/dashboard/SchemaGraph/ERDSchema/getInitialPlacement.ts +115 -0
- package/client/src/dashboard/SchemaGraph/ERDSchema/getInitialPlacementV2.ts +343 -0
- package/client/src/dashboard/SchemaGraph/ERDSchema/useCanvasPanZoom.ts +54 -0
- package/client/src/dashboard/SchemaGraph/ERDSchema/useDrawHiddenSvgForNativeTextSearch.ts +80 -0
- package/client/src/dashboard/SchemaGraph/ERDSchema/useDrawSchemaShapes.ts +242 -0
- package/client/src/dashboard/SchemaGraph/ERDSchema/useFetchSchemaForDiagram.ts +276 -0
- package/client/src/dashboard/SchemaGraph/ERDSchema/usePanShapes.ts +160 -0
- package/client/src/dashboard/SchemaGraph/ERDSchema/useSchemaShapes.ts +352 -0
- package/client/src/dashboard/SchemaGraph/SchemaGraph.tsx +55 -0
- package/client/src/dashboard/SchemaGraph/SchemaGraphControls.tsx +226 -0
- package/client/src/dashboard/SchemaGraph/types.ts +29 -0
- package/client/src/dashboard/SearchAll/SearchAll.tsx +77 -0
- package/client/src/dashboard/SearchAll/SearchAllContent.tsx +63 -0
- package/client/src/dashboard/SearchAll/SearchAllHeader.tsx +71 -0
- package/client/src/dashboard/SearchAll/SearchMatchRow.tsx +103 -0
- package/client/src/dashboard/SearchAll/hooks/useSearchAllState.ts +46 -0
- package/client/src/dashboard/SearchAll/hooks/useSearchListProps.tsx +178 -0
- package/client/src/dashboard/SearchAll/hooks/useSearchTables.tsx +163 -0
- package/client/src/dashboard/SearchAll/hooks/useTablesAndViewsSearchItems.ts +55 -0
- package/client/src/dashboard/SilverGrid/SilverGrid.tsx +531 -0
- package/client/src/dashboard/SilverGrid/SilverGridChild.tsx +403 -0
- package/client/src/dashboard/SilverGrid/SilverGridChildHeader.tsx +235 -0
- package/client/src/dashboard/SilverGrid/SilverGridResizer.tsx +129 -0
- package/client/src/dashboard/SilverGrid/TreeBuilder.ts +261 -0
- package/client/src/dashboard/SmartCard/SmartCard.tsx +218 -0
- package/client/src/dashboard/SmartCard/SmartCardActions.tsx +113 -0
- package/client/src/dashboard/SmartCard/SmartCardColumn.tsx +49 -0
- package/client/src/dashboard/SmartCard/getSelectForFieldConfigs.ts +44 -0
- package/client/src/dashboard/SmartCard/parseFieldConfigs.tsx +165 -0
- package/client/src/dashboard/SmartCard/useFieldConfigParser.ts +55 -0
- package/client/src/dashboard/SmartCard/useSmartCardColumns.ts +46 -0
- package/client/src/dashboard/SmartCardList/SmartCardList.tsx +291 -0
- package/client/src/dashboard/SmartCardList/SmartCardListHeaderControls.tsx +130 -0
- package/client/src/dashboard/SmartCardList/SmartCardListJoinedNewRecords.tsx +97 -0
- package/client/src/dashboard/SmartCardList/useSmartCardListState.ts +273 -0
- package/client/src/dashboard/SmartFilter/AddJoinFilter.tsx +97 -0
- package/client/src/dashboard/SmartFilter/MinimisedFilter.css +13 -0
- package/client/src/dashboard/SmartFilter/MinimisedFilter.tsx +208 -0
- package/client/src/dashboard/SmartFilter/SmartAddFilter.tsx +324 -0
- package/client/src/dashboard/SmartFilter/SmartFilter.tsx +182 -0
- package/client/src/dashboard/SmartFilter/SmartSearch/SmartSearch.css +4 -0
- package/client/src/dashboard/SmartFilter/SmartSearch/SmartSearch.tsx +230 -0
- package/client/src/dashboard/SmartFilter/SmartSearch/getSmartSearchRows.ts +277 -0
- package/client/src/dashboard/SmartFilter/SmartSearch/onSearchItems.tsx +146 -0
- package/client/src/dashboard/SmartFilter/SortByControl.tsx +81 -0
- package/client/src/dashboard/SmartFilter/smartFilterUtils.ts +97 -0
- package/client/src/dashboard/SmartFilterBar/SmartFilterBar.tsx +178 -0
- package/client/src/dashboard/SmartFilterBar/SmartFilterBarFilters.tsx +103 -0
- package/client/src/dashboard/SmartFilterBar/SmartFilterBarRightActions.tsx +212 -0
- package/client/src/dashboard/SmartFilterBar/SmartFilterBarSearch.tsx +115 -0
- package/client/src/dashboard/SmartFilterBar/SmartFilterBarSort.tsx +108 -0
- package/client/src/dashboard/SmartFilterBar/useSmartFilterBarState.ts +100 -0
- package/client/src/dashboard/SmartForm/ChipArrayEditor.tsx +169 -0
- package/client/src/dashboard/SmartForm/InsertButton.tsx +89 -0
- package/client/src/dashboard/SmartForm/JoinedRecords/JoinedRecords.tsx +155 -0
- package/client/src/dashboard/SmartForm/JoinedRecords/JoinedRecordsAddRow.tsx +182 -0
- package/client/src/dashboard/SmartForm/JoinedRecords/JoinedRecordsSection.tsx +168 -0
- package/client/src/dashboard/SmartForm/JoinedRecords/getJoinFilter.ts +31 -0
- package/client/src/dashboard/SmartForm/JoinedRecords/useJoinedRecordsSections.ts +246 -0
- package/client/src/dashboard/SmartForm/JoinedRecords/useJoinedSectionFieldConfigs.tsx +120 -0
- package/client/src/dashboard/SmartForm/SmartForm.tsx +368 -0
- package/client/src/dashboard/SmartForm/SmartFormField/RenderValue/RenderJson.tsx +72 -0
- package/client/src/dashboard/SmartForm/SmartFormField/RenderValue.tsx +294 -0
- package/client/src/dashboard/SmartForm/SmartFormField/SmartFormField.tsx +349 -0
- package/client/src/dashboard/SmartForm/SmartFormField/SmartFormFieldFileSection.tsx +51 -0
- package/client/src/dashboard/SmartForm/SmartFormField/SmartFormFieldForeignKey.tsx +253 -0
- package/client/src/dashboard/SmartForm/SmartFormField/SmartFormFieldLinkedData.tsx +207 -0
- package/client/src/dashboard/SmartForm/SmartFormField/SmartFormFieldLinkedDataInsert/SmartFormFieldLinkedDataInsert.tsx +165 -0
- package/client/src/dashboard/SmartForm/SmartFormField/SmartFormFieldLinkedDataInsert/useSmartFormFieldLinkedDataInsert.tsx +77 -0
- package/client/src/dashboard/SmartForm/SmartFormField/SmartFormFieldLinkedDataSearch.tsx +91 -0
- package/client/src/dashboard/SmartForm/SmartFormField/SmartFormFieldRightButtons.tsx +110 -0
- package/client/src/dashboard/SmartForm/SmartFormField/ViewMoreSmartCardList.tsx +86 -0
- package/client/src/dashboard/SmartForm/SmartFormField/fetchColumnValueSuggestions.ts +92 -0
- package/client/src/dashboard/SmartForm/SmartFormField/fetchForeignKeyOptions.tsx +348 -0
- package/client/src/dashboard/SmartForm/SmartFormField/fieldUtils.ts +228 -0
- package/client/src/dashboard/SmartForm/SmartFormField/useNestedInsertDefaultData.ts +28 -0
- package/client/src/dashboard/SmartForm/SmartFormField/useSmartFormFieldAsJSON.tsx +87 -0
- package/client/src/dashboard/SmartForm/SmartFormField/useSmartFormFieldOnChange.ts +65 -0
- package/client/src/dashboard/SmartForm/SmartFormFieldList.tsx +190 -0
- package/client/src/dashboard/SmartForm/SmartFormFileSection.tsx +110 -0
- package/client/src/dashboard/SmartForm/SmartFormFooter/SmartFormFooterButtons.tsx +133 -0
- package/client/src/dashboard/SmartForm/SmartFormFooter/useSmartFormActions.ts +265 -0
- package/client/src/dashboard/SmartForm/SmartFormNewRowDataHandler.ts +168 -0
- package/client/src/dashboard/SmartForm/SmartFormPopup/SmartFormPopupWrapper.tsx +92 -0
- package/client/src/dashboard/SmartForm/SmartFormPopup/SmartFormPrevNext.tsx +33 -0
- package/client/src/dashboard/SmartForm/SmartFormPopup/SmartFormViewAsMarkdown.tsx +83 -0
- package/client/src/dashboard/SmartForm/SmartFormPopup/useSmartFormPrevNext.ts +20 -0
- package/client/src/dashboard/SmartForm/SmartFormPopup/useSmartFormSubTitle.ts +44 -0
- package/client/src/dashboard/SmartForm/SmartFormUpperFooter/SmartFormUpperFooter.tsx +198 -0
- package/client/src/dashboard/SmartForm/SmartFormUpperFooter/useActiveJoinedRecordsTab.ts +65 -0
- package/client/src/dashboard/SmartForm/constants.ts +1 -0
- package/client/src/dashboard/SmartForm/useNewRowDataHandler.ts +386 -0
- package/client/src/dashboard/SmartForm/useSmartForm.ts +67 -0
- package/client/src/dashboard/SmartForm/useSmartFormColumns.ts +127 -0
- package/client/src/dashboard/SmartForm/useSmartFormMode.ts +243 -0
- package/client/src/dashboard/SmartSelect.tsx +228 -0
- package/client/src/dashboard/SmartTable.tsx +383 -0
- package/client/src/dashboard/StatusMonitor/StatusMonitor.tsx +41 -0
- package/client/src/dashboard/StatusMonitor/StatusMonitorBlockedByPid.tsx +35 -0
- package/client/src/dashboard/StatusMonitor/StatusMonitorConnections.tsx +127 -0
- package/client/src/dashboard/StatusMonitor/StatusMonitorInfoHeader/StatusMonitorInfoHeader.tsx +122 -0
- package/client/src/dashboard/StatusMonitor/StatusMonitorInfoHeader/StatusMonitorInfoHeaderCpu.tsx +122 -0
- package/client/src/dashboard/StatusMonitor/StatusMonitorInfoHeader/StatusMonitorInfoHeaderMemory.tsx +21 -0
- package/client/src/dashboard/StatusMonitor/StatusMonitorProcList.tsx +292 -0
- package/client/src/dashboard/StatusMonitor/StatusMonitorProcListControlsHeader.tsx +85 -0
- package/client/src/dashboard/TableConfig/ProcessLogs.tsx +65 -0
- package/client/src/dashboard/TableConfig/TableConfig.tsx +88 -0
- package/client/src/dashboard/TimeSeries.tsx +29 -0
- package/client/src/dashboard/UserManager.tsx +54 -0
- package/client/src/dashboard/W_Barchart/W_Barchart.tsx +104 -0
- package/client/src/dashboard/W_Barchart/fetchSQLBarchartData.ts +7 -0
- package/client/src/dashboard/W_Barchart/useBarchartData.ts +176 -0
- package/client/src/dashboard/W_Map/OSM/OverpassQuery.tsx +21 -0
- package/client/src/dashboard/W_Map/OSM/fetchOSMCountryBoundary.ts +73 -0
- package/client/src/dashboard/W_Map/OSM/getOSMData.ts +240 -0
- package/client/src/dashboard/W_Map/OSM/osmToGeoJSON.ts +198 -0
- package/client/src/dashboard/W_Map/OSM/osmTypes.ts +1856 -0
- package/client/src/dashboard/W_Map/W_Map.tsx +747 -0
- package/client/src/dashboard/W_Map/W_MapMenu.tsx +188 -0
- package/client/src/dashboard/W_Map/controls/MapBasemapOptions.tsx +268 -0
- package/client/src/dashboard/W_Map/controls/MapInfoSection.tsx +95 -0
- package/client/src/dashboard/W_Map/controls/MapOSMQuery.tsx +174 -0
- package/client/src/dashboard/W_Map/controls/MapOpacityMenu.tsx +60 -0
- package/client/src/dashboard/W_Map/fetchData/fetchMapLayerData.ts +401 -0
- package/client/src/dashboard/W_Map/fetchData/getMapData.ts +161 -0
- package/client/src/dashboard/W_Map/fetchData/getMapDataExtent.ts +86 -0
- package/client/src/dashboard/W_Map/fetchData/getMapLayerQueries.ts +232 -0
- package/client/src/dashboard/W_Map/getMapFeatureStyle.ts +160 -0
- package/client/src/dashboard/W_Map/onMapHover.ts +118 -0
- package/client/src/dashboard/W_Method/FunctionLabel.tsx +24 -0
- package/client/src/dashboard/W_Method/NewMethod.tsx +108 -0
- package/client/src/dashboard/W_Method/PublishedMethods.tsx +218 -0
- package/client/src/dashboard/W_Method/W_Method.tsx +48 -0
- package/client/src/dashboard/W_Method/W_MethodControls.tsx +338 -0
- package/client/src/dashboard/W_Method/W_MethodMenu.tsx +162 -0
- package/client/src/dashboard/W_QuickMenu.tsx +228 -0
- package/client/src/dashboard/W_SQL/CSVRender.tsx +18 -0
- package/client/src/dashboard/W_SQL/CopyResultBtn.tsx +246 -0
- package/client/src/dashboard/W_SQL/MonacoLanguageRegister.ts +701 -0
- package/client/src/dashboard/W_SQL/SQLHotkeys.tsx +23 -0
- package/client/src/dashboard/W_SQL/TestSQL.ts +52 -0
- package/client/src/dashboard/W_SQL/W_SQL.tsx +679 -0
- package/client/src/dashboard/W_SQL/W_SQLBottomBar/W_SQLBottomBar.tsx +484 -0
- package/client/src/dashboard/W_SQL/W_SQLBottomBar/W_SQLBottomBarProcStats.tsx +67 -0
- package/client/src/dashboard/W_SQL/W_SQLMenu.tsx +403 -0
- package/client/src/dashboard/W_SQL/W_SQLResults.tsx +161 -0
- package/client/src/dashboard/W_SQL/customRenderers.tsx +126 -0
- package/client/src/dashboard/W_SQL/demoScripts/createTables.ts +262 -0
- package/client/src/dashboard/W_SQL/demoScripts/mainTestScripts.ts +269 -0
- package/client/src/dashboard/W_SQL/demoScripts/testBugs.ts +596 -0
- package/client/src/dashboard/W_SQL/demoScripts/testMiscAndBugs.ts +61 -0
- package/client/src/dashboard/W_SQL/demoScripts/testSqlCharts.ts +117 -0
- package/client/src/dashboard/W_SQL/getChartableSQL.ts +169 -0
- package/client/src/dashboard/W_SQL/getDemoUtils.ts +260 -0
- package/client/src/dashboard/W_SQL/getSQLResultTableColumns.ts +56 -0
- package/client/src/dashboard/W_SQL/monacoEditorTypes.ts +13 -0
- package/client/src/dashboard/W_SQL/parseExplainResult.ts +99 -0
- package/client/src/dashboard/W_SQL/parseSQLError.ts +55 -0
- package/client/src/dashboard/W_SQL/parseSqlResultCols.ts +96 -0
- package/client/src/dashboard/W_SQL/runSQL/getQueryTotalRowCount.ts +38 -0
- package/client/src/dashboard/W_SQL/runSQL/runSQL.ts +432 -0
- package/client/src/dashboard/W_SQL/runSQLErrorHints.ts +150 -0
- package/client/src/dashboard/W_Table/CardView/CardItem/CardItemBody.tsx +151 -0
- package/client/src/dashboard/W_Table/CardView/CardItem/CardItemHeader.tsx +150 -0
- package/client/src/dashboard/W_Table/CardView/CardItem/CardViewRow.tsx +160 -0
- package/client/src/dashboard/W_Table/CardView/CardView.tsx +87 -0
- package/client/src/dashboard/W_Table/CardView/CardViewColumn.tsx +82 -0
- package/client/src/dashboard/W_Table/CardView/CardViewKanban.tsx +87 -0
- package/client/src/dashboard/W_Table/CardView/DragHeader.tsx +46 -0
- package/client/src/dashboard/W_Table/CardView/constants.ts +1 -0
- package/client/src/dashboard/W_Table/CardView/useCardViewState.ts +50 -0
- package/client/src/dashboard/W_Table/CardView/useDragHeader.ts +280 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AddColumnMenu.tsx +193 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AddComputedColumn/AddComputedColMenu.tsx +650 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AddComputedColumn/FunctionColumnList.tsx +75 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AddComputedColumn/QuickAddComputedColumn.tsx +129 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AddComputedColumn/useAddComputedColumn.ts +175 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AlterColumn/AlterColumn.tsx +421 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AlterColumn/AlterColumnFileOptions.tsx +84 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AlterColumn/ColumnEditor.tsx +229 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AlterColumn/CreateColumn.tsx +150 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AlterColumn/ReferenceEditor.tsx +243 -0
- package/client/src/dashboard/W_Table/ColumnMenu/AlterColumn/alterColumnUtilts.ts +53 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColorPicker.tsx +251 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnDisplayFormat/ChipStylePalette.tsx +127 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnDisplayFormat/ColumnDisplayFormat.tsx +116 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnDisplayFormat/ConditionalCellIconStyleControls.tsx +140 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnDisplayFormat/ConditionalCellStyleControls.tsx +235 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnDisplayFormat/NestedColumnRender.tsx +172 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnDisplayFormat/columnFormatUtils.tsx +330 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnList.tsx +291 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnMenu.tsx +537 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnQuickStats/ColumnQuickStats.tsx +176 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnQuickStats/useColumnQuickStats.ts +169 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnSelect/ColumnSelect.tsx +54 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnSelect/getColumnListItem.tsx +97 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnSortMenu.tsx +146 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnStyleControls/ColumnStyleControls.tsx +258 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnStyleControls/getValueColors.ts +101 -0
- package/client/src/dashboard/W_Table/ColumnMenu/ColumnsMenu.tsx +178 -0
- package/client/src/dashboard/W_Table/ColumnMenu/FunctionSelector/FunctionExtraArguments.tsx +140 -0
- package/client/src/dashboard/W_Table/ColumnMenu/FunctionSelector/FunctionSelector.tsx +89 -0
- package/client/src/dashboard/W_Table/ColumnMenu/FunctionSelector/functions.ts +438 -0
- package/client/src/dashboard/W_Table/ColumnMenu/JoinPathSelectorV2.tsx +212 -0
- package/client/src/dashboard/W_Table/ColumnMenu/LinkedColumn/LinkedColumn.tsx +295 -0
- package/client/src/dashboard/W_Table/ColumnMenu/LinkedColumn/LinkedColumnFooter.tsx +94 -0
- package/client/src/dashboard/W_Table/ColumnMenu/LinkedColumn/LinkedColumnSelect.tsx +160 -0
- package/client/src/dashboard/W_Table/ColumnMenu/NestedTimechartControls.tsx +167 -0
- package/client/src/dashboard/W_Table/ColumnMenu/SummariseColumns.tsx +126 -0
- package/client/src/dashboard/W_Table/ColumnMenu/UpdateColumnGlobalConfig.tsx +69 -0
- package/client/src/dashboard/W_Table/ColumnMenu/getNestedColumnTable.ts +83 -0
- package/client/src/dashboard/W_Table/ColumnMenu/rgba2hex.ts +36 -0
- package/client/src/dashboard/W_Table/JoinPathSelector/JoinPathItem.tsx +133 -0
- package/client/src/dashboard/W_Table/JoinPathSelector/JoinPathSelector.tsx +100 -0
- package/client/src/dashboard/W_Table/JoinPathSelector/getJoinTree.ts +79 -0
- package/client/src/dashboard/W_Table/NodeCountChecker.tsx +58 -0
- package/client/src/dashboard/W_Table/ProstglesTable.css +64 -0
- package/client/src/dashboard/W_Table/QuickFilterGroupsControl.tsx +86 -0
- package/client/src/dashboard/W_Table/RowCard.tsx +102 -0
- package/client/src/dashboard/W_Table/TableMenu/AddChartMenu.tsx +288 -0
- package/client/src/dashboard/W_Table/TableMenu/AutoRefreshMenu.tsx +118 -0
- package/client/src/dashboard/W_Table/TableMenu/TableDisplayOptionsJSON.tsx +71 -0
- package/client/src/dashboard/W_Table/TableMenu/W_TableMenu.tsx +365 -0
- package/client/src/dashboard/W_Table/TableMenu/W_TableMenu_AccessRules.tsx +127 -0
- package/client/src/dashboard/W_Table/TableMenu/W_TableMenu_Constraints.tsx +140 -0
- package/client/src/dashboard/W_Table/TableMenu/W_TableMenu_CurrentQuery.tsx +82 -0
- package/client/src/dashboard/W_Table/TableMenu/W_TableMenu_DisplayOptions.tsx +266 -0
- package/client/src/dashboard/W_Table/TableMenu/W_TableMenu_Indexes.tsx +179 -0
- package/client/src/dashboard/W_Table/TableMenu/W_TableMenu_Policies.tsx +197 -0
- package/client/src/dashboard/W_Table/TableMenu/W_TableMenu_TableInfo.tsx +184 -0
- package/client/src/dashboard/W_Table/TableMenu/W_TableMenu_Triggers.tsx +199 -0
- package/client/src/dashboard/W_Table/TableMenu/getAndFixWColumnsConfig.tsx +116 -0
- package/client/src/dashboard/W_Table/TableMenu/getChartCols.ts +153 -0
- package/client/src/dashboard/W_Table/TableMenu/getTableMeta.ts +205 -0
- package/client/src/dashboard/W_Table/TooManyColumnsWarning.tsx +72 -0
- package/client/src/dashboard/W_Table/W_Table.tsx +772 -0
- package/client/src/dashboard/W_Table/W_Table_Content.tsx +51 -0
- package/client/src/dashboard/W_Table/colorBlend.ts +75 -0
- package/client/src/dashboard/W_Table/getTableData/getTableData.ts +291 -0
- package/client/src/dashboard/W_Table/getTableData/getTableFilter.ts +66 -0
- package/client/src/dashboard/W_Table/tableUtils/StyledTableColumn.tsx +322 -0
- package/client/src/dashboard/W_Table/tableUtils/getColWInfo.ts +48 -0
- package/client/src/dashboard/W_Table/tableUtils/getColWidth.ts +160 -0
- package/client/src/dashboard/W_Table/tableUtils/getEditColumn.tsx +143 -0
- package/client/src/dashboard/W_Table/tableUtils/getFullColumnConfig.ts +43 -0
- package/client/src/dashboard/W_Table/tableUtils/getJoinPaths.ts +89 -0
- package/client/src/dashboard/W_Table/tableUtils/getRowFilter.ts +114 -0
- package/client/src/dashboard/W_Table/tableUtils/getTableCols.tsx +258 -0
- package/client/src/dashboard/W_Table/tableUtils/getTableDataRequestSignature.ts +32 -0
- package/client/src/dashboard/W_Table/tableUtils/getTableSelect.ts +235 -0
- package/client/src/dashboard/W_Table/tableUtils/kFormatter.ts +12 -0
- package/client/src/dashboard/W_Table/tableUtils/onRenderColumn.tsx +107 -0
- package/client/src/dashboard/W_Table/tableUtils/prepareColsForRender.ts +69 -0
- package/client/src/dashboard/W_Table/tableUtils/tableUtils.ts +298 -0
- package/client/src/dashboard/W_TimeChart/AddTimeChartFilter.tsx +347 -0
- package/client/src/dashboard/W_TimeChart/W_TimeChart.tsx +405 -0
- package/client/src/dashboard/W_TimeChart/W_TimeChartHeaderControls.tsx +140 -0
- package/client/src/dashboard/W_TimeChart/W_TimeChartLayerLegend.tsx +99 -0
- package/client/src/dashboard/W_TimeChart/W_TimeChartMenu.tsx +228 -0
- package/client/src/dashboard/W_TimeChart/fetchData/constants.ts +5 -0
- package/client/src/dashboard/W_TimeChart/fetchData/fetchAndSetTimechartLayerData.ts +141 -0
- package/client/src/dashboard/W_TimeChart/fetchData/fetchTimechartLayer.ts +291 -0
- package/client/src/dashboard/W_TimeChart/fetchData/getTimeChartData.ts +163 -0
- package/client/src/dashboard/W_TimeChart/fetchData/getTimeChartLayers.ts +137 -0
- package/client/src/dashboard/W_TimeChart/fetchData/getTimeChartLayersWithBins.ts +296 -0
- package/client/src/dashboard/W_TimeChart/fetchData/getTimeChartSelectParams.ts +41 -0
- package/client/src/dashboard/W_TimeChart/fetchData/getTimeLayerDataSignature.ts +22 -0
- package/client/src/dashboard/W_TimeChart/fetchData/getTimechartExtentFilter.ts +48 -0
- package/client/src/dashboard/Window/ChildWindowLayout.tsx +149 -0
- package/client/src/dashboard/Window/Window.tsx +322 -0
- package/client/src/dashboard/WindowControls/AddChartLayer.tsx +142 -0
- package/client/src/dashboard/WindowControls/ColorByLegend/ColorByLegend.tsx +256 -0
- package/client/src/dashboard/WindowControls/ColorByLegend/getGroupByValueColor.ts +50 -0
- package/client/src/dashboard/WindowControls/DataLayerManager/DataLayer.tsx +182 -0
- package/client/src/dashboard/WindowControls/DataLayerManager/DataLayerDataSource.tsx +243 -0
- package/client/src/dashboard/WindowControls/DataLayerManager/DataLayerManager.tsx +157 -0
- package/client/src/dashboard/WindowControls/DataLayerManager/LayerColorPicker.tsx +56 -0
- package/client/src/dashboard/WindowControls/DataLayerManager/MapLayerStyling.tsx +192 -0
- package/client/src/dashboard/WindowControls/DataLayerManager/useSortedLayerQueries.ts +34 -0
- package/client/src/dashboard/WindowControls/OSMLayerOptions.tsx +62 -0
- package/client/src/dashboard/WindowControls/SQLChartLayerEditor.tsx +38 -0
- package/client/src/dashboard/WindowControls/TimeChartLayerOptions.tsx +336 -0
- package/client/src/dashboard/WorkspaceMenu/WorkspaceAddBtn.tsx +104 -0
- package/client/src/dashboard/WorkspaceMenu/WorkspaceDeleteBtn.tsx +87 -0
- package/client/src/dashboard/WorkspaceMenu/WorkspaceMenu.css +13 -0
- package/client/src/dashboard/WorkspaceMenu/WorkspaceMenu.tsx +124 -0
- package/client/src/dashboard/WorkspaceMenu/WorkspaceMenuDropDown.tsx +178 -0
- package/client/src/dashboard/WorkspaceMenu/WorkspaceSettings.tsx +99 -0
- package/client/src/dashboard/WorkspaceMenu/useWorkspaces.ts +78 -0
- package/client/src/dashboard/getCrossFilters.ts +251 -0
- package/client/src/dashboard/localSettings.ts +94 -0
- package/client/src/dashboard/setPan.ts +358 -0
- package/client/src/dashboard/shortestPath.ts +137 -0
- package/client/src/demo/AppVideoDemo.tsx +132 -0
- package/client/src/demo/MousePointer.tsx +39 -0
- package/client/src/demo/demoUtils.ts +214 -0
- package/client/src/demo/recordDemoUtils.ts +87 -0
- package/client/src/demo/scripts/AIAssistantDemo.ts +60 -0
- package/client/src/demo/scripts/accessControlDemo.ts +44 -0
- package/client/src/demo/scripts/backupDemo.ts +50 -0
- package/client/src/demo/scripts/dashboardDemo.ts +215 -0
- package/client/src/demo/scripts/fileDemo.ts +24 -0
- package/client/src/demo/scripts/schemaDiagramDemo.ts +13 -0
- package/client/src/demo/scripts/sqlVideoDemo.ts +539 -0
- package/client/src/demo/scripts/videoDemoAccessControlScripts.ts +245 -0
- package/client/src/exports.ts +15 -0
- package/client/src/hooks/createStore.ts +24 -0
- package/client/src/hooks/useDebouncedCallback.ts +27 -0
- package/client/src/hooks/useThrottledCallback.ts +41 -0
- package/client/src/hooks/useTypedSearchParams.ts +81 -0
- package/client/src/i18n/LanguageSelector.tsx +33 -0
- package/client/src/i18n/i18nUtils.ts +187 -0
- package/client/src/i18n/translations/de.json +453 -0
- package/client/src/i18n/translations/es.json +425 -0
- package/client/src/i18n/translations/fr.json +425 -0
- package/client/src/i18n/translations/hi.json +431 -0
- package/client/src/i18n/translations/ru.json +431 -0
- package/client/src/i18n/translations/translations.ts +477 -0
- package/client/src/i18n/translations/zh.json +423 -0
- package/client/src/index.css +57 -0
- package/client/src/index.html.ejs +37 -0
- package/client/src/index.tsx +17 -0
- package/client/src/pages/Account/Account.tsx +150 -0
- package/client/src/pages/Account/ChangePassword.tsx +96 -0
- package/client/src/pages/Account/Sessions.tsx +248 -0
- package/client/src/pages/Account/Setup2FA.tsx +244 -0
- package/client/src/pages/AccountMenu.tsx +146 -0
- package/client/src/pages/Alerts.tsx +182 -0
- package/client/src/pages/AppContextProvider.tsx +26 -0
- package/client/src/pages/ComponentList.tsx +108 -0
- package/client/src/pages/ElectronSetup/ElectronSetup.tsx +122 -0
- package/client/src/pages/ElectronSetup/ElectronSetupStateDB.tsx +141 -0
- package/client/src/pages/ElectronSetup/useElectronSetup.ts +147 -0
- package/client/src/pages/Login/AuthNotifPopup.tsx +37 -0
- package/client/src/pages/Login/Login.tsx +133 -0
- package/client/src/pages/Login/LoginTotpForm.tsx +72 -0
- package/client/src/pages/Login/LoginWithProviders.tsx +62 -0
- package/client/src/pages/Login/SocialIcons.css +4 -0
- package/client/src/pages/Login/SocialIcons.tsx +85 -0
- package/client/src/pages/NewConnection/NewConnectionForm.tsx +572 -0
- package/client/src/pages/NewConnection/NewConnectionFormFields.tsx +314 -0
- package/client/src/pages/NewConnection/NewConnectionFormOptions.tsx +194 -0
- package/client/src/pages/NewConnection/SchemaFilter.tsx +87 -0
- package/client/src/pages/NewConnection/newConnectionUtils.ts +50 -0
- package/client/src/pages/NonHTTPSWarning.tsx +51 -0
- package/client/src/pages/NotFound.tsx +22 -0
- package/client/src/pages/ProjectConnection/PrglContextProvider.tsx +47 -0
- package/client/src/pages/ProjectConnection/ProjectConnection.tsx +110 -0
- package/client/src/pages/ProjectConnection/ProjectConnectionError.tsx +76 -0
- package/client/src/pages/ProjectConnection/useProjectDb.ts +253 -0
- package/client/src/pages/ProjectLogs.tsx +227 -0
- package/client/src/pages/ServerSettings/AuthProvidersSetup/AuthProvidersSetup.tsx +199 -0
- package/client/src/pages/ServerSettings/AuthProvidersSetup/useProviderProps.ts +39 -0
- package/client/src/pages/ServerSettings/EmailAuthSetup.tsx +209 -0
- package/client/src/pages/ServerSettings/EmailAuthSetupIngredients/EmailSMTPAndTemplateSetup.tsx +158 -0
- package/client/src/pages/ServerSettings/EmailAuthSetupIngredients/EmailSMTPSetup.tsx +128 -0
- package/client/src/pages/ServerSettings/EmailAuthSetupIngredients/EmailTemplateSetup.tsx +111 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/CustomConfigComponents/McpServerOAuthConfig.tsx +41 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/CustomConfigComponents/McpServerOAuthConfigActions.tsx +187 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/CustomConfigComponents/McpServerOAuthConfigAuthorizeUrlBtn.tsx +55 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/CustomConfigComponents/McpServerOAuthConfigCredentials.tsx +81 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/CustomConfigComponents/McpServerOAuthConfigTopControls.tsx +120 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/CustomConfigComponents/WebMcpConfig.tsx +162 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/CustomConfigComponents/useMcpServerOAuthConfigState.ts +132 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/MCPServerConfigButton.tsx +121 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/MCPServerConfigEditor.tsx +206 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/MCPServerConfigProvider.tsx +67 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/useMCPServerConfigState.tsx +107 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerConfig/useMCPServerEnable.ts +131 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerFooterActions/MCPServerFooterActions.tsx +108 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerFooterActions/MCPServerLogs.tsx +46 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerFooterActions/MCPServersInstall.tsx +81 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerHeaderCheckbox.tsx +120 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerTools/MCPServerTools.tsx +95 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerTools/MCPServerToolsGroupToggle.tsx +96 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerTools/useMcpServerIcons.ts +87 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServerTools/useMcpToolsSelectOptions.tsx +33 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServers.tsx +140 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServersHeader.tsx +47 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServersToolbar/AddMCPServer.tsx +196 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServersToolbar/MCPServersToolbar.tsx +77 -0
- package/client/src/pages/ServerSettings/MCPServers/MCPServersToolbar/useAddMCPServer.ts +253 -0
- package/client/src/pages/ServerSettings/MCPServers/useMCPChatAllowedTools.ts +25 -0
- package/client/src/pages/ServerSettings/MCPServers/useMCPServersListProps.tsx +118 -0
- package/client/src/pages/ServerSettings/OAuthProviderSetup.tsx +258 -0
- package/client/src/pages/ServerSettings/SecuritySettings.tsx +154 -0
- package/client/src/pages/ServerSettings/ServerSettings.tsx +151 -0
- package/client/src/pages/ServerSettings/Services.tsx +231 -0
- package/client/src/pages/ServerSettings/useEditableData.ts +55 -0
- package/client/src/pages/TopControls.tsx +182 -0
- package/client/src/pages/projectUtils.ts +0 -0
- package/client/src/theme/ThemeSelector.tsx +36 -0
- package/client/src/theme/useAppTheme.ts +47 -0
- package/client/src/theme/useSystemTheme.ts +23 -0
- package/client/src/useAppState/PrglCoreContextProvider.tsx +76 -0
- package/client/src/useAppState/useAppState.ts +92 -0
- package/client/src/useAppState/useDBSClient.ts +104 -0
- package/client/src/useAppState/useServerState.ts +62 -0
- package/client/src/useAppState/useUserData.ts +1 -0
- package/client/src/utils/colorUtils.ts +48 -0
- package/client/src/utils/hashCode.ts +52 -0
- package/client/src/utils/utils.ts +207 -0
- package/client/static/favicon-32x32.png +0 -0
- package/client/static/logos/anthropic.svg +3 -0
- package/client/static/logos/google.svg +25 -0
- package/client/static/logos/ollama.svg +7 -0
- package/client/static/logos/openai.svg +2 -0
- package/client/static/logos/openrouter.svg +1 -0
- package/client/static/mcp-oauth-close.js +5 -0
- package/client/static/prostgles-logo.svg +39 -0
- package/client/static/util.css +2024 -0
- package/client/static/v2.svg +25 -0
- package/client/tsconfig.eslint.json +5 -0
- package/client/tsconfig.json +40 -0
- package/client/tslint.json +5 -0
- package/common/DBGeneratedSchema.ts +953 -0
- package/common/DashboardTypes.ts +533 -0
- package/common/KeyObjMap.ts +100 -0
- package/common/OAuthUtils.ts +285 -0
- package/common/authTypesAndConstants.ts +1 -0
- package/common/columnDisplayFormat.schema.ts +211 -0
- package/common/electronInitTypes.ts +56 -0
- package/common/filterUtils.ts +491 -0
- package/common/getJsonSchemaAsTs.ts +335 -0
- package/common/llmUtils.ts +133 -0
- package/common/managedTableSchema.ts +38 -0
- package/common/mcp/databaseAccessSchema.ts +70 -0
- package/common/mcp/db.mcp.schema.ts +280 -0
- package/common/mcp/documents.mcp.schema.ts +45 -0
- package/common/mcp/documentsServiceInputSchema.ts +129 -0
- package/common/mcp/runCodeInSandboxSchema.ts +85 -0
- package/common/mcp/startAgenticWorkflowSchema.ts +180 -0
- package/common/mcp/tableOptionsJsonbSchema.ts +151 -0
- package/common/mcp/tablePermissionsSchema.ts +101 -0
- package/common/mcp/ui.mcp.schema.ts +496 -0
- package/common/mcp/userInputSchema.ts +87 -0
- package/common/mcp/web.mcp.schema.ts +245 -0
- package/common/mcp/webdev.mcp.schema.ts +138 -0
- package/common/mcpUtils.ts +75 -0
- package/common/prostglesApiTypes.ts +551 -0
- package/common/prostglesMcp.ts +35 -0
- package/common/psql_queries.json +657 -0
- package/common/publishUtils.ts +600 -0
- package/common/tsconfig.json +22 -0
- package/common/utils.ts +525 -0
- package/docker-compose.yml +99 -0
- package/docs/01_Overview.md +25 -0
- package/docs/02_Installation_(Docker).md +37 -0
- package/docs/03_Installation_(Desktop_Version).md +27 -0
- package/docs/04_Navigation_bar.md +37 -0
- package/docs/05_Connections.md +108 -0
- package/docs/06_Connection_dashboard.md +58 -0
- package/docs/07_Import_file.md +15 -0
- package/docs/08_Agentic_workflows.md +27 -0
- package/docs/09_Schema_diagram.md +63 -0
- package/docs/10_SQL_editor.md +69 -0
- package/docs/11_Table_view.md +188 -0
- package/docs/12_Map_view.md +56 -0
- package/docs/13_Timechart_view.md +49 -0
- package/docs/14_AI_Assistant.md +64 -0
- package/docs/15_Connection_configuration.md +20 -0
- package/docs/16_Access_control.md +12 -0
- package/docs/17_File_storage.md +8 -0
- package/docs/18_Backup_and_Restore.md +22 -0
- package/docs/19_API.md +20 -0
- package/docs/20_Server_Settings.md +28 -0
- package/docs/21_Account.md +21 -0
- package/docs/22_Command_Palette.md +10 -0
- package/docs/screenshots/table_timechart.dark.svgif.svg +375 -0
- package/docs/screenshots/table_timechart.svgif.svg +1102 -0
- package/docs/screenshots/timechart.dark.svgif.svg +221 -0
- package/docs/screenshots/timechart.svgif.svg +846 -0
- package/e2e/icon512.png +0 -0
- package/e2e/package-lock.json +401 -0
- package/e2e/package.json +31 -0
- package/e2e/playwright.config.js +65 -0
- package/e2e/playwright.config.ts +32 -0
- package/e2e/test-local.sh +5 -0
- package/e2e/tests/Testing.ts +724 -0
- package/e2e/tests/command_palette.spec.ts +114 -0
- package/e2e/tests/configTest/.env.example +10 -0
- package/e2e/tests/configTest/constants.ts +13 -0
- package/e2e/tests/configTest/functions.ts +14 -0
- package/e2e/tests/configTest/index.ts +84 -0
- package/e2e/tests/configTest/package.json +17 -0
- package/e2e/tests/configTest/tsconfig.json +13 -0
- package/e2e/tests/config_deploy.spec.ts +386 -0
- package/e2e/tests/create_docs.spec.ts +231 -0
- package/e2e/tests/create_load_test_users.spec.ts +47 -0
- package/e2e/tests/demo_video.spec.ts +139 -0
- package/e2e/tests/demo_video_setup.spec.ts +118 -0
- package/e2e/tests/fileBrowserGoToPath.ts +53 -0
- package/e2e/tests/load_test.spec.ts +53 -0
- package/e2e/tests/main.spec.ts +3820 -0
- package/e2e/tests/mockSMTPServer.ts +81 -0
- package/e2e/tests/saveDocs.ts +55 -0
- package/e2e/tests/svgScreenshots/SVG_SCREENSHOT_DETAILS.ts +132 -0
- package/e2e/tests/svgScreenshots/account.svgif.ts +14 -0
- package/e2e/tests/svgScreenshots/aiAssistant.svgif.ts +235 -0
- package/e2e/tests/svgScreenshots/aiAssistantAgenticWorkflow.svgif.ts +339 -0
- package/e2e/tests/svgScreenshots/aiAssistantAgenticWorkflowGovApi.svgif.ts +116 -0
- package/e2e/tests/svgScreenshots/backupAndRestore.svgif.ts +143 -0
- package/e2e/tests/svgScreenshots/commandPalette.svgif.ts +69 -0
- package/e2e/tests/svgScreenshots/dashboard.svgif.ts +271 -0
- package/e2e/tests/svgScreenshots/electronSetup.svgif.ts +32 -0
- package/e2e/tests/svgScreenshots/fileImporter.svgif.ts +39 -0
- package/e2e/tests/svgScreenshots/getOverviewSvgifSpecs.svgif.ts +288 -0
- package/e2e/tests/svgScreenshots/map.svgif.ts +50 -0
- package/e2e/tests/svgScreenshots/navbar.svgif.ts +22 -0
- package/e2e/tests/svgScreenshots/newConnection.svgif.ts +26 -0
- package/e2e/tests/svgScreenshots/schemaDiagram.svgif.ts +82 -0
- package/e2e/tests/svgScreenshots/sqlEditor.svgif.ts +348 -0
- package/e2e/tests/svgScreenshots/table.svgif.ts +167 -0
- package/e2e/tests/svgScreenshots/tableTimechart.svgif.ts +507 -0
- package/e2e/tests/svgScreenshots/timechart.svgif.ts +138 -0
- package/e2e/tests/svgScreenshots/utils/constants.ts +23 -0
- package/e2e/tests/svgScreenshots/utils/dedent.ts +9 -0
- package/e2e/tests/svgScreenshots/utils/getFilesFromDir.ts +30 -0
- package/e2e/tests/svgScreenshots/utils/getSceneUtils.ts +200 -0
- package/e2e/tests/svgScreenshots/utils/removeOtherElements.ts +26 -0
- package/e2e/tests/svgScreenshots/utils/saveSVGScreenshot.ts +67 -0
- package/e2e/tests/svgScreenshots/utils/saveSVGifs.ts +74 -0
- package/e2e/tests/svgScreenshots/utils/saveSVGs.ts +61 -0
- package/e2e/tests/svgScreenshots/utils/startScreencast.ts +118 -0
- package/e2e/tests/svgScreenshots/utils/svgScreenshotsCompleteReferenced.ts +98 -0
- package/e2e/tests/svgScreenshots/utils/svgifToWebm.ts +196 -0
- package/e2e/tests/svgScreenshots/utils/typeSendAddScenes.ts +86 -0
- package/e2e/tests/testAskLLM/agenticWorkflowToolUses.ts +294 -0
- package/e2e/tests/testAskLLM/createComponentToolUse.ts +49 -0
- package/e2e/tests/testAskLLM/createReceipts.ts +183 -0
- package/e2e/tests/testAskLLM/getAskUserToolUse.ts +36 -0
- package/e2e/tests/testAskLLM/hello.mp3 +0 -0
- package/e2e/tests/testAskLLM/mcpSandboxToolUse.ts +64 -0
- package/e2e/tests/testAskLLM/mockRemoteMcp/Dockerfile +32 -0
- package/e2e/tests/testAskLLM/mockRemoteMcp/package-lock.json +2120 -0
- package/e2e/tests/testAskLLM/mockRemoteMcp/package.json +20 -0
- package/e2e/tests/testAskLLM/mockRemoteMcp/server.ts +144 -0
- package/e2e/tests/testAskLLM/mockRemoteMcp/start-mock-mcp.sh +93 -0
- package/e2e/tests/testAskLLM/sample.pdf +35 -0
- package/e2e/tests/testAskLLM/sampleToolUseData.ts +1413 -0
- package/e2e/tests/testAskLLM/scenarios/geoQuestion.scenario.ts +110 -0
- package/e2e/tests/testAskLLM/scenarios/hygieneRatingsApi.scenario.ts +62 -0
- package/e2e/tests/testAskLLM/scenarios/receiptImport/receiptImport.scenario.ts +53 -0
- package/e2e/tests/testAskLLM/speechToTextTest.ts +101 -0
- package/e2e/tests/testAskLLM/stringify.ts +1 -0
- package/e2e/tests/testAskLLM/testAskLLM.ts +558 -0
- package/e2e/tests/testAskLLM/utils.ts +34 -0
- package/e2e/tests/tsconfig.json +16 -0
- package/e2e/tests/utils/constants.ts +22 -0
- package/e2e/tests/utils/goTo.ts +87 -0
- package/e2e/tests/utils/isPortFree.ts +19 -0
- package/e2e/tests/utils/utils.ts +1319 -0
- package/e2e/tsconfig.json +5 -0
- package/electron/README.md +34 -0
- package/electron/build.sh +74 -0
- package/electron/e2e-electron/electron.spec.tsx +214 -0
- package/electron/e2e-electron/tsconfig.json +10 -0
- package/electron/forge.config.js +26 -0
- package/electron/getProtocolHandler.ts +41 -0
- package/electron/handleErrors.ts +25 -0
- package/electron/icon512.png +0 -0
- package/electron/image.ico +0 -0
- package/electron/images/generate_from_svg.sh +13 -0
- package/electron/images/icon.ico +0 -0
- package/electron/images/icon512.png +0 -0
- package/electron/images/icon512notpadded.png +0 -0
- package/electron/images/loading-effect.css +43 -0
- package/electron/images/prostgles-logo-rounded.svg +46 -0
- package/electron/images/prostgles-logo.svg +39 -0
- package/electron/images/rounded/256x256.png +0 -0
- package/electron/images/rounded/512.png +0 -0
- package/electron/images/rounded/512x512.png +0 -0
- package/electron/images/rounded/64x64.png +0 -0
- package/electron/images/rounded/icon512.png +0 -0
- package/electron/loadingHTML.ts +70 -0
- package/electron/main.ts +125 -0
- package/electron/mainWindow.ts +155 -0
- package/electron/package-lock.json +3916 -0
- package/electron/package.json +111 -0
- package/electron/playwright.config.ts +17 -0
- package/electron/screenCapture.bat +275 -0
- package/electron/scripts/patch-builder.mjs +25 -0
- package/electron/setContextMenu.ts +56 -0
- package/electron/start.sh +10 -0
- package/electron/test-linux-macos.sh +1 -0
- package/electron/test-linux.sh +2 -0
- package/electron/test-setup.js +8 -0
- package/electron/test-w-debug.sh +1 -0
- package/electron/test.sh +1 -0
- package/electron/tsconfig.json +22 -0
- package/electron/win-inno-setup.ts +100 -0
- package/electron/win.js +3 -0
- package/package.json +33 -0
- package/releases/v1.0.0.md +5 -0
- package/releases/v2.0.0.md +25 -0
- package/releases/v2.2.2.md +13 -0
- package/releases/v2.2.3.md +1 -0
- package/releases/v2.2.4.md +1 -0
- package/releases/v2.2.5.md +1 -0
- package/releases/v2.3.1.md +5 -0
- package/releases/v2.3.5.md +7 -0
- package/scripts/check_release_ready.sh +53 -0
- package/scripts/demo/record-local.sh +13 -0
- package/scripts/demo/split-video.sh +6 -0
- package/scripts/get_version.sh +11 -0
- package/scripts/npm_publish_dev.sh +6 -0
- package/scripts/release.sh +35 -0
- package/scripts/start-dev-electron.sh +14 -0
- package/scripts/start-dev.sh +18 -0
- package/scripts/start-prod.sh +5 -0
- package/scripts/test.sh +62 -0
- package/scripts/update_docker_image_versions.sh +28 -0
- package/server/.vscode/settings.json +3 -0
- package/server/eslint.config.mjs +83 -0
- package/server/licenses.json +3821 -0
- package/server/package-lock.json +7252 -0
- package/server/package.json +84 -0
- package/server/sample_schemas/_crypto.sql +95 -0
- package/server/sample_schemas/cleaning.sql +49 -0
- package/server/sample_schemas/cloud_computing.sql +63 -0
- package/server/sample_schemas/countries.sql +29 -0
- package/server/sample_schemas/crypto/index.ts +3 -0
- package/server/sample_schemas/crypto/onMount.ts +802 -0
- package/server/sample_schemas/crypto/package.json +7 -0
- package/server/sample_schemas/crypto/tableConfig.ts +80 -0
- package/server/sample_schemas/crypto/tsconfig.json +12 -0
- package/server/sample_schemas/crypto/workspaceConfig.ts +261 -0
- package/server/sample_schemas/financial.sql +49 -0
- package/server/sample_schemas/food_delivery/connection.ts +1007 -0
- package/server/sample_schemas/food_delivery/databaseConfig.ts +116 -0
- package/server/sample_schemas/food_delivery/index.ts +8 -0
- package/server/sample_schemas/food_delivery/onInit.sql +1507 -0
- package/server/sample_schemas/food_delivery/onMount.ts +149 -0
- package/server/sample_schemas/food_delivery/package.json +4 -0
- package/server/sample_schemas/food_delivery/tsconfig.json +16 -0
- package/server/sample_schemas/food_delivery/workspaceConfig.ts +53 -0
- package/server/sample_schemas/lodging.sql +48 -0
- package/server/sample_schemas/maps.sql +73 -0
- package/server/sample_schemas/property_management/index.ts +2 -0
- package/server/sample_schemas/property_management/onMount.ts +55 -0
- package/server/sample_schemas/property_management/package.json +4 -0
- package/server/sample_schemas/property_management/tsconfig.json +16 -0
- package/server/sample_schemas/property_management/workspaceConfig.ts +92 -0
- package/server/sample_schemas/sales.sql +51 -0
- package/server/sample_schemas/sample.sql +72 -0
- package/server/sample_schemas/testschema.ts +21 -0
- package/server/sample_schemas/weather/index.ts +1 -0
- package/server/sample_schemas/weather/onMount.ts +284 -0
- package/server/sample_schemas/weather/package.json +4 -0
- package/server/sample_schemas/weather/tsconfig.json +16 -0
- package/server/scripts/preparePackage.mjs +18 -0
- package/server/src/BackupManager/BackupManager.ts +297 -0
- package/server/src/BackupManager/checkAutomaticBackup.ts +143 -0
- package/server/src/BackupManager/getInstalledPrograms.ts +203 -0
- package/server/src/BackupManager/pgDump.ts +242 -0
- package/server/src/BackupManager/pgRestore.ts +238 -0
- package/server/src/BackupManager/pipeFromCommand.ts +94 -0
- package/server/src/BackupManager/pipeToCommand.ts +66 -0
- package/server/src/BackupManager/utils.ts +124 -0
- package/server/src/ConnectionManager/ConnectionManager.ts +613 -0
- package/server/src/ConnectionManager/applyStartupSchemaConfig.ts +95 -0
- package/server/src/ConnectionManager/connectionManagerUtils.ts +164 -0
- package/server/src/ConnectionManager/connectionOnReady.ts +76 -0
- package/server/src/ConnectionManager/dbsConnectionOptions.ts +109 -0
- package/server/src/ConnectionManager/getConnectionAuth.ts +37 -0
- package/server/src/ConnectionManager/getConnectionHttpServer.ts +112 -0
- package/server/src/ConnectionManager/getConnectionPublish.ts +119 -0
- package/server/src/ConnectionManager/getConnectionServerFunctions.ts +108 -0
- package/server/src/ConnectionManager/getConnectionSocketPath.ts +12 -0
- package/server/src/ConnectionManager/getHotReloadConfigs.ts +161 -0
- package/server/src/ConnectionManager/getInitiatedPostgresqlPIDs.ts +84 -0
- package/server/src/ConnectionManager/getSchemaConfig.ts +84 -0
- package/server/src/ConnectionManager/initConnectionManager.ts +147 -0
- package/server/src/ConnectionManager/modifyClientSchema.ts +146 -0
- package/server/src/ConnectionManager/parseTableConfig.ts +231 -0
- package/server/src/ConnectionManager/saveCertificates.ts +68 -0
- package/server/src/ConnectionManager/startConnection.ts +353 -0
- package/server/src/ConnectionManager/startConnectionOnRequestHandler.ts +63 -0
- package/server/src/ConnectionManager/syncSchemaConfig.ts +98 -0
- package/server/src/Logger.ts +150 -0
- package/server/src/McpHub/AnthropicMcpHub/McpHub.ts +144 -0
- package/server/src/McpHub/AnthropicMcpHub/McpOAuth/authenticateMcpServer.ts +98 -0
- package/server/src/McpHub/AnthropicMcpHub/McpOAuth/connectToRemoteMCPServer.ts +176 -0
- package/server/src/McpHub/AnthropicMcpHub/McpOAuth/createMcpOAuthProvider.ts +257 -0
- package/server/src/McpHub/AnthropicMcpHub/McpOAuth/getMcpOAuthMetadata.ts +112 -0
- package/server/src/McpHub/AnthropicMcpHub/McpOAuth/getRemoteMcpServerParameters.ts +82 -0
- package/server/src/McpHub/AnthropicMcpHub/McpOAuth/saveServerInfo.ts +76 -0
- package/server/src/McpHub/AnthropicMcpHub/McpOAuth/updateRemoteMcpAuthorizationCode.ts +100 -0
- package/server/src/McpHub/AnthropicMcpHub/McpTypes.ts +189 -0
- package/server/src/McpHub/AnthropicMcpHub/connectToMCPServer.ts +132 -0
- package/server/src/McpHub/AnthropicMcpHub/createMcpServerHandlers.ts +116 -0
- package/server/src/McpHub/AnthropicMcpHub/installMCPServer.ts +195 -0
- package/server/src/McpHub/AnthropicMcpHub/runShellCommand.ts +53 -0
- package/server/src/McpHub/AnthropicMcpHub/startMcpHub.ts +111 -0
- package/server/src/McpHub/DefaultMCPServers/DefaultMCPServers.ts +153 -0
- package/server/src/McpHub/DefaultMCPServers/mcpGithub.ts +968 -0
- package/server/src/McpHub/DockerSandbox/createBridgeInternalDockerNetwork.ts +35 -0
- package/server/src/McpHub/DockerSandbox/createContainer.spec.ts +195 -0
- package/server/src/McpHub/DockerSandbox/createContainer.ts +125 -0
- package/server/src/McpHub/DockerSandbox/dockerMCPServerProxy/dockerContainerAuthRegistry.ts +150 -0
- package/server/src/McpHub/DockerSandbox/dockerMCPServerProxy/dockerMCPServerProxy.ts +395 -0
- package/server/src/McpHub/DockerSandbox/dockerMCPServerProxy/getDockerGatewayIP.ts +27 -0
- package/server/src/McpHub/DockerSandbox/executeDockerCommand.ts +152 -0
- package/server/src/McpHub/DockerSandbox/getContainerLogs.ts +17 -0
- package/server/src/McpHub/DockerSandbox/getDockerRunArgs.ts +114 -0
- package/server/src/McpHub/DockerSandbox/runContainerWithProxyAccess.ts +99 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServerTypes.ts +143 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Db.mcp.ts +281 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Documents.mcp.ts +89 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/createAgenticWorkflow.ts +247 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/definitionValidation/assertTablesExistInFutureSchema.ts +14 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/definitionValidation/getValidatedMcpServerToolsAllowed.ts +155 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/definitionValidation/parseDDLStatements.ts +84 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/definitionValidation/quoteIdent.ts +139 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/definitionValidation/validateAgenticWorkflowDefinitions.ts +102 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/definitionValidation/validateDatabaseAccessDefinitions.ts +212 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/definitionValidation/validateUserInput.ts +159 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/definitionValidation/validateUserInputDefinitions.ts +36 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/execution/getVolumesFromUserInput.ts +134 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/execution/startAgenticWorkflowContainer.ts +341 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/proxyHandlers/createWorkflowExecutionHandlers.ts +155 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/proxyHandlers/getAgentConfigWithDefaults.ts +96 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/proxyHandlers/setupOrchestrationToolPermissions.ts +64 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/addInstrumentationToTsLogic.ts +350 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/callWorkflowProxy.ts +99 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/defineAgenticWorkflow.spec.ts +110 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/defineAgenticWorkflow.ts +576 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/defineAgenticWorkflowHandlers.ts +127 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/defineAgenticWorkflowHandlers.types.ts +72 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/definitionHandler.ts +104 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/ensureWorkflowIsExecuted.ts +53 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/getTsLogicSummary.ts +639 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/orchestrationToolHandlers.ts +55 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSdk/tableHandlers.ts +108 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSetup/getAgenticWorkflowDockerCoreFiles.spec.ts +26 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSetup/getAgenticWorkflowDockerCoreFiles.ts +225 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSetup/getDefineAgenticWorkflowTsWithDbAndMcpTypes.ts +187 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSetup/getOrchestrationContainerFiles.ts +31 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/runtimeSetup/getToolTypescriptSchemas.ts +84 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/startAgenticWorkflow.ts +181 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/fetchTools.ts +48 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/runCodeInSandboxContainer.ts +133 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/schemas/getAgenticToolSchemas.ts +55 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/schemas/getContainerToolProxyAccessInstructions.ts +22 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/schemas/getContainerToolSchemas.ts +46 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/schemas/prostglesUiToolSchemas.ts +23 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/schemas/suggestDashboardsToolSchema.ts +26 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/startAgent.ts +166 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/validateCreateDashboards.ts +249 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Ui.mcp.ts +343 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Web/Web.mcp.ts +265 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Web/checkConfigAccess.spec.ts +112 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Web/checkConfigAccess.ts +263 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Web/getDocumentText.ts +34 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/WebDev.mcp.ts +114 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/createComponent.ts +94 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/createComponentQuickFeedbackPreview.ts +53 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/getWebDevChatAndConnection.ts +12 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/searchWebDevFiles.spec.ts +82 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/searchWebDevFiles.ts +118 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/utils.ts +30 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/getClientDBHandlersForChat.ts +46 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/getExistingTablesSchema.ts +230 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers.ts +30 -0
- package/server/src/McpHub/ProstglesMcpHub/ProstglesMcpHub.ts +244 -0
- package/server/src/McpHub/callMCPServerTool.ts +148 -0
- package/server/src/McpHub/getMcpServerParameters.ts +204 -0
- package/server/src/McpHub/insertMcpServerList.ts +49 -0
- package/server/src/McpHub/reloadMcpServerTools.ts +123 -0
- package/server/src/McpHub/testMCPServerConfig.ts +29 -0
- package/server/src/McpHub/utils.ts +1 -0
- package/server/src/ServiceManager/ServiceManager.spec.ts +27 -0
- package/server/src/ServiceManager/ServiceManager.ts +162 -0
- package/server/src/ServiceManager/ServiceManagerTypes.ts +136 -0
- package/server/src/ServiceManager/buildService.ts +138 -0
- package/server/src/ServiceManager/dockerInspect.ts +33 -0
- package/server/src/ServiceManager/enableService.ts +41 -0
- package/server/src/ServiceManager/getDockerBuildHash.ts +57 -0
- package/server/src/ServiceManager/getSelectedConfigEnvs.ts +47 -0
- package/server/src/ServiceManager/getServiceEndpoints.ts +122 -0
- package/server/src/ServiceManager/initialiseServices.ts +56 -0
- package/server/src/ServiceManager/resolveBinary.ts +41 -0
- package/server/src/ServiceManager/services/documents/documents.service.ts +178 -0
- package/server/src/ServiceManager/services/documents/documents.service.types.ts +43 -0
- package/server/src/ServiceManager/services/documents/src/Dockerfile +29 -0
- package/server/src/ServiceManager/services/documents/src/layout_postprocessor.py +707 -0
- package/server/src/ServiceManager/services/documents/src/requirements.txt +3 -0
- package/server/src/ServiceManager/services/frontendDev/frontendDev.service.ts +19 -0
- package/server/src/ServiceManager/services/frontendDev/src/.prettierrc +3 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/.env.development +1 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/Dockerfile +5 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/README.md +6 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/eslint.config.js +27 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/index.html +13 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/package.json +32 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/public/vite.svg +1 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/src/App.css +42 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/src/App.tsx +19 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/src/api/DBGeneratedSchema.d.ts +33 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/src/api/ProstglesProvider.tsx +61 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/src/assets/react.svg +1 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/src/components/SampleComponent/SampleComponent.tsx +11 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/src/index.css +68 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/src/main.tsx +23 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/src/pages/ComponentPreview.tsx +31 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/src/pages/Home.tsx +36 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/tsconfig.app.json +28 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/tsconfig.json +7 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/tsconfig.node.json +26 -0
- package/server/src/ServiceManager/services/frontendDev/src/client/vite.config.ts +17 -0
- package/server/src/ServiceManager/services/frontendDev/src/e2e/package.json +24 -0
- package/server/src/ServiceManager/services/frontendDev/src/e2e/playwright.config.ts +36 -0
- package/server/src/ServiceManager/services/frontendDev/src/e2e/tests/coverage.ts +67 -0
- package/server/src/ServiceManager/services/frontendDev/src/e2e/tests/main.spec.ts +21 -0
- package/server/src/ServiceManager/services/frontendDev/src/e2e/tests/tsconfig.json +13 -0
- package/server/src/ServiceManager/services/frontendDev/src/e2e/tsconfig.json +13 -0
- package/server/src/ServiceManager/services/frontendDev/src/package.json +15 -0
- package/server/src/ServiceManager/services/frontendDev/src/tsconfig.base.json +32 -0
- package/server/src/ServiceManager/services/speechToText/TRANSCRIBE_OUTPUT_SCHEMA.ts +53 -0
- package/server/src/ServiceManager/services/speechToText/speechToText.service.ts +125 -0
- package/server/src/ServiceManager/services/speechToText/src/Dockerfile +31 -0
- package/server/src/ServiceManager/services/speechToText/src/app.py +115 -0
- package/server/src/ServiceManager/services/speechToText/src/requirements.txt +3 -0
- package/server/src/ServiceManager/services/webSearchSearxng/src/Dockerfile +12 -0
- package/server/src/ServiceManager/services/webSearchSearxng/src/limiter.toml +0 -0
- package/server/src/ServiceManager/services/webSearchSearxng/src/settings.yml +11 -0
- package/server/src/ServiceManager/services/webSearchSearxng/webSearchSearxng.service.ts +36 -0
- package/server/src/ServiceManager/startService.ts +196 -0
- package/server/src/ServiceManager/stopService.ts +23 -0
- package/server/src/ServiceManager/withRetries.ts +19 -0
- package/server/src/authConfig/OAuthProviders/getOAuthLoginProviders.ts +67 -0
- package/server/src/authConfig/OAuthProviders/loginWithProvider.ts +94 -0
- package/server/src/authConfig/authUtils.ts +19 -0
- package/server/src/authConfig/createPasswordlessAdminSessionIfNeeded.ts +86 -0
- package/server/src/authConfig/createPublicUserSessionIfAllowed.ts +48 -0
- package/server/src/authConfig/emailProvider/getEmailAuthProvider.ts +44 -0
- package/server/src/authConfig/emailProvider/getEmailSenderWithMockTest.ts +96 -0
- package/server/src/authConfig/emailProvider/onEmailRegistration.ts +116 -0
- package/server/src/authConfig/getActiveSession.ts +76 -0
- package/server/src/authConfig/getAuth.ts +171 -0
- package/server/src/authConfig/getLogin.ts +206 -0
- package/server/src/authConfig/getUser.ts +108 -0
- package/server/src/authConfig/onMagicLinkOrOTP.ts +171 -0
- package/server/src/authConfig/onUseOrSocketConnected.ts +43 -0
- package/server/src/authConfig/sessionUtils.ts +120 -0
- package/server/src/authConfig/startRateLimitedLoginAttempt.ts +201 -0
- package/server/src/authConfig/subscribeToAuthSetupChanges.ts +144 -0
- package/server/src/authConfig/upsertSession.ts +48 -0
- package/server/src/cli/cli.ts +217 -0
- package/server/src/cli/cliUtils.ts +50 -0
- package/server/src/cloudClients/cloudClients.ts +116 -0
- package/server/src/connectionUtils/getConnectionDetails.ts +76 -0
- package/server/src/connectionUtils/testDBConnection.ts +167 -0
- package/server/src/connectionUtils/validateConnection.ts +114 -0
- package/server/src/createHttpAndIOServers/createHttpServer.ts +147 -0
- package/server/src/createHttpAndIOServers/createIOWebsocketServer.ts +31 -0
- package/server/src/createHttpAndIOServers/getCorsOptions.ts +58 -0
- package/server/src/createHttpAndIOServers/setHttpAppSecurity.ts +124 -0
- package/server/src/electronConfig.ts +223 -0
- package/server/src/envVars.ts +45 -0
- package/server/src/getPSQLQueries.ts +123 -0
- package/server/src/index.ts +273 -0
- package/server/src/init/CSP_DEFAULTS.ts +41 -0
- package/server/src/init/addDevImageProxyRoute.ts +74 -0
- package/server/src/init/cleanupTestDatabases.ts +51 -0
- package/server/src/init/initExpressAndIOServers.ts +127 -0
- package/server/src/init/initUsers.ts +113 -0
- package/server/src/init/insertStateDatabase.ts +72 -0
- package/server/src/init/isRetryableError.ts +50 -0
- package/server/src/init/logOutgoingHttpRequests.ts +15 -0
- package/server/src/init/prostglesOnReady.ts +147 -0
- package/server/src/init/saveTypescriptFilesForProduction.ts +113 -0
- package/server/src/init/setDBSRoutesForElectron.ts +206 -0
- package/server/src/init/startDevHotReloadNotifier.ts +39 -0
- package/server/src/init/startProstgles.ts +220 -0
- package/server/src/init/tryStartProstgles.ts +177 -0
- package/server/src/init/utils.ts +44 -0
- package/server/src/init.sql +1 -0
- package/server/src/methods/getPidStats.ts +336 -0
- package/server/src/methods/getPidStatsFromProc.ts +125 -0
- package/server/src/methods/statusMonitorUtils.ts +148 -0
- package/server/src/publish/getPublishLLM.ts +246 -0
- package/server/src/publish/getPublishLlmChats.ts +73 -0
- package/server/src/publish/publish.ts +398 -0
- package/server/src/schemaConfig.ts +97 -0
- package/server/src/serverFunctions/adminServerFunctions/getAdminServerFunctions.ts +477 -0
- package/server/src/serverFunctions/adminServerFunctions/getAgenticWorkflowFunctions.ts +186 -0
- package/server/src/serverFunctions/adminServerFunctions/getBackupServerFunctions.ts +178 -0
- package/server/src/serverFunctions/adminServerFunctions/getDefineAdminFunction.ts +11 -0
- package/server/src/serverFunctions/adminServerFunctions/getMcpServerFunctions.ts +283 -0
- package/server/src/serverFunctions/adminServerFunctions/getWebAppServerFunctions.ts +228 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/buildWebApp.ts +38 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/getReactComponents copy.ts +188 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/getReactComponents.ts +287 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/getReactRenderTree.ts +180 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/getTemplatedWebAppConnection.ts +23 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/getValidatedWebAppPath.spec.ts +77 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/getValidatedWebAppPath.ts +22 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/readWebAppFiles.ts +45 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/runDockerForWebApp.ts +56 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/testWebApp.ts +30 -0
- package/server/src/serverFunctions/adminServerFunctions/webApp/writeWebAppFiles.ts +91 -0
- package/server/src/serverFunctions/applySampleSchema.ts +96 -0
- package/server/src/serverFunctions/askLLM/LLMResponseTypes.ts +315 -0
- package/server/src/serverFunctions/askLLM/agentConstants.ts +42 -0
- package/server/src/serverFunctions/askLLM/askLLM.ts +540 -0
- package/server/src/serverFunctions/askLLM/checkLLMLimit.ts +59 -0
- package/server/src/serverFunctions/askLLM/checkMaxCostLimitForChat.ts +51 -0
- package/server/src/serverFunctions/askLLM/defaultPrompts/base.prompt.ts +26 -0
- package/server/src/serverFunctions/askLLM/defaultPrompts/createAgenticWorkflow.prompt.ts +53 -0
- package/server/src/serverFunctions/askLLM/defaultPrompts/createDashboards.prompt.ts +15 -0
- package/server/src/serverFunctions/askLLM/fetchLLMResponse.ts +105 -0
- package/server/src/serverFunctions/askLLM/getCompactedMessages.ts +101 -0
- package/server/src/serverFunctions/askLLM/getFullPrompt.ts +86 -0
- package/server/src/serverFunctions/askLLM/getLLMRequestBody.ts +368 -0
- package/server/src/serverFunctions/askLLM/getLLMToolsAllowedInThisChat.ts +179 -0
- package/server/src/serverFunctions/askLLM/getLLMUsageCost.ts +91 -0
- package/server/src/serverFunctions/askLLM/getPastMessages.ts +9 -0
- package/server/src/serverFunctions/askLLM/getUserMessageCost.ts +21 -0
- package/server/src/serverFunctions/askLLM/getValidatedAskLLMChatOptions.ts +59 -0
- package/server/src/serverFunctions/askLLM/handleToolUseResultConfirmation.ts +87 -0
- package/server/src/serverFunctions/askLLM/parseLLMResponseObject.ts +206 -0
- package/server/src/serverFunctions/askLLM/prostglesLLMTools/getDbConnectionWithPermissions.ts +94 -0
- package/server/src/serverFunctions/askLLM/prostglesLLMTools/getMCPServerTools.ts +28 -0
- package/server/src/serverFunctions/askLLM/prostglesLLMTools/getMcpToolsWithDynamicDescription.ts +77 -0
- package/server/src/serverFunctions/askLLM/prostglesLLMTools/getTemplateUserConnection.ts +182 -0
- package/server/src/serverFunctions/askLLM/readFetchStream.ts +69 -0
- package/server/src/serverFunctions/askLLM/refreshModels.ts +223 -0
- package/server/src/serverFunctions/askLLM/runApprovedTools/getMostSimilar.ts +55 -0
- package/server/src/serverFunctions/askLLM/runApprovedTools/runAgentGoalTool.ts +116 -0
- package/server/src/serverFunctions/askLLM/runApprovedTools/runApprovedTools.ts +348 -0
- package/server/src/serverFunctions/askLLM/runApprovedTools/validateLastMessageToolUseRequests.ts +33 -0
- package/server/src/serverFunctions/askLLM/setupLLM.ts +176 -0
- package/server/src/serverFunctions/askLLM/setupLLMProviders.ts +186 -0
- package/server/src/serverFunctions/deleteConnection.ts +111 -0
- package/server/src/serverFunctions/getConnectionAndDatabaseConfig.ts +27 -0
- package/server/src/serverFunctions/getNodeTypes.spec.ts +80 -0
- package/server/src/serverFunctions/getNodeTypes.ts +306 -0
- package/server/src/serverFunctions/getServerFunctions.ts +163 -0
- package/server/src/serverFunctions/getServerFunctionsContext.ts +29 -0
- package/server/src/serverFunctions/prostglesSignup.ts +28 -0
- package/server/src/serverFunctions/setFileStorage.ts +107 -0
- package/server/src/serverFunctions/userServerFunctions/approveToolUse.ts +146 -0
- package/server/src/serverFunctions/userServerFunctions/getLLMAccessParams.ts +21 -0
- package/server/src/serverFunctions/userServerFunctions/getUserServerFunctions.ts +260 -0
- package/server/src/tableConfig/tableConfig.ts +374 -0
- package/server/src/tableConfig/tableConfigAccessControl.ts +212 -0
- package/server/src/tableConfig/tableConfigAgenticWorkflow.ts +174 -0
- package/server/src/tableConfig/tableConfigBackups.ts +160 -0
- package/server/src/tableConfig/tableConfigConnections.ts +182 -0
- package/server/src/tableConfig/tableConfigDatabaseConfig.ts +714 -0
- package/server/src/tableConfig/tableConfigGlobalSettings.ts +40 -0
- package/server/src/tableConfig/tableConfigLinks.ts +273 -0
- package/server/src/tableConfig/tableConfigLlm/tableConfigLlm.ts +347 -0
- package/server/src/tableConfig/tableConfigLlm/tableConfigLlmChats.ts +361 -0
- package/server/src/tableConfig/tableConfigLlm/tableConfigLlmExtraRequestData.ts +50 -0
- package/server/src/tableConfig/tableConfigMCPServers.ts +676 -0
- package/server/src/tableConfig/tableConfigMigrations.ts +26 -0
- package/server/src/tableConfig/tableConfigPublishedMethods.ts +120 -0
- package/server/src/tableConfig/tableConfigServices.ts +61 -0
- package/server/src/tableConfig/tableConfigUsers.ts +227 -0
- package/server/src/tableConfig/tableConfigWebApp.ts +17 -0
- package/server/src/tableConfig/tableConfigWindows.ts +164 -0
- package/server/src/tableConfig/tableConfigWorkspaces.ts +100 -0
- package/server/src/tableConfig/tablePermissionsSchema.ts +66 -0
- package/server/src/testElectron.ts +33 -0
- package/server/src/upsertConnection.ts +73 -0
- package/server/src/utils/assertIconExists.ts +24 -0
- package/server/src/utils/isPortFree.ts +40 -0
- package/server/src/utils/tout.ts +7 -0
- package/server/test-runner.mjs +28 -0
- package/server/tsconfig.json +45 -0
- package/server/tslint.json +8 -0
|
@@ -0,0 +1,1319 @@
|
|
|
1
|
+
import { Locator, Page as PG, expect } from "@playwright/test";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import { Command, getCommandElemSelector, getDataKey } from "../Testing";
|
|
4
|
+
import { goTo } from "./goTo";
|
|
5
|
+
import { IS_GITHUB_WORKER, TEST_DB_NAME, USERS } from "./constants";
|
|
6
|
+
|
|
7
|
+
type FuncNamesReturningLocatorObj = {
|
|
8
|
+
[prop in keyof PG as PG[prop] extends (...args: any) => any ?
|
|
9
|
+
prop extends "expect" ? never
|
|
10
|
+
: prop extends "getByTestId" ? never
|
|
11
|
+
: prop extends "evaluateHandle" ? never
|
|
12
|
+
: prop extends "waitForFunction" ? never
|
|
13
|
+
: ReturnType<PG[prop]> extends Promise<any> ? never
|
|
14
|
+
: ReturnType<PG[prop]> extends Locator ? prop
|
|
15
|
+
: never
|
|
16
|
+
: never]: 1;
|
|
17
|
+
};
|
|
18
|
+
type FuncNames = keyof FuncNamesReturningLocatorObj;
|
|
19
|
+
type LocatorFuncNamesReturningLocatorObj = {
|
|
20
|
+
[prop in keyof Locator as Locator[prop] extends (...args: any) => any ?
|
|
21
|
+
prop extends "expect" ? never
|
|
22
|
+
: prop extends "getByTestId" ? never
|
|
23
|
+
: prop extends "evaluateHandle" ? never
|
|
24
|
+
: prop extends "waitForFunction" ? never
|
|
25
|
+
: ReturnType<Locator[prop]> extends Promise<any> ? never
|
|
26
|
+
: ReturnType<Locator[prop]> extends Locator ? prop
|
|
27
|
+
: // ReturnType<Locator[prop]> extends Promise<Locator>? prop :
|
|
28
|
+
never
|
|
29
|
+
: never]: 1;
|
|
30
|
+
};
|
|
31
|
+
type LocatorFuncNames = keyof LocatorFuncNamesReturningLocatorObj;
|
|
32
|
+
export type PageWIds = Omit<PG, FuncNames | "getByTestId"> & {
|
|
33
|
+
getByTestId: (command: Command) => LocatorWIds;
|
|
34
|
+
} & {
|
|
35
|
+
[funcName in FuncNames]: (
|
|
36
|
+
...args: Parameters<PG[funcName]>
|
|
37
|
+
) => Omit<ReturnType<PG[funcName]>, "getByTestId"> &
|
|
38
|
+
Pick<PageWIds, "getByTestId">;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
type LocatorOverridenFuncNames = "getByTestId" | "all" | "last";
|
|
42
|
+
export type LocatorWIds = Omit<
|
|
43
|
+
Locator,
|
|
44
|
+
LocatorFuncNames | LocatorOverridenFuncNames
|
|
45
|
+
> & {
|
|
46
|
+
getByTestId: (command: Command) => LocatorWIds;
|
|
47
|
+
all: () => Promise<LocatorWIds[]>;
|
|
48
|
+
first: () => LocatorWIds;
|
|
49
|
+
last: () => LocatorWIds;
|
|
50
|
+
} & {
|
|
51
|
+
[funcName in LocatorFuncNames]: (
|
|
52
|
+
...args: Parameters<Locator[funcName]>
|
|
53
|
+
) => Omit<ReturnType<Locator[funcName]>, LocatorOverridenFuncNames> &
|
|
54
|
+
Pick<LocatorWIds, LocatorOverridenFuncNames>;
|
|
55
|
+
};
|
|
56
|
+
export const getMonacoEditorBySelector = async (
|
|
57
|
+
page: PageWIds,
|
|
58
|
+
parentSelector: string,
|
|
59
|
+
) => {
|
|
60
|
+
const monacoEditor = await page
|
|
61
|
+
.locator(`${parentSelector} .monaco-editor`)
|
|
62
|
+
.first();
|
|
63
|
+
return monacoEditor;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const getMonacoValue = async (
|
|
67
|
+
page: PageWIds,
|
|
68
|
+
parentSelector: string,
|
|
69
|
+
) => {
|
|
70
|
+
await page.keyboard.press("Control+A");
|
|
71
|
+
await page.waitForTimeout(1500);
|
|
72
|
+
const monacoNode = await getMonacoEditorBySelector(page, parentSelector);
|
|
73
|
+
const text = await monacoNode.evaluate((node) => {
|
|
74
|
+
//@ts-ignore
|
|
75
|
+
return node.parentElement!._getValue() as string;
|
|
76
|
+
});
|
|
77
|
+
// const text = await page.evaluate(
|
|
78
|
+
// () => window.getSelection()?.toString() ?? "",
|
|
79
|
+
// );
|
|
80
|
+
const normalizedText = text?.replace(/\u00A0/g, " "); // Replace char 160 with char 32
|
|
81
|
+
return normalizedText;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
type KeyPress = "Control" | "Shift";
|
|
85
|
+
type InputKey =
|
|
86
|
+
| KeyPress
|
|
87
|
+
| "Enter"
|
|
88
|
+
| "Escape"
|
|
89
|
+
| "Tab"
|
|
90
|
+
| "Backspace"
|
|
91
|
+
| "Delete"
|
|
92
|
+
| "Space";
|
|
93
|
+
type ArrowKey = "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight";
|
|
94
|
+
type ArrowKeyCombinations = `${KeyPress}+${ArrowKey | InputKey}`;
|
|
95
|
+
export type KeyPressOrCombination = InputKey | ArrowKeyCombinations | ArrowKey;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Will overwrite all previous content
|
|
99
|
+
*/
|
|
100
|
+
export const monacoType = async (
|
|
101
|
+
page: PageWIds,
|
|
102
|
+
parentSelector: string,
|
|
103
|
+
text: string,
|
|
104
|
+
{
|
|
105
|
+
deleteAll,
|
|
106
|
+
deleteAllAndFill,
|
|
107
|
+
pressBeforeTyping,
|
|
108
|
+
pressAfterTyping,
|
|
109
|
+
keyPressDelay = 100,
|
|
110
|
+
}: {
|
|
111
|
+
deleteAll?: boolean;
|
|
112
|
+
deleteAllAndFill?: boolean;
|
|
113
|
+
pressBeforeTyping?: KeyPressOrCombination[];
|
|
114
|
+
pressAfterTyping?: KeyPressOrCombination[];
|
|
115
|
+
keyPressDelay?: number;
|
|
116
|
+
} = { deleteAll: true },
|
|
117
|
+
) => {
|
|
118
|
+
const monacoEditor = await getMonacoEditorBySelector(page, parentSelector);
|
|
119
|
+
await monacoEditor.click();
|
|
120
|
+
await page.waitForTimeout(500);
|
|
121
|
+
|
|
122
|
+
if (deleteAll || deleteAllAndFill) {
|
|
123
|
+
await page.keyboard.press("Control+A");
|
|
124
|
+
await page.waitForTimeout(500);
|
|
125
|
+
await page.keyboard.press("Delete");
|
|
126
|
+
}
|
|
127
|
+
await page.waitForTimeout(500);
|
|
128
|
+
await monacoEditor.click();
|
|
129
|
+
await monacoEditor.blur();
|
|
130
|
+
await page.waitForTimeout(500);
|
|
131
|
+
await monacoEditor.click();
|
|
132
|
+
await page.waitForTimeout(500);
|
|
133
|
+
|
|
134
|
+
for (const key of pressBeforeTyping ?? []) {
|
|
135
|
+
await page.keyboard.press(key);
|
|
136
|
+
await page.waitForTimeout(50);
|
|
137
|
+
}
|
|
138
|
+
if (!keyPressDelay) {
|
|
139
|
+
await monacoEditor.evaluate((node, text) => {
|
|
140
|
+
//@ts-ignore
|
|
141
|
+
console.log(node.parentElement!.editorRef);
|
|
142
|
+
//@ts-ignore
|
|
143
|
+
node.parentElement.editorRef.setValue(text);
|
|
144
|
+
}, text);
|
|
145
|
+
// await monacoEditor.fill(text, { force: true });
|
|
146
|
+
} else if (deleteAllAndFill) {
|
|
147
|
+
await page.keyboard.insertText(text);
|
|
148
|
+
} else {
|
|
149
|
+
await page.keyboard.type(text, { delay: keyPressDelay });
|
|
150
|
+
}
|
|
151
|
+
for (const key of pressAfterTyping ?? []) {
|
|
152
|
+
await page.keyboard.press(key);
|
|
153
|
+
await page.waitForTimeout(50);
|
|
154
|
+
}
|
|
155
|
+
await page.waitForTimeout(500);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export const runSql = async (page: PageWIds, query: string) => {
|
|
159
|
+
await monacoType(page, `.ProstglesSQL`, query);
|
|
160
|
+
await page.waitForTimeout(300);
|
|
161
|
+
await page.getByTestId("W_SQLBottomBar.runQuery").click();
|
|
162
|
+
await page.waitForTimeout(200);
|
|
163
|
+
await page.getByTestId("W_SQLBottomBar.runQuery").isEnabled({ timeout: 5e3 });
|
|
164
|
+
await page.waitForTimeout(1e3);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export const fillSmartForm = async (
|
|
168
|
+
page: PageWIds,
|
|
169
|
+
tableName: string,
|
|
170
|
+
values: Record<string, string | Record<string, any> | Record<string, any>[]>,
|
|
171
|
+
) => {
|
|
172
|
+
const smartFormLocator = `${getTestId("SmartForm")}${getDataKey(tableName)}`;
|
|
173
|
+
for (const [key, valueOrRowOrRows] of Object.entries(values)) {
|
|
174
|
+
const unescapedSelector = `${tableName}-${key}`;
|
|
175
|
+
const escapedSelector = await page.evaluate(
|
|
176
|
+
(unescapedSelector) => CSS.escape(unescapedSelector),
|
|
177
|
+
unescapedSelector,
|
|
178
|
+
);
|
|
179
|
+
if (typeof valueOrRowOrRows === "string") {
|
|
180
|
+
const value = valueOrRowOrRows;
|
|
181
|
+
const elem = await page.locator("input#" + escapedSelector);
|
|
182
|
+
await elem.fill(value);
|
|
183
|
+
const selectElem = await page.locator(
|
|
184
|
+
`[data-key=${JSON.stringify(key)}] .FormField_Select`,
|
|
185
|
+
);
|
|
186
|
+
if (await selectElem.isVisible()) {
|
|
187
|
+
await selectElem.click();
|
|
188
|
+
await page
|
|
189
|
+
.getByTestId("SearchList.List")
|
|
190
|
+
.locator(`[data-key=${JSON.stringify(value)}]`)
|
|
191
|
+
.click();
|
|
192
|
+
}
|
|
193
|
+
/** Joined records */
|
|
194
|
+
} else if (Array.isArray(valueOrRowOrRows)) {
|
|
195
|
+
const nestedTableName = key;
|
|
196
|
+
|
|
197
|
+
// const tabItem = await page.locator(
|
|
198
|
+
// `${smartFormLocator} ${getTestId("JoinedRecords")} ${getDataKey(nestedTableName)}`,
|
|
199
|
+
// );
|
|
200
|
+
// const isActive = await tabItem.getAttribute("aria-current");
|
|
201
|
+
// if (isActive !== "true") {
|
|
202
|
+
// await tabItem.click();
|
|
203
|
+
// }
|
|
204
|
+
for (const nestedRow of valueOrRowOrRows) {
|
|
205
|
+
await page
|
|
206
|
+
.locator(
|
|
207
|
+
`${getTestId("JoinedRecords.AddRow")}${getDataKey(nestedTableName)}`,
|
|
208
|
+
)
|
|
209
|
+
.click();
|
|
210
|
+
await fillSmartFormAndInsert(page, nestedTableName, nestedRow);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** Nested insert into fkey */
|
|
214
|
+
} else if (typeof valueOrRowOrRows === "object") {
|
|
215
|
+
const nestedInsertBtn = await page
|
|
216
|
+
.locator(
|
|
217
|
+
`${getTestId("SmartFormField")}${getDataKey(key)} ${getTestId("SmartFormFieldOptions.NestedInsert")}`,
|
|
218
|
+
)
|
|
219
|
+
.first();
|
|
220
|
+
const nestedTableName = await nestedInsertBtn.getAttribute("data-key");
|
|
221
|
+
if (!nestedTableName) throw `nestedTableName not found for ${key}`;
|
|
222
|
+
await nestedInsertBtn.click();
|
|
223
|
+
await fillSmartFormAndInsert(page, nestedTableName, valueOrRowOrRows);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return page.locator(smartFormLocator);
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
export const fillSmartFormAndInsert = async (
|
|
231
|
+
page: PageWIds,
|
|
232
|
+
tableName: string,
|
|
233
|
+
values: Record<string, string | Record<string, any> | Record<string, any>[]>,
|
|
234
|
+
) => {
|
|
235
|
+
const form = await fillSmartForm(page, tableName, values);
|
|
236
|
+
await page.waitForTimeout(200);
|
|
237
|
+
await form.getByTestId("SmartForm.insert").click();
|
|
238
|
+
await page.waitForTimeout(1200);
|
|
239
|
+
await expect(form).not.toBeVisible(getTimeout(2 * MINUTE));
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export const clickInsertRow = async (
|
|
243
|
+
page: PageWIds,
|
|
244
|
+
tableName: string,
|
|
245
|
+
useTopBtn = false,
|
|
246
|
+
) => {
|
|
247
|
+
await page
|
|
248
|
+
.getByTestId(
|
|
249
|
+
useTopBtn ?
|
|
250
|
+
"dashboard.window.rowInsertTop"
|
|
251
|
+
: "dashboard.window.rowInsert",
|
|
252
|
+
)
|
|
253
|
+
.and(page.locator(`[data-key=${JSON.stringify(tableName)}]`))
|
|
254
|
+
.click();
|
|
255
|
+
await page.waitForTimeout(200);
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export const insertRow = async (
|
|
259
|
+
page: PageWIds,
|
|
260
|
+
tableName: string,
|
|
261
|
+
row: Record<string, string>,
|
|
262
|
+
useTopBtn = false,
|
|
263
|
+
) => {
|
|
264
|
+
await clickInsertRow(page, tableName, useTopBtn);
|
|
265
|
+
await fillSmartFormAndInsert(page, tableName, row);
|
|
266
|
+
await page.waitForTimeout(2200);
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export const fillLoginFormAndSubmit = async (
|
|
270
|
+
page: PageWIds,
|
|
271
|
+
userNameAndPassword = "test_user",
|
|
272
|
+
) => {
|
|
273
|
+
await page.locator("#username").waitFor({ state: "visible", timeout: 30e3 });
|
|
274
|
+
await page.locator("#username").fill("");
|
|
275
|
+
await page.locator("#username").fill(userNameAndPassword);
|
|
276
|
+
const continueBtn = page.getByRole("button", { name: "Continue" });
|
|
277
|
+
let isContinueBtnVisible = false;
|
|
278
|
+
if (await continueBtn.count()) {
|
|
279
|
+
isContinueBtnVisible = true;
|
|
280
|
+
await continueBtn.click();
|
|
281
|
+
}
|
|
282
|
+
await page.locator("#password").fill(userNameAndPassword);
|
|
283
|
+
if (isContinueBtnVisible) {
|
|
284
|
+
await continueBtn.click();
|
|
285
|
+
} else {
|
|
286
|
+
await page.getByRole("button", { name: "Sign in", exact: true }).click();
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
export const login = async (
|
|
291
|
+
page: PageWIds,
|
|
292
|
+
userNameAndPassword = "test_user",
|
|
293
|
+
url = "localhost:3004",
|
|
294
|
+
) => {
|
|
295
|
+
await goTo(page, url);
|
|
296
|
+
await fillLoginFormAndSubmit(page, userNameAndPassword);
|
|
297
|
+
await page.locator("#username").waitFor({ state: "detached", timeout: 30e3 });
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
export const typeConfirmationCode = async (page: PageWIds) => {
|
|
301
|
+
await page.waitForTimeout(200);
|
|
302
|
+
const code = await page.getByTitle("confirmation-code").textContent();
|
|
303
|
+
await page.waitForTimeout(200);
|
|
304
|
+
await page
|
|
305
|
+
.locator(`input[name="confirmation"]`)
|
|
306
|
+
.fill(code ?? "code not found on the page");
|
|
307
|
+
await page.waitForTimeout(200);
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
export const forEachLocator = async (
|
|
311
|
+
page: PageWIds,
|
|
312
|
+
match: () => Promise<LocatorWIds> | LocatorWIds,
|
|
313
|
+
onMatch: (locator: LocatorWIds) => Promise<void>,
|
|
314
|
+
) => {
|
|
315
|
+
let items: LocatorWIds[] = [];
|
|
316
|
+
do {
|
|
317
|
+
items = await (await match()).all();
|
|
318
|
+
const firstItem = items[0];
|
|
319
|
+
if (firstItem) {
|
|
320
|
+
await onMatch(firstItem);
|
|
321
|
+
await page.waitForTimeout(220);
|
|
322
|
+
}
|
|
323
|
+
} while (items.length);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
export const closeWorkspaceWindows = async (page: PageWIds) => {
|
|
327
|
+
await forEachLocator(
|
|
328
|
+
page,
|
|
329
|
+
() => page.getByTestId("dashboard.window.close"),
|
|
330
|
+
async (closeBtn) => {
|
|
331
|
+
await closeBtn.click();
|
|
332
|
+
/** SQL windows need save or delete confirmation */
|
|
333
|
+
const deleteSqlBtn = await page.getByRole("button", {
|
|
334
|
+
name: "Delete",
|
|
335
|
+
exact: true,
|
|
336
|
+
});
|
|
337
|
+
if (await deleteSqlBtn.count()) {
|
|
338
|
+
await deleteSqlBtn.click();
|
|
339
|
+
}
|
|
340
|
+
await page.waitForTimeout(220);
|
|
341
|
+
},
|
|
342
|
+
);
|
|
343
|
+
|
|
344
|
+
const closeBtnsCount = await page
|
|
345
|
+
.getByTestId("dashboard.window.close")
|
|
346
|
+
.count();
|
|
347
|
+
if (closeBtnsCount) {
|
|
348
|
+
throw `${closeBtnsCount} windows are still opened`;
|
|
349
|
+
}
|
|
350
|
+
await page.waitForTimeout(100);
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
export const getTestId = (testid: Command) =>
|
|
354
|
+
`[data-command=${JSON.stringify(testid)}]` as const;
|
|
355
|
+
export const getSelector = ({
|
|
356
|
+
testid,
|
|
357
|
+
dataKey,
|
|
358
|
+
}: {
|
|
359
|
+
testid: Command | undefined;
|
|
360
|
+
dataKey: string | undefined;
|
|
361
|
+
}) =>
|
|
362
|
+
[
|
|
363
|
+
testid && `[data-command=${JSON.stringify(testid)}]`,
|
|
364
|
+
dataKey && `[data-key=${JSON.stringify(dataKey)}]`,
|
|
365
|
+
]
|
|
366
|
+
.filter(Boolean)
|
|
367
|
+
.join("");
|
|
368
|
+
|
|
369
|
+
type FFilter = { fieldName: string; value: string }[];
|
|
370
|
+
type FData = Record<string, string>;
|
|
371
|
+
export const setTableRule = async (
|
|
372
|
+
page: PageWIds,
|
|
373
|
+
tableName: string,
|
|
374
|
+
rule: {
|
|
375
|
+
select?: { excludedFields?: string[]; forcedFilter?: FFilter };
|
|
376
|
+
insert?: { excludedFields?: string[]; forcedData?: FData };
|
|
377
|
+
update?: {
|
|
378
|
+
excludedFields?: string[];
|
|
379
|
+
forcedFilter?: FFilter;
|
|
380
|
+
forcedData?: FData;
|
|
381
|
+
};
|
|
382
|
+
delete?: { forcedFilter?: FFilter };
|
|
383
|
+
},
|
|
384
|
+
isFileTable: boolean,
|
|
385
|
+
) => {
|
|
386
|
+
const tableRow = await page.locator(getDataKey(tableName));
|
|
387
|
+
|
|
388
|
+
const addSmartFilter = async ({
|
|
389
|
+
fieldName,
|
|
390
|
+
value,
|
|
391
|
+
}: {
|
|
392
|
+
fieldName: string;
|
|
393
|
+
value: string;
|
|
394
|
+
}) => {
|
|
395
|
+
await page.getByTestId("SmartAddFilter").click();
|
|
396
|
+
await page.locator(getDataKey(fieldName)).click();
|
|
397
|
+
const filterWrapperSelector = `${getTestId("FilterWrapper")}${getDataKey(fieldName)}`;
|
|
398
|
+
await page
|
|
399
|
+
.locator(`${filterWrapperSelector} input[type="text"]`)
|
|
400
|
+
.fill(value);
|
|
401
|
+
await page.waitForTimeout(500);
|
|
402
|
+
await page.keyboard.press("Enter");
|
|
403
|
+
await page.waitForTimeout(200);
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
const setForcedFilter = async (forcedFilter?: FFilter) => {
|
|
407
|
+
if (!forcedFilter) return;
|
|
408
|
+
|
|
409
|
+
await page.getByTestId("ForcedFilterControl.type").click();
|
|
410
|
+
await page.getByTestId("ForcedFilterControl.type.enabled").click();
|
|
411
|
+
|
|
412
|
+
for (const { fieldName, value } of forcedFilter) {
|
|
413
|
+
await addSmartFilter({ fieldName, value });
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
const setExcludedFields = async (excludedFields?: string[]) => {
|
|
418
|
+
if (!excludedFields?.length) return;
|
|
419
|
+
|
|
420
|
+
await page.getByTestId("FieldFilterControl.type").click();
|
|
421
|
+
await page.getByTestId("FieldFilterControl.type.except").click();
|
|
422
|
+
await page.getByTestId("FieldFilterControl.select").click();
|
|
423
|
+
await page.getByTestId("SearchList.toggleAll").click();
|
|
424
|
+
for (const field of excludedFields) {
|
|
425
|
+
await page.locator(`[data-key=${JSON.stringify(field)}]`).click();
|
|
426
|
+
await page.waitForTimeout(500);
|
|
427
|
+
}
|
|
428
|
+
await page.keyboard.press("Escape");
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
const setForcedData = async (forcedData?: FData) => {
|
|
432
|
+
if (!forcedData) return;
|
|
433
|
+
|
|
434
|
+
// await page.getByTestId("ForcedDataControl.toggle").click();
|
|
435
|
+
// for(const [fieldName, value] of Object.entries(forcedData)){
|
|
436
|
+
// await page.getByTestId("ForcedDataControl.addColumn").click();
|
|
437
|
+
// await page.locator(`[data-key=${JSON.stringify(fieldName)}]`).click();
|
|
438
|
+
// await page.locator(`input#${tableName}-${fieldName}`).type(value);
|
|
439
|
+
// await page.waitForTimeout(500);
|
|
440
|
+
// }
|
|
441
|
+
|
|
442
|
+
await page.getByTestId("CheckFilterControl.type").click();
|
|
443
|
+
await page.getByTestId("CheckFilterControl.type.enabled").click();
|
|
444
|
+
|
|
445
|
+
for (const [fieldName, value] of Object.entries(forcedData)) {
|
|
446
|
+
await addSmartFilter({ fieldName, value });
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
const toggleFileRule = async () => {
|
|
451
|
+
const ruleToggle = await page.getByTestId("RuleToggle");
|
|
452
|
+
if (isFileTable) {
|
|
453
|
+
await ruleToggle.click();
|
|
454
|
+
await page.getByTestId("TablePermissionControls.close").click();
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
if (rule.select) {
|
|
459
|
+
await tableRow.getByTestId("selectRule").click();
|
|
460
|
+
await toggleFileRule();
|
|
461
|
+
await page.waitForTimeout(500);
|
|
462
|
+
|
|
463
|
+
if (!isEmpty(rule.select)) {
|
|
464
|
+
await tableRow.getByTestId("selectRuleAdvanced").click();
|
|
465
|
+
|
|
466
|
+
await setExcludedFields(rule.select.excludedFields);
|
|
467
|
+
await setForcedFilter(rule.select.forcedFilter);
|
|
468
|
+
|
|
469
|
+
await page.getByTestId("TablePermissionControls.close").click();
|
|
470
|
+
await page.waitForTimeout(500);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if (rule.insert) {
|
|
475
|
+
await tableRow.getByTestId("insertRule").click();
|
|
476
|
+
await toggleFileRule();
|
|
477
|
+
await page.waitForTimeout(500);
|
|
478
|
+
|
|
479
|
+
if (!isEmpty(rule.select)) {
|
|
480
|
+
await tableRow.getByTestId("insertRuleAdvanced").click();
|
|
481
|
+
|
|
482
|
+
await setExcludedFields(rule.insert.excludedFields);
|
|
483
|
+
await setForcedData(rule.insert.forcedData);
|
|
484
|
+
|
|
485
|
+
await page.getByTestId("TablePermissionControls.close").click();
|
|
486
|
+
await page.waitForTimeout(500);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if (rule.update) {
|
|
491
|
+
await tableRow.getByTestId("updateRule").click();
|
|
492
|
+
await toggleFileRule();
|
|
493
|
+
await page.waitForTimeout(500);
|
|
494
|
+
|
|
495
|
+
if (!isEmpty(rule.select)) {
|
|
496
|
+
await tableRow.getByTestId("updateRuleAdvanced").click();
|
|
497
|
+
|
|
498
|
+
await setExcludedFields(rule.update.excludedFields);
|
|
499
|
+
await setForcedFilter(rule.update.forcedFilter);
|
|
500
|
+
await setForcedData(rule.update.forcedData);
|
|
501
|
+
|
|
502
|
+
await page.getByTestId("TablePermissionControls.close").click();
|
|
503
|
+
await page.waitForTimeout(500);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
if (rule.delete) {
|
|
508
|
+
await tableRow.getByTestId("deleteRule").click();
|
|
509
|
+
await toggleFileRule();
|
|
510
|
+
await page.waitForTimeout(500);
|
|
511
|
+
|
|
512
|
+
if (!isEmpty(rule.select)) {
|
|
513
|
+
await tableRow.getByTestId("deleteRuleAdvanced").click();
|
|
514
|
+
|
|
515
|
+
await setForcedFilter(rule.delete.forcedFilter);
|
|
516
|
+
|
|
517
|
+
await page.getByTestId("TablePermissionControls.close").click();
|
|
518
|
+
await page.waitForTimeout(500);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
await page.waitForTimeout(500);
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
export const runDbsSql = async (
|
|
525
|
+
page: PageWIds,
|
|
526
|
+
query: string,
|
|
527
|
+
args?: any,
|
|
528
|
+
opts?: any,
|
|
529
|
+
) => {
|
|
530
|
+
return runDbSql(page, query, args, opts, "dbs");
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
export const runDbsMethod = async (
|
|
534
|
+
page: PageWIds,
|
|
535
|
+
methodName: string,
|
|
536
|
+
args?: any,
|
|
537
|
+
) => {
|
|
538
|
+
/** Wait for dbsMethod to become available */
|
|
539
|
+
await page.waitForFunction(() => {
|
|
540
|
+
return (window as any).dbsMethods !== undefined;
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
const result = await page.evaluate(
|
|
544
|
+
async ([methodName, args]) => {
|
|
545
|
+
const dbsMethods = (window as any).dbsMethods;
|
|
546
|
+
if (!dbsMethods) throw "dbsMethods is missing";
|
|
547
|
+
const method = dbsMethods[methodName];
|
|
548
|
+
if (!method) throw `Method ${methodName} is missing in dbsMethods`;
|
|
549
|
+
const [data, err] = await method(args)
|
|
550
|
+
.then((data: any) => [data, undefined])
|
|
551
|
+
.catch((err: any) => {
|
|
552
|
+
console.error(`Error running dbs method ${methodName}:`, err);
|
|
553
|
+
return [undefined, err];
|
|
554
|
+
});
|
|
555
|
+
return [data, err];
|
|
556
|
+
},
|
|
557
|
+
[methodName, args],
|
|
558
|
+
);
|
|
559
|
+
const [data, err] = result as any;
|
|
560
|
+
if (err) {
|
|
561
|
+
throw err;
|
|
562
|
+
}
|
|
563
|
+
return data;
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
export const runDbSql = async (
|
|
567
|
+
page: PageWIds,
|
|
568
|
+
query: string,
|
|
569
|
+
args?: any,
|
|
570
|
+
opts?: any,
|
|
571
|
+
dbType: "db" | "dbs" = "db",
|
|
572
|
+
) => {
|
|
573
|
+
/** Wait for handle to become available */
|
|
574
|
+
await page.waitForFunction(
|
|
575
|
+
({ dbType }) => {
|
|
576
|
+
return (window as any)[dbType] !== undefined;
|
|
577
|
+
},
|
|
578
|
+
{ dbType },
|
|
579
|
+
);
|
|
580
|
+
const [error, sqlResult] = (await page.evaluate(
|
|
581
|
+
async ([query, args, opts, dbType]) => {
|
|
582
|
+
try {
|
|
583
|
+
const sql = (window as any)[dbType === "db" ? "sql" : "dbsSql"];
|
|
584
|
+
if (!sql) throw dbType === "db" ? "db is missing" : "dbs is missing";
|
|
585
|
+
const data = await sql(query, args, opts);
|
|
586
|
+
return [undefined, data];
|
|
587
|
+
} catch (error) {
|
|
588
|
+
return [error];
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
[query, args, opts, dbType],
|
|
592
|
+
)) as any;
|
|
593
|
+
if (error) {
|
|
594
|
+
console.error(`Error running sql:`, error);
|
|
595
|
+
throw error;
|
|
596
|
+
}
|
|
597
|
+
return sqlResult;
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
export const openTable = async (
|
|
601
|
+
page: PageWIds,
|
|
602
|
+
namePartStart: string,
|
|
603
|
+
exact = false,
|
|
604
|
+
) => {
|
|
605
|
+
await page.getByTestId("dashboard.menu").waitFor({ state: "visible" });
|
|
606
|
+
await page.keyboard.press("Control+KeyP");
|
|
607
|
+
await page.waitForTimeout(200);
|
|
608
|
+
const searchAlLInput = await page.getByTestId("SearchAll");
|
|
609
|
+
await searchAlLInput.waitFor({ state: "visible" });
|
|
610
|
+
await searchAlLInput.fill(namePartStart);
|
|
611
|
+
await page.waitForTimeout(200);
|
|
612
|
+
await page.keyboard.press("Enter");
|
|
613
|
+
await page.waitForTimeout(500);
|
|
614
|
+
|
|
615
|
+
/** Ensure table was opened */
|
|
616
|
+
const table = page.locator(
|
|
617
|
+
`[data-table-name${exact ? "=" : "^="}${JSON.stringify(namePartStart)}]`,
|
|
618
|
+
);
|
|
619
|
+
|
|
620
|
+
/** Used for debugging */
|
|
621
|
+
if (!(await table.isVisible())) {
|
|
622
|
+
const v_triggers = await runDbsSql(
|
|
623
|
+
page,
|
|
624
|
+
`SELECT * FROM prostgles.v_triggers;`,
|
|
625
|
+
{},
|
|
626
|
+
{ returnType: "rows" },
|
|
627
|
+
);
|
|
628
|
+
console.log(JSON.stringify({ v_triggers, namePartStart, expect }));
|
|
629
|
+
await page.waitForTimeout(500);
|
|
630
|
+
}
|
|
631
|
+
await expect(table).toBeVisible();
|
|
632
|
+
await page.waitForTimeout(1000);
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
export const addExistingDatabase = async (page: PageWIds, dbName: string) => {
|
|
636
|
+
await goTo(page, "localhost:3004/connections");
|
|
637
|
+
await page.getByTestId("ConnectionServer.add").click();
|
|
638
|
+
await page
|
|
639
|
+
.locator(`[data-label="Select a database from this server"]`)
|
|
640
|
+
.click();
|
|
641
|
+
await page.getByTestId("ConnectionServer.add.existingDatabase").click();
|
|
642
|
+
await page
|
|
643
|
+
.getByTestId("ConnectionServer.add.existingDatabase")
|
|
644
|
+
.locator(getDataKey(dbName))
|
|
645
|
+
.click();
|
|
646
|
+
await page.getByTestId("ConnectionServer.add.confirm").click();
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
export const MINUTE = 60e3;
|
|
650
|
+
export const createDatabase = async (
|
|
651
|
+
dbName: string,
|
|
652
|
+
page: PageWIds,
|
|
653
|
+
fromTemplates = false,
|
|
654
|
+
owner?: { name: string; pass: string },
|
|
655
|
+
) => {
|
|
656
|
+
await goTo(page, "localhost:3004/connections");
|
|
657
|
+
await page
|
|
658
|
+
.locator(`[data-command="ConnectionServer.add"][data-key^="usr@localhost"]`)
|
|
659
|
+
.first()
|
|
660
|
+
.click();
|
|
661
|
+
// await page.waitForTimeout(3000);
|
|
662
|
+
if (fromTemplates) {
|
|
663
|
+
await page.getByTestId("ConnectionServer.add.newDatabase").click();
|
|
664
|
+
await page.getByTestId("ConnectionServer.SampleSchemas").click();
|
|
665
|
+
await page
|
|
666
|
+
.getByTestId("ConnectionServer.SampleSchemas")
|
|
667
|
+
.locator(`[data-key=${JSON.stringify(dbName)}]`)
|
|
668
|
+
.click();
|
|
669
|
+
} else {
|
|
670
|
+
await page.getByTestId("ConnectionServer.add.newDatabase").click();
|
|
671
|
+
await page
|
|
672
|
+
.getByTestId("ConnectionServer.NewDbName")
|
|
673
|
+
.locator("input")
|
|
674
|
+
.fill(dbName);
|
|
675
|
+
}
|
|
676
|
+
if (owner) {
|
|
677
|
+
await page.getByTestId("ConnectionServer.withNewOwnerToggle").click();
|
|
678
|
+
await page.waitForTimeout(500);
|
|
679
|
+
await page
|
|
680
|
+
.getByTestId("ConnectionServer.NewUserName")
|
|
681
|
+
.locator("input")
|
|
682
|
+
.fill(owner.name);
|
|
683
|
+
await page
|
|
684
|
+
.getByTestId("ConnectionServer.NewUserPassword")
|
|
685
|
+
.locator("input")
|
|
686
|
+
.fill(owner.pass);
|
|
687
|
+
await page.waitForTimeout(500);
|
|
688
|
+
}
|
|
689
|
+
await page.getByTestId("ConnectionServer.add.confirm").click();
|
|
690
|
+
/* Wait until db is created */
|
|
691
|
+
const databaseCreationTime = (fromTemplates ? 4 : 1) * MINUTE;
|
|
692
|
+
const workspaceCreationAndLoatTime = 3 * MINUTE;
|
|
693
|
+
await page
|
|
694
|
+
.getByTestId("ConnectionServer.add.confirm")
|
|
695
|
+
.waitFor({ state: "detached", timeout: databaseCreationTime });
|
|
696
|
+
await page
|
|
697
|
+
.getByTestId("dashboard.menu")
|
|
698
|
+
.waitFor({ state: "visible", timeout: workspaceCreationAndLoatTime });
|
|
699
|
+
};
|
|
700
|
+
|
|
701
|
+
export const dropConnectionAndDatabase = async (
|
|
702
|
+
dbName: string,
|
|
703
|
+
page: PageWIds,
|
|
704
|
+
andDatabase = true,
|
|
705
|
+
) => {
|
|
706
|
+
await page.waitForTimeout(2000);
|
|
707
|
+
const connectionSelector = `[data-key=${JSON.stringify(dbName)}]`;
|
|
708
|
+
await page.locator(connectionSelector).getByTestId("Connection.edit").click();
|
|
709
|
+
|
|
710
|
+
await page.getByTestId("Connection.edit.delete").click();
|
|
711
|
+
if (andDatabase) {
|
|
712
|
+
await page.getByTestId("Connection.edit.delete.dropDatabase").click();
|
|
713
|
+
}
|
|
714
|
+
await typeConfirmationCode(page);
|
|
715
|
+
await page.getByTestId("Connection.edit.delete.confirm").click();
|
|
716
|
+
await page.waitForTimeout(5000);
|
|
717
|
+
|
|
718
|
+
return { connectionSelector };
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
export const selectAndUpsertFile = async (
|
|
722
|
+
page: PageWIds,
|
|
723
|
+
onOpenFileDialog: (page: PageWIds) => Promise<void>,
|
|
724
|
+
onBeforePressInsert?: () => Promise<void>,
|
|
725
|
+
isUpdate = false,
|
|
726
|
+
) => {
|
|
727
|
+
// Start waiting for file chooser before clicking. Note no await.
|
|
728
|
+
const fileChooserPromise = page.waitForEvent("filechooser");
|
|
729
|
+
await onOpenFileDialog(page);
|
|
730
|
+
const fileChooser = await fileChooserPromise;
|
|
731
|
+
const resolvedPath = path.resolve(path.join(__dirname, "../../" + fileName));
|
|
732
|
+
|
|
733
|
+
await fileChooser.setFiles(resolvedPath);
|
|
734
|
+
await onBeforePressInsert?.();
|
|
735
|
+
await page
|
|
736
|
+
.getByRole("button", { name: isUpdate ? "Update" : "Insert", exact: true })
|
|
737
|
+
.click();
|
|
738
|
+
if (isUpdate) {
|
|
739
|
+
await page
|
|
740
|
+
.getByRole("button", { name: "Update row!", exact: true })
|
|
741
|
+
.click();
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
export const getTimeout = (base: number) => ({
|
|
746
|
+
timeout: base * (process.env.CI ? 3 : 1),
|
|
747
|
+
});
|
|
748
|
+
export const TWENTY_SECONDS_OR_MORE = getTimeout(20_000);
|
|
749
|
+
|
|
750
|
+
export const fileName = "icon512.png";
|
|
751
|
+
export const uploadFile = async (page: PageWIds) => {
|
|
752
|
+
await clickInsertRow(page, "files");
|
|
753
|
+
await page.waitForTimeout(200);
|
|
754
|
+
await selectAndUpsertFile(page, (page) =>
|
|
755
|
+
page.getByTestId("FileBtn").click(),
|
|
756
|
+
);
|
|
757
|
+
const MINUTE = 60e3;
|
|
758
|
+
await page
|
|
759
|
+
.getByTestId("Popup.content")
|
|
760
|
+
.waitFor({ state: "detached", ...getTimeout(2 * MINUTE) });
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
export const isEmpty = (obj?: any) => {
|
|
764
|
+
return !obj || Object.keys(obj).length === 0;
|
|
765
|
+
};
|
|
766
|
+
|
|
767
|
+
export const getSearchListItem = (
|
|
768
|
+
page: PageWIds | LocatorWIds,
|
|
769
|
+
{ dataKey }: { dataKey: string },
|
|
770
|
+
) => {
|
|
771
|
+
return page.getByTestId("SearchList.List").locator(getDataKey(dataKey));
|
|
772
|
+
};
|
|
773
|
+
export const getTableWindow = (page: PageWIds, tableName: string) => {
|
|
774
|
+
return page.locator(`[data-table-name=${JSON.stringify(tableName)}]`);
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
export const setWspColLayout = async (page: PageWIds) => {
|
|
778
|
+
await page.getByTestId("dashboard.menu").waitFor({ state: "visible" });
|
|
779
|
+
await page.getByTestId("dashboard.menu.settingsToggle").click();
|
|
780
|
+
await page.getByTestId("dashboard.menu.settings.defaultLayoutType").click();
|
|
781
|
+
await page
|
|
782
|
+
.getByTestId("dashboard.menu.settings.defaultLayoutType")
|
|
783
|
+
.locator(`[data-key="col"]`)
|
|
784
|
+
.click();
|
|
785
|
+
await page.getByTestId("Popup.close").click();
|
|
786
|
+
};
|
|
787
|
+
export const disablePwdlessAdminAndCreateUser = async (page: PageWIds) => {
|
|
788
|
+
await page
|
|
789
|
+
.getByRole("link", { name: "Users" })
|
|
790
|
+
.waitFor({ state: "visible", timeout: 60e3 });
|
|
791
|
+
await page.getByRole("link", { name: "Users" }).click();
|
|
792
|
+
await expect(page as PG).toHaveURL(/.*users/);
|
|
793
|
+
// const currentUrl = page.url();
|
|
794
|
+
// await page.goto();
|
|
795
|
+
// await page.goto(`${currentUrl}users`, {
|
|
796
|
+
// waitUntil: "networkidle",
|
|
797
|
+
// timeout: 10e3,
|
|
798
|
+
// });
|
|
799
|
+
await page.getByRole("button", { name: "Create admin user" }).click();
|
|
800
|
+
await page.locator("#username").fill(USERS.test_user);
|
|
801
|
+
await page.locator("#new-password").fill(USERS.test_user);
|
|
802
|
+
await page.locator("#confirm_password").fill(USERS.test_user);
|
|
803
|
+
await page.getByRole("button", { name: "Create", exact: true }).click();
|
|
804
|
+
await page.waitForTimeout(5e3);
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
export const createAccessRule = async (
|
|
808
|
+
page: PageWIds,
|
|
809
|
+
userType: "default" | "public",
|
|
810
|
+
) => {
|
|
811
|
+
/** Set permissions */
|
|
812
|
+
await page.getByTestId("config.ac").click();
|
|
813
|
+
await page.waitForTimeout(1e3);
|
|
814
|
+
await page.getByTestId("config.ac.create").click();
|
|
815
|
+
|
|
816
|
+
/** Setting user type to default */
|
|
817
|
+
await page.getByTestId("config.ac.edit.user").click();
|
|
818
|
+
await page.getByRole("option").getByText(userType).click();
|
|
819
|
+
await page.getByRole("button", { name: "Done", exact: true }).click();
|
|
820
|
+
|
|
821
|
+
/** Setting AC Type to custom */
|
|
822
|
+
await page
|
|
823
|
+
.getByTestId("config.ac.edit.type")
|
|
824
|
+
.locator(`button[value="Custom"]`)
|
|
825
|
+
.click();
|
|
826
|
+
};
|
|
827
|
+
export const createAccessRuleForTestDB = async (
|
|
828
|
+
page: PageWIds,
|
|
829
|
+
userType: "default" | "public",
|
|
830
|
+
) => {
|
|
831
|
+
await login(page);
|
|
832
|
+
await page.getByRole("link", { name: "Connections" }).click();
|
|
833
|
+
await page.getByRole("link", { name: TEST_DB_NAME }).click();
|
|
834
|
+
await page
|
|
835
|
+
.getByTestId("dashboard.goToConnConfig")
|
|
836
|
+
.waitFor({ state: "visible", timeout: 10e3 });
|
|
837
|
+
await page.getByTestId("dashboard.goToConnConfig").click();
|
|
838
|
+
|
|
839
|
+
await createAccessRule(page, userType);
|
|
840
|
+
};
|
|
841
|
+
|
|
842
|
+
export const enableAskLLM = async (
|
|
843
|
+
page: PageWIds,
|
|
844
|
+
maxRequestsPerDay: number,
|
|
845
|
+
credsProvided = false,
|
|
846
|
+
) => {
|
|
847
|
+
await page.getByTestId("AskLLMAccessControl").click();
|
|
848
|
+
if (!credsProvided) {
|
|
849
|
+
await page.getByTestId("SetupLLMCredentials.api").click();
|
|
850
|
+
// await page.getByTestId("AddLLMCredentialForm").click();
|
|
851
|
+
await page.getByTestId("dashboard.window.rowInsertTop").click();
|
|
852
|
+
// await page.getByTestId("AddLLMCredentialForm.Provider").click();
|
|
853
|
+
|
|
854
|
+
// await page
|
|
855
|
+
// .getByTestId("AddLLMCredentialForm.Provider")
|
|
856
|
+
// .locator(`[data-key="Custom"]`)
|
|
857
|
+
// .click();
|
|
858
|
+
await runDbsSql(page, "DELETE FROM llm_providers WHERE id = 'Custom' ");
|
|
859
|
+
await fillSmartFormAndInsert(page, "llm_credentials", {
|
|
860
|
+
name: "my credential",
|
|
861
|
+
api_key: "nothing",
|
|
862
|
+
provider_id: {
|
|
863
|
+
id: "Custom",
|
|
864
|
+
api_url: "http://localhost:3004/mocked-llm",
|
|
865
|
+
logo_url: "/icons/CloudQuestionOutline.svg",
|
|
866
|
+
llm_models: [
|
|
867
|
+
{
|
|
868
|
+
name: "mymodel",
|
|
869
|
+
},
|
|
870
|
+
],
|
|
871
|
+
},
|
|
872
|
+
});
|
|
873
|
+
// await page.locator(`#endpoint`).fill("http://localhost:3004/mocked-llm");
|
|
874
|
+
// await page.getByTestId("AddLLMCredentialForm.Save").click();
|
|
875
|
+
}
|
|
876
|
+
await page.getByTestId("AskLLMAccessControl.AllowAll").click();
|
|
877
|
+
await page.waitForTimeout(1e3);
|
|
878
|
+
if (maxRequestsPerDay) {
|
|
879
|
+
await page
|
|
880
|
+
.getByTestId("AskLLMAccessControl.llm_daily_limit")
|
|
881
|
+
.locator("input")
|
|
882
|
+
.fill(maxRequestsPerDay.toString());
|
|
883
|
+
}
|
|
884
|
+
await page.getByTestId("Popup.close").click();
|
|
885
|
+
};
|
|
886
|
+
export const getAskLLMLastMessage = async (page: PageWIds) => {
|
|
887
|
+
const lastIncomingMessage = page
|
|
888
|
+
.getByTestId("AskLLM.popup")
|
|
889
|
+
.locator(".message.incoming")
|
|
890
|
+
.last();
|
|
891
|
+
|
|
892
|
+
/** Await any in progress tool calls */
|
|
893
|
+
const toolCallBtns = await lastIncomingMessage
|
|
894
|
+
.getByTestId("ToolUseMessage.toggle")
|
|
895
|
+
.all();
|
|
896
|
+
|
|
897
|
+
await Promise.all(
|
|
898
|
+
[...toolCallBtns, lastIncomingMessage].map((btn) =>
|
|
899
|
+
btn
|
|
900
|
+
.getByTestId("Loading")
|
|
901
|
+
.waitFor({ state: "detached", timeout: 30_000 }),
|
|
902
|
+
),
|
|
903
|
+
);
|
|
904
|
+
await page.waitForTimeout(1500);
|
|
905
|
+
return lastIncomingMessage;
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
const waitForAllMatchingLocatorsToDisappear = async (
|
|
909
|
+
locator: LocatorWIds,
|
|
910
|
+
timeout = 30_000,
|
|
911
|
+
) => {
|
|
912
|
+
const start = Date.now();
|
|
913
|
+
let tries = 0;
|
|
914
|
+
while (true) {
|
|
915
|
+
const count = await locator.count();
|
|
916
|
+
if (!count) {
|
|
917
|
+
if (tries > 2) {
|
|
918
|
+
return;
|
|
919
|
+
} else {
|
|
920
|
+
tries++;
|
|
921
|
+
}
|
|
922
|
+
} else if (Date.now() - start > timeout) {
|
|
923
|
+
throw new Error(
|
|
924
|
+
`Timeout waiting for locators to disappear. Still ${count} remaining.`,
|
|
925
|
+
);
|
|
926
|
+
}
|
|
927
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
|
|
931
|
+
export const sendAskLLMMessage = async (
|
|
932
|
+
page: PageWIds,
|
|
933
|
+
msg: string,
|
|
934
|
+
waitForLoadingToStop:
|
|
935
|
+
| boolean
|
|
936
|
+
| {
|
|
937
|
+
onAfterSend: () => Promise<void>;
|
|
938
|
+
} = false,
|
|
939
|
+
) => {
|
|
940
|
+
await page.getByTestId("AskLLM.popup").getByTestId("Chat.textarea").fill(msg);
|
|
941
|
+
await page.keyboard.press("Enter");
|
|
942
|
+
await page.waitForTimeout(500);
|
|
943
|
+
if (waitForLoadingToStop) {
|
|
944
|
+
if (typeof waitForLoadingToStop === "object") {
|
|
945
|
+
await waitForLoadingToStop.onAfterSend();
|
|
946
|
+
}
|
|
947
|
+
await waitForAllMatchingLocatorsToDisappear(
|
|
948
|
+
page
|
|
949
|
+
.getByTestId("Chat.messageList")
|
|
950
|
+
.getByTestId("Loading")
|
|
951
|
+
// .locator(".message.incoming .Loading")
|
|
952
|
+
.last(),
|
|
953
|
+
);
|
|
954
|
+
}
|
|
955
|
+
};
|
|
956
|
+
export const getLLMResponses = async (
|
|
957
|
+
page: PageWIds,
|
|
958
|
+
questions: string[],
|
|
959
|
+
openWindow = true,
|
|
960
|
+
) => {
|
|
961
|
+
if (openWindow) {
|
|
962
|
+
await page.getByTestId("AskLLM").click();
|
|
963
|
+
}
|
|
964
|
+
await page.getByTestId("AskLLM.popup").waitFor({ state: "visible" });
|
|
965
|
+
await page.waitForTimeout(2e3);
|
|
966
|
+
const result: {
|
|
967
|
+
response: string | null;
|
|
968
|
+
isOk: boolean;
|
|
969
|
+
}[] = [];
|
|
970
|
+
|
|
971
|
+
for (const question of questions) {
|
|
972
|
+
await sendAskLLMMessage(page, question);
|
|
973
|
+
const responseMessage = await getAskLLMLastMessage(page);
|
|
974
|
+
const response = await responseMessage.textContent();
|
|
975
|
+
result.push({
|
|
976
|
+
response,
|
|
977
|
+
isOk: !!response?.includes("Mocked response"),
|
|
978
|
+
});
|
|
979
|
+
await page.waitForTimeout(3000);
|
|
980
|
+
}
|
|
981
|
+
if (openWindow) {
|
|
982
|
+
await page.getByTestId("Popup.close").click();
|
|
983
|
+
}
|
|
984
|
+
return result;
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
export const toggleMCPTools = async (
|
|
988
|
+
page: PageWIds,
|
|
989
|
+
toolNames: string[],
|
|
990
|
+
toggleAutoApprove?: boolean,
|
|
991
|
+
) => {
|
|
992
|
+
await page.getByTestId("LLMChatOptions.MCPTools").click({ timeout: 10e3 });
|
|
993
|
+
await page.waitForTimeout(1000);
|
|
994
|
+
for (const toolName of toolNames) {
|
|
995
|
+
await page
|
|
996
|
+
.getByTestId("LLMChatOptions.MCPTools")
|
|
997
|
+
.getByTestId("MCPServerTools")
|
|
998
|
+
.getByText(toolName, { exact: true })
|
|
999
|
+
.click({ timeout: 30e3 });
|
|
1000
|
+
await page.waitForTimeout(1500);
|
|
1001
|
+
}
|
|
1002
|
+
if (toggleAutoApprove) {
|
|
1003
|
+
const node = page.getByTestId("MCPServers.toggleAutoApprove");
|
|
1004
|
+
await node.waitFor({ state: "visible", timeout: 10e3 });
|
|
1005
|
+
if ((await node.textContent())?.includes(": ON")) {
|
|
1006
|
+
await node.click();
|
|
1007
|
+
}
|
|
1008
|
+
await page.waitForTimeout(1000);
|
|
1009
|
+
await node.click();
|
|
1010
|
+
}
|
|
1011
|
+
await page.getByTestId("Popup.close").last().click();
|
|
1012
|
+
await page.waitForTimeout(500);
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
export const openConnection = async (
|
|
1016
|
+
page: PageWIds,
|
|
1017
|
+
connectionName:
|
|
1018
|
+
| "sample_database"
|
|
1019
|
+
| "cloud"
|
|
1020
|
+
| "crypto"
|
|
1021
|
+
| "financial"
|
|
1022
|
+
| "food_delivery"
|
|
1023
|
+
| "Prostgles UI state"
|
|
1024
|
+
| "prostgles_video_demo"
|
|
1025
|
+
| "db_with_owner"
|
|
1026
|
+
| "Prostgles UI automated tests database",
|
|
1027
|
+
) => {
|
|
1028
|
+
await goTo(page, "/connections");
|
|
1029
|
+
await page
|
|
1030
|
+
.locator(getDataKey(connectionName))
|
|
1031
|
+
.getByTestId("Connection.openConnection")
|
|
1032
|
+
.click();
|
|
1033
|
+
await page.waitForTimeout(1000);
|
|
1034
|
+
};
|
|
1035
|
+
|
|
1036
|
+
export const loginWhenSignupIsEnabled = async (
|
|
1037
|
+
page: PageWIds,
|
|
1038
|
+
userNameAndPassword = "test_user",
|
|
1039
|
+
) => {
|
|
1040
|
+
await goTo(page, "/login");
|
|
1041
|
+
await page.locator("#username").fill(userNameAndPassword);
|
|
1042
|
+
await page.getByRole("button", { name: "Continue" }).click();
|
|
1043
|
+
await page.locator("#password").waitFor({ state: "visible" });
|
|
1044
|
+
await page.locator("#password").fill(userNameAndPassword);
|
|
1045
|
+
await page.getByRole("button", { name: "Continue" }).click();
|
|
1046
|
+
await page.getByTestId("App.colorScheme").waitFor({ state: "visible" });
|
|
1047
|
+
await page.waitForTimeout(500);
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1050
|
+
const backupNames = "Demo";
|
|
1051
|
+
export const restoreFromBackup = async (
|
|
1052
|
+
page: PageWIds,
|
|
1053
|
+
backupFileName?: typeof backupNames,
|
|
1054
|
+
) => {
|
|
1055
|
+
const backupListItems = await page
|
|
1056
|
+
.getByTestId("BackupsControls.Completed")
|
|
1057
|
+
.locator(".SmartCard");
|
|
1058
|
+
await backupListItems.first().waitFor({ state: "visible" });
|
|
1059
|
+
const backupItem =
|
|
1060
|
+
backupFileName ?
|
|
1061
|
+
backupListItems.filter({ hasText: `Backup name${backupFileName}` })
|
|
1062
|
+
: backupListItems;
|
|
1063
|
+
await backupItem
|
|
1064
|
+
.getByRole("button", { name: "Restore...", exact: true })
|
|
1065
|
+
.click();
|
|
1066
|
+
await typeConfirmationCode(page);
|
|
1067
|
+
await page.getByRole("button", { name: "Restore", exact: true }).click();
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
export const getDashboardUtils = (page: PageWIds) => {
|
|
1071
|
+
const _open = openConnection.bind(null, page);
|
|
1072
|
+
const openMenuIfClosed = async (closeMenu = false) => {
|
|
1073
|
+
await page.waitForTimeout(1500);
|
|
1074
|
+
const menuCloseButton = await page
|
|
1075
|
+
.getByTestId("DashboardMenu")
|
|
1076
|
+
.getByTestId("Popup.close");
|
|
1077
|
+
const menuPinnedButton = await page.locator(
|
|
1078
|
+
getCommandElemSelector("DashboardMenuHeader.togglePinned") +
|
|
1079
|
+
getDataKey("pinned"),
|
|
1080
|
+
);
|
|
1081
|
+
const menuIsOpen =
|
|
1082
|
+
(await menuCloseButton.count()) ? "close"
|
|
1083
|
+
: (await menuPinnedButton.count()) ? "unpinn"
|
|
1084
|
+
: undefined;
|
|
1085
|
+
if (menuIsOpen) {
|
|
1086
|
+
if (closeMenu) {
|
|
1087
|
+
if (menuIsOpen === "close") {
|
|
1088
|
+
await menuCloseButton.click();
|
|
1089
|
+
} else {
|
|
1090
|
+
await menuPinnedButton.click();
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
const menuBtn = await page.getByTestId("dashboard.menu");
|
|
1096
|
+
if ((await menuBtn.count()) && (await menuBtn.isEnabled())) {
|
|
1097
|
+
await menuBtn.click();
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1100
|
+
const toggleMenuPinned = async (shouldBePinned?: boolean) => {
|
|
1101
|
+
await page.waitForTimeout(1500);
|
|
1102
|
+
const toggleBtn = await page.getByTestId(
|
|
1103
|
+
"DashboardMenuHeader.togglePinned",
|
|
1104
|
+
);
|
|
1105
|
+
const menuBtn = await page.getByTestId("dashboard.menu");
|
|
1106
|
+
const menuIsPinned = await menuBtn.isDisabled();
|
|
1107
|
+
if ((await toggleBtn.count()) && (await toggleBtn.isEnabled())) {
|
|
1108
|
+
if (menuIsPinned && shouldBePinned) {
|
|
1109
|
+
return;
|
|
1110
|
+
}
|
|
1111
|
+
await toggleBtn.click();
|
|
1112
|
+
} else if (shouldBePinned) {
|
|
1113
|
+
await menuBtn.click();
|
|
1114
|
+
await page.getByTestId("DashboardMenuHeader.togglePinned").click();
|
|
1115
|
+
}
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
return {
|
|
1119
|
+
openConnection: _open,
|
|
1120
|
+
openMenuIfClosed,
|
|
1121
|
+
toggleMenuPinned,
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
export const setPromptByText = async (
|
|
1126
|
+
page: PageWIds,
|
|
1127
|
+
text: string,
|
|
1128
|
+
closePopup = true,
|
|
1129
|
+
) => {
|
|
1130
|
+
await page.getByTestId("LLMChatOptions.Prompt").click();
|
|
1131
|
+
await page.locator(".SmartCard").getByText(text).first().click();
|
|
1132
|
+
await page.waitForTimeout(2e3); // wait for prompt tools to be set
|
|
1133
|
+
if (!closePopup) return;
|
|
1134
|
+
await page
|
|
1135
|
+
.getByTestId("LLMChatOptions.Prompt")
|
|
1136
|
+
.getByTestId("Popup.close")
|
|
1137
|
+
.click();
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1140
|
+
export const setModelByText = async (page: PageWIds, text: string) => {
|
|
1141
|
+
await page.getByTestId("LLMChatOptions.Model").click();
|
|
1142
|
+
await page.waitForTimeout(500);
|
|
1143
|
+
await page.keyboard.type(text);
|
|
1144
|
+
await page.keyboard.press("Enter");
|
|
1145
|
+
await page.waitForTimeout(1e3); // wait for model to be set
|
|
1146
|
+
};
|
|
1147
|
+
|
|
1148
|
+
export const setupProstglesLLMProvider = async (page: PageWIds) => {
|
|
1149
|
+
const aiDemoDBName = "prostgles_video_demo" as const;
|
|
1150
|
+
await openConnection(page, "cloud");
|
|
1151
|
+
await openConnection(page, aiDemoDBName);
|
|
1152
|
+
await runDbsSql(page, "TRUNCATE llm_chats CASCADE");
|
|
1153
|
+
await runDbsSql(
|
|
1154
|
+
page,
|
|
1155
|
+
`
|
|
1156
|
+
DELETE FROM llm_credentials WHERE provider_id = 'Prostgles';
|
|
1157
|
+
UPDATE llm_providers
|
|
1158
|
+
SET api_url = 'http://localhost:3005/rest-api/methods/askLLM'
|
|
1159
|
+
WHERE id = 'Prostgles';
|
|
1160
|
+
/*
|
|
1161
|
+
UPDATE published_methods
|
|
1162
|
+
SET connection_id = (
|
|
1163
|
+
SELECT id FROM connections WHERE "name" = '${aiDemoDBName}'
|
|
1164
|
+
)
|
|
1165
|
+
WHERE name = 'askLLM';
|
|
1166
|
+
*/
|
|
1167
|
+
`,
|
|
1168
|
+
);
|
|
1169
|
+
const activeSession = await runDbsSql(
|
|
1170
|
+
page,
|
|
1171
|
+
`SELECT *
|
|
1172
|
+
FROM sessions
|
|
1173
|
+
WHERE user_id = (SELECT id FROM users WHERE username = 'test_user')
|
|
1174
|
+
AND active = true
|
|
1175
|
+
ORDER BY id_num DESC
|
|
1176
|
+
LIMIT 1`,
|
|
1177
|
+
{},
|
|
1178
|
+
{ returnType: "rows" },
|
|
1179
|
+
);
|
|
1180
|
+
if (!activeSession.length) {
|
|
1181
|
+
throw new Error("No active session found for test_user");
|
|
1182
|
+
}
|
|
1183
|
+
await runDbsSql(
|
|
1184
|
+
page,
|
|
1185
|
+
`INSERT INTO llm_credentials(provider_id, api_key, user_id)
|
|
1186
|
+
VALUES('Prostgles', \${api_key} , \${user_id} )
|
|
1187
|
+
`,
|
|
1188
|
+
{ api_key: btoa(activeSession[0].id), user_id: activeSession[0].user_id },
|
|
1189
|
+
);
|
|
1190
|
+
};
|
|
1191
|
+
|
|
1192
|
+
/** Delete existing chat during local testing */
|
|
1193
|
+
export const deleteExistingLLMChat = async (page: PageWIds) => {
|
|
1194
|
+
const optsToggle = page.getByTestId("LLMChatOptions.toggle");
|
|
1195
|
+
if ((await optsToggle.count()) === 0) {
|
|
1196
|
+
await page.getByTestId("AskLLM").click();
|
|
1197
|
+
}
|
|
1198
|
+
await page.getByTestId("LLMChatOptions.toggle").click();
|
|
1199
|
+
await page.getByTestId("SmartForm.delete").click();
|
|
1200
|
+
await page.getByTestId("SmartForm.delete.confirm").click();
|
|
1201
|
+
await page.waitForTimeout(1e3);
|
|
1202
|
+
};
|
|
1203
|
+
|
|
1204
|
+
export const deleteAllWorkspaces = async (page: PageWIds): Promise<void> => {
|
|
1205
|
+
const list = page.getByTestId("WorkspaceMenu.list");
|
|
1206
|
+
await list.waitFor({ state: "visible", timeout: 10e3 });
|
|
1207
|
+
await page.waitForTimeout(1500);
|
|
1208
|
+
const listTextContent = await list.textContent();
|
|
1209
|
+
if (listTextContent?.trim().toLowerCase() === "default") return; // only default workspace exists
|
|
1210
|
+
await page.getByTestId("WorkspaceMenuDropDown").click();
|
|
1211
|
+
await page.getByTestId("WorkspaceDeleteBtn").last().click();
|
|
1212
|
+
await page.getByTestId("WorkspaceDeleteBtn.Confirm").click();
|
|
1213
|
+
await page.waitForTimeout(555);
|
|
1214
|
+
await page.reload();
|
|
1215
|
+
return deleteAllWorkspaces(page);
|
|
1216
|
+
};
|
|
1217
|
+
|
|
1218
|
+
export const setOrAddWorkspace = async (
|
|
1219
|
+
page: PageWIds,
|
|
1220
|
+
workspaceName: string,
|
|
1221
|
+
) => {
|
|
1222
|
+
const workspaceList = await page.getByTestId("WorkspaceMenu.list");
|
|
1223
|
+
await workspaceList.waitFor({ state: "visible", timeout: 10e3 });
|
|
1224
|
+
await page.waitForTimeout(1500);
|
|
1225
|
+
const toggleBtn = await page
|
|
1226
|
+
.getByTestId("WorkspaceMenu.list")
|
|
1227
|
+
.getByText(workspaceName, { exact: true });
|
|
1228
|
+
|
|
1229
|
+
if (await toggleBtn.count()) {
|
|
1230
|
+
await toggleBtn.click();
|
|
1231
|
+
} else {
|
|
1232
|
+
await page.getByTestId("WorkspaceMenuDropDown").click();
|
|
1233
|
+
await page.getByTestId("WorkspaceMenuDropDown.WorkspaceAddBtn").click();
|
|
1234
|
+
await page.getByLabel("New workspace name").fill(workspaceName);
|
|
1235
|
+
await page.getByTestId("WorkspaceAddBtn.Create").click();
|
|
1236
|
+
}
|
|
1237
|
+
await page.waitForTimeout(1e3);
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1240
|
+
export const newChat = async (page: PageWIds) => {
|
|
1241
|
+
await page.getByTestId("AskLLMChat.NewChat").click();
|
|
1242
|
+
await page.waitForTimeout(2e3);
|
|
1243
|
+
};
|
|
1244
|
+
|
|
1245
|
+
let setupAuthCount = 0;
|
|
1246
|
+
export const setupMagicLinkAuth = async (page: PageWIds) => {
|
|
1247
|
+
await page.getByTestId("EmailAuthSetup").locator("button").click();
|
|
1248
|
+
await page.getByTestId("EmailAuthSetup.SignupType").click();
|
|
1249
|
+
await page.locator(`[data-key="withMagicLink"]`).click();
|
|
1250
|
+
await page.getByTestId("EmailSMTPAndTemplateSetup").locator("button").click();
|
|
1251
|
+
await page.getByTestId("EmailSMTPSetup").locator("button").click();
|
|
1252
|
+
await page.locator("input#smtp-Port").fill((465 + setupAuthCount).toString());
|
|
1253
|
+
await page.locator(`[data-label="Host"] input`).fill("prostgles-test-mock");
|
|
1254
|
+
await page.getByTestId("EmailSMTPAndTemplateSetup.save").click();
|
|
1255
|
+
await page.waitForTimeout(1500);
|
|
1256
|
+
const errNodeCount = await page.getByTestId("EmailAuthSetup.error").count();
|
|
1257
|
+
await expect(errNodeCount).toBe(0);
|
|
1258
|
+
setupAuthCount++;
|
|
1259
|
+
};
|
|
1260
|
+
|
|
1261
|
+
export const clickAndWait = async (
|
|
1262
|
+
btnLocator: LocatorWIds,
|
|
1263
|
+
timeout = IS_GITHUB_WORKER ? 220_000 : 120_000,
|
|
1264
|
+
) => {
|
|
1265
|
+
await btnLocator.click();
|
|
1266
|
+
await btnLocator.page().waitForTimeout(200);
|
|
1267
|
+
await expect(btnLocator).toBeDisabled();
|
|
1268
|
+
await expect(btnLocator).toBeEnabled({ timeout }); // waits until loading finishes
|
|
1269
|
+
};
|
|
1270
|
+
|
|
1271
|
+
export const enableMCPServers = async (
|
|
1272
|
+
page: PageWIds,
|
|
1273
|
+
serverNames: string[],
|
|
1274
|
+
needsConfigSetup = false,
|
|
1275
|
+
toggleOn = true,
|
|
1276
|
+
) => {
|
|
1277
|
+
await page.getByTestId("LLMChatOptions.MCPTools").click({ timeout: 10e3 });
|
|
1278
|
+
for (const serverName of serverNames) {
|
|
1279
|
+
const toggleCheckbox = page
|
|
1280
|
+
.locator(getDataKey(serverName))
|
|
1281
|
+
.getByTestId("MCPServerFooterActions.enableToggle");
|
|
1282
|
+
|
|
1283
|
+
await toggleCheckbox.scrollIntoViewIfNeeded();
|
|
1284
|
+
await page.waitForTimeout(500);
|
|
1285
|
+
await toggleCheckbox.click();
|
|
1286
|
+
await page.waitForTimeout(500);
|
|
1287
|
+
if (!needsConfigSetup) {
|
|
1288
|
+
if (toggleOn) {
|
|
1289
|
+
await expect(toggleCheckbox).toBeChecked({ timeout: 15e3 });
|
|
1290
|
+
} else {
|
|
1291
|
+
await expect(toggleCheckbox).not.toBeChecked({ timeout: 15e3 });
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
};
|
|
1296
|
+
|
|
1297
|
+
export const deletePreviousMessages = async (page: PageWIds) => {
|
|
1298
|
+
const firstMessage = await page.getByTestId("AskLLM.DeleteMessage").first();
|
|
1299
|
+
if (await firstMessage.count()) {
|
|
1300
|
+
await firstMessage.click();
|
|
1301
|
+
await page.locator(getDataKey("allToBottom")).click();
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
export const allowOnce = async (page: PageWIds, doClick = true) => {
|
|
1306
|
+
const allowOnceBtn = await page
|
|
1307
|
+
.getByTestId("AskLLMToolApprover.AllowOnce")
|
|
1308
|
+
.last();
|
|
1309
|
+
await allowOnceBtn.waitFor({ state: "visible", timeout: 15000 });
|
|
1310
|
+
doClick && (await allowOnceBtn.click());
|
|
1311
|
+
await page.waitForTimeout(2500);
|
|
1312
|
+
};
|
|
1313
|
+
|
|
1314
|
+
// This function is used to scroll an element into view, playwright's version of this scrollIntoViewIfNeeded() results in flaky tests
|
|
1315
|
+
export async function scrollElementIntoView(locator: Locator): Promise<void> {
|
|
1316
|
+
await locator.evaluate((element) => {
|
|
1317
|
+
element.scrollIntoView({ block: "center" });
|
|
1318
|
+
});
|
|
1319
|
+
}
|