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 "./secrets.scss";
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { RouteComponentProps } from "react-router";
|
||||
import type { Secret } from "../../api/endpoints";
|
||||
import { AddSecretDialog } from "./add-secret-dialog";
|
||||
import type { ISecretsRouteParams } from "./secrets.route";
|
||||
import { KubeObjectListLayout } from "../kube-object";
|
||||
@@ -53,16 +54,16 @@ export class Secrets extends React.Component<Props> {
|
||||
tableId="configuration_secrets"
|
||||
className="Secrets" store={secretsStore}
|
||||
sortingCallbacks={{
|
||||
[columnId.name]: item => item.getName(),
|
||||
[columnId.namespace]: item => item.getNs(),
|
||||
[columnId.labels]: item => item.getLabels(),
|
||||
[columnId.keys]: item => item.getKeys(),
|
||||
[columnId.type]: item => item.type,
|
||||
[columnId.age]: item => item.getTimeDiffFromNow(),
|
||||
[columnId.name]: (item: Secret) => item.getName(),
|
||||
[columnId.namespace]: (item: Secret) => item.getNs(),
|
||||
[columnId.labels]: (item: Secret) => item.getLabels(),
|
||||
[columnId.keys]: (item: Secret) => item.getKeys(),
|
||||
[columnId.type]: (item: Secret) => item.type,
|
||||
[columnId.age]: (item: Secret) => item.getTimeDiffFromNow(),
|
||||
}}
|
||||
searchFilters={[
|
||||
item => item.getSearchFields(),
|
||||
item => item.getKeys(),
|
||||
(item: Secret) => item.getSearchFields(),
|
||||
(item: Secret) => item.getKeys(),
|
||||
]}
|
||||
renderHeaderTitle="Secrets"
|
||||
renderTableHeader={[
|
||||
@@ -74,7 +75,7 @@ export class Secrets extends React.Component<Props> {
|
||||
{ title: "Type", className: "type", sortBy: columnId.type, id: columnId.type },
|
||||
{ title: "Age", className: "age", sortBy: columnId.age, id: columnId.age },
|
||||
]}
|
||||
renderTableContents={secret => [
|
||||
renderTableContents={(secret: Secret) => [
|
||||
secret.getName(),
|
||||
<KubeObjectStatusIcon key="icon" object={secret} />,
|
||||
secret.getNs(),
|
||||
|
||||
Reference in new issue
Block a user