mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Resolve pr comments
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
8258e0b59a
commit
98d1868430
@ -340,7 +340,7 @@ export interface FiberChannelSource {
|
|||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FlokerSource {
|
export interface FlockerSource {
|
||||||
datasetName: string;
|
datasetName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -604,7 +604,7 @@ export interface PodVolumeVariants {
|
|||||||
ephemeral: EphemeralSource;
|
ephemeral: EphemeralSource;
|
||||||
fc: FiberChannelSource;
|
fc: FiberChannelSource;
|
||||||
flexVolume: FlexVolumeSource;
|
flexVolume: FlexVolumeSource;
|
||||||
flocker: FlokerSource;
|
flocker: FlockerSource;
|
||||||
gcePersistentDisk: GcePersistentDiskSource;
|
gcePersistentDisk: GcePersistentDiskSource;
|
||||||
gitRepo: GitRepoSource;
|
gitRepo: GitRepoSource;
|
||||||
glusterfs: GlusterFsSource;
|
glusterfs: GlusterFsSource;
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import { CephFs } from "./variants/ceph-fs";
|
|||||||
import { Cinder } from "./variants/cinder";
|
import { Cinder } from "./variants/cinder";
|
||||||
import { ConfigMap } from "./variants/config-map";
|
import { ConfigMap } from "./variants/config-map";
|
||||||
import { ContainerStorageInterface } from "./variants/container-storage-interface";
|
import { ContainerStorageInterface } from "./variants/container-storage-interface";
|
||||||
import { DownwardApi } from "./variants/downward-api";
|
import { DownwardAPI } from "./variants/downward-api";
|
||||||
import { EmptyDir } from "./variants/empty-dir";
|
import { EmptyDir } from "./variants/empty-dir";
|
||||||
import { Ephemeral } from "./variants/ephemeral";
|
import { Ephemeral } from "./variants/ephemeral";
|
||||||
import { FiberChannel } from "./variants/fiber-channel";
|
import { FiberChannel } from "./variants/fiber-channel";
|
||||||
@ -108,7 +108,7 @@ function renderVolumeVariant({ pod, volume }: VolumeVariantProps): VolumeVariant
|
|||||||
if (volume.downwardAPI) {
|
if (volume.downwardAPI) {
|
||||||
return {
|
return {
|
||||||
kind: "downwardAPI",
|
kind: "downwardAPI",
|
||||||
element: <DownwardApi variant={volume.downwardAPI} pod={pod} volumeName={volume.name} />,
|
element: <DownwardAPI variant={volume.downwardAPI} pod={pod} volumeName={volume.name} />,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import React from "react";
|
|||||||
import { DrawerItem } from "../../../../drawer";
|
import { DrawerItem } from "../../../../drawer";
|
||||||
import type { VolumeVariantComponent } from "../variant-helpers";
|
import type { VolumeVariantComponent } from "../variant-helpers";
|
||||||
|
|
||||||
export const DownwardApi: VolumeVariantComponent<"downwardAPI"> = (
|
export const DownwardAPI: VolumeVariantComponent<"downwardAPI"> = (
|
||||||
({ variant: { items }}) => (
|
({ variant: { items }}) => (
|
||||||
<>
|
<>
|
||||||
<DrawerItem name="Items">
|
<DrawerItem name="Items">
|
||||||
|
|||||||
@ -9,8 +9,8 @@ import type { VolumeVariantComponent } from "../variant-helpers";
|
|||||||
export const EmptyDir: VolumeVariantComponent<"emptyDir"> = (
|
export const EmptyDir: VolumeVariantComponent<"emptyDir"> = (
|
||||||
({ variant: { medium, sizeLimit }}) => (
|
({ variant: { medium, sizeLimit }}) => (
|
||||||
<>
|
<>
|
||||||
<DrawerItem name="Medium" hidden={!medium}>
|
<DrawerItem name="Medium">
|
||||||
{medium}
|
{medium || "<node's default medium>"}
|
||||||
</DrawerItem>
|
</DrawerItem>
|
||||||
<DrawerItem name="Size Limit" hidden={!sizeLimit}>
|
<DrawerItem name="Size Limit" hidden={!sizeLimit}>
|
||||||
{sizeLimit}
|
{sizeLimit}
|
||||||
|
|||||||
@ -26,14 +26,14 @@ export const FlexVolume: VolumeVariantComponent<"flexVolume"> = (
|
|||||||
<DrawerItem name="Readonly">
|
<DrawerItem name="Readonly">
|
||||||
{readOnly.toString()}
|
{readOnly.toString()}
|
||||||
</DrawerItem>
|
</DrawerItem>
|
||||||
{
|
{
|
||||||
...Object.entries(options)
|
...Object.entries(options)
|
||||||
.map(([key, value]) => (
|
.map(([key, value]) => (
|
||||||
<DrawerItem key={key} name={`Option: ${key}`}>
|
<DrawerItem key={key} name={`Option: ${key}`}>
|
||||||
{value}
|
{value}
|
||||||
</DrawerItem>
|
</DrawerItem>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -23,25 +23,21 @@ export const Projected: VolumeVariantComponent<"projected"> = (
|
|||||||
<DrawerItem name="Name">
|
<DrawerItem name="Name">
|
||||||
{secret.name}
|
{secret.name}
|
||||||
</DrawerItem>
|
</DrawerItem>
|
||||||
{secret.items && (
|
<DrawerItem name="Items">
|
||||||
<DrawerItem name="Items">
|
<ul>
|
||||||
<ul>
|
{secret.items?.map(({ key }) => <li key={key}>{key}</li>)}
|
||||||
{secret.items.map(({ key }) => <li key={key}>{key}</li>)}
|
</ul>
|
||||||
</ul>
|
</DrawerItem>
|
||||||
</DrawerItem>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{downwardAPI && (
|
{downwardAPI && (
|
||||||
<>
|
<>
|
||||||
<DrawerTitle size="sub-title">Downward API</DrawerTitle>
|
<DrawerTitle size="sub-title">Downward API</DrawerTitle>
|
||||||
{downwardAPI.items && (
|
<DrawerItem name="Items">
|
||||||
<DrawerItem name="Items">
|
<ul>
|
||||||
<ul>
|
{downwardAPI.items?.map(({ path }) => <li key={path}>{path}</li>)}
|
||||||
{downwardAPI.items.map(({ path }) => <li key={path}>{path}</li>)}
|
</ul>
|
||||||
</ul>
|
</DrawerItem>
|
||||||
</DrawerItem>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{configMap && (
|
{configMap && (
|
||||||
@ -50,13 +46,11 @@ export const Projected: VolumeVariantComponent<"projected"> = (
|
|||||||
<DrawerItem name="Name">
|
<DrawerItem name="Name">
|
||||||
{configMap.name}
|
{configMap.name}
|
||||||
</DrawerItem>
|
</DrawerItem>
|
||||||
{configMap.items && (
|
<DrawerItem name="Items">
|
||||||
<DrawerItem name="Items">
|
<ul>
|
||||||
<ul>
|
{configMap.items?.map(({ path }) => <li key={path}>{path}</li>)}
|
||||||
{configMap.items.map(({ path }) => <li key={path}>{path}</li>)}
|
</ul>
|
||||||
</ul>
|
</DrawerItem>
|
||||||
</DrawerItem>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{serviceAccountToken && (
|
{serviceAccountToken && (
|
||||||
@ -65,8 +59,8 @@ export const Projected: VolumeVariantComponent<"projected"> = (
|
|||||||
<DrawerItem name="Audience" hidden={!serviceAccountToken.audience}>
|
<DrawerItem name="Audience" hidden={!serviceAccountToken.audience}>
|
||||||
{serviceAccountToken.audience}
|
{serviceAccountToken.audience}
|
||||||
</DrawerItem>
|
</DrawerItem>
|
||||||
<DrawerItem name="Expiration" hidden={!serviceAccountToken.expirationSeconds}>
|
<DrawerItem name="Expiration">
|
||||||
{serviceAccountToken.expirationSeconds}s
|
{String(serviceAccountToken.expirationSeconds || (60*60 /* an hour */))}s
|
||||||
</DrawerItem>
|
</DrawerItem>
|
||||||
<DrawerItem name="Path">
|
<DrawerItem name="Path">
|
||||||
{serviceAccountToken.path}
|
{serviceAccountToken.path}
|
||||||
|
|||||||
@ -26,9 +26,6 @@ export const ScaleIo: VolumeVariantComponent<"scaleIO"> = (
|
|||||||
<DrawerItem name="SSL Enabled">
|
<DrawerItem name="SSL Enabled">
|
||||||
{sslEnabled.toString()}
|
{sslEnabled.toString()}
|
||||||
</DrawerItem>
|
</DrawerItem>
|
||||||
<DrawerItem name="SSL Enabled">
|
|
||||||
{sslEnabled.toString()}
|
|
||||||
</DrawerItem>
|
|
||||||
<DrawerItem name="Protection Domain Name" hidden={!protectionDomain}>
|
<DrawerItem name="Protection Domain Name" hidden={!protectionDomain}>
|
||||||
{protectionDomain}
|
{protectionDomain}
|
||||||
</DrawerItem>
|
</DrawerItem>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user