Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
export let months: string[];
export let hour: string;
export let minute: string;
export let timezoneName: string;
</script>

<div class="flex flex-col gap-4">
Expand All @@ -23,5 +24,5 @@
<DayOfMonthPicker bind:daysOfMonth />
</div>
<MonthPicker bind:months />
<SchedulesTimeView bind:hour bind:minute />
<SchedulesTimeView bind:hour bind:minute {timezoneName} />
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
export let daysOfWeek: string[];
export let hour: string;
export let minute: string;
export let timezoneName: string;
</script>

<div class="flex flex-col gap-4">
Expand All @@ -19,5 +20,5 @@
</p>
<DayOfWeekPicker bind:daysOfWeek />
</div>
<SchedulesTimeView bind:hour bind:minute />
<SchedulesTimeView bind:hour bind:minute {timezoneName} />
</div>
2 changes: 2 additions & 0 deletions src/lib/components/schedule/schedule-form-view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
let second = '';
let phase = '';
let cronString = '';
let timezoneName = schedule?.spec?.timezoneName ?? 'UTC';

const decodedSearchAttributes = decodePayloadAttributes({ searchAttributes });
const decodedWorkflowSearchAttributes = decodePayloadAttributes({
Expand Down Expand Up @@ -256,6 +257,7 @@
bind:second
bind:phase
bind:cronString
{timezoneName}
>
<SchedulesSearchAttributesInputs
bind:searchAttributesInput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
export let second: string;
export let phase: string;
export let cronString: string;
export let timezoneName: string;

const clearSchedule = () => {
daysOfWeek = [];
Expand Down Expand Up @@ -106,14 +107,20 @@
/>
</TabPanel>
<TabPanel id="daily-panel" tabId="daily-tab">
<ScheduleDayOfWeekView bind:daysOfWeek bind:hour bind:minute />
<ScheduleDayOfWeekView
bind:daysOfWeek
bind:hour
bind:minute
{timezoneName}
/>
</TabPanel>
<TabPanel id="monthly-panel" tabId="monthly-tab">
<ScheduleDayOfMonthView
bind:daysOfMonth
bind:months
bind:hour
bind:minute
{timezoneName}
/>
</TabPanel>
<TabPanel
Expand Down
10 changes: 8 additions & 2 deletions src/lib/components/schedule/schedules-time-view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

export let hour = '';
export let minute = '';
export let timezoneName: string;

$: timezoneHint =
timezoneName.toLowerCase() === 'utc'
? 'Universal Standard Time (UTC)'
: timezoneName;
</script>

<div class="flex flex-col gap-4">
Expand All @@ -13,7 +19,7 @@
{translate('schedules.time-view-heading')}
</h3>
<p class="text-secondary">
{translate('schedules.time-view-description')}
{translate('schedules.time-view-description', { timezoneName })}
</p>

<TimePicker
Expand All @@ -27,7 +33,7 @@
<div class="flex w-full flex-row items-center gap-2">
<Icon name="clock" aria-hidden="true" />
<span class="text-xs font-normal text-slate-500"
>{translate('common.based-on-time-preface')} Universal Standard Time (UTC)
>{translate('common.based-on-time-preface')} {timezoneHint}
</span>
</div>
</div>
2 changes: 1 addition & 1 deletion src/lib/i18n/locales/en/schedules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const Strings = {
'Select the day(s) of the week this schedule will always run on.',
'time-view-heading': 'Time',
'time-view-description':
'Specify the time (UTC) for this schedule to run. By default, the schedule will run at 00:00 UTC if left blank.',
'Specify the time ({{- timezoneName}}) for this schedule to run. By default, the schedule will run at 00:00 {{- timezoneName}} if left blank.',
'interval-view-heading': 'Recurring Time',
'interval-view-description':
'Specify the time interval for this schedule to run (for example every 5 minutes).',
Expand Down
Loading