Skip to content

Commit 4c23932

Browse files
authored
Merge pull request #4669 from greedy-wudpeckr/filter-fix
frontend: ObjectEventList: Fix age column sorting
2 parents 5808125 + 6d61651 commit 4c23932

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

frontend/src/components/common/ObjectEventList.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ export default function ObjectEventList(props: ObjectEventListProps) {
9090
{
9191
label: t('Age'),
9292
getter: item => {
93-
if (item.count > 1) {
94-
return `${timeAgo(item.lastOccurrence)} (${item.count} times over ${timeAgo(
95-
item.firstOccurrence
96-
)})`;
97-
}
9893
const eventDate = timeAgo(item.lastOccurrence, { format: 'mini' });
9994
let label: string;
10095
if (item.count > 1) {
@@ -115,8 +110,7 @@ export default function ObjectEventList(props: ObjectEventListProps) {
115110
/>
116111
);
117112
},
118-
sort: (n1: KubeEvent, n2: KubeEvent) =>
119-
new Date(n2.lastTimestamp).getTime() - new Date(n1.lastTimestamp).getTime(),
113+
sort: (item: Event) => -new Date(item.lastOccurrence).getTime(),
120114
},
121115
]}
122116
data={events}

0 commit comments

Comments
 (0)