mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix all Age, LastSeen, and FirstSeen displays (#4990)
This commit is contained in:
1 parent
c9cab22558
commit
b08daa811d
48 files changed
+458
-344
No files matched your search
@@ -13,6 +13,7 @@ import { Badge } from "../badge";
|
||||
import { serviceStore } from "./services.store";
|
||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||
import type { ServicesRouteParams } from "../../../common/routes";
|
||||
import { KubeObjectAge } from "../kube-object/age";
|
||||
|
||||
enum columnId {
|
||||
name = "name",
|
||||
@@ -44,7 +45,7 @@ export class Services extends React.Component<ServicesProps> {
|
||||
[columnId.ports]: service => (service.spec.ports || []).map(({ port }) => port)[0],
|
||||
[columnId.clusterIp]: service => service.getClusterIp(),
|
||||
[columnId.type]: service => service.getType(),
|
||||
[columnId.age]: service => service.getTimeDiffFromNow(),
|
||||
[columnId.age]: service => -service.getCreationTimestamp(),
|
||||
[columnId.status]: service => service.getStatus(),
|
||||
}}
|
||||
searchFilters={[
|
||||
@@ -81,7 +82,7 @@ export class Services extends React.Component<ServicesProps> {
|
||||
service.getPorts().join(", "),
|
||||
externalIps.join(", ") || "-",
|
||||
service.getSelector().map(label => <Badge key={label} label={label} />),
|
||||
service.getAge(),
|
||||
<KubeObjectAge key="age" object={service} />,
|
||||
{ title: service.getStatus(), className: service.getStatus().toLowerCase() },
|
||||
];
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user