windmill-components 1.37.0 → 1.46.2
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/common.d.ts +1 -0
- package/components/AppConnect.svelte +45 -49
- package/components/ArgInfo.svelte +37 -15
- package/components/ArgInput.svelte +33 -34
- package/components/ArgInput.svelte.d.ts +3 -1
- package/components/ButtonAndDropdown.svelte +1 -1
- package/components/CenteredPage.svelte +2 -2
- package/components/CronInput.svelte +24 -20
- package/components/CronInput.svelte.d.ts +1 -0
- package/components/DisplayResult.svelte +2 -2
- package/components/Dropdown.svelte +10 -13
- package/components/Dropdown.svelte.d.ts +4 -1
- package/components/Editor.svelte +27 -3
- package/components/Editor.svelte.d.ts +3 -1
- package/components/EditorBar.svelte +77 -30
- package/components/EditorBar.svelte.d.ts +3 -1
- package/components/FieldHeader.svelte +6 -5
- package/components/FlowBuilder.svelte +52 -55
- package/components/FlowBuilder.svelte.d.ts +2 -0
- package/components/FlowJobResult.svelte +11 -18
- package/components/FlowJobResult.svelte.d.ts +2 -2
- package/components/FlowMetadata.svelte +65 -0
- package/components/FlowMetadata.svelte.d.ts +17 -0
- package/components/FlowModulesViewer.svelte +18 -4
- package/components/FlowPreviewContent.svelte +88 -50
- package/components/FlowPreviewContent.svelte.d.ts +1 -0
- package/components/FlowStatusViewer.svelte +123 -61
- package/components/FlowStatusViewer.svelte.d.ts +8 -3
- package/components/FlowViewer.svelte +84 -9
- package/components/FlowViewer.svelte.d.ts +1 -0
- package/components/GroupModal.svelte +43 -44
- package/components/GroupModal.svelte.d.ts +2 -2
- package/components/HighlightCode.svelte +4 -1
- package/components/HighlightCode.svelte.d.ts +1 -1
- package/components/IconedResourceType.svelte +6 -4
- package/components/IconedResourceType.svelte.d.ts +1 -0
- package/components/InputTransformForm.svelte +38 -27
- package/components/InputTransformsViewer.svelte +2 -1
- package/components/InviteGlobalUser.svelte +6 -10
- package/components/InviteGlobalUser.svelte.d.ts +1 -4
- package/components/InviteUser.svelte +4 -8
- package/components/InviteUser.svelte.d.ts +1 -4
- package/components/ItemPicker.svelte +50 -43
- package/components/ItemPicker.svelte.d.ts +2 -2
- package/components/JobArgs.svelte +33 -0
- package/components/JobArgs.svelte.d.ts +16 -0
- package/components/JobStatus.svelte +21 -17
- package/components/LogViewer.svelte +11 -6
- package/components/Modal.svelte +5 -5
- package/components/Modal.svelte.d.ts +4 -4
- package/components/ModulePreview.svelte +47 -63
- package/components/ModulePreview.svelte.d.ts +0 -1
- package/components/PageHeader.svelte +6 -6
- package/components/Password.svelte +1 -1
- package/components/Path.svelte +28 -7
- package/components/Path.svelte.d.ts +3 -3
- package/components/Popover.svelte +61 -0
- package/components/Popover.svelte.d.ts +17 -0
- package/components/Required.svelte +4 -4
- package/components/Required.svelte.d.ts +1 -0
- package/components/ResourceEditor.svelte +105 -116
- package/components/ResourceEditor.svelte.d.ts +0 -1
- package/components/ResourcePicker.svelte +9 -6
- package/components/ResourceTypePicker.svelte +3 -1
- package/components/RunChart.svelte +102 -0
- package/components/RunChart.svelte.d.ts +20 -0
- package/components/RunForm.svelte +58 -40
- package/components/RunForm.svelte.d.ts +13 -0
- package/components/SchemaEditor.svelte +5 -5
- package/components/SchemaEditorProperty.svelte +1 -1
- package/components/SchemaForm.svelte +3 -1
- package/components/SchemaForm.svelte.d.ts +1 -0
- package/components/SchemaModal.svelte +113 -105
- package/components/SchemaModal.svelte.d.ts +4 -4
- package/components/SchemaViewer.svelte +7 -4
- package/components/ScriptBuilder.svelte +143 -163
- package/components/ScriptBuilder.svelte.d.ts +1 -0
- package/components/ScriptEditor.svelte +117 -114
- package/components/ScriptEditor.svelte.d.ts +1 -0
- package/components/ScriptPicker.svelte +16 -24
- package/components/ScriptSchema.svelte +33 -32
- package/components/ShareModal.svelte +74 -68
- package/components/ShareModal.svelte.d.ts +2 -2
- package/components/SimpleEditor.svelte +4 -2
- package/components/SuperadminSettings.svelte +134 -0
- package/components/SuperadminSettings.svelte.d.ts +19 -0
- package/components/TableCustom.svelte +1 -1
- package/components/TableSimple.svelte +1 -1
- package/components/TestJobLoader.svelte +14 -6
- package/components/TestJobLoader.svelte.d.ts +4 -2
- package/components/Toggle.svelte +5 -3
- package/components/Toggle.svelte.d.ts +2 -0
- package/components/Tooltip.svelte +9 -64
- package/components/UserSettings.svelte +241 -0
- package/components/UserSettings.svelte.d.ts +19 -0
- package/components/VariableEditor.svelte +80 -74
- package/components/common/actionRow/ActionRow.svelte +5 -4
- package/components/common/alert/Alert.svelte +1 -1
- package/components/common/alert/Alert.svelte.d.ts +1 -0
- package/components/common/badge/Badge.svelte +2 -2
- package/components/common/breadcrumb/Breadcrumb.svelte +24 -0
- package/components/common/breadcrumb/Breadcrumb.svelte.d.ts +22 -0
- package/components/common/button/Button.svelte +20 -8
- package/components/common/button/Button.svelte.d.ts +1 -0
- package/components/common/button/model.d.ts +1 -1
- package/components/common/confirmationModal/ConfirmationModal.svelte +1 -0
- package/components/common/drawer/Drawer.svelte +38 -7
- package/components/common/drawer/Drawer.svelte.d.ts +6 -0
- package/components/common/drawer/DrawerContent.svelte +21 -7
- package/components/common/drawer/DrawerContent.svelte.d.ts +4 -0
- package/components/common/index.d.ts +1 -0
- package/components/common/index.js +1 -0
- package/components/common/kbd/Kbd.svelte +1 -1
- package/components/common/languageIcons/Bash.svelte +18 -0
- package/components/common/languageIcons/Bash.svelte.d.ts +27 -0
- package/components/common/languageIcons/Go.svelte +34 -0
- package/components/common/languageIcons/Go.svelte.d.ts +27 -0
- package/components/common/languageIcons/LanguageIcon.svelte +19 -0
- package/components/common/languageIcons/LanguageIcon.svelte.d.ts +21 -0
- package/components/common/languageIcons/Python.svelte +51 -0
- package/components/common/languageIcons/Python.svelte.d.ts +27 -0
- package/components/common/languageIcons/TypeScript.svelte +31 -0
- package/components/common/languageIcons/TypeScript.svelte.d.ts +27 -0
- package/components/common/languageIcons/index.d.ts +5 -0
- package/components/common/languageIcons/index.js +5 -0
- package/components/common/menu/Menu.svelte +15 -19
- package/components/common/skeleton/Skeleton.svelte +1 -2
- package/components/common/skeleton/Skeleton.svelte.d.ts +0 -1
- package/components/common/skeleton/SkeletonElement.svelte +1 -1
- package/components/common/tabs/TabContent.svelte +2 -1
- package/components/common/tabs/TabContent.svelte.d.ts +1 -0
- package/components/common/tabs/Tabs.svelte +8 -6
- package/components/common/tabs/Tabs.svelte.d.ts +1 -0
- package/components/flows/FlowEditor.svelte +11 -20
- package/components/flows/FlowProgressBar.svelte +55 -0
- package/components/flows/FlowProgressBar.svelte.d.ts +21 -0
- package/components/flows/common/FlowCardHeader.svelte +5 -6
- package/components/flows/content/CapturePayload.svelte +112 -0
- package/components/flows/content/CapturePayload.svelte.d.ts +17 -0
- package/components/flows/content/DynamicInputHelpBox.svelte +6 -10
- package/components/flows/content/FlowBranchAllWrapper.svelte +21 -0
- package/components/flows/content/FlowBranchAllWrapper.svelte.d.ts +21 -0
- package/components/flows/content/FlowBranchOneWrapper.svelte +49 -0
- package/components/flows/content/FlowBranchOneWrapper.svelte.d.ts +23 -0
- package/components/flows/content/FlowBranchesWrapper.svelte +140 -0
- package/components/flows/content/FlowBranchesWrapper.svelte.d.ts +19 -0
- package/components/flows/content/FlowEditorPanel.svelte +8 -6
- package/components/flows/content/FlowFailureModule.svelte +4 -6
- package/components/flows/content/FlowInput.svelte +31 -5
- package/components/flows/content/FlowInputs.svelte +119 -50
- package/components/flows/content/FlowInputs.svelte.d.ts +5 -4
- package/components/flows/content/FlowLoop.svelte +85 -142
- package/components/flows/content/FlowLoop.svelte.d.ts +2 -1
- package/components/flows/content/FlowModuleComponent.svelte +231 -0
- package/components/flows/content/FlowModuleComponent.svelte.d.ts +20 -0
- package/components/flows/content/FlowModuleEarlyStop.svelte +45 -48
- package/components/flows/content/FlowModuleEarlyStop.svelte.d.ts +1 -0
- package/components/flows/content/FlowModuleHeader.svelte +11 -40
- package/components/flows/content/FlowModuleHeader.svelte.d.ts +0 -1
- package/components/flows/content/FlowModuleScript.svelte +7 -12
- package/components/flows/content/FlowModuleScript.svelte.d.ts +1 -2
- package/components/flows/content/FlowModuleSuspend.svelte +31 -15
- package/components/flows/content/FlowModuleSuspend.svelte.d.ts +1 -0
- package/components/flows/content/FlowModuleWrapper.svelte +138 -38
- package/components/flows/content/FlowModuleWrapper.svelte.d.ts +6 -1
- package/components/flows/content/FlowRetries.svelte +13 -2
- package/components/flows/content/FlowRetries.svelte.d.ts +1 -0
- package/components/flows/content/FlowSchedules.svelte +0 -2
- package/components/flows/content/FlowSettings.svelte +103 -72
- package/components/flows/flowState.d.ts +8 -8
- package/components/flows/flowState.js +32 -17
- package/components/flows/flowStateUtils.d.ts +21 -38
- package/components/flows/flowStateUtils.js +86 -158
- package/components/flows/flowStore.d.ts +3 -2
- package/components/flows/flowStore.js +60 -7
- package/components/flows/header/FlowImportExportMenu.svelte +12 -22
- package/components/flows/header/FlowPreviewButtons.svelte +11 -11
- package/components/flows/map/FlowBranchAllMap.svelte +90 -0
- package/components/flows/map/FlowBranchAllMap.svelte.d.ts +17 -0
- package/components/flows/map/FlowBranchOneMap.svelte +116 -0
- package/components/flows/map/FlowBranchOneMap.svelte.d.ts +17 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte +14 -11
- package/components/flows/map/FlowInputsItem.svelte +19 -0
- package/components/flows/map/FlowInputsItem.svelte.d.ts +14 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte +53 -36
- package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +5 -5
- package/components/flows/map/FlowModuleSchemaMap.svelte +73 -144
- package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +2 -3
- package/components/flows/map/FlowSettingsItem.svelte +29 -0
- package/components/flows/map/FlowSettingsItem.svelte.d.ts +14 -0
- package/components/flows/map/InsertModuleButton.svelte +11 -0
- package/components/flows/map/InsertModuleButton.svelte.d.ts +16 -0
- package/components/flows/map/MapItem.svelte +105 -0
- package/components/flows/map/MapItem.svelte.d.ts +22 -0
- package/components/flows/pickers/FlowScriptPicker.svelte +14 -4
- package/components/flows/pickers/FlowScriptPicker.svelte.d.ts +1 -1
- package/components/flows/pickers/PickHubScript.svelte +5 -4
- package/components/flows/pickers/PickHubScript.svelte.d.ts +1 -0
- package/components/flows/pickers/PickScript.svelte +6 -5
- package/components/flows/pickers/PickScript.svelte.d.ts +1 -0
- package/components/flows/previousResults.d.ts +14 -0
- package/components/flows/previousResults.js +118 -0
- package/components/flows/propPicker/PropPickerWrapper.svelte +22 -15
- package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +6 -2
- package/components/flows/utils.d.ts +8 -5
- package/components/flows/utils.js +86 -56
- package/components/graph/FlowGraph.svelte +259 -0
- package/components/graph/FlowGraph.svelte.d.ts +20 -0
- package/components/graph/index.d.ts +3 -0
- package/components/graph/index.js +3 -0
- package/components/graph/model.d.ts +20 -0
- package/components/graph/model.js +9 -0
- package/components/graph/util.d.ts +9 -0
- package/components/graph/util.js +14 -0
- package/components/icons/WindmillIcon.svelte +85 -52
- package/components/icons/WindmillIcon.svelte.d.ts +2 -0
- package/components/jobs/JobDetail.svelte +40 -30
- package/components/landing/FlowGettingStarted.svelte +4 -3
- package/components/landing/FlowLandingBox.svelte +23 -53
- package/components/landing/RessourceGettingStarted.svelte +1 -1
- package/components/landing/ScriptBox.svelte +25 -27
- package/components/landing/ScriptGettingStarted.svelte +4 -3
- package/components/preview/FlowPreviewStatus.svelte +1 -1
- package/components/progressBar/ProgressBar.svelte +89 -0
- package/components/{ProgressBar.svelte.d.ts → progressBar/ProgressBar.svelte.d.ts} +5 -2
- package/components/progressBar/ProgressBarGeneralPart.svelte +22 -0
- package/components/progressBar/ProgressBarGeneralPart.svelte.d.ts +19 -0
- package/components/progressBar/ProgressBarLoopAccessor.svelte +14 -0
- package/components/progressBar/ProgressBarLoopAccessor.svelte.d.ts +19 -0
- package/components/progressBar/ProgressBarLoopPart.svelte +34 -0
- package/components/progressBar/ProgressBarLoopPart.svelte.d.ts +19 -0
- package/components/progressBar/index.d.ts +2 -0
- package/components/progressBar/index.js +2 -0
- package/components/progressBar/model.d.ts +32 -0
- package/components/progressBar/model.js +14 -0
- package/components/propertyPicker/ObjectViewer.svelte +18 -13
- package/components/propertyPicker/ObjectViewer.svelte.d.ts +1 -0
- package/components/propertyPicker/PropPicker.svelte +90 -44
- package/components/propertyPicker/PropPicker.svelte.d.ts +4 -1
- package/components/propertyPicker/PropPickerResult.svelte +12 -0
- package/components/propertyPicker/PropPickerResult.svelte.d.ts +18 -0
- package/components/propertyPicker/utils.d.ts +1 -1
- package/components/propertyPicker/utils.js +4 -1
- package/components/{script_editor → scriptEditor}/LogPanel.svelte +30 -20
- package/components/{script_editor → scriptEditor}/LogPanel.svelte.d.ts +0 -0
- package/components/scripts/CreateActions.svelte +2 -2
- package/components/sidebar/SidebarContent.svelte +1 -1
- package/components/sidebar/UserMenu.svelte +17 -1
- package/components/sidebar/UserMenu.svelte.d.ts +3 -0
- package/components/sidebar/WorkspaceMenu.svelte +16 -14
- package/components/splitPanes/SplitPanesWrapper.svelte +34 -0
- package/components/splitPanes/SplitPanesWrapper.svelte.d.ts +20 -0
- package/editorUtils.js +2 -0
- package/gen/core/OpenAPI.js +1 -1
- package/gen/index.d.ts +8 -1
- package/gen/index.js +5 -0
- package/gen/models/AppWithLastVersion.d.ts +21 -0
- package/gen/models/AppWithLastVersion.js +12 -0
- package/gen/models/BranchAll.d.ts +10 -0
- package/gen/models/{Branches.js → BranchAll.js} +0 -0
- package/gen/models/{Branches.d.ts → BranchOne.d.ts} +3 -5
- package/gen/models/BranchOne.js +4 -0
- package/gen/models/CompletedJob.d.ts +4 -2
- package/gen/models/CompletedJob.js +2 -0
- package/gen/models/FlowModule.d.ts +2 -1
- package/gen/models/FlowModuleValue.d.ts +4 -2
- package/gen/models/FlowStatusModule.d.ts +11 -2
- package/gen/models/ForloopFlow.d.ts +1 -0
- package/gen/models/Identity.d.ts +3 -0
- package/gen/models/Identity.js +4 -0
- package/gen/models/ListableApp.d.ts +16 -0
- package/gen/models/ListableApp.js +12 -0
- package/gen/models/ListableVariable.d.ts +1 -1
- package/gen/models/PathScript.d.ts +2 -0
- package/gen/models/Policy.d.ts +12 -0
- package/gen/models/Policy.js +12 -0
- package/gen/models/Preview.d.ts +2 -1
- package/gen/models/Preview.js +1 -0
- package/gen/models/QueuedJob.d.ts +4 -2
- package/gen/models/QueuedJob.js +2 -0
- package/gen/models/RawScript.d.ts +4 -1
- package/gen/models/RawScript.js +1 -0
- package/gen/models/Script.d.ts +4 -2
- package/gen/models/Script.js +2 -0
- package/gen/services/AppService.d.ts +31 -0
- package/gen/services/AppService.js +49 -0
- package/gen/services/CaptureService.d.ts +30 -0
- package/gen/services/CaptureService.js +52 -0
- package/gen/services/FlowService.d.ts +90 -0
- package/gen/services/FlowService.js +72 -0
- package/gen/services/JobService.d.ts +57 -8
- package/gen/services/JobService.js +78 -10
- package/gen/services/OauthService.d.ts +6 -15
- package/gen/services/OauthService.js +6 -19
- package/gen/services/ResourceService.d.ts +10 -1
- package/gen/services/ResourceService.js +16 -1
- package/gen/services/ScriptService.d.ts +28 -3
- package/gen/services/ScriptService.js +27 -0
- package/gen/services/UserService.d.ts +14 -6
- package/gen/services/UserService.js +25 -11
- package/infer.d.ts +1 -1
- package/infer.js +35 -18
- package/logout.d.ts +1 -1
- package/logout.js +7 -9
- package/package.json +74 -68
- package/script_helpers.d.ts +5 -3
- package/script_helpers.js +42 -12
- package/scripts.js +9 -4
- package/utils.d.ts +8 -9
- package/utils.js +42 -81
- package/components/AutosizedTextarea.svelte +0 -34
- package/components/AutosizedTextarea.svelte.d.ts +0 -19
- package/components/ProgressBar.svelte +0 -31
- package/components/ProgressBarPart.svelte +0 -20
- package/components/ProgressBarPart.svelte.d.ts +0 -20
- package/components/Switch.svelte +0 -61
- package/components/Switch.svelte.d.ts +0 -31
- package/components/flows/content/CopyFirstStepSchema.svelte +0 -13
- package/components/flows/content/CopyFirstStepSchema.svelte.d.ts +0 -14
- package/components/flows/content/FlowLoopWrapper.svelte +0 -9
- package/components/flows/content/FlowLoopWrapper.svelte.d.ts +0 -14
- package/components/flows/content/FlowModule.svelte +0 -217
- package/components/flows/content/FlowModule.svelte.d.ts +0 -29
- package/gen/schemas/$AuditLog.d.ts +0 -32
- package/gen/schemas/$AuditLog.js +0 -35
- package/gen/schemas/$CompletedJob.d.ts +0 -98
- package/gen/schemas/$CompletedJob.js +0 -103
- package/gen/schemas/$ContextualVariable.d.ts +0 -16
- package/gen/schemas/$ContextualVariable.js +0 -19
- package/gen/schemas/$CreateResource.d.ts +0 -22
- package/gen/schemas/$CreateResource.js +0 -25
- package/gen/schemas/$CreateVariable.d.ts +0 -26
- package/gen/schemas/$CreateVariable.js +0 -29
- package/gen/schemas/$CreateWorkspace.d.ts +0 -20
- package/gen/schemas/$CreateWorkspace.js +0 -23
- package/gen/schemas/$EditResource.d.ts +0 -13
- package/gen/schemas/$EditResource.js +0 -16
- package/gen/schemas/$EditResourceType.d.ts +0 -10
- package/gen/schemas/$EditResourceType.js +0 -13
- package/gen/schemas/$EditSchedule.d.ts +0 -20
- package/gen/schemas/$EditSchedule.js +0 -23
- package/gen/schemas/$EditVariable.d.ts +0 -16
- package/gen/schemas/$EditVariable.js +0 -19
- package/gen/schemas/$EditWorkspaceUser.d.ts +0 -7
- package/gen/schemas/$EditWorkspaceUser.js +0 -10
- package/gen/schemas/$Flow.d.ts +0 -23
- package/gen/schemas/$Flow.js +0 -26
- package/gen/schemas/$FlowMetadata.d.ts +0 -31
- package/gen/schemas/$FlowMetadata.js +0 -34
- package/gen/schemas/$FlowPreview.d.ts +0 -80
- package/gen/schemas/$FlowPreview.js +0 -83
- package/gen/schemas/$GlobalUserInfo.d.ts +0 -26
- package/gen/schemas/$GlobalUserInfo.js +0 -29
- package/gen/schemas/$Group.d.ts +0 -23
- package/gen/schemas/$Group.js +0 -26
- package/gen/schemas/$Job.d.ts +0 -17
- package/gen/schemas/$Job.js +0 -20
- package/gen/schemas/$ListableVariable.d.ts +0 -35
- package/gen/schemas/$ListableVariable.js +0 -38
- package/gen/schemas/$Login.d.ts +0 -12
- package/gen/schemas/$Login.js +0 -15
- package/gen/schemas/$MainArgSignature.d.ts +0 -50
- package/gen/schemas/$MainArgSignature.js +0 -53
- package/gen/schemas/$NewSchedule.d.ts +0 -30
- package/gen/schemas/$NewSchedule.js +0 -33
- package/gen/schemas/$NewToken.d.ts +0 -11
- package/gen/schemas/$NewToken.js +0 -14
- package/gen/schemas/$NewUser.d.ts +0 -16
- package/gen/schemas/$NewUser.js +0 -19
- package/gen/schemas/$Preview.d.ts +0 -19
- package/gen/schemas/$Preview.js +0 -22
- package/gen/schemas/$QueuedJob.d.ts +0 -139
- package/gen/schemas/$QueuedJob.js +0 -144
- package/gen/schemas/$Resource.d.ts +0 -31
- package/gen/schemas/$Resource.js +0 -34
- package/gen/schemas/$ResourceType.d.ts +0 -17
- package/gen/schemas/$ResourceType.js +0 -20
- package/gen/schemas/$Schedule.d.ts +0 -47
- package/gen/schemas/$Schedule.js +0 -50
- package/gen/schemas/$Script.d.ts +0 -77
- package/gen/schemas/$Script.js +0 -80
- package/gen/schemas/$ScriptArgs.d.ts +0 -6
- package/gen/schemas/$ScriptArgs.js +0 -9
- package/gen/schemas/$SlackToken.d.ts +0 -24
- package/gen/schemas/$SlackToken.js +0 -27
- package/gen/schemas/$TokenResponse.d.ts +0 -23
- package/gen/schemas/$TokenResponse.js +0 -26
- package/gen/schemas/$TruncatedToken.d.ts +0 -25
- package/gen/schemas/$TruncatedToken.js +0 -28
- package/gen/schemas/$Usage.d.ts +0 -13
- package/gen/schemas/$Usage.js +0 -16
- package/gen/schemas/$User.d.ts +0 -42
- package/gen/schemas/$User.js +0 -45
- package/gen/schemas/$UserWorkspaceList.d.ts +0 -28
- package/gen/schemas/$UserWorkspaceList.js +0 -31
- package/gen/schemas/$WorkerPing.d.ts +0 -31
- package/gen/schemas/$WorkerPing.js +0 -34
- package/gen/schemas/$Workspace.d.ts +0 -19
- package/gen/schemas/$Workspace.js +0 -22
- package/gen/schemas/$WorkspaceInvite.d.ts +0 -16
- package/gen/schemas/$WorkspaceInvite.js +0 -19
|
@@ -3,13 +3,10 @@ import { faSearch } from '@fortawesome/free-solid-svg-icons';
|
|
|
3
3
|
import { hubScripts, workspaceStore } from '../stores';
|
|
4
4
|
import { createEventDispatcher } from 'svelte';
|
|
5
5
|
import ItemPicker from './ItemPicker.svelte';
|
|
6
|
-
import Modal from './Modal.svelte';
|
|
7
|
-
import { Highlight } from 'svelte-highlight';
|
|
8
|
-
import typescript from 'svelte-highlight/languages/typescript';
|
|
9
|
-
import python from 'svelte-highlight/languages/python';
|
|
10
6
|
import { getScriptByPath } from '../utils';
|
|
11
7
|
import RadioButton from './RadioButton.svelte';
|
|
12
|
-
import { Button } from './common';
|
|
8
|
+
import { Button, Drawer, DrawerContent } from './common';
|
|
9
|
+
import HighlightCode from './HighlightCode.svelte';
|
|
13
10
|
export let scriptPath = undefined;
|
|
14
11
|
export let allowFlow = false;
|
|
15
12
|
export let allowHub = false;
|
|
@@ -17,7 +14,7 @@ export let itemKind = allowHub ? 'hub' : 'script';
|
|
|
17
14
|
export let kind = Script.kind.SCRIPT;
|
|
18
15
|
let items = [];
|
|
19
16
|
let itemPicker;
|
|
20
|
-
let
|
|
17
|
+
let drawerViewer;
|
|
21
18
|
let code = '';
|
|
22
19
|
let lang;
|
|
23
20
|
let options = [['Script', 'script']];
|
|
@@ -56,20 +53,20 @@ $: {
|
|
|
56
53
|
}}
|
|
57
54
|
/>
|
|
58
55
|
|
|
59
|
-
<div class="flex flex-row flex-wrap items-center gap-4">
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
<div class="flex flex-row flex-wrap items-center gap-4 w-full">
|
|
57
|
+
{#if options.length > 1}
|
|
58
|
+
<div class="w-80 -mb-2">
|
|
62
59
|
<RadioButton bind:value={itemKind} {options} />
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
</div>
|
|
61
|
+
{/if}
|
|
65
62
|
|
|
66
63
|
<div class="flex items-center grow gap-4">
|
|
67
|
-
<input type="text" value={scriptPath ?? 'No path chosen yet'} disabled />
|
|
64
|
+
<input class="grow w-full" type="text" value={scriptPath ?? 'No path chosen yet'} disabled />
|
|
68
65
|
<Button
|
|
69
66
|
size="sm"
|
|
70
67
|
endIcon={{ icon: faSearch }}
|
|
71
68
|
btnClasses="mx-auto whitespace-nowrap"
|
|
72
|
-
on:click={() => itemPicker.
|
|
69
|
+
on:click={() => itemPicker.openDrawer()}
|
|
73
70
|
>
|
|
74
71
|
Pick a {itemKind} path
|
|
75
72
|
</Button>
|
|
@@ -82,7 +79,7 @@ $: {
|
|
|
82
79
|
const { language, content } = await getScriptByPath(scriptPath ?? '')
|
|
83
80
|
code = content
|
|
84
81
|
lang = language
|
|
85
|
-
|
|
82
|
+
drawerViewer.openDrawer()
|
|
86
83
|
}}
|
|
87
84
|
>
|
|
88
85
|
Show code
|
|
@@ -90,13 +87,8 @@ $: {
|
|
|
90
87
|
{/if}
|
|
91
88
|
</div>
|
|
92
89
|
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
{:else if lang == 'deno'}
|
|
99
|
-
<Highlight language={typescript} {code} />
|
|
100
|
-
{/if}
|
|
101
|
-
</div>
|
|
102
|
-
</Modal>
|
|
90
|
+
<Drawer bind:this={drawerViewer}>
|
|
91
|
+
<DrawerContent title="Script {scriptPath}" on:close={drawerViewer.closeDrawer}>
|
|
92
|
+
<HighlightCode {code} language={lang} />
|
|
93
|
+
</DrawerContent>
|
|
94
|
+
</Drawer>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import SchemaForm from './SchemaForm.svelte';
|
|
1
|
+
<script>import SchemaForm from './SchemaForm.svelte';
|
|
3
2
|
import Tab from './common/tabs/Tab.svelte';
|
|
4
3
|
import Tabs from './common/tabs/Tabs.svelte';
|
|
5
4
|
import TabContent from './common/tabs/TabContent.svelte';
|
|
6
5
|
import Highlight from 'svelte-highlight';
|
|
7
6
|
import json from 'svelte-highlight/languages/json';
|
|
8
7
|
import SvelteMarkdown from 'svelte-markdown';
|
|
8
|
+
import { Alert } from './common';
|
|
9
9
|
export let schema;
|
|
10
10
|
export let summary;
|
|
11
11
|
export let description;
|
|
@@ -15,45 +15,46 @@ export function setSchema(newSchema) {
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<div class="w-full">
|
|
18
|
-
<
|
|
18
|
+
<h1 class="my-4">UI customisation</h1>
|
|
19
19
|
|
|
20
20
|
<Tabs selected="ui">
|
|
21
21
|
<Tab value="ui">UI</Tab>
|
|
22
22
|
<Tab value="jsonschema">JSON Schema</Tab>
|
|
23
23
|
<svelte:fragment slot="content">
|
|
24
24
|
<TabContent value="ui">
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<div class="
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<div
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/>
|
|
25
|
+
<h2 class="border-b pb-1 mt-6">Display</h2>
|
|
26
|
+
<div class="grid grid-cols-3 gap-2 mt-4">
|
|
27
|
+
<label>
|
|
28
|
+
<div class="text-gray-700 text-sm">Summary</div>
|
|
29
|
+
<textarea bind:value={summary} placeholder="Edit summary" class="text-sm" />
|
|
30
|
+
</label>
|
|
31
|
+
<label class="col-span-2">
|
|
32
|
+
<div class="text-gray-700 text-sm">Description</div>
|
|
33
|
+
<textarea
|
|
34
|
+
bind:value={description}
|
|
35
|
+
placeholder="Edit description. Markdown accepted."
|
|
36
|
+
class="text-sm"
|
|
37
|
+
/>
|
|
38
|
+
<div class="mt-1 px-2">
|
|
39
|
+
{#if description}
|
|
40
|
+
<div
|
|
41
|
+
class="prose !max-w-full !max-h-48 text-xs shadow-inner shadow-blue overflow-auto mt-1"
|
|
42
|
+
>
|
|
43
|
+
<SvelteMarkdown source={description} />
|
|
44
44
|
</div>
|
|
45
|
-
|
|
45
|
+
{:else}
|
|
46
|
+
<div class="text-xs text-gray-500"> Enter a description to see the preview </div>
|
|
47
|
+
{/if}
|
|
46
48
|
</div>
|
|
47
|
-
</
|
|
48
|
-
</div>
|
|
49
|
-
<div class="bg-blue-100 border-l-4 border-blue-600 text-blue-700 p-4 m-4" role="alert">
|
|
50
|
-
<p class="font-bold">Synchronized with main signature</p>
|
|
51
|
-
<p>
|
|
52
|
-
Argument names, being required or not, and default values are derived from the main
|
|
53
|
-
signature of step 2 and cannot be edited directly. Change the main signature to edit
|
|
54
|
-
them.
|
|
55
|
-
</p>
|
|
49
|
+
</label>
|
|
56
50
|
</div>
|
|
51
|
+
<h2 class="border-b pb-1 my-4">Arguments</h2>
|
|
52
|
+
<Alert type="info" title="Synchronized with main signature">
|
|
53
|
+
Argument names, being required or not, and default values are derived from the main
|
|
54
|
+
signature of step 2 and cannot be edited directly. Change the main signature to edit them.
|
|
55
|
+
</Alert>
|
|
56
|
+
<div class="mt-4" />
|
|
57
|
+
|
|
57
58
|
<SchemaForm {schema} editableSchema={true} />
|
|
58
59
|
</TabContent>
|
|
59
60
|
<TabContent value="jsonschema">
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import TableCustom from './TableCustom.svelte';
|
|
1
|
+
<script>import TableCustom from './TableCustom.svelte';
|
|
3
2
|
import { GranularAclService } from '../gen/services/GranularAclService';
|
|
4
3
|
import { sendUserToast } from '../utils';
|
|
5
4
|
import { GroupService, UserService } from '../gen';
|
|
6
5
|
import { createEventDispatcher } from 'svelte';
|
|
7
6
|
import AutoComplete from 'simple-svelte-autocomplete';
|
|
8
7
|
import { workspaceStore } from '../stores';
|
|
9
|
-
import { Button } from './common';
|
|
8
|
+
import { Alert, Button, Drawer } from './common';
|
|
9
|
+
import DrawerContent from './common/drawer/DrawerContent.svelte';
|
|
10
|
+
import Toggle from './Toggle.svelte';
|
|
10
11
|
const dispatch = createEventDispatcher();
|
|
11
12
|
export let kind;
|
|
12
13
|
export let path = '';
|
|
@@ -17,16 +18,16 @@ let write = false;
|
|
|
17
18
|
let acls = [];
|
|
18
19
|
let groups = [];
|
|
19
20
|
let usernames = [];
|
|
20
|
-
let
|
|
21
|
+
let drawer;
|
|
21
22
|
$: newOwner = [ownerKind === 'group' ? 'g' : 'u', owner].join('/');
|
|
22
|
-
export async function
|
|
23
|
+
export async function openDrawer(newPath) {
|
|
23
24
|
if (newPath) {
|
|
24
25
|
path = newPath;
|
|
25
26
|
}
|
|
26
27
|
loadAcls();
|
|
27
28
|
loadGroups();
|
|
28
29
|
loadUsernames();
|
|
29
|
-
|
|
30
|
+
drawer.openDrawer();
|
|
30
31
|
}
|
|
31
32
|
async function loadAcls() {
|
|
32
33
|
acls = Object.entries(await GranularAclService.getGranularAcls({ workspace: $workspaceStore, path, kind }));
|
|
@@ -64,67 +65,72 @@ async function addAcl(owner, write) {
|
|
|
64
65
|
}
|
|
65
66
|
</script>
|
|
66
67
|
|
|
67
|
-
<
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<
|
|
76
|
-
class="
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
68
|
+
<Drawer bind:this={drawer}>
|
|
69
|
+
<DrawerContent title="Share {path}" on:close={drawer.closeDrawer}>
|
|
70
|
+
<div>
|
|
71
|
+
<Alert type="info" title="Owners/Editors/Readers"
|
|
72
|
+
>Owner is the user or group that is prefix of its path. Sharing allow other users or group
|
|
73
|
+
to be able to read or write to this item without being an owner.</Alert
|
|
74
|
+
>
|
|
75
|
+
<div class="flex flex-row flex-wrap pb-0 my-5 items-end">
|
|
76
|
+
<div class="flex gap-4 mr-2 flex-row">
|
|
77
|
+
<label class="flex flex-col">
|
|
78
|
+
<span class="text-gray-700 text-sm"> Owner Kind </span>
|
|
79
|
+
<select
|
|
80
|
+
class="block mt-1 w-20"
|
|
81
|
+
bind:value={ownerKind}
|
|
82
|
+
on:change={() => {
|
|
83
|
+
if (ownerKind === 'group') {
|
|
84
|
+
owner = 'all'
|
|
85
|
+
} else {
|
|
86
|
+
owner = ''
|
|
87
|
+
}
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
<option>user</option>
|
|
91
|
+
<option>group</option>
|
|
92
|
+
</select>
|
|
93
|
+
</label>
|
|
94
|
+
<label class="flex flex-col" for="inp">
|
|
95
|
+
<span class="text-sm text-gray-700">Owner</span>
|
|
96
|
+
<div class="block mt-1">
|
|
97
|
+
<div class="static z-50">
|
|
98
|
+
<AutoComplete
|
|
99
|
+
items={ownerKind === 'user' ? usernames : groups}
|
|
100
|
+
bind:selectedItem={owner}
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</label>
|
|
105
|
+
<label class="flex flex-col items-end" for="inp">
|
|
106
|
+
<span class="text-sm text-gray-700">Editor</span>
|
|
107
|
+
<Toggle bind:checked={write} />
|
|
108
|
+
</label>
|
|
99
109
|
</div>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
<div class="mt-2">
|
|
111
|
+
<Button size="sm" on:click={() => addAcl(newOwner, write)}>Add permission</Button>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<TableCustom>
|
|
115
|
+
<tr slot="header-row">
|
|
116
|
+
<th>owner</th>
|
|
117
|
+
<th>has write permission</th>
|
|
118
|
+
<th />
|
|
119
|
+
</tr>
|
|
120
|
+
<tbody slot="body">
|
|
121
|
+
{#each acls as [owner, write]}
|
|
122
|
+
<tr>
|
|
123
|
+
<td>{owner}</td>
|
|
124
|
+
<td>{write}</td>
|
|
125
|
+
<td>
|
|
126
|
+
<Button variant="border" color="red" size="sm" on:click={() => deleteAcl(owner)}>
|
|
127
|
+
Delete
|
|
128
|
+
</Button>
|
|
129
|
+
</td>
|
|
130
|
+
</tr>
|
|
131
|
+
{/each}
|
|
132
|
+
</tbody>
|
|
133
|
+
</TableCustom>
|
|
108
134
|
</div>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
<th>owner</th>
|
|
112
|
-
<th>has write permission</th>
|
|
113
|
-
<th />
|
|
114
|
-
</tr>
|
|
115
|
-
<tbody slot="body">
|
|
116
|
-
{#each acls as [owner, write]}
|
|
117
|
-
<tr>
|
|
118
|
-
<td>{owner}</td>
|
|
119
|
-
<td>{write}</td>
|
|
120
|
-
<td
|
|
121
|
-
><Button variant="border" color="blue" size="sm" on:click={() => deleteAcl(owner)}
|
|
122
|
-
>Delete</Button
|
|
123
|
-
></td
|
|
124
|
-
>
|
|
125
|
-
</tr>
|
|
126
|
-
{/each}
|
|
127
|
-
</tbody>
|
|
128
|
-
</TableCustom>
|
|
129
|
-
</div>
|
|
130
|
-
</Modal>
|
|
135
|
+
</DrawerContent>
|
|
136
|
+
</Drawer>
|
|
@@ -3,7 +3,7 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow';
|
|
5
5
|
path?: string | undefined;
|
|
6
|
-
|
|
6
|
+
openDrawer?: ((newPath?: string) => Promise<void>) | undefined;
|
|
7
7
|
};
|
|
8
8
|
events: {
|
|
9
9
|
change: CustomEvent<any>;
|
|
@@ -16,6 +16,6 @@ export declare type ShareModalProps = typeof __propDef.props;
|
|
|
16
16
|
export declare type ShareModalEvents = typeof __propDef.events;
|
|
17
17
|
export declare type ShareModalSlots = typeof __propDef.slots;
|
|
18
18
|
export default class ShareModal extends SvelteComponentTyped<ShareModalProps, ShareModalEvents, ShareModalSlots> {
|
|
19
|
-
get
|
|
19
|
+
get openDrawer(): (newPath?: string | undefined) => Promise<void>;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
@@ -21,6 +21,7 @@ import { createEventDispatcher, onDestroy, onMount } from 'svelte';
|
|
|
21
21
|
import { createHash, editorConfig, langToExt, updateOptions } from '../editorUtils';
|
|
22
22
|
let divEl = null;
|
|
23
23
|
let editor;
|
|
24
|
+
let model;
|
|
24
25
|
export let lang;
|
|
25
26
|
export let code = '';
|
|
26
27
|
export let hash = createHash();
|
|
@@ -78,7 +79,7 @@ function format() {
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
async function loadMonaco() {
|
|
81
|
-
|
|
82
|
+
model = monaco.editor.createModel(code, lang, monaco.Uri.parse(uri));
|
|
82
83
|
model.updateOptions(updateOptions);
|
|
83
84
|
editor = monaco.editor.create(divEl, editorConfig(model, code, lang, automaticLayout));
|
|
84
85
|
let timeoutModel = undefined;
|
|
@@ -120,6 +121,7 @@ onMount(() => {
|
|
|
120
121
|
});
|
|
121
122
|
onDestroy(() => {
|
|
122
123
|
try {
|
|
124
|
+
model && model.dispose();
|
|
123
125
|
editor && editor.dispose();
|
|
124
126
|
}
|
|
125
127
|
catch (err) { }
|
|
@@ -143,5 +145,5 @@ onDestroy(() => {
|
|
|
143
145
|
|
|
144
146
|
.few-lines-editor {
|
|
145
147
|
/* stylelint-disable-next-line unit-allowed-list */
|
|
146
|
-
height:
|
|
148
|
+
height: 100px;
|
|
147
149
|
}</style>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<script>import Fuse from 'fuse.js';
|
|
2
|
+
import { UserService, SettingsService, GlobalUserInfo } from '../gen';
|
|
3
|
+
import TableCustom from './TableCustom.svelte';
|
|
4
|
+
import PageHeader from './PageHeader.svelte';
|
|
5
|
+
import InviteGlobalUser from './InviteGlobalUser.svelte';
|
|
6
|
+
import { Alert, Badge, Drawer, DrawerContent } from './common';
|
|
7
|
+
import ConfirmationModal from './common/confirmationModal/ConfirmationModal.svelte';
|
|
8
|
+
let drawer;
|
|
9
|
+
export function openDrawer() {
|
|
10
|
+
loadVersion();
|
|
11
|
+
listUsers();
|
|
12
|
+
drawer?.openDrawer();
|
|
13
|
+
}
|
|
14
|
+
export function toggleDrawer() {
|
|
15
|
+
drawer?.toggleDrawer();
|
|
16
|
+
}
|
|
17
|
+
let version;
|
|
18
|
+
let users = [];
|
|
19
|
+
let filteredUsers;
|
|
20
|
+
let userFilter = '';
|
|
21
|
+
let deleteConfirmedCallback = undefined;
|
|
22
|
+
$: openConfirmation = Boolean(deleteConfirmedCallback);
|
|
23
|
+
const fuseOptions = {
|
|
24
|
+
includeScore: false,
|
|
25
|
+
keys: ['email', 'name', 'company']
|
|
26
|
+
};
|
|
27
|
+
const fuse = new Fuse(users, fuseOptions);
|
|
28
|
+
$: filteredUsers = fuse?.search(userFilter).map((value) => value.item);
|
|
29
|
+
async function loadVersion() {
|
|
30
|
+
version = await SettingsService.backendVersion();
|
|
31
|
+
}
|
|
32
|
+
async function listUsers() {
|
|
33
|
+
users = await UserService.listUsersAsSuperAdmin({ perPage: 100000 });
|
|
34
|
+
fuse?.setCollection(users);
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<Drawer bind:this={drawer} on:open={listUsers} size="900px">
|
|
39
|
+
<DrawerContent overflow_y={false} title="Superadmin Settings" on:close={drawer.closeDrawer}>
|
|
40
|
+
<ConfirmationModal
|
|
41
|
+
open={openConfirmation}
|
|
42
|
+
title="Remove user"
|
|
43
|
+
confirmationText="Remove"
|
|
44
|
+
on:canceled={() => {
|
|
45
|
+
deleteConfirmedCallback = undefined
|
|
46
|
+
}}
|
|
47
|
+
on:confirmed={() => {
|
|
48
|
+
if (deleteConfirmedCallback) {
|
|
49
|
+
deleteConfirmedCallback()
|
|
50
|
+
}
|
|
51
|
+
deleteConfirmedCallback = undefined
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<div class="flex flex-col w-full space-y-4">
|
|
55
|
+
<span>Are you sure you want to remove this user?</span>
|
|
56
|
+
<Alert type="info" title="Bypass confirmation">
|
|
57
|
+
<div>
|
|
58
|
+
You can press
|
|
59
|
+
<Badge color="dark-gray">SHIFT</Badge>
|
|
60
|
+
while removing a variable to bypass confirmation.
|
|
61
|
+
</div>
|
|
62
|
+
</Alert>
|
|
63
|
+
</div>
|
|
64
|
+
</ConfirmationModal>
|
|
65
|
+
|
|
66
|
+
<div class="flex flex-col h-full">
|
|
67
|
+
<div>
|
|
68
|
+
<div class="text-xs pt-1 text-gray-500 ">
|
|
69
|
+
Windmill {version}
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<PageHeader title="All users" primary={false} />
|
|
73
|
+
|
|
74
|
+
<div class="pb-1" />
|
|
75
|
+
<InviteGlobalUser on:new={listUsers} />
|
|
76
|
+
<div class="pb-1" />
|
|
77
|
+
|
|
78
|
+
<input placeholder="Search users" bind:value={userFilter} class="input mt-1" />
|
|
79
|
+
</div>
|
|
80
|
+
<div class="mt-2 overflow-auto">
|
|
81
|
+
<TableCustom>
|
|
82
|
+
<tr slot="header-row" class="sticky top-0 bg-white border-b">
|
|
83
|
+
<th>email</th>
|
|
84
|
+
<th>superadmin</th>
|
|
85
|
+
<th>auth</th>
|
|
86
|
+
<th>name</th>
|
|
87
|
+
<th>company</th>
|
|
88
|
+
<th />
|
|
89
|
+
</tr>
|
|
90
|
+
<tbody slot="body" class="overflow-y-auto h-full max-h-full">
|
|
91
|
+
{#if filteredUsers && users}
|
|
92
|
+
{#each userFilter === '' ? users : filteredUsers as { email, super_admin, login_type, name, company }}
|
|
93
|
+
<tr class="border">
|
|
94
|
+
<td>{email}</td>
|
|
95
|
+
<td>{super_admin ? 'yes' : ''}</td>
|
|
96
|
+
<td>{login_type}</td>
|
|
97
|
+
<td><span class="break-words">{name ?? ''}</span></td>
|
|
98
|
+
<td><span class="break-words">{company ?? ''}</span></td>
|
|
99
|
+
<td>
|
|
100
|
+
<div class="flex flex-row gap-x-1">
|
|
101
|
+
<button
|
|
102
|
+
class="text-blue-500"
|
|
103
|
+
on:click={async () => {
|
|
104
|
+
await UserService.globalUserUpdate({
|
|
105
|
+
email,
|
|
106
|
+
requestBody: {
|
|
107
|
+
is_super_admin: !super_admin
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
listUsers()
|
|
111
|
+
}}>{super_admin ? 'demote' : 'promote'}</button
|
|
112
|
+
>
|
|
113
|
+
|
|
|
114
|
+
<button
|
|
115
|
+
class="text-red-500"
|
|
116
|
+
on:click={async () => {
|
|
117
|
+
deleteConfirmedCallback = async () => {
|
|
118
|
+
await UserService.globalUserDelete({ email })
|
|
119
|
+
listUsers()
|
|
120
|
+
}
|
|
121
|
+
openConfirmation = true
|
|
122
|
+
}}>remove</button
|
|
123
|
+
>
|
|
124
|
+
</div>
|
|
125
|
+
</td>
|
|
126
|
+
</tr>
|
|
127
|
+
{/each}
|
|
128
|
+
{/if}
|
|
129
|
+
</tbody>
|
|
130
|
+
</TableCustom>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</DrawerContent>
|
|
134
|
+
</Drawer>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
openDrawer?: (() => void) | undefined;
|
|
5
|
+
toggleDrawer?: (() => void) | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
export declare type SuperadminSettingsProps = typeof __propDef.props;
|
|
13
|
+
export declare type SuperadminSettingsEvents = typeof __propDef.events;
|
|
14
|
+
export declare type SuperadminSettingsSlots = typeof __propDef.slots;
|
|
15
|
+
export default class SuperadminSettings extends SvelteComponentTyped<SuperadminSettingsProps, SuperadminSettingsEvents, SuperadminSettingsSlots> {
|
|
16
|
+
get openDrawer(): () => void;
|
|
17
|
+
get toggleDrawer(): () => void;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -11,7 +11,7 @@ const dispatch = createEventDispatcher();
|
|
|
11
11
|
-->
|
|
12
12
|
<div class="flex flex-col {$$props.class} min-w-full">
|
|
13
13
|
<div class="inline-block min-w-full py-2 align-middle">
|
|
14
|
-
<table
|
|
14
|
+
<table class="table-custom min-w-full table-auto divide-y divide-gray-300">
|
|
15
15
|
<thead>
|
|
16
16
|
<slot name="header-row" />
|
|
17
17
|
</thead>
|
|
@@ -31,7 +31,7 @@ const dispatch = createEventDispatcher();
|
|
|
31
31
|
<tr>
|
|
32
32
|
{#each keys as key, i}
|
|
33
33
|
<td
|
|
34
|
-
class="py-
|
|
34
|
+
class="py-2 text-sm text-gray-700 break-words {i == 0
|
|
35
35
|
? 'pl-4 pr-3 sm:pl-6 md:pl-0 font-semibold'
|
|
36
36
|
: 'px-3'} {twTextSize}"
|
|
37
37
|
>
|
|
@@ -5,6 +5,9 @@ import { createEventDispatcher } from 'svelte';
|
|
|
5
5
|
const dispatch = createEventDispatcher();
|
|
6
6
|
export let isLoading = false;
|
|
7
7
|
export let job = undefined;
|
|
8
|
+
export let workspaceOverride = undefined;
|
|
9
|
+
export let notfound = false;
|
|
10
|
+
$: workspace = workspaceOverride ?? $workspaceStore;
|
|
8
11
|
let intervalId;
|
|
9
12
|
let syncIteration = 0;
|
|
10
13
|
let ITERATIONS_BEFORE_SLOW_REFRESH = 100;
|
|
@@ -13,14 +16,14 @@ export async function runPreview(path, code, lang, args) {
|
|
|
13
16
|
intervalId && clearInterval(intervalId);
|
|
14
17
|
if (isLoading && job) {
|
|
15
18
|
JobService.cancelQueuedJob({
|
|
16
|
-
workspace:
|
|
19
|
+
workspace: workspace,
|
|
17
20
|
id: job.id,
|
|
18
21
|
requestBody: {}
|
|
19
22
|
});
|
|
20
23
|
}
|
|
21
24
|
isLoading = true;
|
|
22
25
|
const testId = await JobService.runScriptPreview({
|
|
23
|
-
workspace:
|
|
26
|
+
workspace: workspace,
|
|
24
27
|
requestBody: {
|
|
25
28
|
path,
|
|
26
29
|
content: code,
|
|
@@ -61,7 +64,7 @@ async function loadTestJob(id) {
|
|
|
61
64
|
try {
|
|
62
65
|
if (job && `running` in job) {
|
|
63
66
|
let previewJobUpdates = await JobService.getJobUpdates({
|
|
64
|
-
workspace:
|
|
67
|
+
workspace: workspace,
|
|
65
68
|
id,
|
|
66
69
|
running: job.running,
|
|
67
70
|
logOffset: job.logs?.length ?? 0
|
|
@@ -70,23 +73,28 @@ async function loadTestJob(id) {
|
|
|
70
73
|
job.logs = (job.logs ?? '').concat(previewJobUpdates.new_logs);
|
|
71
74
|
}
|
|
72
75
|
if ((previewJobUpdates.running ?? false) || (previewJobUpdates.completed ?? false)) {
|
|
73
|
-
job = await JobService.getJob({ workspace:
|
|
76
|
+
job = await JobService.getJob({ workspace: workspace, id });
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
79
|
else {
|
|
77
|
-
job = await JobService.getJob({ workspace:
|
|
80
|
+
job = await JobService.getJob({ workspace: workspace, id });
|
|
78
81
|
}
|
|
79
82
|
if (job?.type === 'CompletedJob') {
|
|
80
83
|
//only CompletedJob has success property
|
|
81
84
|
isCompleted = true;
|
|
82
|
-
clearInterval(intervalId);
|
|
85
|
+
intervalId && clearInterval(intervalId);
|
|
83
86
|
if (isLoading) {
|
|
84
87
|
dispatch('done', job);
|
|
85
88
|
isLoading = false;
|
|
86
89
|
}
|
|
87
90
|
}
|
|
91
|
+
notfound = false;
|
|
88
92
|
}
|
|
89
93
|
catch (err) {
|
|
94
|
+
intervalId && clearInterval(intervalId);
|
|
95
|
+
if (err.status === 404) {
|
|
96
|
+
notfound = true;
|
|
97
|
+
}
|
|
90
98
|
console.error(err);
|
|
91
99
|
}
|
|
92
100
|
return isCompleted;
|
|
@@ -4,7 +4,9 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
isLoading?: boolean | undefined;
|
|
6
6
|
job?: Job | undefined;
|
|
7
|
-
|
|
7
|
+
workspaceOverride?: string | undefined;
|
|
8
|
+
notfound?: boolean | undefined;
|
|
9
|
+
runPreview?: ((path: string | undefined, code: string, lang: 'deno' | 'go' | 'python3' | 'bash', args: Record<string, any>) => Promise<void>) | undefined;
|
|
8
10
|
cancelJob?: (() => Promise<void>) | undefined;
|
|
9
11
|
watchJob?: ((testId: string) => Promise<void>) | undefined;
|
|
10
12
|
};
|
|
@@ -19,7 +21,7 @@ export declare type TestJobLoaderProps = typeof __propDef.props;
|
|
|
19
21
|
export declare type TestJobLoaderEvents = typeof __propDef.events;
|
|
20
22
|
export declare type TestJobLoaderSlots = typeof __propDef.slots;
|
|
21
23
|
export default class TestJobLoader extends SvelteComponentTyped<TestJobLoaderProps, TestJobLoaderEvents, TestJobLoaderSlots> {
|
|
22
|
-
get runPreview(): (path: string | undefined, code: string, lang: "
|
|
24
|
+
get runPreview(): (path: string | undefined, code: string, lang: "deno" | "python3" | "go" | "bash", args: Record<string, any>) => Promise<void>;
|
|
23
25
|
get cancelJob(): () => Promise<void>;
|
|
24
26
|
get watchJob(): (testId: string) => Promise<void>;
|
|
25
27
|
}
|