From 69d192d989afaa41c3be9a0d2e5b5cd04dcd7e66 Mon Sep 17 00:00:00 2001 From: Ali BARIN Date: Tue, 2 May 2023 09:30:41 +0000 Subject: [PATCH] feat: sort executions by updated at --- packages/backend/src/graphql/queries/get-executions.ts | 2 +- packages/web/src/components/ExecutionRow/index.tsx | 8 ++++---- packages/web/src/locales/en.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/graphql/queries/get-executions.ts b/packages/backend/src/graphql/queries/get-executions.ts index 109c1481..ee261f1b 100644 --- a/packages/backend/src/graphql/queries/get-executions.ts +++ b/packages/backend/src/graphql/queries/get-executions.ts @@ -32,7 +32,7 @@ const getExecutions = async ( }, }) .groupBy('executions.id') - .orderBy('created_at', 'desc'); + .orderBy('updated_at', 'desc'); return paginate(executions, params.limit, params.offset); }; diff --git a/packages/web/src/components/ExecutionRow/index.tsx b/packages/web/src/components/ExecutionRow/index.tsx index 114162cd..1baa49a3 100644 --- a/packages/web/src/components/ExecutionRow/index.tsx +++ b/packages/web/src/components/ExecutionRow/index.tsx @@ -23,8 +23,8 @@ export default function ExecutionRow( const { execution } = props; const { flow } = execution; - const createdAt = DateTime.fromMillis(parseInt(execution.createdAt, 10)); - const relativeCreatedAt = createdAt.toRelative(); + const updatedAt = DateTime.fromMillis(parseInt(execution.updatedAt, 10)); + const relativeUpdatedAt = updatedAt.toRelative(); return ( @@ -41,8 +41,8 @@ export default function ExecutionRow( - {formatMessage('execution.executedAt', { - datetime: relativeCreatedAt, + {formatMessage('execution.updatedAt', { + datetime: relativeUpdatedAt, })} diff --git a/packages/web/src/locales/en.json b/packages/web/src/locales/en.json index e9804974..bf5973a8 100644 --- a/packages/web/src/locales/en.json +++ b/packages/web/src/locales/en.json @@ -77,7 +77,7 @@ "flowEditor.goBack": "Go back to flows", "executions.title": "Executions", "executions.noExecutions": "There is no execution data point to show.", - "execution.executedAt": "executed {datetime}", + "execution.updatedAt": "updated {datetime}", "execution.test": "Test run", "execution.statusSuccess": "Success", "execution.statusFailure": "Failure",