chore: change yaml rendering to be an option and enable for kubernetes plugin FE components

Signed-off-by: Chris Langhout <clanghout@bol.com>
This commit is contained in:
Chris Langhout
2025-01-04 16:01:35 +02:00
committed by blam
parent 58e1383241
commit b6c5ea2aba
9 changed files with 131 additions and 24 deletions
@@ -84,7 +84,10 @@ const DefaultCustomResourceAccordion = ({
</AccordionSummary>
<AccordionDetails>
{Object.prototype.hasOwnProperty.call(customResource, 'status') && (
<StructuredMetadataTable metadata={customResource.status} />
<StructuredMetadataTable
metadata={customResource.status}
options={{ nestedValuesAsYaml: true }}
/>
)}
</AccordionDetails>
</Accordion>
@@ -65,6 +65,9 @@ const IngressCard = ({ ingress }: IngressCardProps) => {
metadata={{
...ingress.spec,
}}
options={{
nestedValuesAsYaml: true,
}}
/>
);
};
@@ -237,6 +237,7 @@ const KubernetesStructuredMetadataTableDrawerContent = <
{!isYaml && (
<StructuredMetadataTable
metadata={renderObject(replaceNullsWithUndefined(object))}
options={{ nestedValuesAsYaml: true }}
/>
)}
</div>
@@ -176,6 +176,7 @@ export const ContainerCard: React.FC<ContainerCardProps> = ({
containerSpec,
containerStatus,
)}
options={{ nestedValuesAsYaml: true }}
/>
</Grid>
{containerMetrics && (
@@ -77,6 +77,7 @@ const ServiceCard = ({ service }: ServiceCardProps) => {
ports: service.spec?.ports,
...metadata,
}}
options={{ nestedValuesAsYaml: true }}
/>
);
};