diff --git a/plugins/kubernetes/src/components/Cluster/Cluster.tsx b/plugins/kubernetes/src/components/Cluster/Cluster.tsx index 8998c68253..58025955b2 100644 --- a/plugins/kubernetes/src/components/Cluster/Cluster.tsx +++ b/plugins/kubernetes/src/components/Cluster/Cluster.tsx @@ -19,7 +19,6 @@ import { Accordion, AccordionDetails, AccordionSummary, - Divider, Grid, Typography, } from '@material-ui/core'; @@ -60,11 +59,12 @@ const ClusterSummary = ({ - {clusterName} - + {clusterName} + Cluster - - - {totalNumberOfPods} pods @@ -137,24 +135,36 @@ export const Cluster = ({ clusterObjects, podsWithErrors }: ClusterProps) => { - - - - - - - - - - - - - - - - - - + {groupedResponses.customResources.length > 0 ? ( + + + + ) : undefined} + {groupedResponses.deployments.length > 0 ? ( + + + + ) : undefined} + {groupedResponses.statefulsets.length > 0 ? ( + + + + ) : undefined} + {groupedResponses.ingresses.length > 0 ? ( + + + + ) : undefined} + {groupedResponses.services.length > 0 ? ( + + + + ) : undefined} + {groupedResponses.cronJobs.length > 0 ? ( + + + + ) : undefined} diff --git a/plugins/kubernetes/src/components/CronJobsAccordions/CronJobsAccordions.tsx b/plugins/kubernetes/src/components/CronJobsAccordions/CronJobsAccordions.tsx index ce2dc340e7..c5babe67fc 100644 --- a/plugins/kubernetes/src/components/CronJobsAccordions/CronJobsAccordions.tsx +++ b/plugins/kubernetes/src/components/CronJobsAccordions/CronJobsAccordions.tsx @@ -18,7 +18,6 @@ import { Accordion, AccordionDetails, AccordionSummary, - Divider, Grid, Typography, } from '@material-ui/core'; @@ -51,22 +50,21 @@ const CronJobSummary = ({ cronJob }: CronJobSummaryProps) => { - + - - - {cronJob.spec?.suspend ? ( @@ -92,7 +90,7 @@ const CronJobSummary = ({ cronJob }: CronJobSummaryProps) => { const CronJobAccordion = ({ cronJob, ownedJobs }: CronJobAccordionProps) => { return ( - + }> diff --git a/plugins/kubernetes/src/components/CronJobsAccordions/CronJobsDrawer.tsx b/plugins/kubernetes/src/components/CronJobsAccordions/CronJobsDrawer.tsx index 758f17ade0..0dc53396bb 100644 --- a/plugins/kubernetes/src/components/CronJobsAccordions/CronJobsDrawer.tsx +++ b/plugins/kubernetes/src/components/CronJobsAccordions/CronJobsDrawer.tsx @@ -47,12 +47,12 @@ export const CronJobDrawer = ({ spacing={0} > - + {cronJob.metadata?.name ?? 'unknown object'} - + CronJob diff --git a/plugins/kubernetes/src/components/CustomResources/ArgoRollouts/Rollout.tsx b/plugins/kubernetes/src/components/CustomResources/ArgoRollouts/Rollout.tsx index 185eeb771e..91039ec314 100644 --- a/plugins/kubernetes/src/components/CustomResources/ArgoRollouts/Rollout.tsx +++ b/plugins/kubernetes/src/components/CustomResources/ArgoRollouts/Rollout.tsx @@ -19,7 +19,6 @@ import { Accordion, AccordionDetails, AccordionSummary, - Divider, Grid, Typography, } from '@material-ui/core'; @@ -101,15 +100,13 @@ const RolloutSummary = ({ - + - - - {hpa && ( @@ -149,7 +146,8 @@ const RolloutSummary = ({ xs={3} direction="column" justifyContent="flex-start" - alignItems="flex-start" + alignItems="flex-end" + spacing={0} > {numberOfCurrentPods} pods @@ -210,6 +208,7 @@ const RolloutAccordion = ({ }> - + {rollout.metadata?.name ?? 'unknown object'} - + Rollout diff --git a/plugins/kubernetes/src/components/CustomResources/DefaultCustomResource.tsx b/plugins/kubernetes/src/components/CustomResources/DefaultCustomResource.tsx index 36d38d3fe0..cee3fb9e6c 100644 --- a/plugins/kubernetes/src/components/CustomResources/DefaultCustomResource.tsx +++ b/plugins/kubernetes/src/components/CustomResources/DefaultCustomResource.tsx @@ -19,7 +19,6 @@ import { Accordion, AccordionDetails, AccordionSummary, - Divider, Grid, } from '@material-ui/core'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; @@ -54,18 +53,16 @@ const DefaultCustomResourceSummary = ({ - + - - - ); }; @@ -79,6 +76,7 @@ const DefaultCustomResourceAccordion = ({ }> - + {customResource.metadata?.name ?? 'unknown object'} - + {capitalizedName} diff --git a/plugins/kubernetes/src/components/DeploymentsAccordions/DeploymentDrawer.tsx b/plugins/kubernetes/src/components/DeploymentsAccordions/DeploymentDrawer.tsx index 6d25702d70..8be5ee1e46 100644 --- a/plugins/kubernetes/src/components/DeploymentsAccordions/DeploymentDrawer.tsx +++ b/plugins/kubernetes/src/components/DeploymentsAccordions/DeploymentDrawer.tsx @@ -58,12 +58,12 @@ export const DeploymentDrawer = ({ spacing={0} > - + {deployment.metadata?.name ?? 'unknown object'} - + Deployment diff --git a/plugins/kubernetes/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx b/plugins/kubernetes/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx index d2fb6275bc..8432b9d133 100644 --- a/plugins/kubernetes/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx +++ b/plugins/kubernetes/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx @@ -19,7 +19,6 @@ import { Accordion, AccordionDetails, AccordionSummary, - Divider, Grid, Typography, } from '@material-ui/core'; @@ -72,17 +71,15 @@ const DeploymentSummary = ({ - + - - - {hpa && ( - + {numberOfCurrentPods} pods @@ -152,7 +150,7 @@ const DeploymentAccordion = ({ ); return ( - + }> { title="Error Reporting" data={errors} columns={columns} - options={{ paging: true, search: false }} + options={{ paging: true, search: false, emptyRowsWhenPaging: false }} /> )} diff --git a/plugins/kubernetes/src/components/IngressesAccordions/IngressDrawer.tsx b/plugins/kubernetes/src/components/IngressesAccordions/IngressDrawer.tsx index dc88987d53..ea79c1e4dc 100644 --- a/plugins/kubernetes/src/components/IngressesAccordions/IngressDrawer.tsx +++ b/plugins/kubernetes/src/components/IngressesAccordions/IngressDrawer.tsx @@ -43,12 +43,12 @@ export const IngressDrawer = ({ spacing={0} > - + {ingress.metadata?.name ?? 'unknown object'} - + Ingress diff --git a/plugins/kubernetes/src/components/IngressesAccordions/IngressesAccordions.tsx b/plugins/kubernetes/src/components/IngressesAccordions/IngressesAccordions.tsx index f6d6e4bf68..6e12c033ba 100644 --- a/plugins/kubernetes/src/components/IngressesAccordions/IngressesAccordions.tsx +++ b/plugins/kubernetes/src/components/IngressesAccordions/IngressesAccordions.tsx @@ -19,7 +19,6 @@ import { Accordion, AccordionDetails, AccordionSummary, - Divider, Grid, } from '@material-ui/core'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; @@ -46,13 +45,9 @@ const IngressSummary = ({ ingress }: IngressSummaryProps) => { justifyContent="flex-start" alignItems="center" > - + - - - - ); }; diff --git a/plugins/kubernetes/src/components/JobsAccordions/JobsAccordions.tsx b/plugins/kubernetes/src/components/JobsAccordions/JobsAccordions.tsx index 715be4c88a..e805e3664b 100644 --- a/plugins/kubernetes/src/components/JobsAccordions/JobsAccordions.tsx +++ b/plugins/kubernetes/src/components/JobsAccordions/JobsAccordions.tsx @@ -18,7 +18,6 @@ import { Accordion, AccordionDetails, AccordionSummary, - Divider, Grid, } from '@material-ui/core'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; @@ -54,22 +53,21 @@ const JobSummary = ({ job }: JobSummaryProps) => { - + - - - {job.status?.succeeded && Succeeded} @@ -89,7 +87,7 @@ const JobSummary = ({ job }: JobSummaryProps) => { const JobAccordion = ({ job, ownedPods }: JobAccordionProps) => { return ( - + }> diff --git a/plugins/kubernetes/src/components/JobsAccordions/JobsDrawer.tsx b/plugins/kubernetes/src/components/JobsAccordions/JobsDrawer.tsx index a7217725b2..b91fb15541 100644 --- a/plugins/kubernetes/src/components/JobsAccordions/JobsDrawer.tsx +++ b/plugins/kubernetes/src/components/JobsAccordions/JobsDrawer.tsx @@ -47,12 +47,12 @@ export const JobDrawer = ({ spacing={0} > - + {job.metadata?.name ?? 'unknown object'} - + Job diff --git a/plugins/kubernetes/src/components/Pods/PodsTable.tsx b/plugins/kubernetes/src/components/Pods/PodsTable.tsx index 1d2369e322..a6e4b33020 100644 --- a/plugins/kubernetes/src/components/Pods/PodsTable.tsx +++ b/plugins/kubernetes/src/components/Pods/PodsTable.tsx @@ -46,6 +46,7 @@ const DEFAULT_COLUMNS: TableColumn[] = [ { title: 'phase', render: (pod: V1Pod) => pod.status?.phase ?? 'unknown', + width: 'auto', }, { title: 'status', @@ -58,12 +59,14 @@ const READY: TableColumn[] = [ title: 'containers ready', align: 'center', render: containersReady, + width: 'auto', }, { title: 'total restarts', align: 'center', render: totalRestarts, type: 'numeric', + width: 'auto', }, ]; @@ -87,6 +90,7 @@ export const PodsTable = ({ pods, extraColumns = [] }: PodsTablesProps) => { return podStatusToCpuUtil(metrics); }, + width: 'auto', }, { title: 'Memory usage %', @@ -99,6 +103,7 @@ export const PodsTable = ({ pods, extraColumns = [] }: PodsTablesProps) => { return podStatusToMemoryUtil(metrics); }, + width: 'auto', }, ]; columns.push(...resourceColumns); @@ -109,11 +114,13 @@ export const PodsTable = ({ pods, extraColumns = [] }: PodsTablesProps) => { width: '100%', }; + const usePods = pods.map(p => ({ ...p, id: p.metadata?.uid })); + return (
diff --git a/plugins/kubernetes/src/components/ServicesAccordions/ServiceDrawer.tsx b/plugins/kubernetes/src/components/ServicesAccordions/ServiceDrawer.tsx index 5d17fd7213..a088c4792d 100644 --- a/plugins/kubernetes/src/components/ServicesAccordions/ServiceDrawer.tsx +++ b/plugins/kubernetes/src/components/ServicesAccordions/ServiceDrawer.tsx @@ -43,12 +43,12 @@ export const ServiceDrawer = ({ spacing={0} > - + {service.metadata?.name ?? 'unknown object'} - + Service diff --git a/plugins/kubernetes/src/components/ServicesAccordions/ServicesAccordions.tsx b/plugins/kubernetes/src/components/ServicesAccordions/ServicesAccordions.tsx index a51b93b3bc..f0cb99ec9c 100644 --- a/plugins/kubernetes/src/components/ServicesAccordions/ServicesAccordions.tsx +++ b/plugins/kubernetes/src/components/ServicesAccordions/ServicesAccordions.tsx @@ -19,7 +19,6 @@ import { Accordion, AccordionDetails, AccordionSummary, - Divider, Grid, Typography, } from '@material-ui/core'; @@ -38,17 +37,14 @@ const ServiceSummary = ({ service }: ServiceSummaryProps) => { - + - - - - Type: {service.spec?.type ?? '?'} @@ -95,7 +91,7 @@ type ServiceAccordionProps = { const ServiceAccordion = ({ service }: ServiceAccordionProps) => { return ( - + }> diff --git a/plugins/kubernetes/src/components/StatefulSetsAccordions/StatefulSetDrawer.tsx b/plugins/kubernetes/src/components/StatefulSetsAccordions/StatefulSetDrawer.tsx index 5dd3bafe37..e83c890426 100644 --- a/plugins/kubernetes/src/components/StatefulSetsAccordions/StatefulSetDrawer.tsx +++ b/plugins/kubernetes/src/components/StatefulSetsAccordions/StatefulSetDrawer.tsx @@ -59,12 +59,12 @@ export const StatefulSetDrawer = ({ spacing={0} > - + {statefulset.metadata?.name ?? 'unknown object'} - + Stateful Set diff --git a/plugins/kubernetes/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx b/plugins/kubernetes/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx index bb1c4821ba..37bb76c84e 100644 --- a/plugins/kubernetes/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx +++ b/plugins/kubernetes/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx @@ -19,7 +19,6 @@ import { Accordion, AccordionDetails, AccordionSummary, - Divider, Grid, Typography, } from '@material-ui/core'; @@ -69,15 +68,13 @@ const StatefulSetSummary = ({ - + - - - {hpa && ( @@ -118,6 +115,7 @@ const StatefulSetSummary = ({ direction="column" justifyContent="flex-start" alignItems="flex-start" + spacing={0} > {numberOfCurrentPods} pods @@ -149,7 +147,7 @@ const StatefulSetAccordion = ({ ); return ( - + }>