windmill-components 1.35.1 → 1.35.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ArgInput.svelte +21 -21
- package/components/ArgInput.svelte.d.ts +3 -3
- package/components/DisplayResult.svelte +73 -67
- package/components/Editor.svelte +184 -246
- package/components/Editor.svelte.d.ts +4 -4
- package/components/EditorBar.svelte +58 -45
- package/components/EditorBar.svelte.d.ts +2 -1
- package/components/FlowBuilder.svelte +113 -121
- package/components/FlowJobResult.svelte +4 -5
- package/components/FlowModulesViewer.svelte +89 -7
- package/components/FlowModulesViewer.svelte.d.ts +1 -0
- package/components/FlowPreviewContent.svelte +56 -15
- package/components/FlowPreviewContent.svelte.d.ts +1 -1
- package/components/FlowStatusViewer.svelte +42 -24
- package/components/FlowStatusViewer.svelte.d.ts +0 -1
- package/components/FlowViewer.svelte +7 -3
- package/components/HighlightCode.svelte +21 -0
- package/components/HighlightCode.svelte.d.ts +17 -0
- package/components/IconedPath.svelte +9 -7
- package/components/IconedResourceType.svelte +1 -1
- package/components/InputTransformForm.svelte +88 -107
- package/components/InputTransformForm.svelte.d.ts +0 -1
- package/components/ItemPicker.svelte +2 -2
- package/components/LogViewer.svelte +23 -0
- package/components/LogViewer.svelte.d.ts +19 -0
- package/components/ModulePreview.svelte +108 -0
- package/components/ModulePreview.svelte.d.ts +24 -0
- package/components/RunForm.svelte +29 -18
- package/components/RunForm.svelte.d.ts +6 -2
- package/components/SchemaEditor.svelte +5 -3
- package/components/SchemaForm.svelte +0 -2
- package/components/SchemaForm.svelte.d.ts +0 -1
- package/components/ScriptBuilder.svelte +77 -66
- package/components/ScriptBuilder.svelte.d.ts +2 -4
- package/components/ScriptEditor.svelte +69 -142
- package/components/ScriptEditor.svelte.d.ts +0 -5
- package/components/ScriptPicker.svelte +3 -3
- package/components/ScriptPicker.svelte.d.ts +2 -1
- package/components/SharedBadge.svelte +5 -13
- package/components/SimpleEditor.svelte +147 -0
- package/components/SimpleEditor.svelte.d.ts +35 -0
- package/components/TestJobLoader.svelte +98 -0
- package/components/TestJobLoader.svelte.d.ts +26 -0
- package/components/Tooltip.svelte +2 -1
- package/components/common/actionRow/ActionRow.svelte +26 -0
- package/components/common/actionRow/ActionRow.svelte.d.ts +21 -0
- package/components/common/alert/Alert.svelte +53 -0
- package/components/common/alert/Alert.svelte.d.ts +20 -0
- package/components/common/alert/model.d.ts +1 -0
- package/components/common/alert/model.js +1 -0
- package/components/common/badge/Badge.svelte +82 -0
- package/components/common/badge/Badge.svelte.d.ts +28 -0
- package/components/common/badge/model.d.ts +8 -0
- package/components/common/badge/model.js +1 -0
- package/components/common/button/Button.svelte +107 -0
- package/components/common/button/Button.svelte.d.ts +37 -0
- package/components/common/button/model.d.ts +6 -0
- package/components/common/button/model.js +1 -0
- package/components/common/confirmationModal/ConfirmationModal.svelte +55 -0
- package/components/common/confirmationModal/ConfirmationModal.svelte.d.ts +23 -0
- package/components/common/drawer/Drawer.svelte +3 -0
- package/components/common/drawer/Drawer.svelte.d.ts +2 -0
- package/components/common/index.d.ts +14 -0
- package/components/common/index.js +14 -0
- package/components/common/tabs/TabContent.svelte +3 -2
- package/components/common/tabs/TabContent.svelte.d.ts +1 -0
- package/components/common/tabs/Tabs.svelte +8 -1
- package/components/common/tabs/Tabs.svelte.d.ts +2 -0
- package/components/common/toggleButton/ToggleButton.svelte +20 -0
- package/components/common/toggleButton/ToggleButton.svelte.d.ts +19 -0
- package/components/common/toggleButton/ToggleButtonGroup.svelte +33 -0
- package/components/common/toggleButton/ToggleButtonGroup.svelte.d.ts +24 -0
- package/components/flows/FlowEditor.svelte +30 -0
- package/components/{FlowEditor.svelte.d.ts → flows/FlowEditor.svelte.d.ts} +1 -8
- package/components/flows/common/FlowCard.svelte +9 -0
- package/components/flows/common/FlowCard.svelte.d.ts +21 -0
- package/components/flows/common/FlowCardHeader.svelte +39 -0
- package/components/flows/common/FlowCardHeader.svelte.d.ts +20 -0
- package/components/flows/content/CopyFirstStepSchema.svelte +13 -0
- package/components/flows/{CopyFirstStepSchema.svelte.d.ts → content/CopyFirstStepSchema.svelte.d.ts} +0 -0
- package/components/flows/{DynamicInputHelpBox.svelte → content/DynamicInputHelpBox.svelte} +0 -0
- package/components/flows/{DynamicInputHelpBox.svelte.d.ts → content/DynamicInputHelpBox.svelte.d.ts} +0 -0
- package/components/flows/content/FlowEditorPanel.svelte +26 -0
- package/components/flows/content/FlowEditorPanel.svelte.d.ts +14 -0
- package/components/flows/content/FlowFailureModule.svelte +17 -0
- package/components/flows/content/FlowFailureModule.svelte.d.ts +14 -0
- package/components/flows/content/FlowInput.svelte +22 -0
- package/components/flows/{FlowInput.svelte.d.ts → content/FlowInput.svelte.d.ts} +0 -0
- package/components/flows/{FlowInputs.svelte → content/FlowInputs.svelte} +24 -13
- package/components/flows/{FlowInputs.svelte.d.ts → content/FlowInputs.svelte.d.ts} +0 -0
- package/components/flows/content/FlowLoop.svelte +38 -0
- package/components/flows/content/FlowLoop.svelte.d.ts +14 -0
- package/components/flows/content/FlowModule.svelte +190 -0
- package/components/flows/content/FlowModule.svelte.d.ts +29 -0
- package/components/flows/content/FlowModuleAdvancedSettings.svelte +64 -0
- package/components/flows/content/FlowModuleAdvancedSettings.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleHeader.svelte +68 -0
- package/components/flows/{FlowModuleHeader.svelte.d.ts → content/FlowModuleHeader.svelte.d.ts} +2 -3
- package/components/flows/content/FlowModuleScript.svelte +21 -0
- package/components/flows/content/FlowModuleScript.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleWrapper.svelte +47 -0
- package/components/flows/content/FlowModuleWrapper.svelte.d.ts +14 -0
- package/components/flows/content/FlowRetries.svelte +80 -0
- package/components/flows/content/FlowRetries.svelte.d.ts +14 -0
- package/components/flows/content/FlowSchedules.svelte +18 -0
- package/components/flows/content/FlowSchedules.svelte.d.ts +14 -0
- package/components/flows/content/FlowSettings.svelte +51 -0
- package/components/flows/{FlowSettings.svelte.d.ts → content/FlowSettings.svelte.d.ts} +1 -6
- package/components/flows/content/RemoveStepConfirmationModal.svelte +32 -0
- package/components/flows/content/RemoveStepConfirmationModal.svelte.d.ts +19 -0
- package/components/flows/flowState.d.ts +8 -7
- package/components/flows/flowState.js +25 -46
- package/components/flows/flowStateUtils.d.ts +15 -13
- package/components/flows/flowStateUtils.js +80 -72
- package/components/flows/flowStore.js +7 -4
- package/components/flows/header/FlowEditorHeader.svelte +23 -0
- package/components/flows/header/FlowEditorHeader.svelte.d.ts +14 -0
- package/components/flows/header/FlowImportExportMenu.svelte +56 -0
- package/components/flows/header/FlowImportExportMenu.svelte.d.ts +14 -0
- package/components/flows/header/FlowPreviewButtons.svelte +49 -0
- package/components/flows/header/FlowPreviewButtons.svelte.d.ts +14 -0
- package/components/flows/header/FlowStatus.svelte +36 -0
- package/components/flows/header/FlowStatus.svelte.d.ts +14 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte +54 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte.d.ts +14 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte +58 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +27 -0
- package/components/flows/map/FlowModuleSchemaMap.svelte +161 -0
- package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +20 -0
- package/components/flows/pickers/PickHubScript.svelte +4 -3
- package/components/flows/pickers/PickHubScript.svelte.d.ts +2 -1
- package/components/flows/pickers/PickScript.svelte +4 -12
- package/components/flows/pickers/PickScript.svelte.d.ts +1 -1
- package/components/flows/propPicker/PropPickerWrapper.svelte +42 -0
- package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +31 -0
- package/components/flows/scheduleUtils.d.ts +0 -1
- package/components/flows/scheduleUtils.js +0 -1
- package/components/flows/types.d.ts +9 -0
- package/components/flows/types.js +1 -0
- package/components/flows/utils.d.ts +1 -1
- package/components/flows/utils.js +8 -11
- package/components/icons/HatIcon.svelte +19 -0
- package/components/icons/HatIcon.svelte.d.ts +16 -0
- package/components/landing/FlowGettingStarted.svelte +22 -68
- package/components/landing/FlowLandingBox.svelte +1 -1
- package/components/landing/RessourceGettingStarted.svelte +7 -37
- package/components/landing/ScriptBox.svelte +33 -60
- package/components/landing/ScriptGettingStarted.svelte +23 -69
- package/components/propertyPicker/ObjectViewer.svelte +16 -7
- package/components/propertyPicker/PropPicker.svelte +38 -12
- package/components/propertyPicker/WarningMessage.svelte +2 -15
- package/components/script_editor/LogPanel.svelte +108 -119
- package/components/script_editor/LogPanel.svelte.d.ts +2 -0
- package/components/sidebar/SidebarContent.svelte +2 -2
- package/editorUtils.d.ts +25 -0
- package/editorUtils.js +43 -0
- package/gen/models/CompletedJob.d.ts +2 -1
- package/gen/models/CompletedJob.js +1 -0
- package/gen/models/FlowModule.d.ts +1 -0
- package/gen/models/FlowStatus.d.ts +3 -0
- package/gen/models/FlowStatusModule.d.ts +1 -1
- package/gen/models/FlowValue.d.ts +11 -0
- package/gen/models/Preview.d.ts +2 -1
- package/gen/models/Preview.js +1 -0
- package/gen/models/QueuedJob.d.ts +2 -1
- package/gen/models/QueuedJob.js +1 -0
- package/gen/models/RawScript.d.ts +2 -1
- package/gen/models/RawScript.js +1 -0
- package/gen/models/Script.d.ts +9 -2
- package/gen/models/Script.js +8 -0
- package/gen/services/JobService.d.ts +40 -0
- package/gen/services/JobService.js +70 -0
- package/gen/services/ScriptService.d.ts +14 -3
- package/gen/services/ScriptService.js +13 -0
- package/infer.d.ts +1 -1
- package/infer.js +6 -1
- package/package.json +67 -35
- package/script_helpers.d.ts +5 -2
- package/script_helpers.js +41 -13
- package/stores.d.ts +1 -1
- package/utils.d.ts +6 -4
- package/utils.js +27 -4
- package/components/FlowEditor.svelte +0 -55
- package/components/FlowPreview.svelte +0 -107
- package/components/FlowPreview.svelte.d.ts +0 -23
- package/components/ModuleStep.svelte +0 -131
- package/components/ModuleStep.svelte.d.ts +0 -25
- package/components/flows/CopyFirstStepSchema.svelte +0 -13
- package/components/flows/FlowBox.svelte +0 -16
- package/components/flows/FlowBox.svelte.d.ts +0 -23
- package/components/flows/FlowBoxHeader.svelte +0 -16
- package/components/flows/FlowBoxHeader.svelte.d.ts +0 -21
- package/components/flows/FlowInput.svelte +0 -22
- package/components/flows/FlowModuleHeader.svelte +0 -109
- package/components/flows/FlowSettings.svelte +0 -165
- package/components/flows/FlowTimeline.svelte +0 -169
- package/components/flows/FlowTimeline.svelte.d.ts +0 -21
- package/components/flows/stepOpenedStore.d.ts +0 -1
- package/components/flows/stepOpenedStore.js +0 -6
- package/components/propertyPicker/OverlayPropertyPicker.svelte +0 -69
- package/components/propertyPicker/OverlayPropertyPicker.svelte.d.ts +0 -24
|
@@ -11,8 +11,11 @@ import DisplayResult from '../DisplayResult.svelte';
|
|
|
11
11
|
import TableCustom from '../TableCustom.svelte';
|
|
12
12
|
import Drawer from '../common/drawer/Drawer.svelte';
|
|
13
13
|
import { Highlight } from 'svelte-highlight';
|
|
14
|
-
import { json
|
|
14
|
+
import { json } from 'svelte-highlight/languages';
|
|
15
15
|
import DrawerContent from '../common/drawer/DrawerContent.svelte';
|
|
16
|
+
import HighlightCode from '../HighlightCode.svelte';
|
|
17
|
+
import { VSplitPane } from 'svelte-split-pane';
|
|
18
|
+
import LogViewer from '../LogViewer.svelte';
|
|
16
19
|
export let path;
|
|
17
20
|
export let lang;
|
|
18
21
|
export let previewIsLoading = false;
|
|
@@ -22,6 +25,9 @@ export let lastSave;
|
|
|
22
25
|
let selectedTab = 'logs';
|
|
23
26
|
let drawerOpen = false;
|
|
24
27
|
let drawerContent = undefined;
|
|
28
|
+
export function setFocusToLogs() {
|
|
29
|
+
selectedTab = 'logs';
|
|
30
|
+
}
|
|
25
31
|
function openDrawer(newContent) {
|
|
26
32
|
drawerContent = newContent;
|
|
27
33
|
drawerOpen = true;
|
|
@@ -39,134 +45,117 @@ function closeDrawer() {
|
|
|
39
45
|
<pre class="overflow-x-auto break-all relative h-full m-2 text-xs bg-white shadow-inner p-2">
|
|
40
46
|
{drawerContent?.content}
|
|
41
47
|
</pre>
|
|
42
|
-
{:else if drawerContent?.mode === 'deno'}
|
|
43
|
-
<
|
|
44
|
-
{:else if drawerContent?.mode === 'python3'}
|
|
45
|
-
<Highlight language={python} code={drawerContent?.content} />
|
|
48
|
+
{:else if drawerContent?.mode === 'deno' || drawerContent?.mode === 'python3' || drawerContent?.mode === 'go'}
|
|
49
|
+
<HighlightCode language={drawerContent?.mode} code={drawerContent?.content} />
|
|
46
50
|
{/if}
|
|
47
51
|
</DrawerContent>
|
|
48
52
|
</Drawer>
|
|
49
53
|
|
|
50
54
|
<Tabs bind:selected={selectedTab}>
|
|
51
|
-
<Tab value="logs"><span class="text-xs">Logs</span></Tab>
|
|
52
|
-
<Tab value="results"><span class="text-xs">Results</span></Tab>
|
|
55
|
+
<Tab value="logs"><span class="text-xs">Logs/Result</span></Tab>
|
|
53
56
|
<Tab value="history"><span class="text-xs">History</span></Tab>
|
|
54
57
|
<Tab value="last_save"><span class="text-xs">Last save</span></Tab>
|
|
55
58
|
|
|
56
59
|
<svelte:fragment slot="content">
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<pre class="overflow-x-auto break-all relative h-full">
|
|
71
|
-
{#if previewJob && 'result' in previewJob && previewJob.result}
|
|
72
|
-
<DisplayResult result={previewJob.result} />
|
|
73
|
-
{:else if previewIsLoading}
|
|
74
|
-
Running...
|
|
75
|
-
{:else}
|
|
76
|
-
No output is available yet
|
|
77
|
-
{/if}
|
|
60
|
+
<TabContent value="logs" class="h-full w-full relative">
|
|
61
|
+
<VSplitPane topPanelSize="50%" downPanelSize="50%">
|
|
62
|
+
<top slot="top">
|
|
63
|
+
<LogViewer content={previewJob?.logs} isLoading={previewIsLoading} />
|
|
64
|
+
</top>
|
|
65
|
+
<down slot="down">
|
|
66
|
+
<pre
|
|
67
|
+
class="overflow-x-auto break-all relative h-full p-2 text-sm">{#if previewJob && 'result' in previewJob && previewJob.result}<DisplayResult
|
|
68
|
+
result={previewJob.result}
|
|
69
|
+
/>
|
|
70
|
+
{:else if previewIsLoading}Waiting for Result...
|
|
71
|
+
{:else}Test to see result here
|
|
72
|
+
{/if}
|
|
78
73
|
</pre>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
</
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
74
|
+
</down>
|
|
75
|
+
</VSplitPane>
|
|
76
|
+
</TabContent>
|
|
77
|
+
<TabContent value="history" class="p-2">
|
|
78
|
+
<TableCustom>
|
|
79
|
+
<tr slot="header-row">
|
|
80
|
+
<th class="text-xs">Id</th>
|
|
81
|
+
<th class="text-xs">Created at</th>
|
|
82
|
+
<th class="text-xs">Success</th>
|
|
83
|
+
<th class="text-xs">Result</th>
|
|
84
|
+
<th class="text-xs">Code</th>
|
|
85
|
+
<th class="text-xs">Logs</th>
|
|
86
|
+
</tr>
|
|
87
|
+
<tbody slot="body">
|
|
88
|
+
{#each pastPreviews as { id, created_at, success, result }}
|
|
89
|
+
<tr class="">
|
|
90
|
+
<td class="text-xs">
|
|
91
|
+
<a class="pr-3" href="/run/{id}" target="_blank">{id.substring(30)}</a>
|
|
92
|
+
</td>
|
|
93
|
+
<td class="text-xs">{displayDate(created_at)}</td>
|
|
94
|
+
<td class="text-xs">
|
|
95
|
+
{#if success}
|
|
96
|
+
<Icon class="text-green-600" data={check} scale={0.6} />
|
|
97
|
+
{:else}
|
|
98
|
+
<Icon class="text-red-700" data={faTimes} scale={0.6} />
|
|
99
|
+
{/if}
|
|
100
|
+
</td>
|
|
101
|
+
<td class="text-xs">
|
|
102
|
+
<a
|
|
103
|
+
href="#result"
|
|
104
|
+
class="text-xs"
|
|
105
|
+
on:click={() => {
|
|
106
|
+
openDrawer({ mode: 'json', content: result, title: 'Result' })
|
|
107
|
+
}}
|
|
108
|
+
>
|
|
109
|
+
{JSON.stringify(result).substring(0, 30)}...
|
|
110
|
+
</a>
|
|
111
|
+
</td>
|
|
112
|
+
<td class="text-xs">
|
|
113
|
+
<a
|
|
114
|
+
href="#code"
|
|
115
|
+
class="text-xs"
|
|
116
|
+
on:click={async () => {
|
|
117
|
+
const code = (
|
|
118
|
+
await JobService.getCompletedJob({
|
|
119
|
+
workspace: $workspaceStore ?? 'NO_W',
|
|
120
|
+
id
|
|
121
|
+
})
|
|
122
|
+
).raw_code
|
|
126
123
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
>
|
|
164
|
-
View last local save for path {path}
|
|
165
|
-
</a>
|
|
166
|
-
{:else}
|
|
167
|
-
No local save
|
|
168
|
-
{/if}
|
|
169
|
-
</TabContent>
|
|
170
|
-
</div>
|
|
124
|
+
openDrawer({ mode: lang, content: String(code), title: `Code ${lang}` })
|
|
125
|
+
}}
|
|
126
|
+
>
|
|
127
|
+
View code
|
|
128
|
+
</a>
|
|
129
|
+
</td>
|
|
130
|
+
<td>
|
|
131
|
+
<a
|
|
132
|
+
href="#logs"
|
|
133
|
+
class="text-xs"
|
|
134
|
+
on:click={async () => {
|
|
135
|
+
const logs = (
|
|
136
|
+
await JobService.getCompletedJob({
|
|
137
|
+
workspace: $workspaceStore ?? 'NO_W',
|
|
138
|
+
id
|
|
139
|
+
})
|
|
140
|
+
).logs
|
|
141
|
+
openDrawer({ mode: 'plain', content: String(logs), title: `Code ${lang}` })
|
|
142
|
+
}}
|
|
143
|
+
>
|
|
144
|
+
View logs
|
|
145
|
+
</a>
|
|
146
|
+
</td>
|
|
147
|
+
</tr>
|
|
148
|
+
{/each}
|
|
149
|
+
</tbody>
|
|
150
|
+
</TableCustom>
|
|
151
|
+
</TabContent>
|
|
152
|
+
<TabContent value="last_save" class="p-2">
|
|
153
|
+
{#if lastSave}
|
|
154
|
+
<h2>last local save for path {path}</h2>
|
|
155
|
+
<HighlightCode language={lang} code={lastSave} />
|
|
156
|
+
{:else}
|
|
157
|
+
No local save
|
|
158
|
+
{/if}
|
|
159
|
+
</TabContent>
|
|
171
160
|
</svelte:fragment>
|
|
172
161
|
</Tabs>
|
|
@@ -8,6 +8,7 @@ declare const __propDef: {
|
|
|
8
8
|
previewJob: Job | undefined;
|
|
9
9
|
pastPreviews?: CompletedJob[] | undefined;
|
|
10
10
|
lastSave: string | null;
|
|
11
|
+
setFocusToLogs?: (() => void) | undefined;
|
|
11
12
|
};
|
|
12
13
|
events: {
|
|
13
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -18,5 +19,6 @@ export declare type LogPanelProps = typeof __propDef.props;
|
|
|
18
19
|
export declare type LogPanelEvents = typeof __propDef.events;
|
|
19
20
|
export declare type LogPanelSlots = typeof __propDef.slots;
|
|
20
21
|
export default class LogPanel extends SvelteComponentTyped<LogPanelProps, LogPanelEvents, LogPanelSlots> {
|
|
22
|
+
get setFocusToLogs(): () => void;
|
|
21
23
|
}
|
|
22
24
|
export {};
|
|
@@ -12,7 +12,6 @@ const mainMenuLinks = [
|
|
|
12
12
|
{ label: 'Resources', href: '/resources', icon: faCubes }
|
|
13
13
|
];
|
|
14
14
|
$: secondaryMenuLinks = [
|
|
15
|
-
{ label: 'Workers', href: '/workers', icon: faRobot },
|
|
16
15
|
{ label: 'Groups', href: '/groups', icon: faUsersCog },
|
|
17
16
|
{ label: 'Audit Logs', href: '/audit_logs', icon: faEye },
|
|
18
17
|
{
|
|
@@ -20,7 +19,8 @@ $: secondaryMenuLinks = [
|
|
|
20
19
|
href: '/workspace_settings',
|
|
21
20
|
icon: faCog,
|
|
22
21
|
disabled: !$userStore?.is_admin
|
|
23
|
-
}
|
|
22
|
+
},
|
|
23
|
+
{ label: 'Workers', href: '/workers', icon: faRobot }
|
|
24
24
|
];
|
|
25
25
|
const thirdMenuLinks = [
|
|
26
26
|
{ label: 'Documentation', href: 'https://docs.windmill.dev/docs/intro/', icon: faBookOpen },
|
package/editorUtils.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare function editorConfig(model: any, code: string, lang: string, automaticLayout: boolean): {
|
|
2
|
+
model: any;
|
|
3
|
+
value: string;
|
|
4
|
+
language: string;
|
|
5
|
+
automaticLayout: boolean;
|
|
6
|
+
readOnly: boolean;
|
|
7
|
+
fixedOverflowWidgets: boolean;
|
|
8
|
+
autoDetectHighContrast: boolean;
|
|
9
|
+
lineNumbersMinChars: number;
|
|
10
|
+
lineNumbers: (ln: any) => string;
|
|
11
|
+
folding: boolean;
|
|
12
|
+
scrollBeyondLastLine: boolean;
|
|
13
|
+
minimap: {
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
};
|
|
16
|
+
lightbulb: {
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare function createHash(): string;
|
|
21
|
+
export declare function langToExt(lang: string): string;
|
|
22
|
+
export declare const updateOptions: {
|
|
23
|
+
tabSize: number;
|
|
24
|
+
insertSpaces: boolean;
|
|
25
|
+
};
|
package/editorUtils.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export function editorConfig(model, code, lang, automaticLayout) {
|
|
2
|
+
return {
|
|
3
|
+
model,
|
|
4
|
+
value: code,
|
|
5
|
+
language: lang,
|
|
6
|
+
automaticLayout,
|
|
7
|
+
readOnly: false,
|
|
8
|
+
fixedOverflowWidgets: true,
|
|
9
|
+
autoDetectHighContrast: true,
|
|
10
|
+
//lineNumbers: 'off',
|
|
11
|
+
//lineDecorationsWidth: 0,
|
|
12
|
+
lineNumbersMinChars: 4,
|
|
13
|
+
lineNumbers: (ln) => '<span class="pr-4 text-gray-400">' + ln + '</span>',
|
|
14
|
+
folding: false,
|
|
15
|
+
scrollBeyondLastLine: false,
|
|
16
|
+
minimap: {
|
|
17
|
+
enabled: false
|
|
18
|
+
},
|
|
19
|
+
lightbulb: {
|
|
20
|
+
enabled: true
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function createHash() {
|
|
25
|
+
return (Math.random() + 1).toString(36).substring(2);
|
|
26
|
+
}
|
|
27
|
+
export function langToExt(lang) {
|
|
28
|
+
switch (lang) {
|
|
29
|
+
case 'javascript':
|
|
30
|
+
return 'js';
|
|
31
|
+
case 'json':
|
|
32
|
+
return 'json';
|
|
33
|
+
case 'sql':
|
|
34
|
+
return 'sql';
|
|
35
|
+
case 'typescript':
|
|
36
|
+
return 'ts';
|
|
37
|
+
case 'python':
|
|
38
|
+
return 'py';
|
|
39
|
+
default:
|
|
40
|
+
return 'unknown';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export const updateOptions = { tabSize: 2, insertSpaces: true };
|
|
@@ -2,4 +2,15 @@ import type { FlowModule } from './FlowModule';
|
|
|
2
2
|
export declare type FlowValue = {
|
|
3
3
|
modules: Array<FlowModule>;
|
|
4
4
|
failure_module?: FlowModule;
|
|
5
|
+
retry?: {
|
|
6
|
+
constant?: {
|
|
7
|
+
attempts?: number;
|
|
8
|
+
seconds?: number;
|
|
9
|
+
};
|
|
10
|
+
exponential?: {
|
|
11
|
+
attempts?: number;
|
|
12
|
+
multiplier?: number;
|
|
13
|
+
seconds?: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
5
16
|
};
|
package/gen/models/Preview.d.ts
CHANGED
package/gen/models/Preview.js
CHANGED
package/gen/models/QueuedJob.js
CHANGED
package/gen/models/RawScript.js
CHANGED
package/gen/models/Script.d.ts
CHANGED
|
@@ -20,11 +20,18 @@ export declare type Script = {
|
|
|
20
20
|
lock?: string;
|
|
21
21
|
lock_error_logs?: string;
|
|
22
22
|
language: Script.language;
|
|
23
|
-
|
|
23
|
+
kind: Script.kind;
|
|
24
24
|
};
|
|
25
25
|
export declare namespace Script {
|
|
26
26
|
enum language {
|
|
27
27
|
PYTHON3 = "python3",
|
|
28
|
-
DENO = "deno"
|
|
28
|
+
DENO = "deno",
|
|
29
|
+
GO = "go"
|
|
30
|
+
}
|
|
31
|
+
enum kind {
|
|
32
|
+
SCRIPT = "script",
|
|
33
|
+
FAILURE = "failure",
|
|
34
|
+
TRIGGER = "trigger",
|
|
35
|
+
COMMAND = "command"
|
|
29
36
|
}
|
|
30
37
|
}
|
package/gen/models/Script.js
CHANGED
|
@@ -7,5 +7,13 @@ export var Script;
|
|
|
7
7
|
(function (language) {
|
|
8
8
|
language["PYTHON3"] = "python3";
|
|
9
9
|
language["DENO"] = "deno";
|
|
10
|
+
language["GO"] = "go";
|
|
10
11
|
})(language = Script.language || (Script.language = {}));
|
|
12
|
+
let kind;
|
|
13
|
+
(function (kind) {
|
|
14
|
+
kind["SCRIPT"] = "script";
|
|
15
|
+
kind["FAILURE"] = "failure";
|
|
16
|
+
kind["TRIGGER"] = "trigger";
|
|
17
|
+
kind["COMMAND"] = "command";
|
|
18
|
+
})(kind = Script.kind || (Script.kind = {}));
|
|
11
19
|
})(Script || (Script = {}));
|
|
@@ -343,4 +343,44 @@ export declare class JobService {
|
|
|
343
343
|
reason?: string;
|
|
344
344
|
};
|
|
345
345
|
}): CancelablePromise<string>;
|
|
346
|
+
/**
|
|
347
|
+
* resume a job for a suspended flow
|
|
348
|
+
* @returns void
|
|
349
|
+
* @throws ApiError
|
|
350
|
+
*/
|
|
351
|
+
static resumeSuspendedJob({ workspace, id, payload, }: {
|
|
352
|
+
workspace: string;
|
|
353
|
+
id: string;
|
|
354
|
+
payload?: any;
|
|
355
|
+
}): CancelablePromise<void>;
|
|
356
|
+
/**
|
|
357
|
+
* resume a job for a suspended flow
|
|
358
|
+
* @returns void
|
|
359
|
+
* @throws ApiError
|
|
360
|
+
*/
|
|
361
|
+
static resumeSuspendedJob1({ workspace, id, requestBody, }: {
|
|
362
|
+
workspace: string;
|
|
363
|
+
id: string;
|
|
364
|
+
requestBody?: any;
|
|
365
|
+
}): CancelablePromise<void>;
|
|
366
|
+
/**
|
|
367
|
+
* cancel a job for a suspended flow
|
|
368
|
+
* @returns void
|
|
369
|
+
* @throws ApiError
|
|
370
|
+
*/
|
|
371
|
+
static cancelSuspendedJob({ workspace, id, payload, }: {
|
|
372
|
+
workspace: string;
|
|
373
|
+
id: string;
|
|
374
|
+
payload?: any;
|
|
375
|
+
}): CancelablePromise<void>;
|
|
376
|
+
/**
|
|
377
|
+
* cancel a job for a suspended flow
|
|
378
|
+
* @returns void
|
|
379
|
+
* @throws ApiError
|
|
380
|
+
*/
|
|
381
|
+
static cancelSuspendedJob1({ workspace, id, requestBody, }: {
|
|
382
|
+
workspace: string;
|
|
383
|
+
id: string;
|
|
384
|
+
requestBody?: any;
|
|
385
|
+
}): CancelablePromise<void>;
|
|
346
386
|
}
|
|
@@ -283,4 +283,74 @@ export class JobService {
|
|
|
283
283
|
mediaType: 'application/json',
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* resume a job for a suspended flow
|
|
288
|
+
* @returns void
|
|
289
|
+
* @throws ApiError
|
|
290
|
+
*/
|
|
291
|
+
static resumeSuspendedJob({ workspace, id, payload, }) {
|
|
292
|
+
return __request(OpenAPI, {
|
|
293
|
+
method: 'GET',
|
|
294
|
+
url: '/w/{workspace}/jobs/resume/{id}',
|
|
295
|
+
path: {
|
|
296
|
+
'workspace': workspace,
|
|
297
|
+
'id': id,
|
|
298
|
+
},
|
|
299
|
+
query: {
|
|
300
|
+
'payload': payload,
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* resume a job for a suspended flow
|
|
306
|
+
* @returns void
|
|
307
|
+
* @throws ApiError
|
|
308
|
+
*/
|
|
309
|
+
static resumeSuspendedJob1({ workspace, id, requestBody, }) {
|
|
310
|
+
return __request(OpenAPI, {
|
|
311
|
+
method: 'POST',
|
|
312
|
+
url: '/w/{workspace}/jobs/resume/{id}',
|
|
313
|
+
path: {
|
|
314
|
+
'workspace': workspace,
|
|
315
|
+
'id': id,
|
|
316
|
+
},
|
|
317
|
+
body: requestBody,
|
|
318
|
+
mediaType: 'application/json',
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* cancel a job for a suspended flow
|
|
323
|
+
* @returns void
|
|
324
|
+
* @throws ApiError
|
|
325
|
+
*/
|
|
326
|
+
static cancelSuspendedJob({ workspace, id, payload, }) {
|
|
327
|
+
return __request(OpenAPI, {
|
|
328
|
+
method: 'GET',
|
|
329
|
+
url: '/w/{workspace}/jobs/cancel/{id}',
|
|
330
|
+
path: {
|
|
331
|
+
'workspace': workspace,
|
|
332
|
+
'id': id,
|
|
333
|
+
},
|
|
334
|
+
query: {
|
|
335
|
+
'payload': payload,
|
|
336
|
+
},
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* cancel a job for a suspended flow
|
|
341
|
+
* @returns void
|
|
342
|
+
* @throws ApiError
|
|
343
|
+
*/
|
|
344
|
+
static cancelSuspendedJob1({ workspace, id, requestBody, }) {
|
|
345
|
+
return __request(OpenAPI, {
|
|
346
|
+
method: 'POST',
|
|
347
|
+
url: '/w/{workspace}/jobs/cancel/{id}',
|
|
348
|
+
path: {
|
|
349
|
+
'workspace': workspace,
|
|
350
|
+
'id': id,
|
|
351
|
+
},
|
|
352
|
+
body: requestBody,
|
|
353
|
+
mediaType: 'application/json',
|
|
354
|
+
});
|
|
355
|
+
}
|
|
286
356
|
}
|