From 935f7cd5a7187fdf176c631bc64c56f681470d7f Mon Sep 17 00:00:00 2001 From: "Bryson G." <114206517+bryson-g@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:47:20 -0800 Subject: [PATCH] refactor(dashboard): professional all time display (#1181) Co-authored-by: Hazim Arafa --- .../(diagram)/wfSpec/[...props]/components/WfRunsHeader.tsx | 4 ++-- dashboard/src/app/constants.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/src/app/[tenantId]/(diagram)/wfSpec/[...props]/components/WfRunsHeader.tsx b/dashboard/src/app/[tenantId]/(diagram)/wfSpec/[...props]/components/WfRunsHeader.tsx index dba18d8eb..1c4eabe56 100644 --- a/dashboard/src/app/[tenantId]/(diagram)/wfSpec/[...props]/components/WfRunsHeader.tsx +++ b/dashboard/src/app/[tenantId]/(diagram)/wfSpec/[...props]/components/WfRunsHeader.tsx @@ -27,7 +27,7 @@ export const WfRunsHeader: FC = ({ spec, currentStatus, currentWindow, se
- Last {TIME_RANGES_NAMES[currentWindow]} + {currentWindow !== -1 ? `Last ${TIME_RANGES_NAMES[currentWindow]}` : TIME_RANGES_NAMES[currentWindow]} {TIME_RANGES.map(time => ( @@ -40,7 +40,7 @@ export const WfRunsHeader: FC = ({ spec, currentStatus, currentWindow, se }` } > - Last {TIME_RANGES_NAMES[time]} + {time !== -1 ? `Last ${TIME_RANGES_NAMES[time]}` : TIME_RANGES_NAMES[time]} ))} diff --git a/dashboard/src/app/constants.ts b/dashboard/src/app/constants.ts index 51b700f1b..e726bac53 100644 --- a/dashboard/src/app/constants.ts +++ b/dashboard/src/app/constants.ts @@ -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',