diff --git a/cli/README.md b/cli/README.md index b6ac87ef50..d1a128dfd3 100644 --- a/cli/README.md +++ b/cli/README.md @@ -3,6 +3,8 @@ A simple CLI allowing interactions with windmill from the command line. ![](./vhs/output/setup.gif) +You can find more information in [Windmill Docs](https://docs.windmill.dev/docs/advanced/cli) + ## Installation Install the `wmill` CLI tool using @@ -18,11 +20,14 @@ workspace settings. ## Running Flows & Scripts Run a script or flow using `wmill flow/script run u/username/path/to/script` and -pass any inputs using `--input/-i =` curl-style syntax using -`-i @-` for stdin or `-i @` is also supported +pass any inputs using `--data` + Inputs specified as a JSON string or a file using `@ ` or stdin using @-. + +Curl-style syntax using `-d @-` for stdin or `-d @` is also supported. Flow Steps and Logs will be streamed during execution automatically. +![CLI input example](./vhs/output/cli_inputs_example.png) + ## Pushing Resources, Scripts & More The CLI can push specifications to a windmill instance. See the diff --git a/cli/vhs/output/cli_inputs_example.png b/cli/vhs/output/cli_inputs_example.png new file mode 100644 index 0000000000..f831fa6cac Binary files /dev/null and b/cli/vhs/output/cli_inputs_example.png differ diff --git a/frontend/src/lib/components/Button.svelte b/frontend/src/lib/components/Button.svelte deleted file mode 100644 index a889d3d4a9..0000000000 --- a/frontend/src/lib/components/Button.svelte +++ /dev/null @@ -1,67 +0,0 @@ - - - diff --git a/frontend/src/lib/components/ChevronButton.svelte b/frontend/src/lib/components/ChevronButton.svelte index 5433384c6d..68a8a9d783 100644 --- a/frontend/src/lib/components/ChevronButton.svelte +++ b/frontend/src/lib/components/ChevronButton.svelte @@ -10,7 +10,7 @@ - {/if} - diff --git a/frontend/src/lib/components/apps/components/helpers/RunnableWrapper.svelte b/frontend/src/lib/components/apps/components/helpers/RunnableWrapper.svelte index 650fbfacf1..504723567d 100644 --- a/frontend/src/lib/components/apps/components/helpers/RunnableWrapper.svelte +++ b/frontend/src/lib/components/apps/components/helpers/RunnableWrapper.svelte @@ -49,7 +49,6 @@ export let outputs: { result: Output; loading: Output } export let extraKey: string | undefined = undefined export let refreshOnStart: boolean = false - export let triggerable: boolean = false export let errorHandledByComponent: boolean = false const { staticExporter, noBackend, componentControl, runnableComponents } = @@ -69,7 +68,7 @@ }) // We need to make sure that old apps have correct values. Triggerable (button, form, etc) have both autoRefresh and recomputeOnInputChanged set to false - $: if (triggerable && componentInput?.type === 'runnable' && componentInput.autoRefresh) { + $: if (!autoRefresh && componentInput?.type === 'runnable' && componentInput.autoRefresh) { componentInput.autoRefresh = false componentInput.recomputeOnInputChanged = false } diff --git a/frontend/src/lib/components/apps/components/layout/AppStepper.svelte b/frontend/src/lib/components/apps/components/layout/AppStepper.svelte index ac758694f8..9d7cbc0647 100644 --- a/frontend/src/lib/components/apps/components/layout/AppStepper.svelte +++ b/frontend/src/lib/components/apps/components/layout/AppStepper.svelte @@ -124,7 +124,6 @@ forceSchemaDisplay={true} runnableClass="!block" {outputs} - triggerable bind:result errorHandledByComponent={true} > diff --git a/frontend/src/lib/components/apps/editor/ComponentHeader.svelte b/frontend/src/lib/components/apps/editor/ComponentHeader.svelte index d715c205e6..499621b452 100644 --- a/frontend/src/lib/components/apps/editor/ComponentHeader.svelte +++ b/frontend/src/lib/components/apps/editor/ComponentHeader.svelte @@ -8,8 +8,8 @@ import type { AppComponent } from './component' import { twMerge } from 'tailwind-merge' import { getErrorFromLatestResult } from './appUtils' - import ButtonDropdown from '$lib/components/common/button/ButtonDropdown.svelte' - import { MenuItem } from '@rgossiaux/svelte-headlessui' + + import TabsDebug from './TabsDebug.svelte' export let component: AppComponent export let selected: boolean @@ -20,11 +20,9 @@ export let inlineEditorOpened: boolean = false export let errorHandledByComponent: boolean = false - let isConditionalWrapperManuallySelected: boolean = false - const dispatch = createEventDispatcher() - const { errorByComponent, openDebugRun, jobs, connectingInput, componentControl } = + const { errorByComponent, openDebugRun, jobs, connectingInput } = getContext('AppViewerContext') $: error = getErrorFromLatestResult(component.id, $errorByComponent, $jobs) @@ -74,56 +72,10 @@ {/if} {#if component.type === 'conditionalwrapper'} - + + {/if} + {#if component.type === 'tabscomponent' && component.configuration.tabsKind.type === 'static' && component.configuration.tabsKind.value === 'invisibleOnView'} + {/if} diff --git a/frontend/src/lib/components/apps/editor/component/components.ts b/frontend/src/lib/components/apps/editor/component/components.ts index 39ce7d5948..2f19a9ecff 100644 --- a/frontend/src/lib/components/apps/editor/component/components.ts +++ b/frontend/src/lib/components/apps/editor/component/components.ts @@ -1484,11 +1484,11 @@ Hello \${ctx.username} type: 'static', onlyStatic: true, selectOptions: selectOptions.tabsKindOptions, - value: 'tabs' as string + value: 'tabs' as string, + tooltip: `Tabs can be configured to be either horizontal (tabs), vertical (sidebar), or invisible.` } }, componentInput: undefined, - numberOfSubgrids: 2, tabs: ['First tab', 'Second tab'] as string[] } @@ -1530,12 +1530,15 @@ Hello \${ctx.username} icon: { type: 'static', value: 'Smile', - fieldType: 'icon-select' + fieldType: 'icon-select', + tooltip: 'The icons can be found at https://lucide.dev/' }, color: { type: 'static', value: 'currentColor', - fieldType: 'color' + fieldType: 'color', + tooltip: + 'The color of the icon can be overridden by the `background-color` property in the styling menu' }, size: { type: 'static', @@ -1810,7 +1813,6 @@ Hello \${ctx.username} initialData: { configuration: {}, componentInput: undefined, - panes: [50, 50] as number[], numberOfSubgrids: 2 } @@ -1912,7 +1914,6 @@ Hello \${ctx.username} } }, componentInput: undefined, - numberOfSubgrids: 1 } }, @@ -1945,13 +1946,15 @@ Hello \${ctx.username} fieldType: 'boolean', type: 'static', value: false, - onlyStatic: true + onlyStatic: true, + tooltip: 'This will diplay the type and/or the format on the field next to the label.' }, largeGap: { fieldType: 'boolean', type: 'static', value: false, - onlyStatic: true + onlyStatic: true, + tooltip: 'This will add a large gap between the form elements.' } } } @@ -1989,7 +1992,9 @@ Hello \${ctx.username} type: 'static', value: 'sm', fieldType: 'select', - selectOptions: selectOptions.buttonSizeOptions + selectOptions: selectOptions.buttonSizeOptions, + tooltip: + 'Size of the tabs can be overwritten with custom styles using `font-size` in CSS or using tailwind classes.' } } } diff --git a/frontend/src/lib/components/apps/editor/componentsPanel/QuickStyleProperty.svelte b/frontend/src/lib/components/apps/editor/componentsPanel/QuickStyleProperty.svelte index 34ae73e232..2621833df8 100644 --- a/frontend/src/lib/components/apps/editor/componentsPanel/QuickStyleProperty.svelte +++ b/frontend/src/lib/components/apps/editor/componentsPanel/QuickStyleProperty.svelte @@ -8,7 +8,8 @@ StylePropertyUnits, STYLE_STORE_KEY, type StyleStore, - type StyleStoreValue + type StyleStoreValue, + type StylePropertyValue } from './quickStyleProperties' export let prop: StyleStoreValue['style'][number]['prop'] @@ -21,7 +22,19 @@ let unit: (typeof StylePropertyUnits)[number] = StylePropertyUnits[0] let internalValue: number | string - $: internalValue = value ? +value.replace(unit, '') : '' + function getInteralValue(value: string | undefined, propValue: StylePropertyValue) { + if (!value) { + return '' + } + if (propValue.type === StylePropertyType.number) { + return value + } + if (propValue.type === StylePropertyType.text) { + return +value.replace(unit, '') + } + return '' + } + $: internalValue = getInteralValue(value, prop.value as StylePropertyValue) $: dispatch('change', value) function updateValue(next: number) { diff --git a/frontend/src/lib/components/sidebar/UserMenu.svelte b/frontend/src/lib/components/sidebar/UserMenu.svelte index f0f4c97812..54cb3c91b2 100644 --- a/frontend/src/lib/components/sidebar/UserMenu.svelte +++ b/frontend/src/lib/components/sidebar/UserMenu.svelte @@ -80,7 +80,7 @@ {/if}
diff --git a/frontend/src/routes/(root)/(logged)/resources/+page.svelte b/frontend/src/routes/(root)/(logged)/resources/+page.svelte index 6536de71a4..8725afd286 100644 --- a/frontend/src/routes/(root)/(logged)/resources/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/resources/+page.svelte @@ -316,9 +316,9 @@
Schema
- +
@@ -340,9 +340,9 @@ documentationLink="https://docs.windmill.dev/docs/core_concepts/resources_and_types" >
- + @@ -357,19 +357,23 @@
- Resource Types Every resources have Resource Types attached to them which contains its schema and make - it easy in scripts and flows to accept only resources of a specific resource type + Every resources have Resource Types attached to them which contains its schema and make it + easy in scripts and flows to accept only resources of a specific resource type +
- States States are actually resources (but excluded from the Workspace tab for clarity). States + States + + States are actually resources (but excluded from the Workspace tab for clarity). States are used by scripts to keep data persistent between runs of the same script by the same - trigger (schedule or user) + trigger (schedule or user) +
@@ -413,8 +417,8 @@ >{#if marked}{@html marked}{:else}{path}{/if} - + { const linkedRt = resourceTypes?.find((rt) => rt.name === resource_type) @@ -431,14 +435,16 @@ true ) } - }}> - {removeMarkdown(truncate(description ?? '', 30))} + }} + > + + + + + + {removeMarkdown(truncate(description ?? '', 30))} + +
@@ -595,8 +601,8 @@ {#if resourceTypes} {#each resourceTypes as { name, description, schema, canWrite }} - + { resourceTypeViewerObj = { @@ -606,22 +612,25 @@ } resourceTypeViewer.openDrawer?.() - }}> - {removeMarkdown(truncate(description ?? '', 200))} + }} + > + + + + + + {removeMarkdown(truncate(description ?? '', 200))} + + {#if !canWrite} - Shared globallyThis resource type is from the 'admins' workspace shared with all - workspaces + + Shared globally + + This resource type is from the 'admins' workspace shared with all + workspaces + + {:else if $userStore?.is_admin || $userStore?.is_super_admin}