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:
parent
a341b1b44f
commit
8258e0b59a
@ -21,11 +21,11 @@ export type VolumeVariantComponent<Kind extends keyof PodVolumeVariants> = React
|
||||
export interface LocalRefProps {
|
||||
pod: Pod;
|
||||
title: string;
|
||||
ref: LocalObjectReference | SecretReference | undefined;
|
||||
kubeRef: LocalObjectReference | SecretReference | undefined;
|
||||
api: KubeApi<KubeObject>;
|
||||
}
|
||||
|
||||
export const LocalRef = ({ pod, title, ref, api }: LocalRefProps) => {
|
||||
export const LocalRef = ({ pod, title, kubeRef: ref, api }: LocalRefProps) => {
|
||||
if (!ref) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -45,17 +45,17 @@ const deprecatedVolumeTypes = new Set<PodVolumeKind>([
|
||||
"storageos",
|
||||
]);
|
||||
|
||||
interface VolumeVarientProps {
|
||||
interface VolumeVariantProps {
|
||||
pod: Pod;
|
||||
volume: PodVolume;
|
||||
}
|
||||
|
||||
interface VolumeVarientRender {
|
||||
interface VolumeVariantRender {
|
||||
kind: PodVolumeKind;
|
||||
element: JSX.Element;
|
||||
}
|
||||
|
||||
function renderVolumeVarient({ pod, volume }: VolumeVarientProps): VolumeVarientRender | null {
|
||||
function renderVolumeVariant({ pod, volume }: VolumeVariantProps): VolumeVariantRender | null {
|
||||
if (volume.awsElasticBlockStore) {
|
||||
return {
|
||||
kind: "awsElasticBlockStore",
|
||||
@ -269,8 +269,8 @@ function renderVolumeVarient({ pod, volume }: VolumeVarientProps): VolumeVarient
|
||||
return null;
|
||||
}
|
||||
|
||||
export function VolumeVarient(props: VolumeVarientProps) {
|
||||
const result = renderVolumeVarient(props);
|
||||
export function VolumeVariant(props: VolumeVariantProps) {
|
||||
const result = renderVolumeVariant(props);
|
||||
|
||||
if (!result) {
|
||||
return <p>Error! Unknown pod volume kind</p>;
|
||||
|
||||
@ -28,7 +28,7 @@ export const CephFs: VolumeVariantComponent<"cephfs"> = (
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Secret"
|
||||
ref={secretRef}
|
||||
kubeRef={secretRef}
|
||||
api={secretsApi}
|
||||
/>
|
||||
)
|
||||
|
||||
@ -12,7 +12,7 @@ export const ConfigMap: VolumeVariantComponent<"configMap"> = (
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Name"
|
||||
ref={{ name }}
|
||||
kubeRef={{ name }}
|
||||
api={configMapApi}
|
||||
/>
|
||||
)
|
||||
|
||||
@ -34,25 +34,25 @@ export const ContainerStorageInterface: VolumeVariantComponent<"csi"> = ({
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Controller Publish Secret"
|
||||
ref={controllerPublishSecretRef}
|
||||
kubeRef={controllerPublishSecretRef}
|
||||
api={secretsApi}
|
||||
/>
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Controller Expand Secret"
|
||||
ref={controllerExpandSecretRef}
|
||||
kubeRef={controllerExpandSecretRef}
|
||||
api={secretsApi}
|
||||
/>
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Node Publish Secret"
|
||||
ref={nodePublishSecretRef}
|
||||
kubeRef={nodePublishSecretRef}
|
||||
api={secretsApi}
|
||||
/>
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Node Stage Secret"
|
||||
ref={nodeStageSecretRef}
|
||||
kubeRef={nodeStageSecretRef}
|
||||
api={secretsApi}
|
||||
/>
|
||||
{
|
||||
|
||||
@ -20,7 +20,7 @@ export const FlexVolume: VolumeVariantComponent<"flexVolume"> = (
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Secret"
|
||||
ref={secretRef}
|
||||
kubeRef={secretRef}
|
||||
api={secretsApi}
|
||||
/>
|
||||
<DrawerItem name="Readonly">
|
||||
|
||||
@ -12,7 +12,7 @@ export const PersistentVolumeClaim: VolumeVariantComponent<"persistentVolumeClai
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Name"
|
||||
ref={{ name: claimName }}
|
||||
kubeRef={{ name: claimName }}
|
||||
api={pvcApi}
|
||||
/>
|
||||
)
|
||||
|
||||
@ -34,7 +34,7 @@ export const RadosBlockDevice: VolumeVariantComponent<"rbd"> = (
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Authentication Secret"
|
||||
ref={secretRef}
|
||||
kubeRef={secretRef}
|
||||
api={secretsApi}
|
||||
/>
|
||||
)
|
||||
|
||||
@ -20,7 +20,7 @@ export const ScaleIo: VolumeVariantComponent<"scaleIO"> = (
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Name"
|
||||
ref={secretRef}
|
||||
kubeRef={secretRef}
|
||||
api={secretsApi}
|
||||
/>
|
||||
<DrawerItem name="SSL Enabled">
|
||||
|
||||
@ -14,7 +14,7 @@ export const Secret: VolumeVariantComponent<"secret"> = (
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Name"
|
||||
ref={{ name: secretName }}
|
||||
kubeRef={{ name: secretName }}
|
||||
api={secretsApi}
|
||||
/>
|
||||
<DrawerItem name="Items" hidden={items.length === 0}>
|
||||
|
||||
@ -30,7 +30,7 @@ export const StorageOs: VolumeVariantComponent<"storageos"> = (
|
||||
<LocalRef
|
||||
pod={pod}
|
||||
title="Secret"
|
||||
ref={secretRef}
|
||||
kubeRef={secretRef}
|
||||
api={secretsApi}
|
||||
/>
|
||||
</>
|
||||
|
||||
@ -8,7 +8,7 @@ import React from "react";
|
||||
import type { Pod } from "../../../../../common/k8s-api/endpoints";
|
||||
import { DrawerTitle } from "../../../drawer";
|
||||
import { Icon } from "../../../icon";
|
||||
import { VolumeVarient } from "./variant";
|
||||
import { VolumeVariant } from "./variant";
|
||||
|
||||
export interface PodVolumesProps {
|
||||
pod: Pod;
|
||||
@ -30,7 +30,7 @@ export const PodVolumes = observer(({ pod }: PodVolumesProps) => {
|
||||
<Icon small material="storage" />
|
||||
<span>{volume.name}</span>
|
||||
</div>
|
||||
<VolumeVarient pod={pod} volume={volume} />
|
||||
<VolumeVariant pod={pod} volume={volume} />
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user