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 { KubeObjectStatusIcon } from "../../kube-object-status-icon";
|
||||
import { AddRoleDialog } from "./add-dialog";
|
||||
import { rolesStore } from "./store";
|
||||
import type { RolesRouteParams } from "../../../../common/routes";
|
||||
import { KubeObjectAge } from "../../kube-object/age";
|
||||
|
||||
enum columnId {
|
||||
name = "name",
|
||||
@@ -36,7 +37,7 @@ export class Roles extends React.Component<RolesProps> {
|
||||
sortingCallbacks={{
|
||||
[columnId.name]: role => role.getName(),
|
||||
[columnId.namespace]: role => role.getNs(),
|
||||
[columnId.age]: role => role.getTimeDiffFromNow(),
|
||||
[columnId.age]: role => -role.getCreationTimestamp(),
|
||||
}}
|
||||
searchFilters={[
|
||||
role => role.getSearchFields(),
|
||||
@@ -52,7 +53,7 @@ export class Roles extends React.Component<RolesProps> {
|
||||
role.getName(),
|
||||
<KubeObjectStatusIcon key="icon" object={role} />,
|
||||
role.getNs(),
|
||||
role.getAge(),
|
||||
<KubeObjectAge key="age" object={role} />,
|
||||
]}
|
||||
addRemoveButtons={{
|
||||
onAdd: () => AddRoleDialog.open(),
|
||||
|
||||
Reference in new issue
Block a user