Skip to content

Commit

Permalink
Fix [Jobs] Schedule change tooltip in UTC 1.2.1 (#1571)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan7empest committed Dec 28, 2022
1 parent bcffb6a commit 9a62f89
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/components/ScheduleCron/ScheduleCron.js
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
6 changes: 1 addition & 5 deletions src/components/Table/table.scss
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 Expand Up @@ -41,10 +41,6 @@
&-small {
max-width: 150px;
}

&-medium {
max-width: 250px;
}
}

&__content {
Expand Down
27 changes: 6 additions & 21 deletions src/elements/ScheduleRecurring/ScheduleRecurring.js
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 @@ -63,7 +54,7 @@ const ScheduleRecurring = ({
<div className="recurring-container">
<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>
<div className="repeat_container">
<Select
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 @@ -124,9 +111,7 @@ const ScheduleRecurring = ({
{['day', 'month', 'week'].includes(scheduleRepeatActiveOption) && (
<TimePicker
hideLabel
value={
recurringState.scheduleRepeat[scheduleRepeatActiveOption].time
}
value={recurringState.scheduleRepeat[scheduleRepeatActiveOption].time}
onChange={value => {
recurringDispatch({
type:
Expand Down
5 changes: 3 additions & 2 deletions src/utils/createJobsContent.js
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

0 comments on commit 9a62f89

Please sign in to comment.