mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Improve Table typing and remove annotations on callbacks
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
22c9d03edb
commit
defb0ea0dd
55 files changed
+498
-490
No files matched your search
@@ -64,15 +64,15 @@ export class HorizontalPodAutoscalers extends React.Component<Props> {
|
||||
tableId="configuration_hpa"
|
||||
className="HorizontalPodAutoscalers" store={hpaStore}
|
||||
sortingCallbacks={{
|
||||
[columnId.name]: (item: HorizontalPodAutoscaler) => item.getName(),
|
||||
[columnId.namespace]: (item: HorizontalPodAutoscaler) => item.getNs(),
|
||||
[columnId.minPods]: (item: HorizontalPodAutoscaler) => item.getMinPods(),
|
||||
[columnId.maxPods]: (item: HorizontalPodAutoscaler) => item.getMaxPods(),
|
||||
[columnId.replicas]: (item: HorizontalPodAutoscaler) => item.getReplicas(),
|
||||
[columnId.age]: (item: HorizontalPodAutoscaler) => item.getTimeDiffFromNow(),
|
||||
[columnId.name]: item => item.getName(),
|
||||
[columnId.namespace]: item => item.getNs(),
|
||||
[columnId.minPods]: item => item.getMinPods(),
|
||||
[columnId.maxPods]: item => item.getMaxPods(),
|
||||
[columnId.replicas]: item => item.getReplicas(),
|
||||
[columnId.age]: item => item.getTimeDiffFromNow(),
|
||||
}}
|
||||
searchFilters={[
|
||||
(item: HorizontalPodAutoscaler) => item.getSearchFields()
|
||||
item => item.getSearchFields()
|
||||
]}
|
||||
renderHeaderTitle="Horizontal Pod Autoscalers"
|
||||
renderTableHeader={[
|
||||
@@ -86,7 +86,7 @@ export class HorizontalPodAutoscalers extends React.Component<Props> {
|
||||
{ title: "Age", className: "age", sortBy: columnId.age, id: columnId.age },
|
||||
{ title: "Status", className: "status", id: columnId.status },
|
||||
]}
|
||||
renderTableContents={(hpa: HorizontalPodAutoscaler) => [
|
||||
renderTableContents={hpa => [
|
||||
hpa.getName(),
|
||||
<KubeObjectStatusIcon key="icon" object={hpa} />,
|
||||
hpa.getNs(),
|
||||
|
||||
Reference in new issue
Block a user