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
@@ -12,6 +12,7 @@ import type { PodDisruptionBudget } from "../../../common/k8s-api/endpoints/podd
|
||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
||||
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||
import { KubeObjectAge } from "../kube-object/age";
|
||||
|
||||
enum columnId {
|
||||
name = "name",
|
||||
@@ -42,7 +43,7 @@ export class PodDisruptionBudgets extends React.Component<PodDisruptionBudgetsPr
|
||||
[columnId.maxUnavailable]: pdb => pdb.getMaxUnavailable(),
|
||||
[columnId.currentHealthy]: pdb => pdb.getCurrentHealthy(),
|
||||
[columnId.desiredHealthy]: pdb => pdb.getDesiredHealthy(),
|
||||
[columnId.age]: pdb => pdb.getAge(),
|
||||
[columnId.age]: pdb => -pdb.getCreationTimestamp(),
|
||||
}}
|
||||
searchFilters={[
|
||||
pdb => pdb.getSearchFields(),
|
||||
@@ -58,18 +59,16 @@ export class PodDisruptionBudgets extends React.Component<PodDisruptionBudgetsPr
|
||||
{ title: "Desired Healthy", className: "desired-healthy", sortBy: columnId.desiredHealthy, id: columnId.desiredHealthy },
|
||||
{ title: "Age", className: "age", sortBy: columnId.age, id: columnId.age },
|
||||
]}
|
||||
renderTableContents={pdb => {
|
||||
return [
|
||||
pdb.getName(),
|
||||
<KubeObjectStatusIcon key="icon" object={pdb} />,
|
||||
pdb.getNs(),
|
||||
pdb.getMinAvailable(),
|
||||
pdb.getMaxUnavailable(),
|
||||
pdb.getCurrentHealthy(),
|
||||
pdb.getDesiredHealthy(),
|
||||
pdb.getAge(),
|
||||
];
|
||||
}}
|
||||
renderTableContents={pdb => [
|
||||
pdb.getName(),
|
||||
<KubeObjectStatusIcon key="icon" object={pdb} />,
|
||||
pdb.getNs(),
|
||||
pdb.getMinAvailable(),
|
||||
pdb.getMaxUnavailable(),
|
||||
pdb.getCurrentHealthy(),
|
||||
pdb.getDesiredHealthy(),
|
||||
<KubeObjectAge key="age" object={pdb} />,
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user