Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix [Jobs] Schedule change tooltip in UTC #1570

Merged
merged 2 commits into from
Dec 28, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/ScheduleCron/ScheduleCron.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ScheduleCron = ({ cron, setCron }) => {
<>
<p>
Note: all times are interpreted in UTC timezone. <br />
The first weekday (0) is always <b>Monday</b>.
The first day of the week (0) is <b>Monday</b>, and not Sunday.
</p>
<Input
placeholder="10 * * * *"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
border-top: $secondaryBorder;

& [class*='table-cell-'] {
flex: 1 0 0;
flex: 0;
min-width: 70px;
width: 100%;
}
Expand Down
34 changes: 10 additions & 24 deletions src/elements/ScheduleRecurring/ScheduleRecurring.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,10 @@ import { selectOptions } from './scheduleRecurring.util'

import './scheduleRecurring.scss'

const ScheduleRecurring = ({
daysOfWeek,
handleDaysOfWeek,
recurringDispatch,
recurringState
}) => {
const ScheduleRecurring = ({ daysOfWeek, handleDaysOfWeek, recurringDispatch, recurringState }) => {
const {
scheduleRepeat: { activeOption: scheduleRepeatActiveOption, week },
scheduleRepeatEnd: {
activeOption: scheduleRepeatEndActiveOption,
occurrences,
date
}
scheduleRepeatEnd: { activeOption: scheduleRepeatEndActiveOption, occurrences, date }
} = recurringState

const handleScheduleRepeatChange = (value, activeOption) => {
Expand All @@ -61,10 +52,10 @@ const ScheduleRecurring = ({

return (
<div className="recurring-container">
<p>
Note: all times are interpreted in UTC timezone. <br />
The first weekday (0) is always <b>Monday</b>.
</p>
<p>
Note: all times are interpreted in UTC timezone. <br />
The first day of the week (0) is <b>Monday</b>, and not Sunday.
</p>
<div className="repeat_container">
<Select
density="chunky"
Expand All @@ -81,9 +72,7 @@ const ScheduleRecurring = ({
<div className="schedule-repeat schedule-repeat-week">
{daysOfWeek.map(day => (
<span
className={`schedule-repeat-week_day ${week.days.includes(
day.id
) && 'active'}`}
className={`schedule-repeat-week_day ${week.days.includes(day.id) && 'active'}`}
key={day.id}
onClick={() => handleDaysOfWeek(day.id)}
>
Expand All @@ -104,9 +93,7 @@ const ScheduleRecurring = ({
selectOptions[scheduleRepeatActiveOption].find(
option =>
option.id ===
recurringState.scheduleRepeat[
scheduleRepeatActiveOption
].toString()
recurringState.scheduleRepeat[scheduleRepeatActiveOption].toString()
)?.id
}
/>
Expand All @@ -123,9 +110,8 @@ const ScheduleRecurring = ({
</span>
{['day', 'month', 'week'].includes(scheduleRepeatActiveOption) && (
<TimePicker
value={
recurringState.scheduleRepeat[scheduleRepeatActiveOption].time
}
hideLabel
value={recurringState.scheduleRepeat[scheduleRepeatActiveOption].time}
onChange={value => {
recurringDispatch({
type:
Expand Down
5 changes: 3 additions & 2 deletions src/utils/createJobsContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license
under the Apache 2.0 license is conditioned upon your compliance with
such restriction.
*/

import { FUNCTIONS_PAGE, JOBS_PAGE, MONITOR_JOBS_TAB, MONITOR_WORKFLOWS_TAB } from '../constants'
import { formatDatetime } from './datetime'
import measureTime from './measureTime'
Expand Down Expand Up @@ -170,7 +171,7 @@ export const createJobsScheduleTabContent = jobs => {
header: 'Type',
id: `type.${identifierUnique}`,
value: job.type,
class: 'table-cell-1',
class: 'table-cell-small',
type: 'type'
},
{
Expand All @@ -185,7 +186,7 @@ export const createJobsScheduleTabContent = jobs => {
id: `schedule.${identifierUnique}`,
value: job.scheduled_object?.schedule || null,
class: 'table-cell-1',
tip: 'The first weekday (0) is always Monday.'
tip: 'The first day of the week (0) is Monday, and not Sunday.'
},
{
header: 'Labels',
Expand Down