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 { CreateServiceAccountDialog } from "./create-dialog";
|
||||
import { serviceAccountsStore } from "./store";
|
||||
import type { ServiceAccountsRouteParams } from "../../../../common/routes";
|
||||
import { KubeObjectAge } from "../../kube-object/age";
|
||||
|
||||
enum columnId {
|
||||
name = "name",
|
||||
@@ -35,7 +36,7 @@ export class ServiceAccounts extends React.Component<ServiceAccountsProps> {
|
||||
sortingCallbacks={{
|
||||
[columnId.name]: account => account.getName(),
|
||||
[columnId.namespace]: account => account.getNs(),
|
||||
[columnId.age]: account => account.getTimeDiffFromNow(),
|
||||
[columnId.age]: account => -account.getCreationTimestamp(),
|
||||
}}
|
||||
searchFilters={[
|
||||
account => account.getSearchFields(),
|
||||
@@ -51,7 +52,7 @@ export class ServiceAccounts extends React.Component<ServiceAccountsProps> {
|
||||
account.getName(),
|
||||
<KubeObjectStatusIcon key="icon" object={account} />,
|
||||
account.getNs(),
|
||||
account.getAge(),
|
||||
<KubeObjectAge key="age" object={account} />,
|
||||
]}
|
||||
addRemoveButtons={{
|
||||
onAdd: () => CreateServiceAccountDialog.open(),
|
||||
|
||||
Reference in new issue
Block a user