Skip to content

Commit

Permalink
feat: application environment ordered and timeago min time (#6374)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Feb 29, 2024
1 parent 2bf11b2 commit b4a8b0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/src/component/application/ApplicationChart.tsx
Expand Up @@ -293,6 +293,7 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
<StyledCell>Last seen:</StyledCell>
<StyledCell>
<TimeAgo
minPeriod={60}
date={
new Date(
environment.lastSeen,
Expand Down
Expand Up @@ -47,7 +47,7 @@ test('Display application overview with environments', async () => {
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 () => {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/db/client-applications-store.ts
Expand Up @@ -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}`);
Expand Down

0 comments on commit b4a8b0f

Please sign in to comment.