From b4a8b0f780b4e34b5687134ad1d0699c7bcafc50 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Thu, 29 Feb 2024 14:11:56 +0200 Subject: [PATCH] feat: application environment ordered and timeago min time (#6374) --- frontend/src/component/application/ApplicationChart.tsx | 1 + .../src/component/application/ApplicationOverview.test.tsx | 2 +- src/lib/db/client-applications-store.ts | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/component/application/ApplicationChart.tsx b/frontend/src/component/application/ApplicationChart.tsx index ea0f69fd84..3223951dfc 100644 --- a/frontend/src/component/application/ApplicationChart.tsx +++ b/frontend/src/component/application/ApplicationChart.tsx @@ -293,6 +293,7 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => { Last seen: { await screen.findByText('development environment'); await screen.findByText('999'); await screen.findByText('unleash-client-node:5.5.0-beta.0'); - await screen.findByText('1 second ago'); + await screen.findByText('0 seconds ago'); }); test('Display application overview without environments', async () => { diff --git a/src/lib/db/client-applications-store.ts b/src/lib/db/client-applications-store.ts index 129810c476..7b705ed935 100644 --- a/src/lib/db/client-applications-store.ts +++ b/src/lib/db/client-applications-store.ts @@ -312,7 +312,8 @@ export default class ClientApplicationsStore 'cme.environment', ); }) - .where('a.app_name', appName); + .where('a.app_name', appName) + .orderBy('cme.environment', 'asc'); const rows = await query; if (!rows.length) { throw new NotFoundError(`Could not find appName=${appName}`);