Fix all Age, LastSeen, and FirstSeen displays (#4990)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-03-17 15:17:03 -04:00
1 parent c9cab22558
commit b08daa811d
48 files changed
+458 -344

No files matched your search

@@ -82,6 +82,7 @@ const dummyReplicaSet: ReplicaSet = {
getName: jest.fn(),
getNs: jest.fn(),
getAge: jest.fn(),
getCreationTimestamp: jest.fn(),
getTimeDiffFromNow: jest.fn(),
getFinalizers: jest.fn(),
getLabels: jest.fn(),
@@ -13,6 +13,7 @@ import type { RouteComponentProps } from "react-router";
import { KubeObjectListLayout } from "../kube-object-list-layout";
import type { ReplicaSetsRouteParams } from "../../../common/routes";
import { eventStore } from "../+events/event.store";
import { KubeObjectAge } from "../kube-object/age";
enum columnId {
name = "name",
@@ -41,7 +42,7 @@ export class ReplicaSets extends React.Component<ReplicaSetsProps> {
[columnId.desired]: replicaSet => replicaSet.getDesired(),
[columnId.current]: replicaSet => replicaSet.getCurrent(),
[columnId.ready]: replicaSet => replicaSet.getReady(),
[columnId.age]: replicaSet => replicaSet.getTimeDiffFromNow(),
[columnId.age]: replicaSet => -replicaSet.getCreationTimestamp(),
}}
searchFilters={[
replicaSet => replicaSet.getSearchFields(),
@@ -63,7 +64,7 @@ export class ReplicaSets extends React.Component<ReplicaSetsProps> {
replicaSet.getDesired(),
replicaSet.getCurrent(),
replicaSet.getReady(),
replicaSet.getAge(),
<KubeObjectAge key="age" object={replicaSet} />,
]}
/>
);