mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Revert 2844 (#2980)
* Revert "review comments" This reverts commit97f2ecd88d. * Revert "Switch to I, remove type parameter default" This reverts commita3073cc99b. * Revert "Improve Table typing and remove annotations on callbacks" This reverts commitdefb0ea0dd.
This commit is contained in:
1 parent
97f2ecd88d
commit
60a19143b4
55 files changed
+471
-479
No files matched your search
@@ -24,6 +24,7 @@ import "./network-policies.scss";
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { RouteComponentProps } from "react-router-dom";
|
||||
import type { NetworkPolicy } from "../../api/endpoints/network-policy.api";
|
||||
import { KubeObjectListLayout } from "../kube-object";
|
||||
import type { INetworkPoliciesRouteParams } from "./network-policies.route";
|
||||
import { networkPolicyStore } from "./network-policy.store";
|
||||
@@ -48,12 +49,12 @@ export class NetworkPolicies extends React.Component<Props> {
|
||||
tableId="network_policies"
|
||||
className="NetworkPolicies" store={networkPolicyStore}
|
||||
sortingCallbacks={{
|
||||
[columnId.name]: item => item.getName(),
|
||||
[columnId.namespace]: item => item.getNs(),
|
||||
[columnId.age]: item => item.getTimeDiffFromNow(),
|
||||
[columnId.name]: (item: NetworkPolicy) => item.getName(),
|
||||
[columnId.namespace]: (item: NetworkPolicy) => item.getNs(),
|
||||
[columnId.age]: (item: NetworkPolicy) => item.getTimeDiffFromNow(),
|
||||
}}
|
||||
searchFilters={[
|
||||
item => item.getSearchFields(),
|
||||
(item: NetworkPolicy) => item.getSearchFields(),
|
||||
]}
|
||||
renderHeaderTitle="Network Policies"
|
||||
renderTableHeader={[
|
||||
@@ -63,7 +64,7 @@ export class NetworkPolicies extends React.Component<Props> {
|
||||
{ title: "Policy Types", className: "type", id: columnId.types },
|
||||
{ title: "Age", className: "age", sortBy: columnId.age, id: columnId.age },
|
||||
]}
|
||||
renderTableContents={item => [
|
||||
renderTableContents={(item: NetworkPolicy) => [
|
||||
item.getName(),
|
||||
<KubeObjectStatusIcon key="icon" object={item} />,
|
||||
item.getNs(),
|
||||
|
||||
Reference in new issue
Block a user