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

Improve ProjectSource display for configMap and secret

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-03-23 08:54:42 -04:00
parent 98d1868430
commit 6672987cd9

View File

@ -25,7 +25,11 @@ export const Projected: VolumeVariantComponent<"projected"> = (
</DrawerItem> </DrawerItem>
<DrawerItem name="Items"> <DrawerItem name="Items">
<ul> <ul>
{secret.items?.map(({ key }) => <li key={key}>{key}</li>)} {secret.items?.map(({ key, path }) => (
<li key={key}>
{key} {path}
</li>
))}
</ul> </ul>
</DrawerItem> </DrawerItem>
</> </>
@ -35,7 +39,11 @@ export const Projected: VolumeVariantComponent<"projected"> = (
<DrawerTitle size="sub-title">Downward API</DrawerTitle> <DrawerTitle size="sub-title">Downward API</DrawerTitle>
<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>
</> </>
@ -48,7 +56,11 @@ export const Projected: VolumeVariantComponent<"projected"> = (
</DrawerItem> </DrawerItem>
<DrawerItem name="Items"> <DrawerItem name="Items">
<ul> <ul>
{configMap.items?.map(({ path }) => <li key={path}>{path}</li>)} {configMap.items?.map(({ key, path }) => (
<li key={key}>
{key} {path}
</li>
))}
</ul> </ul>
</DrawerItem> </DrawerItem>
</> </>