From 6d1ac84bc34dfb519d0998574bb30c3a5b38705d Mon Sep 17 00:00:00 2001 From: Alex Tideman Date: Wed, 11 Oct 2023 13:06:53 -0500 Subject: [PATCH 1/6] Add trigger immediately action for schedule --- .../schedule-advanced-settings.svelte | 27 ++---- .../holocene/radio-input/radio-input.svelte | 7 +- src/lib/holocene/radio-input/types.ts | 1 + src/lib/i18n/locales/en/schedules.ts | 22 +++++ src/lib/pages/schedule-view.svelte | 93 +++++++++++++++++++ src/lib/services/schedule-service.ts | 36 ++++++- src/lib/types/schedule.ts | 9 ++ 7 files changed, 172 insertions(+), 23 deletions(-) diff --git a/src/lib/components/schedule/schedule-advanced-settings.svelte b/src/lib/components/schedule/schedule-advanced-settings.svelte index 03fdbfd17..b42d0e324 100644 --- a/src/lib/components/schedule/schedule-advanced-settings.svelte +++ b/src/lib/components/schedule/schedule-advanced-settings.svelte @@ -9,6 +9,9 @@ export let spec: ScheduleSpec; export let state: ScheduleState; export let policies: SchedulePolicies; + $: { + console.log('Policies: ', policies?.overlapPolicy); + } export let notes = ''; @@ -28,26 +31,12 @@

{#if state?.limitedActions}

- {translate('schedules', 'start-time')} - {spec?.startTime ?? translate('none')} -

-

- {translate('schedules', 'end-time')}{spec?.endTime ?? translate('none')} -

-

{translate('schedules', 'jitter')}{spec?.jitter ?? translate('none')}

-

- {translate('schedules', 'exclusion-calendar')}{spec - ?.excludeCalendar?.[0] ?? translate('none')} -

- {#if state?.limitedActions} -

- {translate('schedules', 'remaining-actions')}{state?.remainingActions ?? - translate('none')} -

- {/if} -

- {translate('schedules', 'overlap-policy')}{policies?.overlapPolicy ?? + {translate('schedules', 'remaining-actions')}{state?.remainingActions ?? translate('none')}

{/if} +

+ {translate('schedules', 'overlap-policy')}{policies?.overlapPolicy ?? + translate('none')} +

diff --git a/src/lib/holocene/radio-input/radio-input.svelte b/src/lib/holocene/radio-input/radio-input.svelte index 39ea6a3f1..78a582f7a 100644 --- a/src/lib/holocene/radio-input/radio-input.svelte +++ b/src/lib/holocene/radio-input/radio-input.svelte @@ -13,6 +13,7 @@ export let value: T; export let id: string; export let label: string; + export let description: string | undefined = undefined; export let labelHidden = false; let internalGroup: Writable = writable(value); @@ -39,17 +40,17 @@ {...$$restProps} /> - {label} + {#if description}{description}{/if}{label}