Skip to content

Commit

Permalink
Merge branch 'master' into fix/server/optional-utt-reference-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Snarr authored Dec 4, 2024
2 parents e08136e + 935f7cd commit cb709e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const WfRunsHeader: FC<Props> = ({ spec, currentStatus, currentWindow, se
<div className="relative">
<ListboxButton className="flex items-center gap-2 rounded-lg border-2 px-2 py-1 text-xs">
<ClockIcon className="h-5 w-5 fill-none stroke-black" />
Last {TIME_RANGES_NAMES[currentWindow]}
{currentWindow !== -1 ? `Last ${TIME_RANGES_NAMES[currentWindow]}` : TIME_RANGES_NAMES[currentWindow]}
</ListboxButton>
<ListboxOptions className="absolute mt-1 w-[120px] rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none sm:text-sm">
{TIME_RANGES.map(time => (
Expand All @@ -40,7 +40,7 @@ export const WfRunsHeader: FC<Props> = ({ spec, currentStatus, currentWindow, se
}`
}
>
Last {TIME_RANGES_NAMES[time]}
{time !== -1 ? `Last ${TIME_RANGES_NAMES[time]}` : TIME_RANGES_NAMES[time]}
</Listbox.Option>
))}
</ListboxOptions>
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/app/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const TIME_RANGES = [-1, 5, 15, 30, 60, 180, 360, 720, 1440, 4320] as con
export type TimeRange = (typeof TIME_RANGES)[number]

export const TIME_RANGES_NAMES: { [key in TimeRange]: string } = {
[-1]: '4.543 billion years',
[-1]: 'All time',
5: '5 minutes',
15: '15 minutes',
30: '30 minutes',
Expand Down

0 comments on commit cb709e8

Please sign in to comment.