* runs on svelte 5 * Line component from svelte-chartjs * Replaced all svelte-chartjs occurrences with custom wrapper * Fix props mistake * Fix illegal table structures * self-closing-tags fix * aria labels * Fixed trivial warnings and errors * @tanstack/svelte-table fix * upgrade to vite 6 * svelte-kit sync before running svelte-check * Remove on:clear which is actually on:removeAll and already handled by on:change * fix worker tags not displaying in Autoscaling * Try to fix svelte-kit sync not working during CI * remove warnings * Fix add flow page crashing * access worldStore before assignment fix * fix infinite recursions in App Editor * Replaced JSON.stringify with proper deepEqual * component mount api changed (no longer classes) * fix ci errors * Fix infinite loops in background runnable panel * factored effect on deep equal logic in onObjChange * fix "Add" not working in AgGrid Table * Replaced legacy component.$set api * Fix multiselect infinite value reaction * Fix flow input fields resetting when opening their edit tab * fix date input resetting when typing year * Remove !p-0 affecting subgrid dotted borders * fix missing debounceTemplate causing hundreds of updates * Fix AgGrid action refreshes and disppearing * resolve getItems generating random ids every rerun * fix cannot access items before init * fix sort lambda arguments being undefined * Revert "Remove !p-0 affecting subgrid dotted borders" This reverts commit c62809bb45d682a48376b071680645ed4e1c601b. * fix input not updating in decision tree editor * Update frontend/src/lib/components/schema/EditableSchemaWrapper.svelte Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Re-added padding affecting subgrid dotted borders (#5479) * remove !p-0 in preset components * removed extra padding on accordion tabs subgrid * Fix non-reactive SchemaForm * dirty fix for the oneOf bug * Fix warnings and update svelte-exmarkdown for svelte 5 * fix dnd not working * don't mount component like objects --------- Co-authored-by: Diego Imbert <diegoimbert@protonmail.com> Co-authored-by: Diego Imbert <70353967+diegoimbert@users.noreply.github.com> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
101 lines
2.5 KiB
Svelte
101 lines
2.5 KiB
Svelte
<script lang="ts">
|
|
import { SCRIPT_VIEW_SHOW_SCHEDULE_RUN_LATER } from '$lib/consts'
|
|
import Label from './Label.svelte'
|
|
import Toggle from './Toggle.svelte'
|
|
import Tooltip from './Tooltip.svelte'
|
|
import { userStore, workerTags, workspaceStore } from '$lib/stores'
|
|
import { Button } from './common'
|
|
import { WorkerService } from '$lib/gen'
|
|
import DateTimeInput from './DateTimeInput.svelte'
|
|
|
|
export let runnable:
|
|
| {
|
|
summary?: string
|
|
description?: string
|
|
path?: string
|
|
is_template?: boolean
|
|
hash?: string
|
|
kind?: string
|
|
can_write?: boolean
|
|
created_at?: string
|
|
created_by?: string
|
|
extra_perms?: Record<string, boolean>
|
|
}
|
|
| undefined
|
|
|
|
export let scheduledForStr: string | undefined
|
|
export let invisible_to_owner: boolean | undefined
|
|
export let overrideTag: string | undefined
|
|
loadWorkerGroups()
|
|
|
|
async function loadWorkerGroups() {
|
|
if (!$workerTags) {
|
|
$workerTags = await WorkerService.getCustomTags({ workspace: $workspaceStore })
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div class="flex flex-col gap-4 p-4">
|
|
<div class="flex flex-col gap-2">
|
|
{#if SCRIPT_VIEW_SHOW_SCHEDULE_RUN_LATER}
|
|
<div class="">
|
|
<Label label="Schedule to run later" />
|
|
|
|
<div class="flex flex-row items-center my-1">
|
|
<div>
|
|
<label for="run-time"></label>
|
|
<DateTimeInput
|
|
value={scheduledForStr}
|
|
on:change={(e) => {
|
|
console.log('e.detail', e.detail)
|
|
scheduledForStr = e.detail
|
|
}}
|
|
/>
|
|
</div>
|
|
<Button
|
|
variant="border"
|
|
color="light"
|
|
size="xs"
|
|
btnClasses="mx-2 "
|
|
on:click={() => {
|
|
scheduledForStr = undefined
|
|
}}
|
|
>
|
|
Clear
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
{#if !$userStore?.operator}
|
|
{#if $workerTags && $workerTags?.length > 0}
|
|
<div class="w-full">
|
|
<select placeholder="Worker group" bind:value={overrideTag}>
|
|
{#if overrideTag}
|
|
<option value="">reset to default</option>
|
|
{:else}
|
|
<option value="" disabled selected>Override Worker Group Tag</option>
|
|
{/if}
|
|
{#each $workerTags ?? [] as tag (tag)}
|
|
<option value={tag}>{tag}</option>
|
|
{/each}
|
|
</select>
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
|
|
{#if runnable?.path?.startsWith(`u/${$userStore?.username}`) != true && (runnable?.path?.split('/')?.length ?? 0) > 2}
|
|
<div class="flex items-center gap-1">
|
|
<Toggle
|
|
options={{
|
|
right: `make run invisible to others`
|
|
}}
|
|
bind:checked={invisible_to_owner}
|
|
/>
|
|
<Tooltip
|
|
>By default, runs are visible to the owner(s) of the script or flow being triggered</Tooltip
|
|
>
|
|
</div>
|
|
{/if}
|
|
</div>
|