make all the timestamp local time and hovering shows UTC timestamp (#1164)
This commit is contained in:
@@ -20,7 +20,7 @@ import {
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
|
||||
import { basicTimeFormat } from "@/util/timeFormat";
|
||||
import { basicLocalTimeFormat, basicTimeFormat } from "@/util/timeFormat";
|
||||
import { cn } from "@/util/utils";
|
||||
import { Pencil2Icon, PlayIcon } from "@radix-ui/react-icons";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
@@ -147,8 +147,8 @@ function WorkflowPage() {
|
||||
<TableCell>
|
||||
<StatusBadge status={workflowRun.status} />
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
{basicTimeFormat(workflowRun.created_at)}
|
||||
<TableCell title={basicTimeFormat(workflowRun.created_at)}>
|
||||
{basicLocalTimeFormat(workflowRun.created_at)}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))
|
||||
|
||||
@@ -32,7 +32,11 @@ import { useApiCredential } from "@/hooks/useApiCredential";
|
||||
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
|
||||
import { copyText } from "@/util/copyText";
|
||||
import { apiBaseUrl, envCredential } from "@/util/env";
|
||||
import { basicTimeFormat, timeFormatWithShortDate } from "@/util/timeFormat";
|
||||
import {
|
||||
basicLocalTimeFormat,
|
||||
basicTimeFormat,
|
||||
timeFormatWithShortDate,
|
||||
} from "@/util/timeFormat";
|
||||
import { cn } from "@/util/utils";
|
||||
import {
|
||||
CopyIcon,
|
||||
@@ -468,8 +472,9 @@ function WorkflowRun() {
|
||||
onClick={(event) =>
|
||||
handleNavigate(event, task.task_id)
|
||||
}
|
||||
title={basicTimeFormat(task.created_at)}
|
||||
>
|
||||
{basicTimeFormat(task.created_at)}
|
||||
{basicLocalTimeFormat(task.created_at)}
|
||||
</TableCell>
|
||||
<TableCell className="w-1/12">
|
||||
<TaskActions task={task} />
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
|
||||
import { basicTimeFormat } from "@/util/timeFormat";
|
||||
import { basicLocalTimeFormat, basicTimeFormat } from "@/util/timeFormat";
|
||||
import { cn } from "@/util/utils";
|
||||
import {
|
||||
ExclamationTriangleIcon,
|
||||
@@ -241,8 +241,9 @@ function Workflows() {
|
||||
onClick={(event) => {
|
||||
handleRowClick(event, workflow.workflow_permanent_id);
|
||||
}}
|
||||
title={basicTimeFormat(workflow.created_at)}
|
||||
>
|
||||
{basicTimeFormat(workflow.created_at)}
|
||||
{basicLocalTimeFormat(workflow.created_at)}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<div className="flex justify-end gap-2">
|
||||
@@ -384,8 +385,11 @@ function Workflows() {
|
||||
<TableCell className="w-1/5">
|
||||
<StatusBadge status={workflowRun.status} />
|
||||
</TableCell>
|
||||
<TableCell className="w-1/5">
|
||||
{basicTimeFormat(workflowRun.created_at)}
|
||||
<TableCell
|
||||
className="w-1/5"
|
||||
title={basicTimeFormat(workflowRun.created_at)}
|
||||
>
|
||||
{basicLocalTimeFormat(workflowRun.created_at)}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { useWorkflowLastRunQuery } from "../hooks/useWorkflowLastRunQuery";
|
||||
import { basicTimeFormat } from "@/util/timeFormat";
|
||||
import { basicLocalTimeFormat, basicTimeFormat } from "@/util/timeFormat";
|
||||
|
||||
type Props = {
|
||||
workflowId: string;
|
||||
@@ -21,7 +21,11 @@ function LastRunAtTime({ workflowId }: Props) {
|
||||
return <span>N/A</span>;
|
||||
}
|
||||
|
||||
return <span>{basicTimeFormat(data.time)}</span>;
|
||||
return (
|
||||
<span title={basicTimeFormat(data.time)}>
|
||||
{basicLocalTimeFormat(data.time)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
export { LastRunAtTime };
|
||||
|
||||
Reference in New Issue
Block a user