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
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
<script>import { sendUserToast, truncateRev } from '../utils';
|
|
2
|
-
import { faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
-
import Icon from 'svelte-awesome';
|
|
4
|
-
import { flowStateStore, flowStateToFlow } from './flows/flowState';
|
|
5
|
-
import { mapJobResultsToFlowState } from './flows/flowStateUtils';
|
|
6
|
-
import { runFlowPreview } from './flows/utils';
|
|
7
|
-
import FlowStatusViewer from './FlowStatusViewer.svelte';
|
|
8
|
-
import RunForm from './RunForm.svelte';
|
|
9
|
-
import Tab from './common/tabs/Tab.svelte';
|
|
10
|
-
import TabContent from './common/tabs/TabContent.svelte';
|
|
11
|
-
import Tabs from './common/tabs/Tabs.svelte';
|
|
12
|
-
export let i;
|
|
13
|
-
export let flow;
|
|
14
|
-
export let schema;
|
|
15
|
-
export let args = {};
|
|
16
|
-
let stepArgs = {};
|
|
17
|
-
let tab = 'upto';
|
|
18
|
-
let viewPreview = false;
|
|
19
|
-
let uptoText = i >= flow.value.modules.length - 1 ? 'Preview whole flow' : 'Preview up to this step';
|
|
20
|
-
let jobId;
|
|
21
|
-
export async function runPreview(args) {
|
|
22
|
-
viewPreview = true;
|
|
23
|
-
flow = flowStateToFlow($flowStateStore, flow);
|
|
24
|
-
let newFlow = tab == 'upto' ? truncateFlow(flow) : setInputTransformFromArgs(extractStep(flow), args);
|
|
25
|
-
jobId = await runFlowPreview(args, newFlow);
|
|
26
|
-
sendUserToast(`started preview ${truncateRev(jobId, 10)}`);
|
|
27
|
-
}
|
|
28
|
-
function truncateFlow(flow) {
|
|
29
|
-
const localFlow = JSON.parse(JSON.stringify(flow));
|
|
30
|
-
localFlow.value.modules = flow.value.modules.slice(0, i + 1);
|
|
31
|
-
return localFlow;
|
|
32
|
-
}
|
|
33
|
-
function extractStep(flow) {
|
|
34
|
-
const localFlow = JSON.parse(JSON.stringify(flow));
|
|
35
|
-
localFlow.value.modules = flow.value.modules.slice(i, i + 1);
|
|
36
|
-
localFlow.schema = schema;
|
|
37
|
-
return localFlow;
|
|
38
|
-
}
|
|
39
|
-
function setInputTransformFromArgs(flow, args) {
|
|
40
|
-
let input_transforms = {};
|
|
41
|
-
Object.entries(args).forEach(([key, value]) => {
|
|
42
|
-
input_transforms[key] = {
|
|
43
|
-
type: 'static',
|
|
44
|
-
value: value
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
flow.value.modules[0].input_transforms = input_transforms;
|
|
48
|
-
return flow;
|
|
49
|
-
}
|
|
50
|
-
</script>
|
|
51
|
-
|
|
52
|
-
<button
|
|
53
|
-
class="w-full rounded border-1 border border-gray-200"
|
|
54
|
-
on:click={() => {
|
|
55
|
-
viewPreview = !viewPreview
|
|
56
|
-
}}
|
|
57
|
-
>
|
|
58
|
-
<h2 class="flex justify-center text-gray-600">
|
|
59
|
-
<div>
|
|
60
|
-
Preview
|
|
61
|
-
<Icon class="ml-1" data={viewPreview ? faChevronUp : faChevronDown} scale={1} />
|
|
62
|
-
</div>
|
|
63
|
-
</h2>
|
|
64
|
-
</button>
|
|
65
|
-
|
|
66
|
-
{#if viewPreview}
|
|
67
|
-
{#if i != flow.value.modules.length}
|
|
68
|
-
<div class="mt-2">
|
|
69
|
-
<Tabs bind:selected={tab}>
|
|
70
|
-
<Tab value="upto">{uptoText}</Tab>
|
|
71
|
-
<Tab value="justthis">Preview just this step</Tab>
|
|
72
|
-
<svelte:fragment slot="content">
|
|
73
|
-
<TabContent value="upto">
|
|
74
|
-
<RunForm
|
|
75
|
-
runnable={truncateFlow(flow)}
|
|
76
|
-
runAction={(_, args) => runPreview(args)}
|
|
77
|
-
schedulable={false}
|
|
78
|
-
buttonText={uptoText}
|
|
79
|
-
detailed={false}
|
|
80
|
-
bind:args
|
|
81
|
-
/>
|
|
82
|
-
</TabContent>
|
|
83
|
-
<TabContent value="justthis">
|
|
84
|
-
<RunForm
|
|
85
|
-
runnable={extractStep(flow)}
|
|
86
|
-
runAction={(_, args) => runPreview(args)}
|
|
87
|
-
schedulable={false}
|
|
88
|
-
buttonText="Preview just this step"
|
|
89
|
-
detailed={false}
|
|
90
|
-
args={stepArgs}
|
|
91
|
-
/>
|
|
92
|
-
</TabContent>
|
|
93
|
-
</svelte:fragment>
|
|
94
|
-
</Tabs>
|
|
95
|
-
</div>
|
|
96
|
-
{/if}
|
|
97
|
-
|
|
98
|
-
{#if jobId}
|
|
99
|
-
<div class="w-full flex justify-center">
|
|
100
|
-
<FlowStatusViewer
|
|
101
|
-
{jobId}
|
|
102
|
-
on:jobsLoaded={(e) => mapJobResultsToFlowState(e.detail, tab, i)}
|
|
103
|
-
root={true}
|
|
104
|
-
/>
|
|
105
|
-
</div>
|
|
106
|
-
{/if}
|
|
107
|
-
{/if}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Schema } from '../common';
|
|
3
|
-
import type { Flow } from '../gen';
|
|
4
|
-
declare const __propDef: {
|
|
5
|
-
props: {
|
|
6
|
-
i: number;
|
|
7
|
-
flow: Flow;
|
|
8
|
-
schema: Schema;
|
|
9
|
-
args?: Record<string, any> | undefined;
|
|
10
|
-
runPreview?: ((args: any) => Promise<void>) | undefined;
|
|
11
|
-
};
|
|
12
|
-
events: {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {};
|
|
16
|
-
};
|
|
17
|
-
export declare type FlowPreviewProps = typeof __propDef.props;
|
|
18
|
-
export declare type FlowPreviewEvents = typeof __propDef.events;
|
|
19
|
-
export declare type FlowPreviewSlots = typeof __propDef.slots;
|
|
20
|
-
export default class FlowPreview extends SvelteComponentTyped<FlowPreviewProps, FlowPreviewEvents, FlowPreviewSlots> {
|
|
21
|
-
get runPreview(): (args: any) => Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
<script>import { RawScript } from '../gen';
|
|
2
|
-
import { faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
-
import Icon from 'svelte-awesome';
|
|
4
|
-
import Editor from './Editor.svelte';
|
|
5
|
-
import EditorBar from './EditorBar.svelte';
|
|
6
|
-
import FlowPreview from './FlowPreview.svelte';
|
|
7
|
-
import FlowBox from './flows/FlowBox.svelte';
|
|
8
|
-
import FlowInputs from './flows/FlowInputs.svelte';
|
|
9
|
-
import FlowModuleHeader from './flows/FlowModuleHeader.svelte';
|
|
10
|
-
import { flowStore } from './flows/flowStore';
|
|
11
|
-
import { createInlineScriptModule, createLoop, fork, loadFlowModuleSchema, pickScript, createScriptFromInlineScript, isEmptyFlowModule, getStepPropPicker } from './flows/flowStateUtils';
|
|
12
|
-
import SchemaForm from './SchemaForm.svelte';
|
|
13
|
-
import { flowStateStore } from './flows/flowState';
|
|
14
|
-
import { stepOpened } from './flows/stepOpenedStore';
|
|
15
|
-
export let indexes;
|
|
16
|
-
export let mod;
|
|
17
|
-
export let args = {};
|
|
18
|
-
export let schema;
|
|
19
|
-
export let childFlowModules = undefined;
|
|
20
|
-
let editor;
|
|
21
|
-
let websocketAlive = { pyright: false, black: false, deno: false };
|
|
22
|
-
let bigEditor = false;
|
|
23
|
-
const i = indexes[0];
|
|
24
|
-
$: shouldPick = isEmptyFlowModule(mod);
|
|
25
|
-
$: stepPropPicker = getStepPropPicker(indexes, $flowStore.schema, $flowStateStore, args);
|
|
26
|
-
async function apply(fn, arg) {
|
|
27
|
-
const flowModuleSchema = await fn(arg);
|
|
28
|
-
mod = flowModuleSchema.flowModule;
|
|
29
|
-
schema = flowModuleSchema.schema;
|
|
30
|
-
if (flowModuleSchema.childFlowModules) {
|
|
31
|
-
childFlowModules = flowModuleSchema.childFlowModules;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
async function reload(flowModule) {
|
|
35
|
-
apply(loadFlowModuleSchema, flowModule);
|
|
36
|
-
}
|
|
37
|
-
async function applyCreateLoop() {
|
|
38
|
-
await apply(createLoop, null);
|
|
39
|
-
stepOpened.update(() => `${indexes[0]}-0`);
|
|
40
|
-
}
|
|
41
|
-
$: opened = $stepOpened === String(indexes.join('-'));
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<FlowBox
|
|
45
|
-
headerClickable={true}
|
|
46
|
-
on:clickheader={() => ($stepOpened = !opened ? String(indexes.join('-')) : undefined)}
|
|
47
|
-
>
|
|
48
|
-
<svelte:fragment slot="header">
|
|
49
|
-
<FlowModuleHeader
|
|
50
|
-
bind:mod
|
|
51
|
-
bind:indexes
|
|
52
|
-
on:delete
|
|
53
|
-
on:fork={() => apply(fork, mod)}
|
|
54
|
-
on:createScriptFromInlineScript={() => {
|
|
55
|
-
apply(createScriptFromInlineScript, {
|
|
56
|
-
flowModule: mod,
|
|
57
|
-
suffix: indexes.join('-'),
|
|
58
|
-
schema
|
|
59
|
-
})
|
|
60
|
-
}}
|
|
61
|
-
/>
|
|
62
|
-
</svelte:fragment>
|
|
63
|
-
|
|
64
|
-
<div slot="content">
|
|
65
|
-
{#if opened}
|
|
66
|
-
<div class="p-6 border-t border-gray-300">
|
|
67
|
-
{#if shouldPick}
|
|
68
|
-
<FlowInputs
|
|
69
|
-
shouldDisableTriggerScripts={i != 0}
|
|
70
|
-
shouldDisableLoopCreation={indexes.length > 1 || i == 0}
|
|
71
|
-
on:pick={(e) => apply(pickScript, e.detail.path)}
|
|
72
|
-
on:new={(e) =>
|
|
73
|
-
apply(createInlineScriptModule, {
|
|
74
|
-
language: e.detail.language,
|
|
75
|
-
type: e.detail.type
|
|
76
|
-
})}
|
|
77
|
-
on:loop={() => applyCreateLoop()}
|
|
78
|
-
/>
|
|
79
|
-
{/if}
|
|
80
|
-
{#if mod.value.type === 'rawscript'}
|
|
81
|
-
<div class="mb-2 overflow-hidden">
|
|
82
|
-
<EditorBar {editor} {websocketAlive} lang={mod.value.language ?? 'deno'} />
|
|
83
|
-
</div>
|
|
84
|
-
<div on:mouseleave={() => reload(mod)}>
|
|
85
|
-
<Editor
|
|
86
|
-
bind:websocketAlive
|
|
87
|
-
bind:this={editor}
|
|
88
|
-
class="{bigEditor ? 'h-2/3' : 'h-80'} border p-2 rounded"
|
|
89
|
-
bind:code={mod.value.content}
|
|
90
|
-
deno={mod.value.language === RawScript.language.DENO}
|
|
91
|
-
automaticLayout={true}
|
|
92
|
-
formatAction={() => reload(mod)}
|
|
93
|
-
/>
|
|
94
|
-
<button
|
|
95
|
-
class="w-full text-center"
|
|
96
|
-
on:click={() => {
|
|
97
|
-
bigEditor = !bigEditor
|
|
98
|
-
}}
|
|
99
|
-
>
|
|
100
|
-
<Icon data={bigEditor ? faChevronUp : faChevronDown} scale={1.0} />
|
|
101
|
-
</button>
|
|
102
|
-
</div>
|
|
103
|
-
<div class="mt-2 mb-8">
|
|
104
|
-
<p class="text-gray-500 italic">
|
|
105
|
-
Move the focus outside of the text editor to recompute the input schema or press
|
|
106
|
-
Ctrl/Cmd+S
|
|
107
|
-
</p>
|
|
108
|
-
</div>
|
|
109
|
-
{/if}
|
|
110
|
-
{#if !shouldPick}
|
|
111
|
-
<p class="text-lg font-bold text-gray-900 mb-2">Step inputs</p>
|
|
112
|
-
<SchemaForm
|
|
113
|
-
{schema}
|
|
114
|
-
inputTransform={true}
|
|
115
|
-
importPath={String(indexes.join('-'))}
|
|
116
|
-
bind:pickableProperties={stepPropPicker.pickableProperties}
|
|
117
|
-
bind:args={mod.input_transforms}
|
|
118
|
-
bind:extraLib={stepPropPicker.extraLib}
|
|
119
|
-
/>
|
|
120
|
-
{/if}
|
|
121
|
-
|
|
122
|
-
{#if !shouldPick}
|
|
123
|
-
<div class="border-b border-gray-200" />
|
|
124
|
-
<div class="pt-2">
|
|
125
|
-
<FlowPreview bind:args flow={$flowStore} {i} {schema} />
|
|
126
|
-
</div>
|
|
127
|
-
{/if}
|
|
128
|
-
</div>
|
|
129
|
-
{/if}
|
|
130
|
-
</div>
|
|
131
|
-
</FlowBox>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { type FlowModule } from '../gen';
|
|
3
|
-
import type { Schema } from '../common';
|
|
4
|
-
import { type FlowModuleSchema } from './flows/flowState';
|
|
5
|
-
declare const __propDef: {
|
|
6
|
-
props: {
|
|
7
|
-
indexes: number[];
|
|
8
|
-
mod: FlowModule;
|
|
9
|
-
args?: Record<string, any> | undefined;
|
|
10
|
-
schema: Schema;
|
|
11
|
-
childFlowModules?: FlowModuleSchema[] | undefined;
|
|
12
|
-
};
|
|
13
|
-
events: {
|
|
14
|
-
delete: CustomEvent<any>;
|
|
15
|
-
} & {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
};
|
|
18
|
-
slots: {};
|
|
19
|
-
};
|
|
20
|
-
export declare type ModuleStepProps = typeof __propDef.props;
|
|
21
|
-
export declare type ModuleStepEvents = typeof __propDef.events;
|
|
22
|
-
export declare type ModuleStepSlots = typeof __propDef.slots;
|
|
23
|
-
export default class ModuleStep extends SvelteComponentTyped<ModuleStepProps, ModuleStepEvents, ModuleStepSlots> {
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<script>import { Button } from 'flowbite-svelte';
|
|
2
|
-
import { isCopyFirstStepSchemaDisabled } from './flowState';
|
|
3
|
-
import { copyFirstStepSchema } from './flowStore';
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<Button
|
|
7
|
-
color="light"
|
|
8
|
-
size="xs"
|
|
9
|
-
disabled={$isCopyFirstStepSchemaDisabled}
|
|
10
|
-
on:click={copyFirstStepSchema}
|
|
11
|
-
>
|
|
12
|
-
Copy from first step schema
|
|
13
|
-
</Button>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
-
import FlowBoxHeader from './FlowBoxHeader.svelte';
|
|
3
|
-
export let title = undefined;
|
|
4
|
-
export let headerClickable = false;
|
|
5
|
-
const dispatch = createEventDispatcher();
|
|
6
|
-
let slots = $$props.$$slots;
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<div class="bg-white border border-gray-300 rounded-md shadow-md">
|
|
10
|
-
<FlowBoxHeader clickable={headerClickable} on:click={() => dispatch('clickheader')} {title}>
|
|
11
|
-
<slot name="header" />
|
|
12
|
-
</FlowBoxHeader>
|
|
13
|
-
{#if slots.content}
|
|
14
|
-
<slot name="content" />
|
|
15
|
-
{/if}
|
|
16
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
title?: string | undefined;
|
|
6
|
-
headerClickable?: boolean | undefined;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
clickheader: CustomEvent<any>;
|
|
10
|
-
} & {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
header: {};
|
|
15
|
-
content: {};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare type FlowBoxProps = typeof __propDef.props;
|
|
19
|
-
export declare type FlowBoxEvents = typeof __propDef.events;
|
|
20
|
-
export declare type FlowBoxSlots = typeof __propDef.slots;
|
|
21
|
-
export default class FlowBox extends SvelteComponentTyped<FlowBoxProps, FlowBoxEvents, FlowBoxSlots> {
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
-
export let title = undefined;
|
|
3
|
-
export let clickable = false;
|
|
4
|
-
const dispatch = createEventDispatcher();
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<div
|
|
8
|
-
on:click={() => dispatch('click')}
|
|
9
|
-
class="flex items-center justify-between flex-wrap px-6 py-2"
|
|
10
|
-
class:cursor-pointer={clickable}
|
|
11
|
-
>
|
|
12
|
-
{#if title}
|
|
13
|
-
<h3 class="text-sm font-bold text-gray-900">{title}</h3>
|
|
14
|
-
{/if}
|
|
15
|
-
<slot />
|
|
16
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
title?: string | undefined;
|
|
5
|
-
clickable?: boolean | undefined;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
8
|
-
click: CustomEvent<any>;
|
|
9
|
-
} & {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
default: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare type FlowBoxHeaderProps = typeof __propDef.props;
|
|
17
|
-
export declare type FlowBoxHeaderEvents = typeof __propDef.events;
|
|
18
|
-
export declare type FlowBoxHeaderSlots = typeof __propDef.slots;
|
|
19
|
-
export default class FlowBoxHeader extends SvelteComponentTyped<FlowBoxHeaderProps, FlowBoxHeaderEvents, FlowBoxHeaderSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script>import { emptySchema } from '../../utils';
|
|
2
|
-
import SchemaEditor from '../SchemaEditor.svelte';
|
|
3
|
-
import { flowStore } from './../flows/flowStore';
|
|
4
|
-
import CopyFirstStepSchema from './CopyFirstStepSchema.svelte';
|
|
5
|
-
import FlowBox from './FlowBox.svelte';
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<FlowBox title="Flow Inputs">
|
|
9
|
-
<div slot="header">
|
|
10
|
-
<CopyFirstStepSchema />
|
|
11
|
-
</div>
|
|
12
|
-
<div slot="content">
|
|
13
|
-
<div class="p-6 border-t border-gray-300">
|
|
14
|
-
<SchemaEditor
|
|
15
|
-
on:change={() => {
|
|
16
|
-
$flowStore = $flowStore
|
|
17
|
-
}}
|
|
18
|
-
schema={$flowStore?.schema ?? emptySchema()}
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</FlowBox>
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
<script>import { getScriptByPath } from '../../utils';
|
|
2
|
-
import { faArrowDown, faClose, faCode, faCodeBranch, faSave, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
-
import { Button } from 'flowbite-svelte';
|
|
4
|
-
import { createEventDispatcher } from 'svelte';
|
|
5
|
-
import Icon from 'svelte-awesome';
|
|
6
|
-
import { Highlight } from 'svelte-highlight';
|
|
7
|
-
import python from 'svelte-highlight/languages/python';
|
|
8
|
-
import typescript from 'svelte-highlight/languages/typescript';
|
|
9
|
-
import IconedPath from '../IconedPath.svelte';
|
|
10
|
-
import Modal from '../Modal.svelte';
|
|
11
|
-
import { isEmptyFlowModule } from './flowStateUtils';
|
|
12
|
-
import { stepOpened } from './stepOpenedStore';
|
|
13
|
-
export let indexes;
|
|
14
|
-
export let mod;
|
|
15
|
-
$: shouldPick = isEmptyFlowModule(mod);
|
|
16
|
-
let modalViewer;
|
|
17
|
-
let modalViewerContent = '';
|
|
18
|
-
let modalViewerLanguage = 'deno';
|
|
19
|
-
async function viewCode() {
|
|
20
|
-
if (mod.value.type == 'script') {
|
|
21
|
-
const { content, language } = await getScriptByPath(mod.value.path);
|
|
22
|
-
modalViewerContent = content;
|
|
23
|
-
modalViewerLanguage = language;
|
|
24
|
-
modalViewer.openModal();
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
throw Error('Not a script');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
const dispatch = createEventDispatcher();
|
|
31
|
-
$: opened = $stepOpened === String(indexes.join('-'));
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<div>
|
|
35
|
-
<h3 class="text-sm font-bold text-gray-900 flex flex-col">
|
|
36
|
-
<span class="text-xs shrink">
|
|
37
|
-
{#if 'path' in mod.value && mod.value.path}
|
|
38
|
-
<IconedPath path={mod.value.path} />
|
|
39
|
-
{:else if 'language' in mod.value && mod.value.language}
|
|
40
|
-
Inline {mod.value.language}
|
|
41
|
-
{:else}
|
|
42
|
-
Select a script
|
|
43
|
-
{/if}
|
|
44
|
-
</span>
|
|
45
|
-
{#if ('path' in mod.value && mod.value.path) || ('language' in mod.value && mod.value.language)}
|
|
46
|
-
<input
|
|
47
|
-
on:click|stopPropagation={() => undefined}
|
|
48
|
-
class="overflow-x-auto"
|
|
49
|
-
type="text"
|
|
50
|
-
bind:value={mod.summary}
|
|
51
|
-
placeholder="Summary"
|
|
52
|
-
/>
|
|
53
|
-
{/if}
|
|
54
|
-
</h3>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<div class="flex flex-row space-x-2" on:click|stopPropagation={() => undefined}>
|
|
58
|
-
{#if mod.value.type === 'script' && !shouldPick}
|
|
59
|
-
<Button size="xs" color="alternative" on:click={() => dispatch('fork')}>
|
|
60
|
-
<Icon data={faCodeBranch} class="mr-2" />
|
|
61
|
-
Fork
|
|
62
|
-
</Button>
|
|
63
|
-
<Button size="xs" color="alternative" on:click={viewCode}>
|
|
64
|
-
<Icon data={faCode} class="mr-2" />
|
|
65
|
-
View code
|
|
66
|
-
</Button>
|
|
67
|
-
{/if}
|
|
68
|
-
|
|
69
|
-
{#if mod.value.type === 'rawscript' && !shouldPick}
|
|
70
|
-
<Button size="xs" color="alternative" on:click={() => dispatch('createScriptFromInlineScript')}>
|
|
71
|
-
<Icon data={faSave} class="mr-2" />
|
|
72
|
-
Save to workspace
|
|
73
|
-
</Button>
|
|
74
|
-
{/if}
|
|
75
|
-
<Button
|
|
76
|
-
size="xs"
|
|
77
|
-
color="alternative"
|
|
78
|
-
on:click={() => {
|
|
79
|
-
dispatch('delete')
|
|
80
|
-
}}
|
|
81
|
-
>
|
|
82
|
-
<Icon data={faTrashAlt} class="mr-2" />
|
|
83
|
-
Remove step
|
|
84
|
-
</Button>
|
|
85
|
-
{#if opened}
|
|
86
|
-
<Button size="xs" color="dark" on:click={() => stepOpened.update(() => undefined)}>
|
|
87
|
-
<Icon data={faClose} />
|
|
88
|
-
</Button>
|
|
89
|
-
{:else}
|
|
90
|
-
<Button
|
|
91
|
-
size="xs"
|
|
92
|
-
color="light"
|
|
93
|
-
on:click={() => stepOpened.update(() => String(indexes.join('-')))}
|
|
94
|
-
>
|
|
95
|
-
<Icon data={faArrowDown} />
|
|
96
|
-
</Button>
|
|
97
|
-
{/if}
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<Modal bind:this={modalViewer}>
|
|
101
|
-
<div slot="title">Script {'path' in mod?.value ? mod?.value.path : ''}</div>
|
|
102
|
-
<div slot="content">
|
|
103
|
-
{#if modalViewerLanguage === 'python3'}
|
|
104
|
-
<Highlight language={python} code={modalViewerContent} />
|
|
105
|
-
{:else if modalViewerLanguage === 'deno'}
|
|
106
|
-
<Highlight language={typescript} code={modalViewerContent} />
|
|
107
|
-
{/if}
|
|
108
|
-
</div>
|
|
109
|
-
</Modal>
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
<script>import { sendUserToast } from '../../utils';
|
|
2
|
-
import { faFileExport, faFileImport, faGlobe } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
-
import { Button } from 'flowbite-svelte';
|
|
4
|
-
import Icon from 'svelte-awesome';
|
|
5
|
-
import Menu from '../common/menu/Menu.svelte';
|
|
6
|
-
import MenuItem from '../common/menu/MenuItem.svelte';
|
|
7
|
-
import Editor from '../Editor.svelte';
|
|
8
|
-
import FlowViewer from '../FlowViewer.svelte';
|
|
9
|
-
import Modal from '../Modal.svelte';
|
|
10
|
-
import CollapseLink from './../CollapseLink.svelte';
|
|
11
|
-
import CronInput from './../CronInput.svelte';
|
|
12
|
-
import FlowBox from './../flows/FlowBox.svelte';
|
|
13
|
-
import { flowStore, initFlow } from './../flows/flowStore';
|
|
14
|
-
import Path from './../Path.svelte';
|
|
15
|
-
import Required from './../Required.svelte';
|
|
16
|
-
import SchemaForm from './../SchemaForm.svelte';
|
|
17
|
-
import Toggle from './../Toggle.svelte';
|
|
18
|
-
import Tooltip from './../Tooltip.svelte';
|
|
19
|
-
import { stepOpened } from './stepOpenedStore';
|
|
20
|
-
import { cleanInputs } from './utils';
|
|
21
|
-
export let pathError = '';
|
|
22
|
-
export let initialPath = '';
|
|
23
|
-
export let previewArgs = {};
|
|
24
|
-
export let scheduleArgs = {};
|
|
25
|
-
export let scheduleEnabled = false;
|
|
26
|
-
export let scheduleCron = '0 */5 * * *';
|
|
27
|
-
let jsonSetter;
|
|
28
|
-
let jsonViewer;
|
|
29
|
-
let jsonValue = '';
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<Modal bind:this={jsonSetter}>
|
|
33
|
-
<div slot="title">Import JSON</div>
|
|
34
|
-
<div slot="content" class="h-full">
|
|
35
|
-
<Editor bind:code={jsonValue} lang={'json'} class="h-full" />
|
|
36
|
-
</div>
|
|
37
|
-
<div slot="submission">
|
|
38
|
-
<button
|
|
39
|
-
class="default-button px-4 py-2 font-semibold"
|
|
40
|
-
on:click={() => {
|
|
41
|
-
Object.assign($flowStore, JSON.parse(jsonValue))
|
|
42
|
-
initFlow($flowStore)
|
|
43
|
-
stepOpened.update(() => undefined)
|
|
44
|
-
sendUserToast('OpenFlow imported from JSON')
|
|
45
|
-
jsonSetter.closeModal()
|
|
46
|
-
}}
|
|
47
|
-
>
|
|
48
|
-
Import
|
|
49
|
-
</button>
|
|
50
|
-
</div>
|
|
51
|
-
</Modal>
|
|
52
|
-
|
|
53
|
-
<Modal bind:this={jsonViewer}>
|
|
54
|
-
<div slot="title">See JSON</div>
|
|
55
|
-
<div slot="content" class="h-full">
|
|
56
|
-
<FlowViewer flow={cleanInputs($flowStore)} tab="json" />
|
|
57
|
-
</div>
|
|
58
|
-
</Modal>
|
|
59
|
-
|
|
60
|
-
<FlowBox title="Flow Settings">
|
|
61
|
-
<div slot="header">
|
|
62
|
-
<div class="flex flex-row-reverse">
|
|
63
|
-
<Menu placement="bottom-end">
|
|
64
|
-
<button slot="trigger" class="text-gray-900 bg-white dark:text-white dark:bg-gray-800">
|
|
65
|
-
...
|
|
66
|
-
</button>
|
|
67
|
-
<div class="divide-y divide-gray-200">
|
|
68
|
-
<MenuItem
|
|
69
|
-
on:click={() => {
|
|
70
|
-
jsonSetter.openModal()
|
|
71
|
-
}}
|
|
72
|
-
>
|
|
73
|
-
<Icon data={faFileImport} scale={0.6} class="inline mr-2" />
|
|
74
|
-
Import from a JSON OpenFlow
|
|
75
|
-
</MenuItem>
|
|
76
|
-
<MenuItem
|
|
77
|
-
on:click={() => {
|
|
78
|
-
jsonViewer.openModal()
|
|
79
|
-
}}
|
|
80
|
-
>
|
|
81
|
-
<Icon data={faFileExport} scale={0.6} class="inline mr-2" />
|
|
82
|
-
Export to a JSON OpenFlow
|
|
83
|
-
</MenuItem>
|
|
84
|
-
<MenuItem
|
|
85
|
-
on:click={() => {
|
|
86
|
-
const url = new URL('https://hub.windmill.dev/flows/add')
|
|
87
|
-
const openFlow = {
|
|
88
|
-
value: $flowStore.value,
|
|
89
|
-
summary: $flowStore.summary,
|
|
90
|
-
description: $flowStore.description,
|
|
91
|
-
schema: $flowStore.schema
|
|
92
|
-
}
|
|
93
|
-
url.searchParams.append('flow', btoa(JSON.stringify(openFlow)))
|
|
94
|
-
window.open(url, '_blank')?.focus()
|
|
95
|
-
}}
|
|
96
|
-
>
|
|
97
|
-
<Icon data={faGlobe} scale={0.6} class="inline mr-2" />
|
|
98
|
-
Publish to Hub
|
|
99
|
-
</MenuItem>
|
|
100
|
-
</div>
|
|
101
|
-
</Menu>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<div slot="content">
|
|
106
|
-
<div class="p-6 border-t border-gray-300">
|
|
107
|
-
<Path
|
|
108
|
-
bind:error={pathError}
|
|
109
|
-
bind:path={$flowStore.path}
|
|
110
|
-
{initialPath}
|
|
111
|
-
namePlaceholder="my_flow"
|
|
112
|
-
kind="flow"
|
|
113
|
-
>
|
|
114
|
-
<div slot="ownerToolkit">
|
|
115
|
-
Flow permissions depend on their path. Select the group <span class="font-mono">all</span>
|
|
116
|
-
to share your flow, and <span class="font-mono">user</span> to keep it private.
|
|
117
|
-
<a href="https://docs.windmill.dev/docs/reference/namespaces">docs</a>
|
|
118
|
-
</div>
|
|
119
|
-
</Path>
|
|
120
|
-
|
|
121
|
-
<label class="block mt-4">
|
|
122
|
-
<span class="text-gray-700">Summary <Required required={false} /></span>
|
|
123
|
-
<textarea
|
|
124
|
-
bind:value={$flowStore.summary}
|
|
125
|
-
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
126
|
-
placeholder="A very short summary of the flow displayed when the flow is listed"
|
|
127
|
-
rows="1"
|
|
128
|
-
/>
|
|
129
|
-
</label>
|
|
130
|
-
|
|
131
|
-
<CollapseLink text="set primary schedule" open={true}>
|
|
132
|
-
<Tooltip>
|
|
133
|
-
The primary schedule of a flow is simply a schedule that has the same name as a flow. It
|
|
134
|
-
can be set and enabled directly within the flow editor. "Watching for new changes" flows
|
|
135
|
-
are meant to be watching regularly for new items in an external systems. The primary
|
|
136
|
-
schedule purpose is there to set the periodicity at which you want this watcher to
|
|
137
|
-
operate.
|
|
138
|
-
</Tooltip>
|
|
139
|
-
<Toggle
|
|
140
|
-
bind:checked={scheduleEnabled}
|
|
141
|
-
options={{
|
|
142
|
-
left: 'disabled',
|
|
143
|
-
right: 'enabled'
|
|
144
|
-
}}
|
|
145
|
-
/>
|
|
146
|
-
<div class="p-2 my-2 rounded" class:bg-gray-300={!scheduleEnabled}>
|
|
147
|
-
{#if !scheduleEnabled}
|
|
148
|
-
<span class="font-black">No next scheduled run when disabled</span>
|
|
149
|
-
{/if}
|
|
150
|
-
<CronInput bind:schedule={scheduleCron} />
|
|
151
|
-
</div>
|
|
152
|
-
<div class="flex flex-row-reverse">
|
|
153
|
-
<Button
|
|
154
|
-
color="alternative"
|
|
155
|
-
size="sm"
|
|
156
|
-
on:click={() => (scheduleArgs = JSON.parse(JSON.stringify(previewArgs)))}
|
|
157
|
-
>
|
|
158
|
-
Copy from preview arguments
|
|
159
|
-
</Button>
|
|
160
|
-
</div>
|
|
161
|
-
<SchemaForm schema={$flowStore.schema} bind:args={scheduleArgs} />
|
|
162
|
-
</CollapseLink>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
</FlowBox>
|