windmill-components 1.36.2 → 1.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +4 -4
- package/components/Dropdown.svelte +10 -13
- package/components/Dropdown.svelte.d.ts +4 -1
- package/components/Editor.svelte +39 -6
- package/components/Editor.svelte.d.ts +4 -1
- package/components/EditorBar.svelte +81 -37
- package/components/EditorBar.svelte.d.ts +4 -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 -6
- package/components/FlowPreviewContent.svelte +88 -51
- package/components/FlowPreviewContent.svelte.d.ts +1 -0
- package/components/FlowStatusViewer.svelte +129 -52
- 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 +50 -40
- package/components/InputTransformForm.svelte.d.ts +3 -3
- 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 +8 -8
- package/components/Password.svelte +1 -1
- package/components/Path.svelte +28 -7
- package/components/Path.svelte.d.ts +4 -4
- 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 -41
- package/components/RunForm.svelte.d.ts +13 -0
- package/components/SchemaEditor.svelte +5 -5
- package/components/SchemaEditorProperty.svelte +1 -1
- package/components/SchemaForm.svelte +5 -3
- 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 +119 -131
- package/components/ScriptEditor.svelte.d.ts +1 -0
- package/components/ScriptPicker.svelte +16 -24
- package/components/ScriptPicker.svelte.d.ts +1 -1
- package/components/ScriptSchema.svelte +33 -32
- package/components/ShareModal.svelte +74 -68
- package/components/ShareModal.svelte.d.ts +2 -2
- package/components/SharedBadge.svelte +4 -0
- 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 +16 -9
- 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 +4 -9
- package/components/common/breadcrumb/Breadcrumb.svelte +24 -0
- package/components/common/breadcrumb/Breadcrumb.svelte.d.ts +22 -0
- package/components/common/button/Button.svelte +23 -8
- package/components/common/button/Button.svelte.d.ts +1 -0
- package/components/common/button/ButtonPopup.svelte +1 -0
- package/components/common/button/model.d.ts +1 -1
- package/components/common/confirmationModal/ConfirmationModal.svelte +1 -0
- package/components/common/confirmationModal/UnsavedConfirmationModal.svelte +2 -1
- 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 +5 -0
- package/components/common/index.js +5 -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 +37 -0
- package/components/common/skeleton/Skeleton.svelte.d.ts +20 -0
- package/components/common/skeleton/SkeletonElement.svelte +8 -0
- package/components/common/skeleton/SkeletonElement.svelte.d.ts +17 -0
- package/components/common/skeleton/model.d.ts +21 -0
- package/components/common/skeleton/model.js +1 -0
- 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 -6
- 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 +84 -6
- 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/content/RemoveStepConfirmationModal.svelte +0 -1
- 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 +87 -159
- package/components/flows/flowStore.d.ts +3 -2
- package/components/flows/flowStore.js +60 -7
- package/components/flows/header/FlowImportExportMenu.svelte +11 -21
- package/components/flows/header/FlowPreviewButtons.svelte +13 -12
- 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 +24 -15
- package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +7 -2
- package/components/flows/utils.d.ts +8 -3
- package/components/flows/utils.js +86 -46
- 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 +133 -84
- package/components/propertyPicker/PropPicker.svelte.d.ts +5 -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 +4 -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/{PathFlow.js → BranchAll.js} +0 -0
- package/gen/models/BranchOne.d.ts +10 -0
- 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 +7 -2
- package/gen/models/FlowModuleValue.d.ts +4 -2
- package/gen/models/FlowStatus.d.ts +1 -0
- package/gen/models/FlowStatusModule.d.ts +14 -1
- 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 +69 -16
- package/gen/services/JobService.js +86 -14
- 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 +80 -72
- package/script_helpers.d.ts +6 -4
- package/script_helpers.js +48 -14
- 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/Tabs.svelte +0 -21
- package/components/Tabs.svelte.d.ts +0 -20
- 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 -211
- package/components/flows/content/FlowModule.svelte.d.ts +0 -29
- package/gen/models/PathFlow.d.ts +0 -4
- 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
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
<script>import DisplayResult from './DisplayResult.svelte';
|
|
2
|
-
import Tabs from './common/tabs/Tabs.svelte';
|
|
3
|
-
import Tab from './common/tabs/Tab.svelte';
|
|
4
|
-
import TabContent from './common/tabs/TabContent.svelte';
|
|
5
2
|
import LogViewer from './LogViewer.svelte';
|
|
6
|
-
export let
|
|
3
|
+
export let result;
|
|
4
|
+
export let logs;
|
|
7
5
|
</script>
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<LogViewer content={job.logs ?? ''} isLoading={false} />
|
|
19
|
-
</TabContent>
|
|
20
|
-
</svelte:fragment>
|
|
21
|
-
</Tabs>
|
|
22
|
-
{/if}
|
|
7
|
+
<div class="grid grid-cols-2 shadow border border-gray-800 h-full">
|
|
8
|
+
<div class="bg-white max-h-80 h-full p-1 overflow-auto relative">
|
|
9
|
+
<span class="text-gray-500">Result</span>
|
|
10
|
+
<DisplayResult {result} />
|
|
11
|
+
</div>
|
|
12
|
+
<div class="overflow-auto max-h-80 h-full relative">
|
|
13
|
+
<LogViewer content={logs ?? ''} isLoading={false} />
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script>import JobStatus from './JobStatus.svelte';
|
|
2
|
+
import Icon from 'svelte-awesome';
|
|
3
|
+
import { displayDaysAgo } from '../utils';
|
|
4
|
+
import { faCalendar, faClock, faRobot, faScroll, faUser, faWind } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
export let job;
|
|
6
|
+
const SMALL_ICON_SCALE = 0.7;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div class="rounded-md p-3 bg-gray-50 shadow-sm sm:text-sm md:text-base" style="min-height: 150px;">
|
|
10
|
+
<JobStatus {job} />
|
|
11
|
+
<div>
|
|
12
|
+
<Icon class="text-gray-700" data={faClock} scale={SMALL_ICON_SCALE} /><span class="mx-2">
|
|
13
|
+
Created {displayDaysAgo(job.created_at ?? '')}</span
|
|
14
|
+
>
|
|
15
|
+
</div>
|
|
16
|
+
{#if job && 'started_at' in job && job.started_at}
|
|
17
|
+
<div>
|
|
18
|
+
<Icon class="text-gray-700" data={faClock} scale={SMALL_ICON_SCALE} /><span class="mx-2">
|
|
19
|
+
Started {displayDaysAgo(job.started_at ?? '')}</span
|
|
20
|
+
>
|
|
21
|
+
</div>
|
|
22
|
+
{/if}
|
|
23
|
+
<div>
|
|
24
|
+
{#if job && job.parent_job}
|
|
25
|
+
{#if job.is_flow_step}
|
|
26
|
+
<Icon class="text-gray-700" data={faWind} scale={SMALL_ICON_SCALE} /><span class="mx-2">
|
|
27
|
+
Step of flow <a href={`/run/${job.parent_job}`}>{job.parent_job}</a></span
|
|
28
|
+
>
|
|
29
|
+
{:else}
|
|
30
|
+
<Icon class="text-gray-700" data={faRobot} scale={SMALL_ICON_SCALE} /><span class="mx-2">
|
|
31
|
+
Triggered by parent <a href={`/run/${job.parent_job}`}>{job.parent_job}</a></span
|
|
32
|
+
>
|
|
33
|
+
{/if}
|
|
34
|
+
{:else if job && job.schedule_path}
|
|
35
|
+
<Icon class="text-gray-700" data={faCalendar} scale={SMALL_ICON_SCALE} />
|
|
36
|
+
<span
|
|
37
|
+
>Triggered by the schedule: <a
|
|
38
|
+
href={`/schedule/add?edit=${job.schedule_path}&isFlow=${job.job_kind == 'flow'}`}
|
|
39
|
+
>{job.schedule_path}</a
|
|
40
|
+
></span
|
|
41
|
+
>
|
|
42
|
+
{/if}
|
|
43
|
+
|
|
44
|
+
{#if (job && job.job_kind == 'flow') || job?.job_kind == 'script'}
|
|
45
|
+
{@const stem = `/${job?.job_kind}s`}
|
|
46
|
+
{@const isScript = job?.job_kind === 'script'}
|
|
47
|
+
{@const viewHref = `${stem}/get/${isScript ? job?.script_hash : job?.script_path}`}
|
|
48
|
+
<div>
|
|
49
|
+
<Icon class="text-gray-700" data={faScroll} scale={SMALL_ICON_SCALE} /><span class="mx-2">
|
|
50
|
+
<a href={viewHref}>{isScript ? job?.script_hash : job?.script_path}</a>
|
|
51
|
+
</span>
|
|
52
|
+
</div>
|
|
53
|
+
{/if}
|
|
54
|
+
|
|
55
|
+
<div>
|
|
56
|
+
<Icon class="text-gray-700" data={faUser} scale={SMALL_ICON_SCALE} /><span class="mx-2">
|
|
57
|
+
By {job.created_by}
|
|
58
|
+
{#if job.permissioned_as !== `u/${job.created_by}`}but permissioned as {job.permissioned_as}{/if}
|
|
59
|
+
</span>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="text-gray-700 text-2xs pt-2">
|
|
63
|
+
run id: <a href={`/run/${job.id}?workspace=${job.workspace_id}`}>{job.id}</a>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { Job } from '../gen';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
job: Job;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
};
|
|
12
|
+
export declare type FlowMetadataProps = typeof __propDef.props;
|
|
13
|
+
export declare type FlowMetadataEvents = typeof __propDef.events;
|
|
14
|
+
export declare type FlowMetadataSlots = typeof __propDef.slots;
|
|
15
|
+
export default class FlowMetadata extends SvelteComponentTyped<FlowMetadataProps, FlowMetadataEvents, FlowMetadataSlots> {
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -53,7 +53,11 @@ let open = {};
|
|
|
53
53
|
>
|
|
54
54
|
{#if open[i]}
|
|
55
55
|
<div class="border border-black p-2 bg-gray-50 divide-y">
|
|
56
|
-
<InputTransformsViewer
|
|
56
|
+
<InputTransformsViewer
|
|
57
|
+
inputTransforms={mod?.value?.input_transforms ??
|
|
58
|
+
mod?.input_transforms ??
|
|
59
|
+
{}}
|
|
60
|
+
/>
|
|
57
61
|
<div class="w-full h-full mt-6">
|
|
58
62
|
<iframe
|
|
59
63
|
style="height: 400px;"
|
|
@@ -76,15 +80,17 @@ let open = {};
|
|
|
76
80
|
|
|
77
81
|
{#if open[i]}
|
|
78
82
|
<div transition:slide class="border border-black p-2 bg-gray-50 w-full">
|
|
79
|
-
<InputTransformsViewer
|
|
83
|
+
<InputTransformsViewer
|
|
84
|
+
inputTransforms={mod?.value?.input_transforms ??
|
|
85
|
+
mod?.input_transforms ??
|
|
86
|
+
{}}
|
|
87
|
+
/>
|
|
80
88
|
<HighlightCode
|
|
81
89
|
language={mod?.value?.language ?? 'deno'}
|
|
82
90
|
code={mod?.value?.content}
|
|
83
91
|
/>
|
|
84
92
|
</div>
|
|
85
93
|
{/if}
|
|
86
|
-
{:else if mod?.value?.type == 'flow'}
|
|
87
|
-
Flow at path {mod?.value?.path}
|
|
88
94
|
{:else if mod?.value?.type == 'forloopflow'}
|
|
89
95
|
For loop over all the elements of the list returned as a result of step {i}:
|
|
90
96
|
<svelte:self modules={mod.value.modules} />
|
|
@@ -132,7 +138,9 @@ let open = {};
|
|
|
132
138
|
{#if open[modules.length]}
|
|
133
139
|
<div class="border border-black p-2 bg-gray-50 divide-y">
|
|
134
140
|
<InputTransformsViewer
|
|
135
|
-
inputTransforms={failureModule?.input_transforms
|
|
141
|
+
inputTransforms={failureModule?.value?.input_transforms ??
|
|
142
|
+
failureModule?.input_transforms ??
|
|
143
|
+
{}}
|
|
136
144
|
/>
|
|
137
145
|
<div class="w-full h-full mt-6">
|
|
138
146
|
<iframe
|
|
@@ -161,7 +169,11 @@ let open = {};
|
|
|
161
169
|
|
|
162
170
|
{#if open[modules.length]}
|
|
163
171
|
<div transition:slide class="border border-black p-2 bg-gray-50 w-full">
|
|
164
|
-
<InputTransformsViewer
|
|
172
|
+
<InputTransformsViewer
|
|
173
|
+
inputTransforms={failureModule?.value?.input_transforms ??
|
|
174
|
+
failureModule?.input_transforms ??
|
|
175
|
+
{}}
|
|
176
|
+
/>
|
|
165
177
|
<HighlightCode
|
|
166
178
|
language={failureModule?.value?.language ?? 'deno'}
|
|
167
179
|
code={failureModule?.value?.content}
|
|
@@ -1,78 +1,95 @@
|
|
|
1
|
-
<script>import { JobService } from '../gen';
|
|
1
|
+
<script>import { Job, JobService } from '../gen';
|
|
2
2
|
import { workspaceStore } from '../stores';
|
|
3
3
|
import { faClose, faPlay, faRefresh } from '@fortawesome/free-solid-svg-icons';
|
|
4
4
|
import { Button } from './common';
|
|
5
|
-
import { createEventDispatcher, getContext
|
|
5
|
+
import { createEventDispatcher, getContext } from 'svelte';
|
|
6
6
|
import Icon from 'svelte-awesome';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { flowStore } from './flows/flowStore';
|
|
10
|
-
import { runFlowPreview, selectedIdToIndexes } from './flows/utils';
|
|
7
|
+
import { dfs, flowStore } from './flows/flowStore';
|
|
8
|
+
import { runFlowPreview } from './flows/utils';
|
|
11
9
|
import SchemaForm from './SchemaForm.svelte';
|
|
12
10
|
import FlowStatusViewer from '../components/FlowStatusViewer.svelte';
|
|
11
|
+
import FlowProgressBar from './flows/FlowProgressBar.svelte';
|
|
12
|
+
import { flowStateStore } from './flows/flowState';
|
|
13
|
+
import CapturePayload from './flows/content/CapturePayload.svelte';
|
|
14
|
+
let capturePayload;
|
|
13
15
|
export let previewMode;
|
|
16
|
+
export let open;
|
|
14
17
|
let jobId = undefined;
|
|
18
|
+
let job = undefined;
|
|
15
19
|
let isValid = false;
|
|
16
20
|
let isRunning = false;
|
|
21
|
+
let jobProgressReset;
|
|
17
22
|
const { selectedId, previewArgs } = getContext('FlowEditorContext');
|
|
23
|
+
const dispatch = createEventDispatcher();
|
|
24
|
+
function sliceModules(modules, upTo, idOrders) {
|
|
25
|
+
return modules
|
|
26
|
+
.filter((x) => idOrders.indexOf(x.id) <= upTo)
|
|
27
|
+
.map((m) => {
|
|
28
|
+
if (m.value.type === 'forloopflow') {
|
|
29
|
+
m.value.modules = sliceModules(m.value.modules, upTo, idOrders);
|
|
30
|
+
}
|
|
31
|
+
else if (m.value.type === 'branchone') {
|
|
32
|
+
m.value.branches = m.value.branches.map((b) => {
|
|
33
|
+
b.modules = sliceModules(b.modules, upTo, idOrders);
|
|
34
|
+
return b;
|
|
35
|
+
});
|
|
36
|
+
m.value.default = sliceModules(m.value.default, upTo, idOrders);
|
|
37
|
+
}
|
|
38
|
+
else if (m.value.type === 'branchall') {
|
|
39
|
+
m.value.branches = m.value.branches.map((b) => {
|
|
40
|
+
b.modules = sliceModules(b.modules, upTo, idOrders);
|
|
41
|
+
return b;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return m;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
18
47
|
function extractFlow(previewMode) {
|
|
19
48
|
if (previewMode === 'whole') {
|
|
20
49
|
return $flowStore;
|
|
21
50
|
}
|
|
22
51
|
else {
|
|
23
|
-
let [parentIndex, childIndex] = selectedIdToIndexes($selectedId);
|
|
24
52
|
const flow = JSON.parse(JSON.stringify($flowStore));
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
const lastModule = modules[modules.length - 1].value;
|
|
30
|
-
if (lastModule.type === 'forloopflow') {
|
|
31
|
-
lastModule.modules = lastModule.modules.slice(0, Number(childIndex) + 1);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
throw Error('Excepted forloopflow module');
|
|
35
|
-
}
|
|
53
|
+
const idOrders = dfs(flow.value.modules);
|
|
54
|
+
let upToIndex = idOrders.indexOf($selectedId);
|
|
55
|
+
if (upToIndex != -1) {
|
|
56
|
+
flow.value.modules = sliceModules(flow.value.modules, upToIndex, idOrders);
|
|
36
57
|
}
|
|
37
58
|
return flow;
|
|
38
59
|
}
|
|
39
60
|
}
|
|
40
|
-
const dispatch = createEventDispatcher();
|
|
41
61
|
export async function runPreview(args) {
|
|
62
|
+
jobProgressReset();
|
|
42
63
|
const newFlow = extractFlow(previewMode);
|
|
43
64
|
jobId = await runFlowPreview(args, newFlow);
|
|
44
65
|
isRunning = true;
|
|
45
66
|
}
|
|
46
67
|
function onKeyDown(event) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
event.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
68
|
+
if (open) {
|
|
69
|
+
switch (event.key) {
|
|
70
|
+
case 'Enter':
|
|
71
|
+
if (event.ctrlKey) {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
runPreview($previewArgs);
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function onJobsLoaded(newJob) {
|
|
80
|
+
job = newJob;
|
|
81
|
+
if (job?.type === 'CompletedJob') {
|
|
82
|
+
isRunning = false;
|
|
57
83
|
}
|
|
58
84
|
}
|
|
59
85
|
</script>
|
|
60
86
|
|
|
61
|
-
<
|
|
87
|
+
<CapturePayload bind:this={capturePayload} />
|
|
62
88
|
|
|
63
|
-
<
|
|
64
|
-
<div class="flex justify-between">
|
|
65
|
-
<div class="flex flex-row justify-center items-center ">
|
|
66
|
-
<div class="flex justify-center p-2 w-8 h-8 bg-blue-200 rounded-lg mr-2 ">
|
|
67
|
-
<Icon data={faPlay} scale={1} class="text-blue-500" />
|
|
68
|
-
</div>
|
|
89
|
+
<svelte:window on:keydown={onKeyDown} />
|
|
69
90
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
? `up to step ${$selectedId.split('-').join(',')}`
|
|
73
|
-
: ' whole flow'}
|
|
74
|
-
</h3>
|
|
75
|
-
</div>
|
|
91
|
+
<div class="flex divide-y flex-col space-y-2 h-screen bg-white px-6 py-2 w-full">
|
|
92
|
+
<div class="flex flex-row justify-between w-full items-center gap-x-1">
|
|
76
93
|
<Button
|
|
77
94
|
variant="border"
|
|
78
95
|
size="lg"
|
|
@@ -84,6 +101,30 @@ function onKeyDown(event) {
|
|
|
84
101
|
>
|
|
85
102
|
<Icon data={faClose} />
|
|
86
103
|
</Button>
|
|
104
|
+
|
|
105
|
+
<div class="flex flex-row justify-center items-center">
|
|
106
|
+
<div class="flex justify-center p-2 w-8 h-8 bg-blue-200 rounded-lg mr-2 ">
|
|
107
|
+
<Icon data={faPlay} scale={1} class="text-blue-500" />
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<h3
|
|
111
|
+
class="text-lg leading-6 font-bold text-gray-900 inline-flex flex-row justify-between w-full"
|
|
112
|
+
>
|
|
113
|
+
<div>
|
|
114
|
+
Test {previewMode === 'upTo'
|
|
115
|
+
? `up to step ${$selectedId.split('-').join(',')}`
|
|
116
|
+
: ' whole flow'}
|
|
117
|
+
</div>
|
|
118
|
+
</h3>
|
|
119
|
+
</div>
|
|
120
|
+
<Button
|
|
121
|
+
btnClasses="ml-2"
|
|
122
|
+
size="sm"
|
|
123
|
+
variant="border"
|
|
124
|
+
on:click={() => {
|
|
125
|
+
capturePayload.openDrawer()
|
|
126
|
+
}}>Fill test args from payload</Button
|
|
127
|
+
>
|
|
87
128
|
</div>
|
|
88
129
|
<div class="grow pb-8 max-h-1/2 overflow-auto">
|
|
89
130
|
<SchemaForm
|
|
@@ -117,7 +158,6 @@ function onKeyDown(event) {
|
|
|
117
158
|
<Button
|
|
118
159
|
variant="contained"
|
|
119
160
|
endIcon={{ icon: isRunning ? faRefresh : faPlay }}
|
|
120
|
-
size="lg"
|
|
121
161
|
color="blue"
|
|
122
162
|
btnClasses="w-full"
|
|
123
163
|
disabled={!isValid}
|
|
@@ -127,17 +167,14 @@ function onKeyDown(event) {
|
|
|
127
167
|
</Button>
|
|
128
168
|
{/if}
|
|
129
169
|
|
|
130
|
-
<
|
|
170
|
+
<FlowProgressBar {job} bind:reset={jobProgressReset} class="py-4" />
|
|
171
|
+
|
|
172
|
+
<div class="h-full overflow-y-auto mb-16 pt-4 grow">
|
|
131
173
|
{#if jobId}
|
|
132
174
|
<FlowStatusViewer
|
|
175
|
+
bind:flowState={$flowStateStore}
|
|
133
176
|
{jobId}
|
|
134
|
-
on:jobsLoaded={(
|
|
135
|
-
isRunning = false
|
|
136
|
-
const parentIndex = selectedIdToIndexes($selectedId)[0]
|
|
137
|
-
const upToIndex =
|
|
138
|
-
previewMode === 'upTo' ? Number(parentIndex) + 1 : $flowStateStore.modules.length
|
|
139
|
-
mapJobResultsToFlowState(e.detail, upToIndex)
|
|
140
|
-
}}
|
|
177
|
+
on:jobsLoaded={({ detail }) => onJobsLoaded(detail)}
|
|
141
178
|
/>
|
|
142
179
|
{/if}
|
|
143
180
|
</div>
|
|
@@ -1,68 +1,100 @@
|
|
|
1
|
-
<script>import { FlowStatusModule, JobService } from '../gen';
|
|
1
|
+
<script>import { FlowStatusModule, Job, JobService } from '../gen';
|
|
2
2
|
import { workspaceStore } from '../stores';
|
|
3
3
|
import FlowJobResult from './FlowJobResult.svelte';
|
|
4
4
|
import FlowPreviewStatus from './preview/FlowPreviewStatus.svelte';
|
|
5
|
-
import { Button } from 'flowbite-svelte';
|
|
6
5
|
import Icon from 'svelte-awesome';
|
|
7
|
-
import { faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons';
|
|
6
|
+
import { faChevronDown, faChevronUp, faHourglassHalf } from '@fortawesome/free-solid-svg-icons';
|
|
8
7
|
import { createEventDispatcher } from 'svelte';
|
|
9
8
|
import { onDestroy } from 'svelte';
|
|
9
|
+
import { Button } from './common';
|
|
10
|
+
import DisplayResult from './DisplayResult.svelte';
|
|
10
11
|
const dispatch = createEventDispatcher();
|
|
11
12
|
export let jobId;
|
|
12
|
-
export let
|
|
13
|
-
export let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
loopJobs: []
|
|
17
|
-
};
|
|
13
|
+
export let flowState = undefined;
|
|
14
|
+
export let flowJobIds = undefined;
|
|
15
|
+
export let job = undefined;
|
|
16
|
+
let jobResults = [];
|
|
18
17
|
let forloop_selected = '';
|
|
19
18
|
let timeout;
|
|
20
|
-
|
|
19
|
+
let lastSize = 0;
|
|
20
|
+
$: {
|
|
21
|
+
let len = (flowJobIds?.flowJobs ?? []).length;
|
|
22
|
+
if (len != lastSize) {
|
|
23
|
+
forloop_selected = flowJobIds?.flowJobs[len - 1] ?? '';
|
|
24
|
+
lastSize = len;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
$: innerModules =
|
|
28
|
+
job?.flow_status?.modules
|
|
29
|
+
.filter((x) => x.job != jobId)
|
|
30
|
+
.concat(job?.flow_status.failure_module.type != 'WaitingForPriorSteps'
|
|
31
|
+
? job?.flow_status.failure_module
|
|
32
|
+
: []) ?? [];
|
|
33
|
+
let errorCount = 0;
|
|
21
34
|
async function loadJobInProgress() {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
if (jobId != '00000000-0000-0000-0000-000000000000') {
|
|
36
|
+
try {
|
|
37
|
+
job = await JobService.getJob({
|
|
38
|
+
workspace: $workspaceStore ?? '',
|
|
39
|
+
id: jobId ?? ''
|
|
40
|
+
});
|
|
41
|
+
errorCount = 0;
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
errorCount += 1;
|
|
45
|
+
console.error(e);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (job?.type !== 'CompletedJob' && errorCount < 4) {
|
|
29
49
|
timeout = setTimeout(() => loadJobInProgress(), 500);
|
|
30
50
|
}
|
|
31
51
|
}
|
|
32
|
-
$:
|
|
52
|
+
$: job && dispatch('jobsLoaded', job);
|
|
33
53
|
function updateJobId() {
|
|
34
|
-
if (jobId !==
|
|
54
|
+
if (jobId !== job?.id) {
|
|
35
55
|
loadJobInProgress();
|
|
36
56
|
}
|
|
37
57
|
}
|
|
38
58
|
$: jobId && updateJobId();
|
|
59
|
+
$: isListJob = flowJobIds && Array.isArray(flowJobIds?.flowJobs);
|
|
39
60
|
onDestroy(() => {
|
|
40
61
|
timeout && clearTimeout(timeout);
|
|
41
62
|
});
|
|
42
63
|
</script>
|
|
43
64
|
|
|
44
|
-
{#if
|
|
45
|
-
<div class="flow-root w-full space-y-4">
|
|
65
|
+
{#if job}
|
|
66
|
+
<div class="flow-root w-full space-y-4 ">
|
|
46
67
|
{#if innerModules.length > 0}
|
|
47
68
|
<h3 class="text-md leading-6 font-bold text-gray-900 border-b pb-2">Flow result</h3>
|
|
48
69
|
{/if}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
{#if isListJob}
|
|
71
|
+
<div class="w-full h-full border border-gray-600 bg-white p-1">
|
|
72
|
+
<DisplayResult result={jobResults} />
|
|
73
|
+
</div>
|
|
74
|
+
{:else}
|
|
75
|
+
<div class={innerModules.length > 0 ? 'border border-gray-400 shadow p-2' : ''}>
|
|
76
|
+
<FlowPreviewStatus {job} />
|
|
77
|
+
{#if `result` in job}
|
|
78
|
+
<div class="w-full h-full">
|
|
79
|
+
<FlowJobResult result={job.result} logs={job.logs ?? ''} />
|
|
80
|
+
</div>
|
|
81
|
+
{:else if job.logs}
|
|
82
|
+
<div class="text-xs p-4 bg-gray-50 overflow-auto max-h-80 border">
|
|
83
|
+
<pre class="w-full">{job.logs}</pre>
|
|
84
|
+
</div>
|
|
85
|
+
{/if}
|
|
55
86
|
</div>
|
|
56
87
|
{/if}
|
|
57
88
|
|
|
58
|
-
{#if
|
|
59
|
-
<h3 class="text-md leading-6 font-bold text-gray-
|
|
60
|
-
|
|
89
|
+
{#if isListJob}
|
|
90
|
+
<h3 class="text-md leading-6 font-bold text-gray-600 border-b mb-4">
|
|
91
|
+
Embedded flows: ({flowJobIds?.flowJobs.length} items)
|
|
61
92
|
</h3>
|
|
62
|
-
{#each
|
|
93
|
+
{#each flowJobIds?.flowJobs ?? [] as loopJobId, j}
|
|
63
94
|
<Button
|
|
64
|
-
|
|
65
|
-
|
|
95
|
+
variant={forloop_selected === loopJobId ? 'contained' : 'border'}
|
|
96
|
+
color={forloop_selected === loopJobId ? 'dark' : 'light'}
|
|
97
|
+
btnClasses="w-full flex justify-start"
|
|
66
98
|
on:click={() => {
|
|
67
99
|
if (forloop_selected == loopJobId) {
|
|
68
100
|
forloop_selected = ''
|
|
@@ -71,7 +103,9 @@ onDestroy(() => {
|
|
|
71
103
|
}
|
|
72
104
|
}}
|
|
73
105
|
>
|
|
74
|
-
|
|
106
|
+
<span class="truncate">
|
|
107
|
+
#{j + 1}: {loopJobId}
|
|
108
|
+
</span>
|
|
75
109
|
|
|
76
110
|
<Icon
|
|
77
111
|
class="ml-2"
|
|
@@ -80,7 +114,25 @@ onDestroy(() => {
|
|
|
80
114
|
/>
|
|
81
115
|
</Button>
|
|
82
116
|
<div class="border p-6" class:hidden={forloop_selected != loopJobId}>
|
|
83
|
-
<svelte:self
|
|
117
|
+
<svelte:self
|
|
118
|
+
{flowState}
|
|
119
|
+
jobId={loopJobId}
|
|
120
|
+
on:jobsLoaded={(e) => {
|
|
121
|
+
if (flowJobIds?.moduleId) {
|
|
122
|
+
if (flowState) {
|
|
123
|
+
if (
|
|
124
|
+
!flowState[flowJobIds.moduleId].previewResult ||
|
|
125
|
+
!Array.isArray(flowState[flowJobIds.moduleId]?.previewResult)
|
|
126
|
+
) {
|
|
127
|
+
flowState[flowJobIds.moduleId].previewResult = []
|
|
128
|
+
}
|
|
129
|
+
flowState[flowJobIds.moduleId].previewResult[j] = e.detail.result
|
|
130
|
+
flowState[flowJobIds.moduleId].previewArgs = e.detail.args
|
|
131
|
+
jobResults[j] = e.detail.result == null ? 'Job in progress ...' : e.detail.result
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}}
|
|
135
|
+
/>
|
|
84
136
|
</div>
|
|
85
137
|
{/each}
|
|
86
138
|
{:else if innerModules.length > 0}
|
|
@@ -90,38 +142,57 @@ onDestroy(() => {
|
|
|
90
142
|
</h3>
|
|
91
143
|
|
|
92
144
|
{#each innerModules as mod, i}
|
|
93
|
-
<
|
|
94
|
-
|
|
145
|
+
<div class="line w-8 h-10" />
|
|
146
|
+
<h3 class="text-gray-500 mb-2 w-full">
|
|
147
|
+
{#if job?.raw_flow?.modules && i < job?.raw_flow?.modules.length}
|
|
95
148
|
Step
|
|
96
149
|
<span class="font-medium text-gray-900">
|
|
97
150
|
{i + 1}
|
|
98
151
|
</span>
|
|
99
152
|
out of
|
|
100
|
-
<span class="font-medium text-gray-900"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
>{jobResult.job.raw_flow?.modules[i]?.summary ?? ''}</span
|
|
106
|
-
>
|
|
153
|
+
<span class="font-medium text-gray-900">{job?.raw_flow?.modules.length}</span>
|
|
154
|
+
{#if job.raw_flow?.modules[i]?.summary}
|
|
155
|
+
: <span class="font-medium text-gray-900">
|
|
156
|
+
{job.raw_flow?.modules[i]?.summary ?? ''}
|
|
157
|
+
</span>
|
|
107
158
|
{/if}
|
|
108
159
|
{:else}
|
|
109
|
-
<
|
|
160
|
+
<h3>Failure module</h3>
|
|
110
161
|
{/if}
|
|
111
|
-
</
|
|
112
|
-
|
|
113
|
-
<li class="w-full border p-6 space-y-2">
|
|
162
|
+
</h3>
|
|
163
|
+
<div class="line w-8 h-10" />
|
|
164
|
+
<li class="w-full border border-gray-600 p-6 space-y-2 bg-blue-50/50">
|
|
114
165
|
{#if [FlowStatusModule.type.IN_PROGRESS, FlowStatusModule.type.SUCCESS, FlowStatusModule.type.FAILURE].includes(mod.type)}
|
|
115
166
|
<svelte:self
|
|
167
|
+
{flowState}
|
|
116
168
|
jobId={mod.job}
|
|
117
|
-
|
|
118
|
-
|
|
169
|
+
flowJobIds={mod.flow_jobs
|
|
170
|
+
? {
|
|
171
|
+
moduleId: mod.id,
|
|
172
|
+
flowJobs: mod.flow_jobs
|
|
173
|
+
}
|
|
174
|
+
: undefined}
|
|
119
175
|
on:jobsLoaded={(e) => {
|
|
120
|
-
|
|
176
|
+
if (mod.id && (mod.flow_jobs ?? []).length == 0) {
|
|
177
|
+
if (flowState && flowState[mod.id]) {
|
|
178
|
+
flowState[mod.id].previewResult = e.detail.result
|
|
179
|
+
flowState[mod.id].previewArgs = e.detail.args
|
|
180
|
+
}
|
|
181
|
+
}
|
|
121
182
|
}}
|
|
122
183
|
/>
|
|
123
184
|
{:else}
|
|
124
|
-
<span>
|
|
185
|
+
<span class="italic text-gray-600">
|
|
186
|
+
<Icon data={faHourglassHalf} class="mr-2" />
|
|
187
|
+
|
|
188
|
+
{#if mod.type == FlowStatusModule.type.WAITING_FOR_EVENT}
|
|
189
|
+
Waiting to be resumed by receivent events such as approvals
|
|
190
|
+
{:else if mod.type == FlowStatusModule.type.WAITING_FOR_PRIOR_STEPS}
|
|
191
|
+
Waiting for prior steps to complete
|
|
192
|
+
{:else if mod.type == FlowStatusModule.type.WAITING_FOR_EXECUTOR}
|
|
193
|
+
Job is ready to be executed and will be picked up by the next available worker
|
|
194
|
+
{/if}
|
|
195
|
+
</span>
|
|
125
196
|
{/if}
|
|
126
197
|
</li>
|
|
127
198
|
{/each}
|
|
@@ -131,3 +202,9 @@ onDestroy(() => {
|
|
|
131
202
|
{:else}
|
|
132
203
|
Job loading...
|
|
133
204
|
{/if}
|
|
205
|
+
|
|
206
|
+
<style>
|
|
207
|
+
.line {
|
|
208
|
+
background: repeating-linear-gradient(to bottom, transparent 0 4px, #bbb 4px 8px) 50%/1px 100%
|
|
209
|
+
no-repeat;
|
|
210
|
+
}</style>
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import
|
|
2
|
+
import { Job } from '../gen';
|
|
3
|
+
import type { FlowState } from './flows/flowState';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
6
|
jobId: string;
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
flowState?: FlowState | undefined;
|
|
8
|
+
flowJobIds?: {
|
|
9
|
+
moduleId: string;
|
|
10
|
+
flowJobs: string[];
|
|
11
|
+
} | undefined;
|
|
12
|
+
job?: Job | undefined;
|
|
8
13
|
};
|
|
9
14
|
events: {
|
|
10
15
|
jobsLoaded: CustomEvent<any>;
|