Skip to content

Commit

Permalink
Merge branch 'main' into gitar_integrationEvents_true
Browse files Browse the repository at this point in the history
  • Loading branch information
daveleek committed Aug 21, 2024
2 parents acc5f97 + 48423fa commit df69b2e
Show file tree
Hide file tree
Showing 58 changed files with 893 additions and 1,479 deletions.
10 changes: 5 additions & 5 deletions docker/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -669,13 +669,13 @@ __metadata:
linkType: hard

"axios@npm:^1.6.5":
version: 1.6.8
resolution: "axios@npm:1.6.8"
version: 1.7.4
resolution: "axios@npm:1.7.4"
dependencies:
follow-redirects: "npm:^1.15.6"
form-data: "npm:^4.0.0"
proxy-from-env: "npm:^1.1.0"
checksum: 10c0/0f22da6f490335479a89878bc7d5a1419484fbb437b564a80c34888fc36759ae4f56ea28d55a191695e5ed327f0bad56e7ff60fb6770c14d1be6501505d47ab9
checksum: 10c0/5ea1a93140ca1d49db25ef8e1bd8cfc59da6f9220159a944168860ad15a2743ea21c5df2967795acb15cbe81362f5b157fdebbea39d53117ca27658bab9f7f17
languageName: node
linkType: hard

Expand Down Expand Up @@ -4917,7 +4917,7 @@ __metadata:

"unleash-server@file:../build::locator=unleash-docker%40workspace%3A.":
version: 6.0.4+main
resolution: "unleash-server@file:../build#../build::hash=ac980c&locator=unleash-docker%40workspace%3A."
resolution: "unleash-server@file:../build#../build::hash=46341b&locator=unleash-docker%40workspace%3A."
dependencies:
"@slack/web-api": "npm:^6.10.0"
"@wesleytodd/openapi": "npm:^0.3.0"
Expand Down Expand Up @@ -4980,7 +4980,7 @@ __metadata:
type-is: "npm:^1.6.18"
unleash-client: "npm:5.5.5"
uuid: "npm:^9.0.0"
checksum: 10c0/4fa1ad68c7db48a1acdb8bf5755f4654bad3b995075616427ecd7cb86a2887028f80c0140542048edbbab81930d9019aa98d0359e38b5fa907455ce5a761e333
checksum: 10c0/ce1aac9e6d9d81026b5f9e797bbef2e170606e991ab9c4498933ea1ae8a4fcac36a9db8c067ab4a02ac5c91c730d5fcb75c4deb91ead402ffaf7e6ddaa61e205
languageName: node
linkType: hard

Expand Down
16 changes: 4 additions & 12 deletions frontend/src/component/application/ApplicationChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import CheckCircle from '@mui/icons-material/CheckCircle';
import CloudCircle from '@mui/icons-material/CloudCircle';
import Flag from '@mui/icons-material/Flag';
import WarningAmberRounded from '@mui/icons-material/WarningAmberRounded';
import TimeAgo from 'react-timeago';
import { TimeAgo } from 'component/common/TimeAgo/TimeAgo';
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
import { getApplicationIssues } from './ApplicationIssues/ApplicationIssues';

Expand Down Expand Up @@ -305,17 +305,9 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
<tr>
<StyledCell>Last seen:</StyledCell>
<StyledCell>
{environment.lastSeen && (
<TimeAgo
key={`${environment.lastSeen}`}
minPeriod={60}
date={
new Date(
environment.lastSeen,
)
}
/>
)}
<TimeAgo
date={environment.lastSeen}
/>
</StyledCell>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ const setupApi = (application: ApplicationOverviewSchema) => {
'/api/admin/metrics/applications/my-app/overview',
application,
);
testServerRoute(server, '/api/admin/ui-config', {});
testServerRoute(server, '/api/admin/ui-config', {
flags: {
timeAgoRefactor: true,
},
});
};

test('Display application overview with environments', async () => {
Expand Down Expand Up @@ -51,7 +55,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('0 seconds ago');
await screen.findByText('< 1 minute ago');
});

test('Display application overview without environments', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { VFC } from 'react';
import TimeAgo from 'react-timeago';
import type { FC } from 'react';
import { TimeAgo } from 'component/common/TimeAgo/TimeAgo';
import { Tooltip, Typography, useTheme } from '@mui/material';
import { formatDateYMD } from 'utils/formatDate';
import { TextCell } from 'component/common/Table/cells/TextCell/TextCell';
Expand All @@ -9,7 +9,7 @@ interface IFeatureArchivedCellProps {
value?: string | Date | null;
}

export const FeatureArchivedCell: VFC<IFeatureArchivedCellProps> = ({
export const FeatureArchivedCell: FC<IFeatureArchivedCellProps> = ({
value: archivedAt,
}) => {
const { locationSettings } = useLocationSettings();
Expand Down Expand Up @@ -37,12 +37,7 @@ export const FeatureArchivedCell: VFC<IFeatureArchivedCellProps> = ({
arrow
>
<Typography noWrap variant='body2' data-loading>
<TimeAgo
key={`${archivedAt}`}
date={new Date(archivedAt)}
title=''
live={false}
/>
<TimeAgo date={new Date(archivedAt)} refresh={false} />
</Typography>
</Tooltip>
</TextCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { FC } from 'react';
import { Markdown } from 'component/common/Markdown/Markdown';
import Paper from '@mui/material/Paper';
import { Box, styled, Typography } from '@mui/material';
import TimeAgo from 'react-timeago';
import { TimeAgo } from 'component/common/TimeAgo/TimeAgo';
import { StyledAvatar } from './StyledAvatar';
import type { IChangeRequestComment } from '../../changeRequest.types';

Expand Down Expand Up @@ -35,12 +35,7 @@ export const ChangeRequestComment: FC<{ comment: IChangeRequestComment }> = ({
<Box>
<strong>{comment.createdBy.username}</strong>{' '}
<Typography color='text.secondary' component='span'>
commented{' '}
<TimeAgo
key={`${comment.createdAt}`}
minPeriod={60}
date={new Date(comment.createdAt)}
/>
commented <TimeAgo date={comment.createdAt} />
</Typography>
</Box>
</CommentHeader>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box } from '@mui/material';
import { type FC, useState } from 'react';
import { Typography, Tooltip } from '@mui/material';
import TimeAgo from 'react-timeago';
import { TimeAgo } from 'component/common/TimeAgo/TimeAgo';
import type { ChangeRequestType } from 'component/changeRequest/changeRequest.types';
import { ChangeRequestStatusBadge } from 'component/changeRequest/ChangeRequestStatusBadge/ChangeRequestStatusBadge';
import {
Expand Down Expand Up @@ -38,13 +38,7 @@ export const ChangeRequestHeader: FC<{ changeRequest: ChangeRequestType }> = ({
margin: theme.spacing('auto', 0, 'auto', 2),
})}
>
Created{' '}
<TimeAgo
key={`${changeRequest.createdAt}`}
minPeriod={60}
date={new Date(changeRequest.createdAt)}
/>{' '}
by
Created <TimeAgo date={changeRequest.createdAt} /> by
</Typography>
<Box
sx={(theme) => ({
Expand Down
8 changes: 2 additions & 6 deletions frontend/src/component/common/Notifications/Notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
NotificationsSchemaItemNotificationType,
} from 'openapi';
import { ReactComponent as ChangesAppliedIcon } from 'assets/icons/merge.svg';
import TimeAgo from 'react-timeago';
import { TimeAgo } from 'component/common/TimeAgo/TimeAgo';
import ToggleOffOutlined from '@mui/icons-material/ToggleOffOutlined';
import { flexRow } from 'themes/themeStyles';

Expand Down Expand Up @@ -157,11 +157,7 @@ export const Notification = ({
</StyledUserContainer>

<StyledTimeAgoTypography>
<TimeAgo
key={`${notification.createdAt}`}
date={new Date(notification.createdAt)}
minPeriod={60}
/>
<TimeAgo date={notification.createdAt} />
</StyledTimeAgoTypography>
</StyledSecondaryInfoBox>
</StyledNotificationMessageBox>
Expand Down

This file was deleted.

Loading

0 comments on commit df69b2e

Please sign in to comment.