windmill-components 1.35.42 → 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 +19 -19
- package/components/ArgInput.svelte.d.ts +1 -1
- package/components/DisplayResult.svelte +73 -67
- package/components/Editor.svelte +177 -164
- package/components/Editor.svelte.d.ts +4 -2
- 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/InputTransformForm.svelte +87 -106
- 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 +3 -1
- 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 +4 -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/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 +65 -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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script>import { goto } from '$app/navigation';
|
|
2
2
|
import { truncateHash } from '../../utils';
|
|
3
|
+
import { faPencil, faPlay } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
import { Button, Badge, ActionRow } from '../common';
|
|
3
5
|
export let script;
|
|
4
6
|
</script>
|
|
5
7
|
|
|
@@ -12,70 +14,41 @@ export let script;
|
|
|
12
14
|
<div class="inline-flex justify-between w-full">
|
|
13
15
|
<div class="text-xs">{script.path}</div>
|
|
14
16
|
|
|
15
|
-
<
|
|
17
|
+
<Badge color="gray">
|
|
16
18
|
{truncateHash(script.hash)}
|
|
17
|
-
</
|
|
19
|
+
</Badge>
|
|
18
20
|
</div>
|
|
19
21
|
<div class="inline-flex space-x-1 w-full">
|
|
20
|
-
<
|
|
21
|
-
{
|
|
22
|
-
</
|
|
23
|
-
{#if script.
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
</
|
|
22
|
+
<Badge color="blue" capitalize>
|
|
23
|
+
{script.language}
|
|
24
|
+
</Badge>
|
|
25
|
+
{#if script.kind !== 'script'}
|
|
26
|
+
<Badge color="green" capitalize>
|
|
27
|
+
{script.kind}
|
|
28
|
+
</Badge>
|
|
27
29
|
{/if}
|
|
28
30
|
</div>
|
|
29
|
-
<
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
stroke="currentColor"
|
|
41
|
-
viewBox="0 0 24 24"
|
|
42
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
43
|
-
><path
|
|
44
|
-
stroke-linecap="round"
|
|
45
|
-
stroke-linejoin="round"
|
|
46
|
-
stroke-width="2"
|
|
47
|
-
d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"
|
|
48
|
-
/>
|
|
49
|
-
</svg>
|
|
50
|
-
Edit
|
|
51
|
-
</button>
|
|
31
|
+
<ActionRow>
|
|
32
|
+
<svelte:fragment slot="right">
|
|
33
|
+
<Button
|
|
34
|
+
on:click={() => goto(`/scripts/edit/${script.hash}?step=2`)}
|
|
35
|
+
color="dark"
|
|
36
|
+
size="xs"
|
|
37
|
+
variant="border"
|
|
38
|
+
startIcon={{ icon: faPencil }}
|
|
39
|
+
>
|
|
40
|
+
Edit
|
|
41
|
+
</Button>
|
|
52
42
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
viewBox="0 0 24 24"
|
|
65
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
66
|
-
><path
|
|
67
|
-
stroke-linecap="round"
|
|
68
|
-
stroke-linejoin="round"
|
|
69
|
-
stroke-width="2"
|
|
70
|
-
d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"
|
|
71
|
-
/><path
|
|
72
|
-
stroke-linecap="round"
|
|
73
|
-
stroke-linejoin="round"
|
|
74
|
-
stroke-width="2"
|
|
75
|
-
d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
76
|
-
/>
|
|
77
|
-
</svg>
|
|
78
|
-
Run
|
|
79
|
-
</button>
|
|
80
|
-
</div>
|
|
43
|
+
<Button
|
|
44
|
+
on:click={() => goto(`/scripts/run/${script.hash}`)}
|
|
45
|
+
color="dark"
|
|
46
|
+
size="xs"
|
|
47
|
+
variant="border"
|
|
48
|
+
startIcon={{ icon: faPlay }}
|
|
49
|
+
>
|
|
50
|
+
Run
|
|
51
|
+
</Button>
|
|
52
|
+
</svelte:fragment>
|
|
53
|
+
</ActionRow>
|
|
81
54
|
</div>
|
|
@@ -1,93 +1,47 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { goto } from '$app/navigation'
|
|
3
|
+
import { faExternalLink, faFile, faPlus } from '@fortawesome/free-solid-svg-icons'
|
|
4
|
+
import Button from '../common/button/Button.svelte'
|
|
5
|
+
import HatIcon from '../icons/HatIcon.svelte'
|
|
3
6
|
</script>
|
|
4
7
|
|
|
5
8
|
<div class="p-4 border border-gray-300 rounded-md bg-gray-50 ">
|
|
6
9
|
<div class="flex items-center">
|
|
7
10
|
<h3 class="inline-flex items-center text-lg font-medium text-gray-700 ">
|
|
8
|
-
<
|
|
9
|
-
class="w-6 h-6 mr-2"
|
|
10
|
-
fill="none"
|
|
11
|
-
stroke="currentColor"
|
|
12
|
-
viewBox="0 0 24 24"
|
|
13
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
-
><path d="M12 14l9-5-9-5-9 5 9 5z" /><path
|
|
15
|
-
d="M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14z"
|
|
16
|
-
/><path
|
|
17
|
-
stroke-linecap="round"
|
|
18
|
-
stroke-linejoin="round"
|
|
19
|
-
stroke-width="2"
|
|
20
|
-
d="M12 14l9-5-9-5-9 5 9 5zm0 0l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14zm-4 6v-7.5l4-2.222"
|
|
21
|
-
/>
|
|
22
|
-
</svg>
|
|
11
|
+
<HatIcon class="w-6 h-6 mr-2" />
|
|
23
12
|
Getting started
|
|
24
13
|
</h3>
|
|
25
14
|
</div>
|
|
26
15
|
<div class="mt-2 mb-4 text-sm text-gray-700 ">
|
|
27
16
|
Create a new script or find inspiration on the Hub!
|
|
28
17
|
</div>
|
|
29
|
-
<div class="inline-flex flex-wrap gap-y-2">
|
|
30
|
-
<
|
|
18
|
+
<div class="inline-flex flex-wrap gap-y-2 ">
|
|
19
|
+
<Button
|
|
31
20
|
on:click={() => goto('scripts/add')}
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
color="dark"
|
|
22
|
+
size="xs"
|
|
23
|
+
btnClasses="mr-2"
|
|
24
|
+
startIcon={{ icon: faPlus }}
|
|
34
25
|
>
|
|
35
|
-
<svg
|
|
36
|
-
class="w-4 h-4 mr-2"
|
|
37
|
-
fill="none"
|
|
38
|
-
stroke="currentColor"
|
|
39
|
-
viewBox="0 0 24 24"
|
|
40
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
41
|
-
><path
|
|
42
|
-
stroke-linecap="round"
|
|
43
|
-
stroke-linejoin="round"
|
|
44
|
-
stroke-width="2"
|
|
45
|
-
d="M12 6v6m0 0v6m0-6h6m-6 0H6"
|
|
46
|
-
/></svg
|
|
47
|
-
>
|
|
48
26
|
Create script
|
|
49
|
-
</
|
|
50
|
-
<
|
|
27
|
+
</Button>
|
|
28
|
+
<Button
|
|
51
29
|
on:click={() => goto('https://docs.windmill.dev/docs/getting_started/scripts')}
|
|
52
|
-
|
|
53
|
-
|
|
30
|
+
color="blue"
|
|
31
|
+
size="xs"
|
|
32
|
+
btnClasses="mr-2"
|
|
33
|
+
startIcon={{ icon: faFile }}
|
|
54
34
|
>
|
|
55
|
-
<svg
|
|
56
|
-
class="w-4 h-4 mr-2"
|
|
57
|
-
fill="none"
|
|
58
|
-
stroke="currentColor"
|
|
59
|
-
viewBox="0 0 24 24"
|
|
60
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
61
|
-
><path
|
|
62
|
-
stroke-linecap="round"
|
|
63
|
-
stroke-linejoin="round"
|
|
64
|
-
stroke-width="2"
|
|
65
|
-
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
66
|
-
/>
|
|
67
|
-
</svg>
|
|
68
35
|
Script documentation
|
|
69
|
-
</
|
|
70
|
-
<
|
|
36
|
+
</Button>
|
|
37
|
+
<Button
|
|
71
38
|
on:click={() => goto('https://hub.windmill.dev/')}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
39
|
+
color="light"
|
|
40
|
+
variant="border"
|
|
41
|
+
size="xs"
|
|
42
|
+
startIcon={{ icon: faExternalLink }}
|
|
76
43
|
>
|
|
77
|
-
<svg
|
|
78
|
-
class="w-4 h-4 mr-2"
|
|
79
|
-
fill="none"
|
|
80
|
-
stroke="currentColor"
|
|
81
|
-
viewBox="0 0 24 24"
|
|
82
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
83
|
-
><path
|
|
84
|
-
stroke-linecap="round"
|
|
85
|
-
stroke-linejoin="round"
|
|
86
|
-
stroke-width="2"
|
|
87
|
-
d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
88
|
-
/>
|
|
89
|
-
</svg>
|
|
90
44
|
Explore community scripts on WindmillHub
|
|
91
|
-
</
|
|
45
|
+
</Button>
|
|
92
46
|
</div>
|
|
93
47
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script>import { truncate } from '../../utils';
|
|
2
2
|
import { createEventDispatcher } from 'svelte';
|
|
3
|
+
import { NEVER_TESTED_THIS_FAR } from '../flows/flowStateUtils';
|
|
3
4
|
import { getTypeAsString } from '../flows/utils';
|
|
4
5
|
import { computeKey } from './utils';
|
|
5
6
|
import WarningMessage from './WarningMessage.svelte';
|
|
@@ -31,15 +32,19 @@ function selectProp(key) {
|
|
|
31
32
|
|
|
32
33
|
{#if keys.length > 0}
|
|
33
34
|
<span class:hidden={collapsed}>
|
|
34
|
-
{#if level != 0}<span
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
{#if level != 0}<span
|
|
36
|
+
class="cursor-pointer hover:bg-slate-200 px-1 rounded"
|
|
37
|
+
on:click={collapse}
|
|
38
|
+
>
|
|
39
|
+
(-)
|
|
40
|
+
</span>
|
|
41
|
+
{/if}
|
|
37
42
|
<ul class="w-full">
|
|
38
43
|
{#each keys as key, index}
|
|
39
44
|
<li class="pt-1">
|
|
40
|
-
<button on:click={() => selectProp(key)} class="key rounded px-1 hover:bg-sky-100"
|
|
41
|
-
|
|
42
|
-
>
|
|
45
|
+
<button on:click={() => selectProp(key)} class="key rounded px-1 hover:bg-sky-100">
|
|
46
|
+
{!isArray ? key : index}:
|
|
47
|
+
</button>
|
|
43
48
|
|
|
44
49
|
{#if getTypeAsString(json[key]) === 'object'}
|
|
45
50
|
<svelte:self
|
|
@@ -55,8 +60,10 @@ function selectProp(key) {
|
|
|
55
60
|
class="val rounded px-1 hover:bg-sky-100 {getTypeAsString(json[key])}"
|
|
56
61
|
on:click={() => selectProp(key)}
|
|
57
62
|
>
|
|
58
|
-
{#if json[key] ===
|
|
63
|
+
{#if json[key] === NEVER_TESTED_THIS_FAR}
|
|
59
64
|
<WarningMessage />
|
|
65
|
+
{:else if json[key] == undefined}
|
|
66
|
+
<span>undefined</span>
|
|
60
67
|
{:else}
|
|
61
68
|
<span>{truncate(JSON.stringify(json[key]), 40)}</span>
|
|
62
69
|
{/if}
|
|
@@ -83,6 +90,8 @@ function selectProp(key) {
|
|
|
83
90
|
border-left: 1px dotted lightgray;
|
|
84
91
|
--tw-text-opacity: 1;
|
|
85
92
|
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
93
|
+
font-size: 0.875rem;
|
|
94
|
+
line-height: 1.25rem;
|
|
86
95
|
}
|
|
87
96
|
|
|
88
97
|
.val {
|
|
@@ -1,22 +1,48 @@
|
|
|
1
|
-
<script>import
|
|
1
|
+
<script>import { faClose } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
+
import { getContext } from 'svelte';
|
|
3
|
+
import Icon from 'svelte-awesome';
|
|
4
|
+
import ObjectViewer from './ObjectViewer.svelte';
|
|
2
5
|
import { keepByKey } from './utils';
|
|
3
6
|
export let pickableProperties = {};
|
|
4
7
|
const EMPTY_STRING = '';
|
|
5
8
|
let search = '';
|
|
9
|
+
const { propPickerConfig, clearFocus } = getContext('PropPickerWrapper');
|
|
6
10
|
$: propsFiltered =
|
|
7
11
|
search === EMPTY_STRING ? pickableProperties : keepByKey(pickableProperties, search);
|
|
8
12
|
</script>
|
|
9
13
|
|
|
10
|
-
<div
|
|
11
|
-
class="
|
|
12
|
-
>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
<div class="px-4 pt-4">
|
|
15
|
+
<div class="flex justify-between items-center h-8">
|
|
16
|
+
<span class="font-bold text-sm">Context</span>
|
|
17
|
+
<div class="flex space-x-2 items-center">
|
|
18
|
+
{#if $propPickerConfig}
|
|
19
|
+
<span
|
|
20
|
+
class="flex items-center bg-blue-100 text-blue-800 text-xs font-semibold px-2 py-1 rounded dark:bg-green-200 dark:text-green-900"
|
|
21
|
+
>
|
|
22
|
+
{`Selected input: ${$propPickerConfig?.propName}`}
|
|
23
|
+
</span>
|
|
24
|
+
<span
|
|
25
|
+
class="flex items-center bg-blue-100 text-blue-800 text-xs font-semibold px-2 py-1 rounded dark:bg-green-200 dark:text-green-900"
|
|
26
|
+
>
|
|
27
|
+
{`Mode: ${$propPickerConfig?.insertionMode}`}
|
|
28
|
+
</span>
|
|
29
|
+
<button
|
|
30
|
+
class="border px-2 py-1 text-xs rounded-md flex items-center hover:bg-gray-50 hover:text-gray-900"
|
|
31
|
+
on:click={() => clearFocus()}
|
|
32
|
+
>
|
|
33
|
+
<Icon data={faClose} class="mr-2" scale={0.8} />
|
|
34
|
+
Deselect
|
|
35
|
+
</button>
|
|
36
|
+
{/if}
|
|
37
|
+
</div>
|
|
21
38
|
</div>
|
|
39
|
+
<input
|
|
40
|
+
type="text"
|
|
41
|
+
bind:value={search}
|
|
42
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg block p-2 mb-2"
|
|
43
|
+
placeholder="Search prop..."
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="overflow-y-auto mb-8">
|
|
47
|
+
<ObjectViewer json={propsFiltered} on:select />
|
|
22
48
|
</div>
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
<div class="flex px-
|
|
2
|
-
<
|
|
3
|
-
class="flex-shrink-0 w-5 h-5 text-yellow-700 dark:text-yellow-800"
|
|
4
|
-
fill="currentColor"
|
|
5
|
-
viewBox="0 0 20 20"
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
><path
|
|
8
|
-
fill-rule="evenodd"
|
|
9
|
-
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
|
|
10
|
-
clip-rule="evenodd"
|
|
11
|
-
/></svg
|
|
12
|
-
>
|
|
13
|
-
<div class="ml-3 text-sm font-medium text-yellow-700 dark:text-yellow-800">
|
|
14
|
-
Previous results are not available unless a preview is run on the previous step.
|
|
15
|
-
</div>
|
|
1
|
+
<div class="flex px-2 bg-yellow-100 rounded-lg dark:bg-yellow-200" role="alert">
|
|
2
|
+
<div class="text-sm font-medium text-yellow-700 dark:text-yellow-800">Require testing flow</div>
|
|
16
3
|
</div>
|
|
@@ -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 },
|