mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 16:02:28 +00:00
fix import script from hub
This commit is contained in:
@@ -538,7 +538,7 @@ pub struct HubScript {
|
||||
pub content: String,
|
||||
pub lockfile: Option<String>,
|
||||
pub language: ScriptLang,
|
||||
pub schema: Option<String>,
|
||||
pub schema: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
pub async fn get_full_hub_script_by_path(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
import PickScript from '../pickers/PickScript.svelte'
|
||||
|
||||
export let shouldDisableTriggerScripts: boolean = false
|
||||
export let shouldDisableLoopCreation: boolean = false
|
||||
|
||||
export let failureModule: boolean
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
@@ -103,15 +105,17 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="text-sm font-bold">Flow primitive</div>
|
||||
{#if !shouldDisableTriggerScripts}
|
||||
<div class="text-sm font-bold">Flow primitive</div>
|
||||
|
||||
<div class="grid sm:grid-col-1 md:grid-col-2 lg:grid-cols-3 gap-4">
|
||||
<FlowScriptPicker
|
||||
label={`Create a for-loop`}
|
||||
icon={faRepeat}
|
||||
iconColor="text-blue-500"
|
||||
on:click={() => dispatch('loop')}
|
||||
/>
|
||||
</div>
|
||||
<div class="grid sm:grid-col-1 md:grid-col-2 lg:grid-cols-3 gap-4">
|
||||
<FlowScriptPicker
|
||||
label={`Create a for-loop`}
|
||||
icon={faRepeat}
|
||||
iconColor="text-blue-500"
|
||||
on:click={() => dispatch('loop')}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -137,9 +137,7 @@
|
||||
{#if shouldPick}
|
||||
<FlowInputs
|
||||
shouldDisableTriggerScripts={parentIndex != 0}
|
||||
shouldDisableLoopCreation={childIndex !== undefined ||
|
||||
parentIndex === 0 ||
|
||||
$selectedId.includes('failure')}
|
||||
shouldDisableLoopCreation={childIndex !== undefined || $selectedId.includes('failure')}
|
||||
on:loop={() => {
|
||||
applyCreateLoop()
|
||||
select(['loop', $selectedId].join('-'))
|
||||
|
||||
Reference in New Issue
Block a user