From bfc58edc464af3f6dbe01bd6115f96a86f85ea35 Mon Sep 17 00:00:00 2001 From: Lauri Nevala Date: Thu, 16 Apr 2020 07:41:19 +0300 Subject: [PATCH] Display emptyDir medium and size limit (#257) Signed-off-by: Lauri Nevala --- dashboard/client/api/endpoints/pods.api.ts | 4 ++++ .../+workloads-pods/pod-details.tsx | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/dashboard/client/api/endpoints/pods.api.ts b/dashboard/client/api/endpoints/pods.api.ts index bed1e52928..adb00cbea7 100644 --- a/dashboard/client/api/endpoints/pods.api.ts +++ b/dashboard/client/api/endpoints/pods.api.ts @@ -175,6 +175,10 @@ export class Pod extends WorkloadKubeObject { persistentVolumeClaim: { claimName: string; }; + emptyDir: { + medium?: string; + sizeLimit?: string; + }; secret: { secretName: string; defaultMode: number; diff --git a/dashboard/client/components/+workloads-pods/pod-details.tsx b/dashboard/client/components/+workloads-pods/pod-details.tsx index a4b66df672..ec406ce0d0 100644 --- a/dashboard/client/components/+workloads-pods/pod-details.tsx +++ b/dashboard/client/components/+workloads-pods/pod-details.tsx @@ -176,6 +176,8 @@ export class PodDetails extends React.Component { Volumes}/> {volumes.map(volume => { const claimName = volume.persistentVolumeClaim ? volume.persistentVolumeClaim.claimName : null; + const type = Object.keys(volume)[1] + return (
@@ -183,8 +185,23 @@ export class PodDetails extends React.Component { {volume.name}
Type}> - {Object.keys(volume)[1]} + {type} + { type === "emptyDir" && ( +
+ { volume.emptyDir.medium && ( + Medium}> + {volume.emptyDir.medium} + + )} + { volume.emptyDir.sizeLimit && ( + Size Limit}> + {volume.emptyDir.sizeLimit} + + )} +
+ )} + {claimName && ( Claim Name}>