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

Fix spelling error and change LocalRef.props.ref to

LocalRef.props.kubeRef to fix react error

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-03-21 09:23:30 -04:00
parent a341b1b44f
commit 8258e0b59a
12 changed files with 21 additions and 21 deletions

View File

@ -21,11 +21,11 @@ export type VolumeVariantComponent<Kind extends keyof PodVolumeVariants> = React
export interface LocalRefProps { export interface LocalRefProps {
pod: Pod; pod: Pod;
title: string; title: string;
ref: LocalObjectReference | SecretReference | undefined; kubeRef: LocalObjectReference | SecretReference | undefined;
api: KubeApi<KubeObject>; api: KubeApi<KubeObject>;
} }
export const LocalRef = ({ pod, title, ref, api }: LocalRefProps) => { export const LocalRef = ({ pod, title, kubeRef: ref, api }: LocalRefProps) => {
if (!ref) { if (!ref) {
return null; return null;
} }

View File

@ -45,17 +45,17 @@ const deprecatedVolumeTypes = new Set<PodVolumeKind>([
"storageos", "storageos",
]); ]);
interface VolumeVarientProps { interface VolumeVariantProps {
pod: Pod; pod: Pod;
volume: PodVolume; volume: PodVolume;
} }
interface VolumeVarientRender { interface VolumeVariantRender {
kind: PodVolumeKind; kind: PodVolumeKind;
element: JSX.Element; element: JSX.Element;
} }
function renderVolumeVarient({ pod, volume }: VolumeVarientProps): VolumeVarientRender | null { function renderVolumeVariant({ pod, volume }: VolumeVariantProps): VolumeVariantRender | null {
if (volume.awsElasticBlockStore) { if (volume.awsElasticBlockStore) {
return { return {
kind: "awsElasticBlockStore", kind: "awsElasticBlockStore",
@ -269,8 +269,8 @@ function renderVolumeVarient({ pod, volume }: VolumeVarientProps): VolumeVarient
return null; return null;
} }
export function VolumeVarient(props: VolumeVarientProps) { export function VolumeVariant(props: VolumeVariantProps) {
const result = renderVolumeVarient(props); const result = renderVolumeVariant(props);
if (!result) { if (!result) {
return <p>Error! Unknown pod volume kind</p>; return <p>Error! Unknown pod volume kind</p>;

View File

@ -28,7 +28,7 @@ export const CephFs: VolumeVariantComponent<"cephfs"> = (
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Secret" title="Secret"
ref={secretRef} kubeRef={secretRef}
api={secretsApi} api={secretsApi}
/> />
) )

View File

@ -12,7 +12,7 @@ export const ConfigMap: VolumeVariantComponent<"configMap"> = (
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Name" title="Name"
ref={{ name }} kubeRef={{ name }}
api={configMapApi} api={configMapApi}
/> />
) )

View File

@ -34,25 +34,25 @@ export const ContainerStorageInterface: VolumeVariantComponent<"csi"> = ({
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Controller Publish Secret" title="Controller Publish Secret"
ref={controllerPublishSecretRef} kubeRef={controllerPublishSecretRef}
api={secretsApi} api={secretsApi}
/> />
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Controller Expand Secret" title="Controller Expand Secret"
ref={controllerExpandSecretRef} kubeRef={controllerExpandSecretRef}
api={secretsApi} api={secretsApi}
/> />
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Node Publish Secret" title="Node Publish Secret"
ref={nodePublishSecretRef} kubeRef={nodePublishSecretRef}
api={secretsApi} api={secretsApi}
/> />
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Node Stage Secret" title="Node Stage Secret"
ref={nodeStageSecretRef} kubeRef={nodeStageSecretRef}
api={secretsApi} api={secretsApi}
/> />
{ {

View File

@ -20,7 +20,7 @@ export const FlexVolume: VolumeVariantComponent<"flexVolume"> = (
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Secret" title="Secret"
ref={secretRef} kubeRef={secretRef}
api={secretsApi} api={secretsApi}
/> />
<DrawerItem name="Readonly"> <DrawerItem name="Readonly">

View File

@ -12,7 +12,7 @@ export const PersistentVolumeClaim: VolumeVariantComponent<"persistentVolumeClai
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Name" title="Name"
ref={{ name: claimName }} kubeRef={{ name: claimName }}
api={pvcApi} api={pvcApi}
/> />
) )

View File

@ -34,7 +34,7 @@ export const RadosBlockDevice: VolumeVariantComponent<"rbd"> = (
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Authentication Secret" title="Authentication Secret"
ref={secretRef} kubeRef={secretRef}
api={secretsApi} api={secretsApi}
/> />
) )

View File

@ -20,7 +20,7 @@ export const ScaleIo: VolumeVariantComponent<"scaleIO"> = (
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Name" title="Name"
ref={secretRef} kubeRef={secretRef}
api={secretsApi} api={secretsApi}
/> />
<DrawerItem name="SSL Enabled"> <DrawerItem name="SSL Enabled">

View File

@ -14,7 +14,7 @@ export const Secret: VolumeVariantComponent<"secret"> = (
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Name" title="Name"
ref={{ name: secretName }} kubeRef={{ name: secretName }}
api={secretsApi} api={secretsApi}
/> />
<DrawerItem name="Items" hidden={items.length === 0}> <DrawerItem name="Items" hidden={items.length === 0}>

View File

@ -30,7 +30,7 @@ export const StorageOs: VolumeVariantComponent<"storageos"> = (
<LocalRef <LocalRef
pod={pod} pod={pod}
title="Secret" title="Secret"
ref={secretRef} kubeRef={secretRef}
api={secretsApi} api={secretsApi}
/> />
</> </>

View File

@ -8,7 +8,7 @@ import React from "react";
import type { Pod } from "../../../../../common/k8s-api/endpoints"; import type { Pod } from "../../../../../common/k8s-api/endpoints";
import { DrawerTitle } from "../../../drawer"; import { DrawerTitle } from "../../../drawer";
import { Icon } from "../../../icon"; import { Icon } from "../../../icon";
import { VolumeVarient } from "./variant"; import { VolumeVariant } from "./variant";
export interface PodVolumesProps { export interface PodVolumesProps {
pod: Pod; pod: Pod;
@ -30,7 +30,7 @@ export const PodVolumes = observer(({ pod }: PodVolumesProps) => {
<Icon small material="storage" /> <Icon small material="storage" />
<span>{volume.name}</span> <span>{volume.name}</span>
</div> </div>
<VolumeVarient pod={pod} volume={volume} /> <VolumeVariant pod={pod} volume={volume} />
</div> </div>
))} ))}
</> </>