1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Remove namespace and labels columns

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2023-04-07 10:56:02 +03:00
parent 02e24735b8
commit a308320dd6

View File

@ -10,15 +10,11 @@ import { SiblingsInTabLayout } from "../layout/siblings-in-tab-layout";
import type { MutatingWebhookConfigurationStore } from "./mutating-webhook-configuration-store";
import { withInjectables } from "@ogre-tools/injectable-react";
import mutatingWebhookConfigurationsStoreInjectable from "./mutating-webhook-configuration-store.injectable";
import { NamespaceSelectBadge } from "../+namespaces/namespace-select-badge";
import { Badge } from "../badge";
import { KubeObjectAge } from "../kube-object/age";
enum columnId {
name = "name",
namespace = "namespace",
webhooks = "webhooks",
selector = "selector",
age = "age",
}
@ -36,8 +32,6 @@ const NonInjectedMutatingWebhookConfigurations = observer((props: Dependencies)
store={props.store}
sortingCallbacks={{
[columnId.name]: item => item.getName(),
[columnId.namespace]: item => item.getNs(),
[columnId.selector]: item => item.getLabels(),
[columnId.webhooks]: item => item.getWebhooks().length,
[columnId.age]: item => -item.getCreationTimestamp(),
}}
@ -48,17 +42,6 @@ const NonInjectedMutatingWebhookConfigurations = observer((props: Dependencies)
renderHeaderTitle="Mutating Webhook Configurations"
renderTableHeader={[
{ title: "Name", className: "name", sortBy: columnId.name, id: columnId.name },
{
title: "Namespace",
className: "namespace",
sortBy: columnId.namespace,
id: columnId.namespace,
},
{
title: "Labels",
sortBy: columnId.selector,
id: columnId.selector,
},
{
title: "Webhooks",
sortBy: columnId.webhooks,
@ -68,8 +51,6 @@ const NonInjectedMutatingWebhookConfigurations = observer((props: Dependencies)
]}
renderTableContents={item => [
item.getName(),
<NamespaceSelectBadge key="namespace" namespace={item.getNs()} />,
item.getLabels().map(label => (<Badge key={label} label={label} />)),
item.getWebhooks().length,
<KubeObjectAge key="age" object={item} />,
]}