mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 00:04:10 +00:00
fix(frontend): add script history in the script menu on the homepage … (#3388)
* fix(frontend): add script history in the script menu on the homepage + move test an iteration * fix(frontend): fix Test an iteration position
This commit is contained in:
@@ -29,8 +29,11 @@
|
||||
List,
|
||||
Pen,
|
||||
Share,
|
||||
Trash
|
||||
Trash,
|
||||
History
|
||||
} from 'lucide-svelte'
|
||||
import ScriptVersionHistory from '$lib/components/ScriptVersionHistory.svelte'
|
||||
import { Drawer, DrawerContent } from '..'
|
||||
|
||||
export let script: Script & { canWrite: boolean }
|
||||
export let marked: string | undefined
|
||||
@@ -74,6 +77,7 @@
|
||||
let scheduleEditor: ScheduleEditor
|
||||
|
||||
const dlt: 'delete' = 'delete'
|
||||
let versionsDrawerOpen: boolean = false
|
||||
</script>
|
||||
|
||||
{#if menuOpen}
|
||||
@@ -209,6 +213,13 @@
|
||||
icon: List,
|
||||
href: `/runs/${script.path}`
|
||||
},
|
||||
{
|
||||
displayName: 'Versions',
|
||||
icon: History,
|
||||
action: () => {
|
||||
versionsDrawerOpen = true
|
||||
}
|
||||
},
|
||||
{
|
||||
displayName: 'Audit logs',
|
||||
icon: Eye,
|
||||
@@ -300,3 +311,20 @@
|
||||
/>
|
||||
</svelte:fragment>
|
||||
</Row>
|
||||
|
||||
{#if script}
|
||||
<Drawer bind:open={versionsDrawerOpen} size="1200px">
|
||||
<DrawerContent title="Versions History" on:close={() => (versionsDrawerOpen = false)}>
|
||||
<ScriptVersionHistory
|
||||
scriptPath={script.path}
|
||||
openDetails
|
||||
on:openDetails={(e) => {
|
||||
if (script) {
|
||||
goto(`/scripts/get/${e.detail.version}?workspace=${$workspaceStore}`)
|
||||
}
|
||||
versionsDrawerOpen = false
|
||||
}}
|
||||
/>
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
{/if}
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
tooltip="For loops"
|
||||
documentationLink="https://www.windmill.dev/docs/flows/flow_loops"
|
||||
class="mb-4"
|
||||
size="xs"
|
||||
>
|
||||
Add steps inside the loop and specify an iterator expression that defines the sequence
|
||||
over which your subsequent steps will iterate.
|
||||
@@ -129,8 +130,9 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="my-2 flex flex-row gap-2 items-center">
|
||||
<div class="text-sm font-bold">
|
||||
<div class="text-sm font-bold whitespace-nowrap">
|
||||
Iterator expression
|
||||
<Tooltip documentationLink="https://www.windmill.dev/docs/flows/flow_loops">
|
||||
List to iterate over.
|
||||
@@ -157,7 +159,16 @@
|
||||
pickableProperties={stepPropPicker.pickableProperties}
|
||||
/>
|
||||
{/if}
|
||||
<div class="flex w-full justify-end">
|
||||
<Button
|
||||
on:click={() => (previewOpen = true)}
|
||||
startIcon={{ icon: Play }}
|
||||
color="dark"
|
||||
size="sm">Test an iteration</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if mod.value.iterator.type == 'javascript'}
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
@@ -199,11 +210,6 @@
|
||||
/>
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="flex mt-4">
|
||||
<Button on:click={() => (previewOpen = true)} startIcon={{ icon: Play }} color="dark"
|
||||
>Test an iteration</Button
|
||||
>
|
||||
</div>
|
||||
</Pane>
|
||||
<Pane size={40} minSize={20} class="flex flex-col flex-1">
|
||||
<Tabs bind:selected>
|
||||
|
||||
Reference in New Issue
Block a user