mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 08:01:25 +00:00
minor UX improvements
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
}
|
||||
: undefined
|
||||
|
||||
console.log(valueSelect)
|
||||
let collection = [valueSelect]
|
||||
|
||||
async function loadResources(resourceType: string | undefined) {
|
||||
|
||||
@@ -191,9 +191,13 @@
|
||||
color={isPicked ? 'blue' : 'dark'}
|
||||
btnClasses={isPicked ? '!border-2 !bg-blue-50/75' : 'm-[1px]'}
|
||||
on:click={() => {
|
||||
let lastTemplate = template
|
||||
template = 'script'
|
||||
initContent(lang, script.kind, template)
|
||||
script.language = lang
|
||||
if (lastTemplate != template) {
|
||||
setCode(script.content)
|
||||
}
|
||||
}}
|
||||
disabled={lockedLanguage}
|
||||
>
|
||||
@@ -208,9 +212,13 @@
|
||||
btnClasses={template == 'pgsql' ? '!border-2 !bg-blue-50/75' : 'm-[1px]'}
|
||||
disabled={lockedLanguage}
|
||||
on:click={() => {
|
||||
let lastTemplate = template
|
||||
template = 'pgsql'
|
||||
initContent(Script.language.DENO, script.kind, template)
|
||||
script.language = Script.language.DENO
|
||||
if (lastTemplate != template) {
|
||||
setCode(script.content)
|
||||
}
|
||||
}}
|
||||
>
|
||||
<LanguageIcon lang="pgsql" /><span class="ml-2 py-2">PostgreSQL</span>
|
||||
|
||||
@@ -3,10 +3,13 @@ import wmill
|
||||
|
||||
# You can import any PyPi package.
|
||||
# See here for more info: https://docs.windmill.dev/docs/advanced/imports#python
|
||||
# Ctrl+S to format the code. Autocompletion available.
|
||||
|
||||
# you can use typed resources by doing a type alias to dict
|
||||
#postgresql = dict
|
||||
|
||||
def main(
|
||||
no_default: str,
|
||||
#db: postgresql,
|
||||
name="Nicolas Bourbaki",
|
||||
age=42,
|
||||
obj: dict = {"even": "dicts"},
|
||||
|
||||
@@ -20,7 +20,7 @@ export const DENO_INIT_CODE = `// Ctrl/CMD+. to cache dependencies on imports ho
|
||||
export async function main(
|
||||
a: number,
|
||||
b: "my" | "enum",
|
||||
//c: Resource<'postgresql'>,
|
||||
//c: wmill.Resource<'postgresql'>,
|
||||
d = "inferred type string from default arg",
|
||||
e = { nested: "object" },
|
||||
//e: wmill.Base64
|
||||
|
||||
@@ -87,6 +87,8 @@
|
||||
duration: 200,
|
||||
easing: cubicOut
|
||||
})
|
||||
|
||||
let reloadArgs = 0
|
||||
</script>
|
||||
|
||||
<svelte:window on:keydown={onKeyDown} />
|
||||
@@ -182,25 +184,35 @@
|
||||
</div>
|
||||
</Button>
|
||||
</div>
|
||||
<RunForm
|
||||
{loading}
|
||||
autofocus
|
||||
bind:this={runForm}
|
||||
bind:isValid
|
||||
detailed={false}
|
||||
runnable={flow}
|
||||
runAction={runFlow}
|
||||
viewCliRun
|
||||
isFlow
|
||||
bind:args
|
||||
/>
|
||||
{#key reloadArgs}
|
||||
<RunForm
|
||||
{loading}
|
||||
autofocus
|
||||
bind:this={runForm}
|
||||
bind:isValid
|
||||
detailed={false}
|
||||
runnable={flow}
|
||||
runAction={runFlow}
|
||||
viewCliRun
|
||||
isFlow
|
||||
bind:args
|
||||
/>
|
||||
{/key}
|
||||
{:else}
|
||||
<Skeleton layout={[2, [3], 1, [2], 4, [4], 3, [8]]} />
|
||||
{/if}
|
||||
</div>
|
||||
</Pane>
|
||||
<Pane size={$savedInputPaneSize}>
|
||||
<SavedInputs flowPath={path} {isValid} {args} on:selected_args={(e) => (args = e.detail)} />
|
||||
<SavedInputs
|
||||
flowPath={path}
|
||||
{isValid}
|
||||
{args}
|
||||
on:selected_args={(e) => {
|
||||
args = JSON.parse(JSON.stringify(e.detail))
|
||||
reloadArgs += 1
|
||||
}}
|
||||
/>
|
||||
</Pane>
|
||||
</Splitpanes>
|
||||
</SplitPanesWrapper>
|
||||
|
||||
@@ -110,6 +110,8 @@
|
||||
duration: 200,
|
||||
easing: cubicOut
|
||||
})
|
||||
|
||||
let reloadArgs = 0
|
||||
</script>
|
||||
|
||||
<svelte:window on:keydown={onKeyDown} />
|
||||
@@ -242,19 +244,20 @@
|
||||
</div>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<RunForm
|
||||
{loading}
|
||||
autofocus
|
||||
detailed={false}
|
||||
bind:isValid
|
||||
bind:this={runForm}
|
||||
runnable={script}
|
||||
runAction={runScript}
|
||||
viewCliRun
|
||||
isFlow={false}
|
||||
bind:args
|
||||
/>
|
||||
{#key reloadArgs}
|
||||
<RunForm
|
||||
{loading}
|
||||
autofocus
|
||||
detailed={false}
|
||||
bind:isValid
|
||||
bind:this={runForm}
|
||||
runnable={script}
|
||||
runAction={runScript}
|
||||
viewCliRun
|
||||
isFlow={false}
|
||||
bind:args
|
||||
/>
|
||||
{/key}
|
||||
{/if}
|
||||
{:else}
|
||||
<Skeleton layout={[2, [3], 1, [2], 4, [4], 3, [8]]} />
|
||||
@@ -263,7 +266,15 @@
|
||||
</Pane>
|
||||
|
||||
<Pane size={$savedInputPaneSize}>
|
||||
<SavedInputs scriptHash={hash} {isValid} {args} on:selected_args={(e) => (args = e.detail)} />
|
||||
<SavedInputs
|
||||
scriptHash={hash}
|
||||
{isValid}
|
||||
{args}
|
||||
on:selected_args={(e) => {
|
||||
args = JSON.parse(JSON.stringify(e.detail))
|
||||
reloadArgs += 1
|
||||
}}
|
||||
/>
|
||||
</Pane>
|
||||
</Splitpanes>
|
||||
</SplitPanesWrapper>
|
||||
|
||||
Reference in New Issue
Block a user