windmill-components 1.596.1 → 1.613.0
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/dist/sharedUtils/assets/tokens/colorTokensConfig.d.ts +2 -0
- package/dist/sharedUtils/base.d.ts +1 -0
- package/dist/sharedUtils/cloud.d.ts +1 -0
- package/dist/sharedUtils/common.d.ts +111 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/count.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/delete.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/insert.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/select.d.ts +13 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/update.d.ts +11 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/utils.d.ts +95 -0
- package/dist/sharedUtils/components/apps/editor/appPolicy.d.ts +6 -0
- package/dist/sharedUtils/components/apps/editor/appUtilsCore.d.ts +7 -0
- package/dist/sharedUtils/components/apps/editor/appUtilsS3.d.ts +33 -0
- package/dist/sharedUtils/components/apps/editor/commonAppUtils.d.ts +10 -0
- package/dist/sharedUtils/components/apps/editor/component/components.d.ts +5371 -0
- package/dist/sharedUtils/components/apps/editor/component/default-codes.d.ts +3 -0
- package/dist/sharedUtils/components/apps/editor/component/index.d.ts +3 -0
- package/dist/sharedUtils/components/apps/editor/component/sets.d.ts +7 -0
- package/dist/sharedUtils/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +3 -0
- package/dist/sharedUtils/components/apps/gridUtils.d.ts +14 -0
- package/dist/sharedUtils/components/apps/inputType.d.ts +178 -0
- package/dist/sharedUtils/components/apps/rx.d.ts +29 -0
- package/dist/sharedUtils/components/apps/sharedTypes.d.ts +21 -0
- package/dist/sharedUtils/components/apps/types.d.ts +274 -0
- package/dist/sharedUtils/components/assets/lib.d.ts +25 -0
- package/dist/sharedUtils/components/common/alert/model.d.ts +2 -0
- package/dist/sharedUtils/components/common/badge/model.d.ts +8 -0
- package/dist/sharedUtils/components/common/button/model.d.ts +45 -0
- package/dist/sharedUtils/components/common/fileInput/model.d.ts +1 -0
- package/dist/sharedUtils/components/common/index.d.ts +24 -0
- package/dist/sharedUtils/components/common/skeleton/model.d.ts +21 -0
- package/dist/sharedUtils/components/dbTypes.d.ts +14 -0
- package/dist/sharedUtils/components/diff_drawer.d.ts +26 -0
- package/dist/sharedUtils/components/ducklake.d.ts +1 -0
- package/dist/sharedUtils/components/flows/scheduleUtils.d.ts +7 -0
- package/dist/sharedUtils/components/icons/index.d.ts +101 -0
- package/dist/sharedUtils/components/random_positive_adjetive.d.ts +1 -0
- package/dist/sharedUtils/components/raw_apps/rawAppPolicy.d.ts +10 -0
- package/dist/sharedUtils/components/raw_apps/utils.d.ts +15 -0
- package/dist/sharedUtils/components/triggers/email/utils.d.ts +4 -0
- package/dist/sharedUtils/components/triggers/gcp/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/http/utils.d.ts +11 -0
- package/dist/sharedUtils/components/triggers/kafka/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/mqtt/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/nats/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/postgres/utils.d.ts +8 -0
- package/dist/sharedUtils/components/triggers/sqs/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/triggers.svelte.d.ts +32 -0
- package/dist/sharedUtils/components/triggers/utils.d.ts +80 -0
- package/dist/sharedUtils/components/triggers/websocket/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers.d.ts +20 -0
- package/dist/sharedUtils/gen/core/ApiError.d.ts +10 -0
- package/dist/sharedUtils/gen/core/ApiRequestOptions.d.ts +13 -0
- package/dist/sharedUtils/gen/core/ApiResult.d.ts +7 -0
- package/dist/sharedUtils/gen/core/CancelablePromise.d.ts +26 -0
- package/dist/sharedUtils/gen/core/OpenAPI.d.ts +27 -0
- package/dist/sharedUtils/gen/core/request.d.ts +29 -0
- package/dist/sharedUtils/gen/index.d.ts +6 -0
- package/dist/sharedUtils/gen/schemas.gen.d.ts +7036 -0
- package/dist/sharedUtils/gen/services.gen.d.ts +6047 -0
- package/dist/sharedUtils/gen/types.gen.d.ts +21881 -0
- package/dist/sharedUtils/history.svelte.d.ts +9 -0
- package/dist/sharedUtils/hub.d.ts +49 -0
- package/dist/sharedUtils/jsr.json +6 -0
- package/dist/sharedUtils/lib.d.ts +5 -0
- package/dist/sharedUtils/lib.es.js +1588 -0
- package/dist/sharedUtils/package.json +12 -0
- package/dist/sharedUtils/schema.d.ts +3 -0
- package/dist/sharedUtils/stores.d.ts +97 -0
- package/dist/sharedUtils/svelte5Utils.svelte.d.ts +80 -0
- package/dist/sharedUtils/toast.d.ts +8 -0
- package/dist/sharedUtils/utils.d.ts +265 -0
- package/package/assets/tokens/tokens.json +11 -1
- package/package/ata/apis.js +78 -5
- package/package/components/AddUser.svelte +1 -1
- package/package/components/CenteredModal.svelte +32 -24
- package/package/components/CenteredModal.svelte.d.ts +7 -27
- package/package/components/CenteredPage.svelte +5 -2
- package/package/components/CenteredPage.svelte.d.ts +2 -0
- package/package/components/ConcurrentJobsChart.svelte +3 -2
- package/package/components/ConcurrentJobsChart.svelte.d.ts +2 -2
- package/package/components/CustomPopover.svelte +20 -23
- package/package/components/CustomPopover.svelte.d.ts +14 -39
- package/package/components/DBManager.svelte +105 -17
- package/package/components/DBManager.svelte.d.ts +2 -1
- package/package/components/DBManagerContent.svelte +4 -3
- package/package/components/DBManagerContent.svelte.d.ts +1 -1
- package/package/components/DBTableEditor.svelte +210 -171
- package/package/components/DBTableEditor.svelte.d.ts +22 -3
- package/package/components/Description.svelte +3 -2
- package/package/components/Dev.svelte +36 -2
- package/package/components/DiffDrawer.svelte +8 -29
- package/package/components/DiffEditor.svelte +32 -2
- package/package/components/DisplayResult.svelte +32 -24
- package/package/components/Editor.svelte +70 -16
- package/package/components/Editor.svelte.d.ts +3 -0
- package/package/components/EditorBar.svelte +1 -1
- package/package/components/FakeMonacoPlaceHolder.svelte +1 -1
- package/package/components/FlowBuilder.svelte +17 -11
- package/package/components/FlowDiffViewer.svelte +37 -0
- package/package/components/FlowDiffViewer.svelte.d.ts +7 -0
- package/package/components/FlowPreviewContent.svelte +3 -2
- package/package/components/FlowPreviewResult.svelte +0 -4
- package/package/components/FlowStatusViewerInner.svelte +50 -33
- package/package/components/FlowStatusViewerInner.svelte.d.ts +1 -1
- package/package/components/FlowStatusWaitingForEvents.svelte +27 -23
- package/package/components/FlowStatusWaitingForEvents.svelte.d.ts +4 -18
- package/package/components/FlowViewer.svelte +103 -2
- package/package/components/FlowViewer.svelte.d.ts +9 -3
- package/package/components/ForkWorkspaceBanner.svelte +16 -13
- package/package/components/GraphqlSchemaViewer.svelte +8 -1
- package/package/components/HistoricInputs.svelte +25 -27
- package/package/components/HistoricInputs.svelte.d.ts +2 -2
- package/package/components/InstanceSetting.svelte +38 -0
- package/package/components/InviteUser.svelte +16 -42
- package/package/components/InviteUser.svelte.d.ts +4 -18
- package/package/components/JobOtelTraces.svelte +287 -0
- package/package/components/JobOtelTraces.svelte.d.ts +6 -0
- package/package/components/JsonInputs.svelte +6 -8
- package/package/components/JsonInputs.svelte.d.ts +7 -8
- package/package/components/LogViewer.svelte +91 -33
- package/package/components/Login.svelte +21 -0
- package/package/components/ManualPopover.svelte +5 -6
- package/package/components/ManualPopover.svelte.d.ts +9 -35
- package/package/components/MemoryFootprintViewer.svelte +2 -6
- package/package/components/ModulePreview.svelte +23 -21
- package/package/components/ModulePreview.svelte.d.ts +1 -0
- package/package/components/Path.svelte +2 -2
- package/package/components/Path.svelte.d.ts +1 -1
- package/package/components/ResourcePicker.svelte +3 -0
- package/package/components/ResourcePicker.svelte.d.ts +1 -0
- package/package/components/RunButton.svelte +5 -15
- package/package/components/RunButton.svelte.d.ts +7 -19
- package/package/components/RunChart.svelte +8 -4
- package/package/components/RunChart.svelte.d.ts +2 -2
- package/package/components/RunFormAdvancedPopup.svelte +1 -1
- package/package/components/RunsPage.svelte +169 -539
- package/package/components/RunsPage.svelte.d.ts +5 -5
- package/package/components/S3FilePicker.svelte +7 -11
- package/package/components/S3FilePickerInner.svelte +2 -3
- package/package/components/S3FilePickerInner.svelte.d.ts +2 -2
- package/package/components/SchemaForm.svelte +26 -19
- package/package/components/SchemaFormWithArgPicker.svelte +4 -3
- package/package/components/ScriptBuilder.svelte +1 -1
- package/package/components/ScriptEditor.svelte +575 -101
- package/package/components/Section.svelte +3 -1
- package/package/components/ServiceLogsInner.svelte +4 -4
- package/package/components/SimpleEditor.svelte +46 -2
- package/package/components/SuperadminSettingsInner.svelte +1 -1
- package/package/components/TemplateEditor.svelte +54 -29
- package/package/components/TemplateEditor.svelte.d.ts +13 -102
- package/package/components/UserSettings.svelte +1 -1
- package/package/components/WorkerTagPicker.svelte +1 -1
- package/package/components/WorkerTagSelect.svelte +5 -2
- package/package/components/WorkspaceTutorials.svelte +5 -0
- package/package/components/apps/components/buttons/AppButton.svelte +21 -6
- package/package/components/apps/components/buttons/AppForm.svelte +2 -1
- package/package/components/apps/components/buttons/AppFormButton.svelte +2 -1
- package/package/components/apps/components/display/dbtable/AppDbExplorer.svelte +0 -4
- package/package/components/apps/components/display/dbtable/metadata.js +69 -30
- package/package/components/apps/components/display/dbtable/queries/alterTable.d.ts +46 -0
- package/package/components/apps/components/display/dbtable/queries/alterTable.js +314 -0
- package/package/components/apps/components/display/dbtable/queries/alterTable.test.d.ts +1 -0
- package/package/components/apps/components/display/dbtable/queries/alterTable.test.js +867 -0
- package/package/components/apps/components/display/dbtable/queries/createTable.d.ts +2 -24
- package/package/components/apps/components/display/dbtable/queries/createTable.js +11 -25
- package/package/components/apps/components/display/dbtable/queries/dbQueriesUtils.d.ts +9 -0
- package/package/components/apps/components/display/dbtable/queries/dbQueriesUtils.js +45 -0
- package/package/components/apps/components/display/dbtable/queries/relationalKeys.d.ts +47 -0
- package/package/components/apps/components/display/dbtable/queries/relationalKeys.js +402 -0
- package/package/components/apps/components/display/dbtable/queries/select.d.ts +2 -0
- package/package/components/apps/components/display/dbtable/queries/select.js +37 -6
- package/package/components/apps/components/display/dbtable/tableEditor.d.ts +35 -0
- package/package/components/apps/components/display/dbtable/tableEditor.js +49 -0
- package/package/components/apps/components/display/dbtable/utils.d.ts +10 -1
- package/package/components/apps/components/display/dbtable/utils.js +52 -20
- package/package/components/apps/components/helpers/HiddenComponent.svelte +1 -1
- package/package/components/apps/components/helpers/InputValue.svelte +1 -1
- package/package/components/apps/components/helpers/ResolveConfig.svelte +1 -1
- package/package/components/apps/components/helpers/RunnableComponent.svelte +3 -2
- package/package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +1 -1
- package/package/components/apps/components/helpers/RunnableWrapper.svelte +2 -2
- package/package/components/apps/editor/AppEditorHeader.svelte +8 -1
- package/package/components/apps/editor/AppEditorHeaderDeploy.svelte +32 -29
- package/package/components/apps/editor/AppEditorHeaderDeploy.svelte.d.ts +2 -2
- package/package/components/apps/editor/AppEditorHeaderDeployInitialDraft.svelte +4 -4
- package/package/components/apps/editor/AppEditorHeaderDeployInitialDraft.svelte.d.ts +3 -3
- package/package/components/apps/editor/PublicApp.svelte +49 -30
- package/package/components/apps/editor/PublicApp.svelte.d.ts +1 -0
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte +77 -7
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte.d.ts +2 -2
- package/package/components/apps/editor/inlineScriptsPanel/utils.d.ts +2 -2
- package/package/components/apps/editor/inlineScriptsPanel/utils.js +10 -1
- package/package/components/apps/inputType.d.ts +6 -1
- package/package/components/auditLogs/AuditLogsFilters.svelte +9 -17
- package/package/components/auditLogs/AuditLogsFilters.svelte.d.ts +1 -1
- package/package/components/common/button/model.js +1 -1
- package/package/components/common/calendarPicker/CalendarPicker.svelte.d.ts +1 -1
- package/package/components/common/languageIcons/TypeScript.svelte +5 -3
- package/package/components/common/languageIcons/TypeScript.svelte.d.ts +1 -0
- package/package/components/common/modal/Modal.svelte +3 -3
- package/package/components/copilot/autocomplete/Autocompletor.js +3 -2
- package/package/components/copilot/chat/AIButtonStyle.d.ts +1 -1
- package/package/components/copilot/chat/AIButtonStyle.js +2 -1
- package/package/components/copilot/chat/AIChat.svelte +3 -1
- package/package/components/copilot/chat/AIChatDisplay.svelte +89 -4
- package/package/components/copilot/chat/AIChatInput.svelte +275 -0
- package/package/components/copilot/chat/AIChatManager.svelte.js +107 -1
- package/package/components/copilot/chat/AiChatLayout.svelte +15 -30
- package/package/components/copilot/chat/AppAvailableContextList.svelte +263 -0
- package/package/components/copilot/chat/AppAvailableContextList.svelte.d.ts +13 -0
- package/package/components/copilot/chat/ContextElementBadge.svelte +44 -0
- package/package/components/copilot/chat/DatatableCreationPolicy.svelte +32 -33
- package/package/components/copilot/chat/ProviderModelSelector.svelte +1 -1
- package/package/components/copilot/chat/__tests__/app/appEvalHelpers.js +3 -0
- package/package/components/copilot/chat/__tests__/flow/flowEvalHelpers.js +4 -0
- package/package/components/copilot/chat/app/core.d.ts +56 -15
- package/package/components/copilot/chat/app/core.js +141 -22
- package/package/components/copilot/chat/context.d.ts +59 -2
- package/package/components/copilot/chat/context.js +6 -2
- package/package/components/copilot/chat/flow/FlowAIChat.svelte +22 -0
- package/package/components/copilot/chat/flow/core.d.ts +3 -1
- package/package/components/copilot/chat/flow/core.js +29 -2
- package/package/components/copilot/chat/flow/openFlow.json +1 -1
- package/package/components/copilot/chat/flow/openFlowZod.d.ts +1 -0
- package/package/components/copilot/chat/flow/openFlowZod.js +14 -2
- package/package/components/copilot/chat/script/core.d.ts +4 -1
- package/package/components/copilot/chat/script/core.js +38 -2
- package/package/components/copilot/chat/shared.d.ts +10 -0
- package/package/components/copilot/chat/shared.js +24 -0
- package/package/components/copilot/lib.d.ts +1 -1
- package/package/components/custom_ui.d.ts +2 -0
- package/package/components/dbOps.d.ts +18 -4
- package/package/components/dbOps.js +25 -3
- package/package/components/debug/DebugConsole.svelte +277 -0
- package/package/components/debug/DebugConsole.svelte.d.ts +13 -0
- package/package/components/debug/DebugPanel.svelte +97 -0
- package/package/components/debug/DebugPanel.svelte.d.ts +11 -0
- package/package/components/debug/DebugToolbar.svelte +148 -0
- package/package/components/debug/DebugToolbar.svelte.d.ts +17 -0
- package/package/components/debug/DebugVariableViewer.svelte +115 -0
- package/package/components/debug/DebugVariableViewer.svelte.d.ts +11 -0
- package/package/components/debug/MonacoDebugger.svelte +384 -0
- package/package/components/debug/MonacoDebugger.svelte.d.ts +15 -0
- package/package/components/debug/dapClient.d.ts +192 -0
- package/package/components/debug/dapClient.js +426 -0
- package/package/components/debug/debugUtils.d.ts +30 -0
- package/package/components/debug/debugUtils.js +131 -0
- package/package/components/debug/index.d.ts +75 -0
- package/package/components/debug/index.js +82 -0
- package/package/components/flows/CreateActionsApp.svelte +6 -4
- package/package/components/flows/DebounceLimit.svelte.d.ts +1 -1
- package/package/components/flows/FlowHistoryInner.svelte +15 -4
- package/package/components/flows/content/AgentToolWrapper.svelte +1 -1
- package/package/components/flows/content/FlowEditorDrawer.svelte +124 -0
- package/package/components/flows/content/FlowEditorDrawer.svelte.d.ts +22 -0
- package/package/components/flows/content/FlowInput.svelte +211 -37
- package/package/components/flows/content/FlowModuleComponent.svelte +553 -67
- package/package/components/flows/content/FlowModuleEarlyStop.svelte +8 -10
- package/package/components/flows/content/FlowModuleHeader.svelte +7 -4
- package/package/components/flows/content/FlowModuleWorkerTagSelect.svelte +1 -1
- package/package/components/flows/content/McpOAuthConnect.svelte +217 -0
- package/package/components/flows/content/McpOAuthConnect.svelte.d.ts +7 -0
- package/package/components/flows/content/McpToolEditor.svelte +50 -37
- package/package/components/flows/content/McpToolEditor.svelte.d.ts +0 -1
- package/package/components/flows/conversations/FlowChat.svelte +16 -2
- package/package/components/flows/conversations/FlowChat.svelte.d.ts +2 -1
- package/package/components/flows/conversations/FlowChatInterface.svelte +103 -6
- package/package/components/flows/conversations/FlowChatInterface.svelte.d.ts +2 -0
- package/package/components/flows/conversations/FlowChatManager.svelte.js +53 -21
- package/package/components/flows/header/FlowImportExportMenu.svelte +1 -1
- package/package/components/flows/propPicker/PropPickerWrapper.svelte +3 -1
- package/package/components/flows/types.d.ts +2 -0
- package/package/components/git_sync/GitSyncRepositoryCard.svelte +16 -8
- package/package/components/home/ItemsList.svelte +5 -5
- package/package/components/home/TutorialBanner.svelte +34 -18
- package/package/components/icons/CssIcon.svelte +20 -0
- package/package/components/icons/CssIcon.svelte.d.ts +7 -25
- package/package/components/icons/HtmlIcon.svelte +20 -0
- package/package/components/icons/HtmlIcon.svelte.d.ts +8 -0
- package/package/components/icons/JavaScriptIcon.svelte +10 -2
- package/package/components/icons/JavaScriptIcon.svelte.d.ts +1 -0
- package/package/components/icons/JsonIcon.svelte +8 -2
- package/package/components/icons/JsonIcon.svelte.d.ts +1 -0
- package/package/components/icons/LessIcon.svelte +16 -0
- package/package/components/icons/LessIcon.svelte.d.ts +8 -0
- package/package/components/icons/MarkdownIcon.svelte +20 -0
- package/package/components/icons/MarkdownIcon.svelte.d.ts +8 -0
- package/package/components/icons/ReactIcon.svelte +10 -2
- package/package/components/icons/ReactIcon.svelte.d.ts +1 -0
- package/package/components/icons/SassIcon.svelte +28 -0
- package/package/components/icons/SassIcon.svelte.d.ts +8 -0
- package/package/components/icons/SvelteIcon.svelte +10 -2
- package/package/components/icons/SvelteIcon.svelte.d.ts +1 -0
- package/package/components/icons/VueIcon.svelte +10 -2
- package/package/components/icons/VueIcon.svelte.d.ts +1 -0
- package/package/components/icons/YamlIcon.svelte +20 -0
- package/package/components/icons/YamlIcon.svelte.d.ts +8 -0
- package/package/components/instanceSettings/SecretBackendConfig.svelte +514 -0
- package/package/components/instanceSettings/SecretBackendConfig.svelte.d.ts +8 -0
- package/package/components/instanceSettings.d.ts +2 -1
- package/package/components/instanceSettings.js +32 -1
- package/package/components/jobs/JobPreview.svelte +46 -39
- package/package/components/jobs/JobPreview.svelte.d.ts +1 -0
- package/package/components/monacoLanguagesOptions.js +16 -15
- package/package/components/propertyPicker/PropPicker.svelte +16 -2
- package/package/components/propertyPicker/PropPicker.svelte.d.ts +2 -0
- package/package/components/raw_apps/DefaultDatabaseSelector.svelte +9 -5
- package/package/components/raw_apps/FileEditorIcon.svelte +12 -7
- package/package/components/raw_apps/FileEditorIcon.svelte.d.ts +2 -0
- package/package/components/raw_apps/FileTreeNode.svelte +119 -83
- package/package/components/raw_apps/RawAppBackgroundRunner.svelte +88 -8
- package/package/components/raw_apps/RawAppDataTableList.svelte +12 -9
- package/package/components/raw_apps/RawAppEditor.svelte +218 -68
- package/package/components/raw_apps/RawAppEditorHeader.svelte +33 -16
- package/package/components/raw_apps/RawAppHistoryList.svelte +264 -80
- package/package/components/raw_apps/RawAppHistoryList.svelte.d.ts +1 -0
- package/package/components/raw_apps/RawAppHistoryManager.svelte.d.ts +15 -1
- package/package/components/raw_apps/RawAppHistoryManager.svelte.js +46 -12
- package/package/components/raw_apps/RawAppInlineScriptEditor.svelte +549 -47
- package/package/components/raw_apps/RawAppInlineScriptEditor.svelte.d.ts +31 -5
- package/package/components/raw_apps/RawAppInlineScriptPanelList.svelte +25 -18
- package/package/components/raw_apps/RawAppInlineScriptPanelList.svelte.d.ts +1 -0
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte +141 -10
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte.d.ts +8 -0
- package/package/components/raw_apps/RawAppInlineScriptsPanel.svelte +2 -1
- package/package/components/raw_apps/RawAppInlineScriptsPanel.svelte.d.ts +9 -1
- package/package/components/raw_apps/RawAppInputsSpecEditor.svelte +47 -3
- package/package/components/raw_apps/RawAppInputsSpecEditor.svelte.d.ts +2 -2
- package/package/components/raw_apps/RawAppModules.svelte +13 -7
- package/package/components/raw_apps/RawAppPreview.svelte +48 -6
- package/package/components/raw_apps/RawAppSidebar.svelte +194 -125
- package/package/components/raw_apps/RawAppSidebar.svelte.d.ts +1 -0
- package/package/components/raw_apps/RunnableRow.svelte +41 -0
- package/package/components/raw_apps/RunnableRow.svelte.d.ts +11 -0
- package/package/components/raw_apps/utils.d.ts +1 -1
- package/package/components/raw_apps/utils.js +76 -18
- package/package/components/runs/ManuelDatePicker.svelte +3 -3
- package/package/components/runs/ManuelDatePicker.svelte.d.ts +3 -3
- package/package/components/runs/NoWorkerWithTagWarning.svelte +5 -1
- package/package/components/runs/RunsFilter.svelte +75 -63
- package/package/components/runs/RunsFilter.svelte.d.ts +35 -4
- package/package/components/runs/RunsQueue.svelte.d.ts +1 -1
- package/package/components/runs/RunsTable.svelte +1 -1
- package/package/components/runs/RunsTable.svelte.d.ts +1 -1
- package/package/components/runs/useJobsLoader.svelte.d.ts +34 -0
- package/package/components/runs/useJobsLoader.svelte.js +507 -0
- package/package/components/scriptEditor/LogPanel.svelte +17 -2
- package/package/components/scriptEditor/LogPanel.svelte.d.ts +2 -0
- package/package/components/select/SelectDropdown.svelte +2 -2
- package/package/components/settings/AIPromptsModal.svelte +88 -0
- package/package/components/settings/AIPromptsModal.svelte.d.ts +11 -0
- package/package/components/settings/ChangeWorkspaceColor.svelte +4 -3
- package/package/components/settings/ChangeWorkspaceId.svelte +14 -10
- package/package/components/settings/ChangeWorkspaceName.svelte +7 -6
- package/package/components/settings/CreateToken.svelte +1 -1
- package/package/components/settings/UserAIPromptsSettings.svelte +56 -15
- package/package/components/settings/WorkspaceOperatorSettings.svelte +68 -85
- package/package/components/settings/WorkspaceUserSettings.svelte +531 -406
- package/package/components/sidebar/MenuButton.svelte +46 -24
- package/package/components/sidebar/MenuButton.svelte.d.ts +2 -0
- package/package/components/sidebar/MultiplayerMenu.svelte +3 -3
- package/package/components/sidebar/OperatorMenu.svelte +62 -87
- package/package/components/sidebar/SidebarContent.svelte +7 -2
- package/package/components/sidebar/WorkspaceMenu.svelte +35 -85
- package/package/components/sqlTypeService.js +4 -3
- package/package/components/table/DataTable.svelte +3 -2
- package/package/components/table/DataTable.svelte.d.ts +1 -0
- package/package/components/text_input/TextInput.svelte +3 -0
- package/package/components/text_input/TextInput.svelte.d.ts +2 -0
- package/package/components/tutorials/FlowBuilderLiveTutorial.svelte +6 -35
- package/package/components/tutorials/RunsTutorial.svelte +399 -0
- package/package/components/{schema/SchemaPicker.svelte.d.ts → tutorials/RunsTutorial.svelte.d.ts} +11 -12
- package/package/components/tutorials/TroubleshootFlowTutorial.svelte +5 -20
- package/package/components/tutorials/utils.d.ts +16 -0
- package/package/components/tutorials/utils.js +96 -0
- package/package/components/tutorials/workspace/WorkspaceOnboardingOperatorTutorial.svelte +133 -0
- package/package/components/{SavedInputs.svelte.d.ts → tutorials/workspace/WorkspaceOnboardingOperatorTutorial.svelte.d.ts} +8 -11
- package/package/components/vscode.js +6 -6
- package/package/components/workspace/WorkspaceCard.svelte +184 -0
- package/package/components/workspace/WorkspaceCard.svelte.d.ts +24 -0
- package/package/components/workspace/WorkspaceIcon.svelte +21 -0
- package/package/components/workspace/WorkspaceIcon.svelte.d.ts +9 -0
- package/package/components/workspace/WorkspaceTreeView.svelte +331 -0
- package/package/components/workspace/WorkspaceTreeView.svelte.d.ts +15 -0
- package/package/components/workspaceSettings/AISettings.svelte +146 -108
- package/package/components/workspaceSettings/CreateWorkspace.svelte +25 -11
- package/package/components/workspaceSettings/DucklakeSettings.svelte +46 -23
- package/package/components/workspaceSettings/DucklakeSettings.svelte.d.ts +2 -1
- package/package/components/workspaceSettings/ModelTokenLimits.svelte +14 -18
- package/package/components/workspaceSettings/StorageSettings.svelte +280 -241
- package/package/components/workspaceSettings/StorageSettings.svelte.d.ts +1 -0
- package/package/consts.js +4 -1
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +126 -0
- package/package/gen/schemas.gen.js +126 -0
- package/package/gen/services.gen.d.ts +151 -2
- package/package/gen/services.gen.js +301 -4
- package/package/gen/types.gen.d.ts +584 -2
- package/package/hubPaths.json +3 -2
- package/package/infer.js +2 -0
- package/package/monaco_workers/graphql.worker.bundle.js +121 -121
- package/package/rawAppWmillTs.d.ts +11 -0
- package/package/rawAppWmillTs.js +38 -1
- package/package/svelte5Utils.svelte.d.ts +9 -0
- package/package/svelte5Utils.svelte.js +51 -1
- package/package/tutorialUtils.js +0 -4
- package/package/tutorials/config.js +31 -3
- package/package/tutorials/roleUtils.d.ts +1 -1
- package/package/tutorials/roleUtils.js +6 -2
- package/package/utils.js +159 -1
- package/package.json +16 -17
- package/package/components/SavedInputs.svelte +0 -416
- package/package/components/runs/JobsLoader.svelte +0 -468
- package/package/components/runs/JobsLoader.svelte.d.ts +0 -49
- package/package/components/schema/SchemaPicker.svelte +0 -92
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
<script lang="ts">import AddUser from '../AddUser.svelte';
|
|
2
|
-
import { Badge, Button, Skeleton } from '../common';
|
|
2
|
+
import { Alert, Badge, Button, Section, Skeleton } from '../common';
|
|
3
3
|
import Popover from '../meltComponents/Popover.svelte';
|
|
4
4
|
import ToggleButton from '../common/toggleButton-v2/ToggleButton.svelte';
|
|
5
5
|
import ToggleButtonGroup from '../common/toggleButton-v2/ToggleButtonGroup.svelte';
|
|
6
6
|
import WorkspaceOperatorSettings from './WorkspaceOperatorSettings.svelte';
|
|
7
7
|
import InviteUser from '../InviteUser.svelte';
|
|
8
|
-
import PageHeader from '../PageHeader.svelte';
|
|
9
8
|
import DataTable from '../table/DataTable.svelte';
|
|
10
9
|
import Head from '../table/Head.svelte';
|
|
11
10
|
import Toggle from '../Toggle.svelte';
|
|
12
11
|
import Tooltip from '../Tooltip.svelte';
|
|
13
12
|
import { UserService, WorkspaceService, GroupService } from '../../gen';
|
|
14
|
-
import { userStore, workspaceStore } from '../../stores';
|
|
13
|
+
import { userStore, workspaceStore, superadmin, globalEmailInvite } from '../../stores';
|
|
15
14
|
import { sendUserToast } from '../../toast';
|
|
16
|
-
import { Loader2, Mails, Search, Plus } from 'lucide-svelte';
|
|
15
|
+
import { Loader2, Mails, Search, Plus, UserMinus, X } from 'lucide-svelte';
|
|
17
16
|
import Select from '../select/Select.svelte';
|
|
18
17
|
import SearchItems from '../SearchItems.svelte';
|
|
19
18
|
import Cell from '../table/Cell.svelte';
|
|
@@ -22,13 +21,14 @@ import ConfirmationModal from '../common/confirmationModal/ConfirmationModal.sve
|
|
|
22
21
|
import { isCloudHosted } from '../../cloud';
|
|
23
22
|
import { truncate } from '../../utils';
|
|
24
23
|
import { onDestroy, untrack } from 'svelte';
|
|
24
|
+
import { goto } from '../../navigation';
|
|
25
25
|
let users = $state(undefined);
|
|
26
26
|
let invites = $state([]);
|
|
27
27
|
let filteredUsers = $state(undefined);
|
|
28
28
|
let userFilter = $state('');
|
|
29
29
|
let auto_invite_domain = $state();
|
|
30
30
|
let operatorOnly = $state(undefined);
|
|
31
|
-
let autoAdd = $state(
|
|
31
|
+
let autoAdd = $state(false);
|
|
32
32
|
let nbDisplayed = $state(30);
|
|
33
33
|
// Instance group auto-add settings
|
|
34
34
|
let instanceGroups = $state([]);
|
|
@@ -219,6 +219,10 @@ onDestroy(() => {
|
|
|
219
219
|
let deleteConfirmedCallback = $state(undefined);
|
|
220
220
|
let removeInstanceGroupConfirmedCallback = $state(undefined);
|
|
221
221
|
let convertConfirmedCallback = $state(undefined);
|
|
222
|
+
// Auto-add/invite confirmation modal states
|
|
223
|
+
let autoAddConfirmCallback = $state(undefined);
|
|
224
|
+
let autoInviteDisableConfirmCallback = $state(undefined);
|
|
225
|
+
let switchToAutoAddConfirmCallback = $state(undefined);
|
|
222
226
|
async function removeAllInvitesFromDomain() {
|
|
223
227
|
await Promise.all(invites
|
|
224
228
|
.filter((x) => isCloudHosted() ? x.email.endsWith('@' + (auto_invite_domain ?? '')) : true)
|
|
@@ -232,9 +236,93 @@ async function removeAllInvitesFromDomain() {
|
|
|
232
236
|
})));
|
|
233
237
|
}
|
|
234
238
|
let nbInviteDisplayed = $state(50);
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
239
|
+
async function inviteUser(email, selected) {
|
|
240
|
+
try {
|
|
241
|
+
await WorkspaceService.inviteUser({
|
|
242
|
+
workspace: $workspaceStore,
|
|
243
|
+
requestBody: {
|
|
244
|
+
email,
|
|
245
|
+
is_admin: selected == 'admin',
|
|
246
|
+
operator: selected == 'operator'
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
sendUserToast(`Invited ${email}`);
|
|
250
|
+
}
|
|
251
|
+
catch (e) {
|
|
252
|
+
console.error('Failed to invite user:', e);
|
|
253
|
+
sendUserToast('Failed to invite user', true);
|
|
254
|
+
}
|
|
255
|
+
if (!(await UserService.existsEmail({ email }))) {
|
|
256
|
+
let isSuperadmin = $superadmin;
|
|
257
|
+
if (!isCloudHosted()) {
|
|
258
|
+
sendUserToast(`User ${email} is not registered yet on the instance. ${!isSuperadmin
|
|
259
|
+
? `If not using SSO, ask an administrator to add ${email} to the instance`
|
|
260
|
+
: ''}`, true, isSuperadmin
|
|
261
|
+
? [
|
|
262
|
+
{
|
|
263
|
+
label: 'Add user to the instance',
|
|
264
|
+
callback: () => {
|
|
265
|
+
$globalEmailInvite = email;
|
|
266
|
+
goto('#superadmin-settings');
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
: []);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
listInvites();
|
|
274
|
+
}
|
|
275
|
+
async function updateAutoInvite(enable) {
|
|
276
|
+
// Cleanup invites if auto add is enabled
|
|
277
|
+
if (enable && autoAdd) {
|
|
278
|
+
await removeAllInvitesFromDomain();
|
|
279
|
+
}
|
|
280
|
+
const updateType = enable ? (autoInviteOrAddEnabled ? 'update' : 'enable') : 'disable';
|
|
281
|
+
try {
|
|
282
|
+
// await removeAllInvitesFromDomain()
|
|
283
|
+
await WorkspaceService.editAutoInvite({
|
|
284
|
+
workspace: $workspaceStore ?? '',
|
|
285
|
+
requestBody: enable
|
|
286
|
+
? {
|
|
287
|
+
operator: operatorOnly ?? false,
|
|
288
|
+
invite_all: !isCloudHosted(),
|
|
289
|
+
auto_add: autoAdd
|
|
290
|
+
}
|
|
291
|
+
: {
|
|
292
|
+
operator: undefined,
|
|
293
|
+
auto_add: undefined
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
const message = updateType === 'update'
|
|
297
|
+
? `Auto-${autoAdd ? 'add' : 'invite'} updated`
|
|
298
|
+
: updateType === 'enable'
|
|
299
|
+
? `Auto-${autoAdd ? 'add' : 'invite'} enabled`
|
|
300
|
+
: `Auto-${autoAdd ? 'add' : 'invite'} disabled`;
|
|
301
|
+
sendUserToast(message);
|
|
302
|
+
}
|
|
303
|
+
catch (e) {
|
|
304
|
+
console.error('Failed to update auto invite:', e);
|
|
305
|
+
sendUserToast('Failed to update auto invite', true);
|
|
306
|
+
}
|
|
307
|
+
loadSettings();
|
|
308
|
+
listInvites();
|
|
309
|
+
listUsers();
|
|
310
|
+
}
|
|
311
|
+
const autoInviteOrAddEnabled = $derived(auto_invite_domain != undefined);
|
|
312
|
+
// Legacy auto-invite: user already has auto-invite enabled (not auto-add) on a non-cloud instance
|
|
313
|
+
// This preserves their existing setup even though auto-invite is deprecated for new setups
|
|
314
|
+
const isLegacyAutoInvite = $derived(autoInviteOrAddEnabled && !autoAdd && !isCloudHosted());
|
|
315
|
+
// Show auto-invite toggle only for:
|
|
316
|
+
// - Cloud hosted users (always available)
|
|
317
|
+
// - Legacy users who already have auto-invite enabled (preserve existing setup)
|
|
318
|
+
const showAutoInviteToggle = $derived(isCloudHosted() || isLegacyAutoInvite);
|
|
319
|
+
// Display mode for labels: for non-cloud, non-legacy users, always show "add"
|
|
320
|
+
// For cloud or legacy users, show based on actual autoAdd setting
|
|
321
|
+
const displayMode = $derived.by(() => {
|
|
322
|
+
if (!isCloudHosted() && !isLegacyAutoInvite) {
|
|
323
|
+
return 'add';
|
|
324
|
+
}
|
|
325
|
+
return autoAdd ? 'add' : 'invite';
|
|
238
326
|
});
|
|
239
327
|
</script>
|
|
240
328
|
|
|
@@ -257,336 +345,334 @@ $effect(() => {
|
|
|
257
345
|
</div>
|
|
258
346
|
</div>
|
|
259
347
|
</div>
|
|
260
|
-
<div class="flex flex-row justify-between items-center pt-2">
|
|
261
|
-
<PageHeader
|
|
262
|
-
title="Members {(filteredUsers?.length ?? users?.length) != undefined
|
|
263
|
-
? `(${filteredUsers?.length ?? users?.length})`
|
|
264
|
-
: ''}"
|
|
265
|
-
primary={false}
|
|
266
|
-
tooltip="Manage users manually or enable SSO authentication."
|
|
267
|
-
documentationLink="https://www.windmill.dev/docs/core_concepts/authentification"
|
|
268
|
-
/>
|
|
269
|
-
|
|
270
|
-
<div class="flex flex-row items-center gap-2 relative whitespace-nowrap">
|
|
271
|
-
<input placeholder="Filter members" bind:value={userFilter} class="input !pl-8" />
|
|
272
|
-
<Search class="absolute left-2" size={14} />
|
|
273
|
-
|
|
274
|
-
<Popover
|
|
275
|
-
floatingConfig={{ strategy: 'absolute', placement: 'bottom-end' }}
|
|
276
|
-
usePointerDownOutside
|
|
277
|
-
>
|
|
278
|
-
{#snippet trigger()}
|
|
279
|
-
<Button
|
|
280
|
-
color={'accent'}
|
|
281
|
-
destructive={auto_invite_domain === undefined}
|
|
282
|
-
variant="default"
|
|
283
|
-
size="xs"
|
|
284
|
-
nonCaptureEvent={true}
|
|
285
|
-
startIcon={{ icon: Mails }}
|
|
286
|
-
>Auto-{showInvites && !autoAdd ? 'invite' : 'add'}: {auto_invite_domain != undefined
|
|
287
|
-
? 'ON'
|
|
288
|
-
: 'OFF'}
|
|
289
|
-
</Button>
|
|
290
|
-
{/snippet}
|
|
291
|
-
{#snippet content()}
|
|
292
|
-
<div class="flex flex-col items-start p-4">
|
|
293
|
-
<span class="text-sm leading-6 font-semibold">
|
|
294
|
-
{isCloudHosted()
|
|
295
|
-
? `Auto-add anyone from ${
|
|
296
|
-
auto_invite_domain != undefined ? auto_invite_domain : domain
|
|
297
|
-
}`
|
|
298
|
-
: `Auto-add anyone joining the instance`}
|
|
299
|
-
</span>
|
|
300
|
-
|
|
301
|
-
{#if showInvites}
|
|
302
|
-
<span class="text-xs mb-1 leading-6 pt-2"
|
|
303
|
-
>Mode <Tooltip>Whether to invite or add users directly to the workspace.</Tooltip>
|
|
304
|
-
</span>
|
|
305
|
-
<ToggleButtonGroup
|
|
306
|
-
selected={autoAdd ? 'add' : 'invite'}
|
|
307
|
-
on:selected={async (e) => {
|
|
308
|
-
if (auto_invite_domain != undefined) {
|
|
309
|
-
await removeAllInvitesFromDomain()
|
|
310
|
-
await WorkspaceService.editAutoInvite({
|
|
311
|
-
workspace: $workspaceStore ?? '',
|
|
312
|
-
requestBody: {
|
|
313
|
-
operator: operatorOnly ?? false,
|
|
314
|
-
invite_all: !isCloudHosted(),
|
|
315
|
-
auto_add: e.detail === 'add'
|
|
316
|
-
}
|
|
317
|
-
})
|
|
318
|
-
loadSettings()
|
|
319
|
-
listInvites()
|
|
320
|
-
listUsers()
|
|
321
|
-
autoAdd = e.detail === 'add'
|
|
322
|
-
} else {
|
|
323
|
-
autoAdd = e.detail === 'add'
|
|
324
|
-
}
|
|
325
|
-
}}
|
|
326
|
-
>
|
|
327
|
-
{#snippet children({ item })}
|
|
328
|
-
<ToggleButton value="invite" small label="Auto-invite" {item} />
|
|
329
|
-
<ToggleButton value="add" small label="Auto-add" {item} />
|
|
330
|
-
{/snippet}
|
|
331
|
-
</ToggleButtonGroup>
|
|
332
|
-
{/if}
|
|
333
348
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
operator: e.detail === 'operator',
|
|
346
|
-
invite_all: !isCloudHosted(),
|
|
347
|
-
auto_add: showInvites ? (autoAdd ?? false) : true
|
|
348
|
-
}
|
|
349
|
-
})
|
|
350
|
-
operatorOnly = e.detail === 'operator'
|
|
351
|
-
loadSettings()
|
|
352
|
-
listInvites()
|
|
353
|
-
listUsers()
|
|
354
|
-
} else {
|
|
355
|
-
operatorOnly = e.detail === 'operator'
|
|
356
|
-
}
|
|
357
|
-
}}
|
|
358
|
-
>
|
|
359
|
-
{#snippet children({ item })}
|
|
360
|
-
<ToggleButton
|
|
361
|
-
value="operator"
|
|
362
|
-
label="Operator"
|
|
363
|
-
tooltip="An operator can only execute and view scripts/flows/apps from your workspace, and only those that he has visibility on."
|
|
364
|
-
{item}
|
|
365
|
-
/>
|
|
366
|
-
<ToggleButton
|
|
367
|
-
value="developer"
|
|
368
|
-
label="Developer"
|
|
369
|
-
tooltip="A Developer can execute and view scripts/flows/apps, but they can also create new ones and edit those they are allowed to by their path (either u/ or Writer or Admin of their folder found at /f)."
|
|
370
|
-
{item}
|
|
371
|
-
/>
|
|
372
|
-
{/snippet}
|
|
373
|
-
</ToggleButtonGroup>
|
|
374
|
-
<div class="pt-2">
|
|
375
|
-
<Toggle
|
|
376
|
-
size="xs"
|
|
377
|
-
checked={auto_invite_domain != undefined}
|
|
378
|
-
on:change={async (e) => {
|
|
379
|
-
await removeAllInvitesFromDomain()
|
|
380
|
-
await WorkspaceService.editAutoInvite({
|
|
381
|
-
workspace: $workspaceStore ?? '',
|
|
382
|
-
requestBody: e.detail
|
|
383
|
-
? {
|
|
384
|
-
operator: operatorOnly ?? false,
|
|
385
|
-
invite_all: !isCloudHosted(),
|
|
386
|
-
auto_add: showInvites ? (autoAdd ?? false) : true
|
|
387
|
-
}
|
|
388
|
-
: {
|
|
389
|
-
operator: undefined,
|
|
390
|
-
auto_add: undefined
|
|
391
|
-
}
|
|
392
|
-
})
|
|
393
|
-
loadSettings()
|
|
394
|
-
listInvites()
|
|
395
|
-
listUsers()
|
|
396
|
-
}}
|
|
397
|
-
disabled={isCloudHosted() && !allowedAutoDomain}
|
|
398
|
-
options={{
|
|
399
|
-
right: 'Enabled'
|
|
400
|
-
}}
|
|
401
|
-
/>
|
|
402
|
-
</div>
|
|
403
|
-
{#if isCloudHosted() && !allowedAutoDomain}
|
|
404
|
-
<div class="text-red-400 text-xs">{domain} domain not allowed for auto-add</div>
|
|
405
|
-
{/if}
|
|
406
|
-
</div>
|
|
407
|
-
{/snippet}
|
|
408
|
-
</Popover>
|
|
349
|
+
<Section
|
|
350
|
+
label="Members {(filteredUsers?.length ?? users?.length) != undefined
|
|
351
|
+
? `(${filteredUsers?.length ?? users?.length})`
|
|
352
|
+
: ''}"
|
|
353
|
+
tooltip="Manage users manually or enable SSO authentication."
|
|
354
|
+
documentationLink="https://www.windmill.dev/docs/core_concepts/authentification"
|
|
355
|
+
>
|
|
356
|
+
{#snippet action()}
|
|
357
|
+
<div class="flex flex-row items-center gap-2 relative whitespace-nowrap">
|
|
358
|
+
<input placeholder="Filter members" bind:value={userFilter} class="input !pl-8" />
|
|
359
|
+
<Search class="absolute left-2" size={14} />
|
|
409
360
|
|
|
410
|
-
{#if instanceGroups.length > 0}
|
|
411
361
|
<Popover
|
|
412
362
|
floatingConfig={{ strategy: 'absolute', placement: 'bottom-end' }}
|
|
413
363
|
usePointerDownOutside
|
|
414
|
-
floatingClass="!z-20"
|
|
415
364
|
>
|
|
416
365
|
{#snippet trigger()}
|
|
417
366
|
<Button
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
size="xs"
|
|
367
|
+
variant="default"
|
|
368
|
+
unifiedSize="md"
|
|
421
369
|
nonCaptureEvent={true}
|
|
422
370
|
startIcon={{ icon: Mails }}
|
|
423
|
-
>
|
|
371
|
+
>Auto-{displayMode}: {autoInviteOrAddEnabled ? 'ON' : 'OFF'}
|
|
424
372
|
</Button>
|
|
425
373
|
{/snippet}
|
|
426
374
|
{#snippet content()}
|
|
427
|
-
<div class="flex flex-col p-4 min-w-[
|
|
428
|
-
|
|
429
|
-
<
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
<span class="text-xs text-primary">Instance group</span>
|
|
437
|
-
<Select
|
|
438
|
-
items={availableGroupItems}
|
|
439
|
-
placeholder="Select group"
|
|
440
|
-
bind:value={selectedNewInstanceGroup}
|
|
441
|
-
class="max-w-[160px]"
|
|
442
|
-
disablePortal={true}
|
|
443
|
-
/>
|
|
444
|
-
</div>
|
|
375
|
+
<div class="flex flex-col items-start p-4 min-w-[320px] max-w-sm">
|
|
376
|
+
{#if showAutoInviteToggle}
|
|
377
|
+
<div class="text-xs mb-1 text-primary"
|
|
378
|
+
>Mode <Tooltip>Whether to invite or add users directly to the workspace.</Tooltip>
|
|
379
|
+
</div>
|
|
380
|
+
<ToggleButtonGroup
|
|
381
|
+
selected={displayMode}
|
|
382
|
+
on:selected={async (e) => {
|
|
383
|
+
const switchingToAdd = e.detail === 'add' && !autoAdd
|
|
445
384
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
<ToggleButton
|
|
468
|
-
value="admin"
|
|
469
|
-
label="Admin"
|
|
470
|
-
tooltip="An admin has full control over a specific Windmill workspace, including the ability to manage users, edit entities, and control permissions within the workspace."
|
|
471
|
-
{item}
|
|
472
|
-
/>
|
|
473
|
-
{/snippet}
|
|
474
|
-
</ToggleButtonGroup>
|
|
475
|
-
</div>
|
|
476
|
-
</div>
|
|
385
|
+
// If switching from invite to add on non-cloud, show confirmation with warning
|
|
386
|
+
if (switchingToAdd && isLegacyAutoInvite) {
|
|
387
|
+
switchToAutoAddConfirmCallback = async () => {
|
|
388
|
+
autoAdd = true
|
|
389
|
+
if (autoInviteOrAddEnabled) {
|
|
390
|
+
await updateAutoInvite(true)
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
} else {
|
|
394
|
+
autoAdd = e.detail === 'add'
|
|
395
|
+
if (autoInviteOrAddEnabled) {
|
|
396
|
+
await updateAutoInvite(true)
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}}
|
|
400
|
+
>
|
|
401
|
+
{#snippet children({ item })}
|
|
402
|
+
<ToggleButton value="invite" small label="Auto-invite" {item} />
|
|
403
|
+
<ToggleButton value="add" small label="Auto-add" {item} />
|
|
404
|
+
{/snippet}
|
|
405
|
+
</ToggleButtonGroup>
|
|
477
406
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
>
|
|
485
|
-
Add
|
|
486
|
-
</Button>
|
|
407
|
+
{#if isLegacyAutoInvite && !autoAdd}
|
|
408
|
+
<div class="mt-3 w-full">
|
|
409
|
+
<Alert type="warning" size="xs" title="Legacy mode">
|
|
410
|
+
Auto-invite is deprecated. Switching to auto-add will permanently disable
|
|
411
|
+
auto-invite for this workspace.
|
|
412
|
+
</Alert>
|
|
487
413
|
</div>
|
|
488
414
|
{/if}
|
|
489
415
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
Remove
|
|
560
|
-
</Button>
|
|
561
|
-
</div>
|
|
562
|
-
</td>
|
|
563
|
-
</tr>
|
|
564
|
-
{/each}
|
|
565
|
-
</tbody>
|
|
566
|
-
</table>
|
|
567
|
-
</div>
|
|
568
|
-
</div>
|
|
569
|
-
{:else}
|
|
570
|
-
<div class="text-center text-primary text-sm py-4">
|
|
571
|
-
No instance groups configured for auto-add
|
|
572
|
-
</div>
|
|
573
|
-
{/if}
|
|
416
|
+
<div class="mt-6"></div>
|
|
417
|
+
{/if}
|
|
418
|
+
|
|
419
|
+
<span class="text-xs mb-1">Role <Tooltip>Role of the auto-added users</Tooltip></span>
|
|
420
|
+
<ToggleButtonGroup
|
|
421
|
+
selected={operatorOnly ? 'operator' : 'developer'}
|
|
422
|
+
on:selected={async (e) => {
|
|
423
|
+
operatorOnly = e.detail === 'operator'
|
|
424
|
+
if (auto_invite_domain != undefined) {
|
|
425
|
+
await updateAutoInvite(true)
|
|
426
|
+
}
|
|
427
|
+
}}
|
|
428
|
+
>
|
|
429
|
+
{#snippet children({ item })}
|
|
430
|
+
<ToggleButton
|
|
431
|
+
value="operator"
|
|
432
|
+
label="Operator"
|
|
433
|
+
tooltip="An operator can only execute and view scripts/flows/apps from your workspace, and only those that he has visibility on."
|
|
434
|
+
{item}
|
|
435
|
+
/>
|
|
436
|
+
<ToggleButton
|
|
437
|
+
value="developer"
|
|
438
|
+
label="Developer"
|
|
439
|
+
tooltip="A Developer can execute and view scripts/flows/apps, but they can also create new ones and edit those they are allowed to by their path (either u/ or Writer or Admin of their folder found at /f)."
|
|
440
|
+
{item}
|
|
441
|
+
/>
|
|
442
|
+
{/snippet}
|
|
443
|
+
</ToggleButtonGroup>
|
|
444
|
+
|
|
445
|
+
<div class="mt-6">
|
|
446
|
+
<Toggle
|
|
447
|
+
checked={autoInviteOrAddEnabled}
|
|
448
|
+
on:change={async (e) => {
|
|
449
|
+
const enabling = e.detail
|
|
450
|
+
|
|
451
|
+
if (enabling) {
|
|
452
|
+
// Non-cloud users without legacy auto-invite: force auto-add mode
|
|
453
|
+
if (!isCloudHosted() && !isLegacyAutoInvite) {
|
|
454
|
+
autoAdd = true
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// Show confirmation when enabling auto-add
|
|
458
|
+
if (autoAdd || (!isCloudHosted() && !showAutoInviteToggle)) {
|
|
459
|
+
autoAddConfirmCallback = async () => {
|
|
460
|
+
await updateAutoInvite(true)
|
|
461
|
+
}
|
|
462
|
+
} else {
|
|
463
|
+
await updateAutoInvite(true)
|
|
464
|
+
}
|
|
465
|
+
} else {
|
|
466
|
+
// Disabling: show confirmation if currently using auto-invite (legacy)
|
|
467
|
+
if (isLegacyAutoInvite) {
|
|
468
|
+
autoInviteDisableConfirmCallback = async () => {
|
|
469
|
+
await updateAutoInvite(false)
|
|
470
|
+
}
|
|
471
|
+
} else {
|
|
472
|
+
await updateAutoInvite(false)
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}}
|
|
476
|
+
disabled={isCloudHosted() && !allowedAutoDomain}
|
|
477
|
+
options={{
|
|
478
|
+
right: isCloudHosted()
|
|
479
|
+
? `Auto-${displayMode} anyone from ${
|
|
480
|
+
autoInviteOrAddEnabled ? auto_invite_domain : domain
|
|
481
|
+
}`
|
|
482
|
+
: `Auto-${displayMode} anyone joining the instance`
|
|
483
|
+
}}
|
|
484
|
+
/>
|
|
574
485
|
</div>
|
|
486
|
+
{#if isCloudHosted() && !allowedAutoDomain}
|
|
487
|
+
<div class="text-red-400 text-xs">{domain} domain not allowed for auto-add</div>
|
|
488
|
+
{/if}
|
|
575
489
|
</div>
|
|
576
490
|
{/snippet}
|
|
577
491
|
</Popover>
|
|
578
|
-
{/if}
|
|
579
492
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
493
|
+
{#if instanceGroups.length > 0}
|
|
494
|
+
<Popover
|
|
495
|
+
floatingConfig={{ strategy: 'absolute', placement: 'bottom-end' }}
|
|
496
|
+
usePointerDownOutside
|
|
497
|
+
floatingClass="!z-20"
|
|
498
|
+
>
|
|
499
|
+
{#snippet trigger()}
|
|
500
|
+
<Button
|
|
501
|
+
color={autoAddInstanceGroups.length > 0 ? 'green' : 'gray'}
|
|
502
|
+
variant="border"
|
|
503
|
+
size="xs"
|
|
504
|
+
nonCaptureEvent={true}
|
|
505
|
+
startIcon={{ icon: Mails }}
|
|
506
|
+
>Instance groups: {autoAddInstanceGroups.length}
|
|
507
|
+
</Button>
|
|
508
|
+
{/snippet}
|
|
509
|
+
{#snippet content()}
|
|
510
|
+
<div class="flex flex-col p-4 min-w-[500px]">
|
|
511
|
+
<div class="flex flex-col gap-4">
|
|
512
|
+
<span class="text-sm leading-6 font-semibold"> Auto-add instance groups </span>
|
|
513
|
+
|
|
514
|
+
<!-- Add new instance group form -->
|
|
515
|
+
{#if availableGroupItems.length > 0}
|
|
516
|
+
<div class="flex w-full mt-1 gap-2 items-end justify-between">
|
|
517
|
+
<div class="flex gap-2 items-end">
|
|
518
|
+
<div class="flex flex-col gap-1">
|
|
519
|
+
<span class="text-xs text-primary">Instance group</span>
|
|
520
|
+
<Select
|
|
521
|
+
items={availableGroupItems}
|
|
522
|
+
placeholder="Select group"
|
|
523
|
+
bind:value={selectedNewInstanceGroup}
|
|
524
|
+
class="max-w-[160px]"
|
|
525
|
+
disablePortal={true}
|
|
526
|
+
/>
|
|
527
|
+
</div>
|
|
528
|
+
|
|
529
|
+
<div class="flex flex-col gap-1">
|
|
530
|
+
<span class="text-xs text-primary">Role</span>
|
|
531
|
+
<ToggleButtonGroup
|
|
532
|
+
selected={selectedNewRole}
|
|
533
|
+
on:selected={(e) => {
|
|
534
|
+
selectedNewRole = e.detail
|
|
535
|
+
}}
|
|
536
|
+
>
|
|
537
|
+
{#snippet children({ item })}
|
|
538
|
+
<ToggleButton
|
|
539
|
+
value="operator"
|
|
540
|
+
label="Operator"
|
|
541
|
+
tooltip="An operator can only execute and view scripts/flows/apps from your workspace, and only those that he has visibility on."
|
|
542
|
+
{item}
|
|
543
|
+
/>
|
|
544
|
+
<ToggleButton
|
|
545
|
+
value="developer"
|
|
546
|
+
label="Developer"
|
|
547
|
+
tooltip="A Developer can execute and view scripts/flows/apps, but they can also create new ones and edit those they are allowed to by their path (either u/ or Writer or Admin of their folder found at /f)."
|
|
548
|
+
{item}
|
|
549
|
+
/>
|
|
550
|
+
<ToggleButton
|
|
551
|
+
value="admin"
|
|
552
|
+
label="Admin"
|
|
553
|
+
tooltip="An admin has full control over a specific Windmill workspace, including the ability to manage users, edit entities, and control permissions within the workspace."
|
|
554
|
+
{item}
|
|
555
|
+
/>
|
|
556
|
+
{/snippet}
|
|
557
|
+
</ToggleButtonGroup>
|
|
558
|
+
</div>
|
|
559
|
+
</div>
|
|
560
|
+
|
|
561
|
+
<Button
|
|
562
|
+
color="blue"
|
|
563
|
+
size="xs"
|
|
564
|
+
startIcon={{ icon: Plus }}
|
|
565
|
+
disabled={!selectedNewInstanceGroup || !selectedNewRole}
|
|
566
|
+
onclick={addInstanceGroup}
|
|
567
|
+
>
|
|
568
|
+
Add
|
|
569
|
+
</Button>
|
|
570
|
+
</div>
|
|
571
|
+
{/if}
|
|
572
|
+
|
|
573
|
+
<!-- Configured groups table -->
|
|
574
|
+
{#if autoAddInstanceGroups.length > 0}
|
|
575
|
+
<div class="flex flex-col gap-2">
|
|
576
|
+
<p class="text-sm font-medium text-secondary">Configured groups:</p>
|
|
577
|
+
<div class="flex flex-col gap-1">
|
|
578
|
+
<table class="w-full text-sm">
|
|
579
|
+
<thead>
|
|
580
|
+
<tr class="text-left text-xs text-primary">
|
|
581
|
+
<th class="pb-2 w-1/2">Group</th>
|
|
582
|
+
<th class="pb-2 w-1/4">Role</th>
|
|
583
|
+
<th class="pb-2 w-1/4"></th>
|
|
584
|
+
</tr>
|
|
585
|
+
</thead>
|
|
586
|
+
<tbody>
|
|
587
|
+
{#each autoAddInstanceGroups as groupName (groupName)}
|
|
588
|
+
{@const group = instanceGroups.find((g) => g.name === groupName)}
|
|
589
|
+
<tr class="border-t border-gray-200 dark:border-gray-700">
|
|
590
|
+
<td class="py-2">
|
|
591
|
+
<div class="font-medium">{groupName}</div>
|
|
592
|
+
{#if group?.summary}
|
|
593
|
+
<div class="text-xs text-primary">{group.summary}</div>
|
|
594
|
+
{/if}
|
|
595
|
+
</td>
|
|
596
|
+
<td class="py-2">
|
|
597
|
+
<div>
|
|
598
|
+
<ToggleButtonGroup
|
|
599
|
+
selected={autoAddInstanceGroupsRoles[groupName] || 'developer'}
|
|
600
|
+
on:selected={async (e) => {
|
|
601
|
+
autoAddInstanceGroupsRoles[groupName] = e.detail
|
|
602
|
+
await updateGroupRole(groupName, e.detail)
|
|
603
|
+
}}
|
|
604
|
+
>
|
|
605
|
+
{#snippet children({ item })}
|
|
606
|
+
<ToggleButton
|
|
607
|
+
value="operator"
|
|
608
|
+
label="Operator"
|
|
609
|
+
tooltip="An operator can only execute and view scripts/flows/apps from your workspace, and only those that he has visibility on."
|
|
610
|
+
{item}
|
|
611
|
+
/>
|
|
612
|
+
<ToggleButton
|
|
613
|
+
value="developer"
|
|
614
|
+
label="Developer"
|
|
615
|
+
tooltip="A Developer can execute and view scripts/flows/apps, but they can also create new ones and edit those they are allowed to by their path (either u/ or Writer or Admin of their folder found at /f)."
|
|
616
|
+
{item}
|
|
617
|
+
/>
|
|
618
|
+
<ToggleButton
|
|
619
|
+
value="admin"
|
|
620
|
+
label="Admin"
|
|
621
|
+
tooltip="An admin has full control over a specific Windmill workspace, including the ability to manage users, edit entities, and control permissions within the workspace."
|
|
622
|
+
{item}
|
|
623
|
+
/>
|
|
624
|
+
{/snippet}
|
|
625
|
+
</ToggleButtonGroup>
|
|
626
|
+
</div>
|
|
627
|
+
</td>
|
|
628
|
+
<td class="py-2">
|
|
629
|
+
<div class="flex justify-end">
|
|
630
|
+
<Button
|
|
631
|
+
color="light"
|
|
632
|
+
variant="contained"
|
|
633
|
+
btnClasses="text-red-500"
|
|
634
|
+
size="xs"
|
|
635
|
+
spacingSize="xs2"
|
|
636
|
+
onclick={() => {
|
|
637
|
+
removeInstanceGroupConfirmedCallback = async () => {
|
|
638
|
+
await removeInstanceGroup(groupName)
|
|
639
|
+
}
|
|
640
|
+
}}
|
|
641
|
+
>
|
|
642
|
+
Remove
|
|
643
|
+
</Button>
|
|
644
|
+
</div>
|
|
645
|
+
</td>
|
|
646
|
+
</tr>
|
|
647
|
+
{/each}
|
|
648
|
+
</tbody>
|
|
649
|
+
</table>
|
|
650
|
+
</div>
|
|
651
|
+
</div>
|
|
652
|
+
{:else}
|
|
653
|
+
<div class="text-center text-primary text-sm py-4">
|
|
654
|
+
No instance groups configured for auto-add
|
|
655
|
+
</div>
|
|
656
|
+
{/if}
|
|
657
|
+
</div>
|
|
658
|
+
</div>
|
|
659
|
+
{/snippet}
|
|
660
|
+
</Popover>
|
|
661
|
+
{/if}
|
|
662
|
+
|
|
663
|
+
{#if showAutoInviteToggle}
|
|
664
|
+
<InviteUser {inviteUser} />
|
|
665
|
+
{/if}
|
|
666
|
+
|
|
667
|
+
<AddUser
|
|
668
|
+
on:new={() => {
|
|
669
|
+
listUsers()
|
|
670
|
+
listInvites()
|
|
671
|
+
}}
|
|
672
|
+
/>
|
|
673
|
+
</div>
|
|
674
|
+
{/snippet}
|
|
588
675
|
|
|
589
|
-
<div class="">
|
|
590
676
|
<DataTable
|
|
591
677
|
shouldLoadMore={(filteredUsers?.length ?? 0) > 30}
|
|
592
678
|
loadMore={30}
|
|
@@ -615,8 +701,8 @@ $effect(() => {
|
|
|
615
701
|
first one
|
|
616
702
|
</Tooltip>
|
|
617
703
|
</Cell>
|
|
618
|
-
<Cell head>Status</Cell>
|
|
619
704
|
<Cell head>Role</Cell>
|
|
705
|
+
<Cell head>Enabled</Cell>
|
|
620
706
|
<Cell head last>
|
|
621
707
|
<span class="sr-only">Actions</span>
|
|
622
708
|
</Cell>
|
|
@@ -657,15 +743,6 @@ $effect(() => {
|
|
|
657
743
|
class="animate-spin"
|
|
658
744
|
/>{/if}</Cell
|
|
659
745
|
>
|
|
660
|
-
<Cell>
|
|
661
|
-
<div class="flex gap-1">
|
|
662
|
-
{#if disabled}
|
|
663
|
-
<Badge color="red">Disabled</Badge>
|
|
664
|
-
{:else}
|
|
665
|
-
<Badge color="green">Enabled</Badge>
|
|
666
|
-
{/if}
|
|
667
|
-
</div>
|
|
668
|
-
</Cell>
|
|
669
746
|
<Cell>
|
|
670
747
|
<div>
|
|
671
748
|
{#if added_via?.source === 'instance_group'}
|
|
@@ -729,13 +806,10 @@ $effect(() => {
|
|
|
729
806
|
</div>
|
|
730
807
|
</Cell>
|
|
731
808
|
<Cell>
|
|
732
|
-
<
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
size="xs"
|
|
737
|
-
spacingSize="xs2"
|
|
738
|
-
on:click={async () => {
|
|
809
|
+
<Toggle
|
|
810
|
+
checked={!disabled}
|
|
811
|
+
on:change={async (e) => {
|
|
812
|
+
try {
|
|
739
813
|
await UserService.updateUser({
|
|
740
814
|
workspace: $workspaceStore ?? '',
|
|
741
815
|
username,
|
|
@@ -743,51 +817,25 @@ $effect(() => {
|
|
|
743
817
|
disabled: !disabled
|
|
744
818
|
}
|
|
745
819
|
})
|
|
820
|
+
sendUserToast(`User ${username} ${disabled ? 'enabled' : 'disabled'}`)
|
|
746
821
|
listUsers()
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
size="xs"
|
|
759
|
-
spacingSize="xs2"
|
|
760
|
-
disabled={true}
|
|
761
|
-
>
|
|
762
|
-
Remove
|
|
763
|
-
</Button>
|
|
764
|
-
<Tooltip
|
|
765
|
-
>Cannot remove users synced from instance groups. Either disable the user or
|
|
766
|
-
remove them from the SCIM group.</Tooltip
|
|
767
|
-
>
|
|
768
|
-
</div>
|
|
769
|
-
{:else if canConvertToGroup(user)}
|
|
770
|
-
<Button
|
|
771
|
-
color="light"
|
|
772
|
-
variant="contained"
|
|
773
|
-
btnClasses="text-blue-500"
|
|
774
|
-
size="xs"
|
|
775
|
-
spacingSize="xs2"
|
|
776
|
-
on:click={() => {
|
|
777
|
-
convertConfirmedCallback = async () => {
|
|
778
|
-
await convertUserToGroup(username)
|
|
779
|
-
}
|
|
780
|
-
}}
|
|
781
|
-
>
|
|
782
|
-
Convert
|
|
783
|
-
</Button>
|
|
822
|
+
} catch (e) {
|
|
823
|
+
console.error('Failed to update user status:', e)
|
|
824
|
+
sendUserToast('Failed to update user status', true)
|
|
825
|
+
}
|
|
826
|
+
}}
|
|
827
|
+
size="xs"
|
|
828
|
+
/>
|
|
829
|
+
</Cell>
|
|
830
|
+
<Cell>
|
|
831
|
+
<div class="flex gap-1">
|
|
832
|
+
{#snippet removeUserButton(disabled: boolean)}
|
|
784
833
|
<Button
|
|
785
|
-
|
|
786
|
-
variant="
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
on:click={() => {
|
|
834
|
+
unifiedSize="sm"
|
|
835
|
+
variant="subtle"
|
|
836
|
+
destructive
|
|
837
|
+
{disabled}
|
|
838
|
+
onClick={() => {
|
|
791
839
|
deleteConfirmedCallback = async () => {
|
|
792
840
|
await UserService.deleteUser({
|
|
793
841
|
workspace: $workspaceStore ?? '',
|
|
@@ -797,29 +845,34 @@ $effect(() => {
|
|
|
797
845
|
listUsers()
|
|
798
846
|
}
|
|
799
847
|
}}
|
|
848
|
+
startIcon={{ icon: UserMinus }}
|
|
800
849
|
>
|
|
801
850
|
Remove
|
|
802
851
|
</Button>
|
|
803
|
-
{
|
|
852
|
+
{/snippet}
|
|
853
|
+
|
|
854
|
+
{#if added_via?.source === 'instance_group'}
|
|
855
|
+
<div class="flex items-center gap-1">
|
|
856
|
+
{@render removeUserButton(true)}
|
|
857
|
+
<Tooltip
|
|
858
|
+
>Cannot remove users synced from instance groups. Either disable the user or
|
|
859
|
+
remove them from the SCIM group.</Tooltip
|
|
860
|
+
>
|
|
861
|
+
</div>
|
|
862
|
+
{:else if canConvertToGroup(user)}
|
|
804
863
|
<Button
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
btnClasses="text-red-500"
|
|
808
|
-
size="xs"
|
|
809
|
-
spacingSize="xs2"
|
|
864
|
+
variant="accent"
|
|
865
|
+
unifiedSize="sm"
|
|
810
866
|
on:click={() => {
|
|
811
|
-
|
|
812
|
-
await
|
|
813
|
-
workspace: $workspaceStore ?? '',
|
|
814
|
-
username
|
|
815
|
-
})
|
|
816
|
-
sendUserToast('User removed')
|
|
817
|
-
listUsers()
|
|
867
|
+
convertConfirmedCallback = async () => {
|
|
868
|
+
await convertUserToGroup(username)
|
|
818
869
|
}
|
|
819
870
|
}}
|
|
820
871
|
>
|
|
821
|
-
|
|
872
|
+
Convert
|
|
822
873
|
</Button>
|
|
874
|
+
{:else}
|
|
875
|
+
{@render removeUserButton(false)}
|
|
823
876
|
{/if}
|
|
824
877
|
</div>
|
|
825
878
|
</Cell>
|
|
@@ -836,23 +889,27 @@ $effect(() => {
|
|
|
836
889
|
{/if}
|
|
837
890
|
</tbody>
|
|
838
891
|
</DataTable>
|
|
839
|
-
</
|
|
892
|
+
</Section>
|
|
893
|
+
|
|
894
|
+
<div class="pt-12"></div>
|
|
840
895
|
|
|
841
896
|
<WorkspaceOperatorSettings />
|
|
842
897
|
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
898
|
+
<div class="pt-12"></div>
|
|
899
|
+
|
|
900
|
+
{#if invites?.length > 0}
|
|
901
|
+
<Section
|
|
902
|
+
label="Invites ({invites.length ?? ''})"
|
|
847
903
|
tooltip="Manage invites on your workspace."
|
|
848
904
|
documentationLink="https://www.windmill.dev/docs/core_concepts/authentification#adding-users-to-a-workspace"
|
|
849
905
|
>
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
906
|
+
{#snippet action()}
|
|
907
|
+
{#if showAutoInviteToggle}
|
|
908
|
+
<div class="flex gap-2 items-center">
|
|
909
|
+
<InviteUser {inviteUser} />
|
|
910
|
+
</div>
|
|
911
|
+
{/if}
|
|
912
|
+
{/snippet}
|
|
856
913
|
<DataTable>
|
|
857
914
|
<Head>
|
|
858
915
|
<tr>
|
|
@@ -913,9 +970,13 @@ $effect(() => {
|
|
|
913
970
|
</div>
|
|
914
971
|
</Cell>
|
|
915
972
|
<Cell last>
|
|
916
|
-
<
|
|
917
|
-
|
|
918
|
-
|
|
973
|
+
<Button
|
|
974
|
+
variant="default"
|
|
975
|
+
destructive
|
|
976
|
+
unifiedSize="sm"
|
|
977
|
+
startIcon={{ icon: X }}
|
|
978
|
+
btnClasses="w-fit"
|
|
979
|
+
onClick={async () => {
|
|
919
980
|
await WorkspaceService.deleteInvite({
|
|
920
981
|
workspace: $workspaceStore ?? '',
|
|
921
982
|
requestBody: {
|
|
@@ -927,8 +988,8 @@ $effect(() => {
|
|
|
927
988
|
listInvites()
|
|
928
989
|
}}
|
|
929
990
|
>
|
|
930
|
-
Cancel
|
|
931
|
-
</
|
|
991
|
+
Cancel invite
|
|
992
|
+
</Button>
|
|
932
993
|
</Cell>
|
|
933
994
|
</Row>
|
|
934
995
|
{/each}
|
|
@@ -947,9 +1008,8 @@ $effect(() => {
|
|
|
947
1008
|
<button class="ml-4" onclick={() => (nbInviteDisplayed += 50)}>load 50 more</button></span
|
|
948
1009
|
>
|
|
949
1010
|
{/if}
|
|
950
|
-
</
|
|
1011
|
+
</Section>
|
|
951
1012
|
{/if}
|
|
952
|
-
|
|
953
1013
|
<ConfirmationModal
|
|
954
1014
|
open={Boolean(deleteConfirmedCallback)}
|
|
955
1015
|
title="Remove user"
|
|
@@ -1017,3 +1077,68 @@ $effect(() => {
|
|
|
1017
1077
|
</ul>
|
|
1018
1078
|
</div>
|
|
1019
1079
|
</ConfirmationModal>
|
|
1080
|
+
|
|
1081
|
+
<!-- Auto-add/invite confirmation modals - z-index to appear above popover -->
|
|
1082
|
+
<div class="[&>div]:!z-[5002]">
|
|
1083
|
+
<ConfirmationModal
|
|
1084
|
+
open={Boolean(autoAddConfirmCallback)}
|
|
1085
|
+
title="Enable Auto-add"
|
|
1086
|
+
confirmationText="Enable"
|
|
1087
|
+
on:canceled={() => {
|
|
1088
|
+
autoAddConfirmCallback = undefined
|
|
1089
|
+
}}
|
|
1090
|
+
on:confirmed={() => {
|
|
1091
|
+
if (autoAddConfirmCallback) {
|
|
1092
|
+
autoAddConfirmCallback()
|
|
1093
|
+
}
|
|
1094
|
+
autoAddConfirmCallback = undefined
|
|
1095
|
+
}}
|
|
1096
|
+
>
|
|
1097
|
+
Are you sure you want to enable auto-add?<br />
|
|
1098
|
+
Anyone added to the instance will automatically join this workspace.
|
|
1099
|
+
</ConfirmationModal>
|
|
1100
|
+
</div>
|
|
1101
|
+
|
|
1102
|
+
<div class="[&>div]:!z-[5002]">
|
|
1103
|
+
<ConfirmationModal
|
|
1104
|
+
open={Boolean(autoInviteDisableConfirmCallback)}
|
|
1105
|
+
title="Disable Auto-invite"
|
|
1106
|
+
confirmationText="Disable"
|
|
1107
|
+
on:canceled={() => {
|
|
1108
|
+
autoInviteDisableConfirmCallback = undefined
|
|
1109
|
+
}}
|
|
1110
|
+
on:confirmed={() => {
|
|
1111
|
+
if (autoInviteDisableConfirmCallback) {
|
|
1112
|
+
autoInviteDisableConfirmCallback()
|
|
1113
|
+
}
|
|
1114
|
+
autoInviteDisableConfirmCallback = undefined
|
|
1115
|
+
}}
|
|
1116
|
+
>
|
|
1117
|
+
Are you sure you want to disable auto-invite? Auto-invite is a legacy feature. After disabling,
|
|
1118
|
+
it will no longer be available for this workspace. You will only be able to use auto-add. <br />
|
|
1119
|
+
Anyone added to the instance will automatically join this workspace.
|
|
1120
|
+
</ConfirmationModal>
|
|
1121
|
+
</div>
|
|
1122
|
+
|
|
1123
|
+
<div class="[&>div]:!z-[5002]">
|
|
1124
|
+
<ConfirmationModal
|
|
1125
|
+
open={Boolean(switchToAutoAddConfirmCallback)}
|
|
1126
|
+
title="Switch to Auto-add"
|
|
1127
|
+
confirmationText="Switch"
|
|
1128
|
+
on:canceled={() => {
|
|
1129
|
+
switchToAutoAddConfirmCallback = undefined
|
|
1130
|
+
}}
|
|
1131
|
+
on:confirmed={() => {
|
|
1132
|
+
if (switchToAutoAddConfirmCallback) {
|
|
1133
|
+
switchToAutoAddConfirmCallback()
|
|
1134
|
+
}
|
|
1135
|
+
switchToAutoAddConfirmCallback = undefined
|
|
1136
|
+
}}
|
|
1137
|
+
>
|
|
1138
|
+
Are you sure you want to switch from auto-invite to auto-add?<br />
|
|
1139
|
+
Auto-invite is a legacy feature. After switching to auto-add, auto-invite will no longer be available
|
|
1140
|
+
for this workspace. <br />
|
|
1141
|
+
With auto-add, anyone added to the instance will automatically join this workspace without needing
|
|
1142
|
+
to accept an invitation.
|
|
1143
|
+
</ConfirmationModal>
|
|
1144
|
+
</div>
|