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

Show runtimeClassName in pods view

Signed-off-by: Piotr Roszatycki <piotr.roszatycki@gmail.com>
This commit is contained in:
Piotr Roszatycki 2022-09-27 22:47:07 +02:00
parent e8f691ab0e
commit c43ff22eb6
2 changed files with 33 additions and 22 deletions

View File

@ -714,6 +714,10 @@ export class Pod extends KubeObject<
return this.spec?.priorityClassName || ""; return this.spec?.priorityClassName || "";
} }
getRuntimeClassName() {
return this.spec?.runtimeClassName || "";
}
getServiceAccountName() { getServiceAccountName() {
return this.spec?.serviceAccountName || ""; return this.spec?.serviceAccountName || "";
} }

View File

@ -119,12 +119,15 @@ export class PodDetails extends React.Component<PodDetailsProps> {
<DrawerItem name="Service Account"> <DrawerItem name="Service Account">
{pod.getServiceAccountName()} {pod.getServiceAccountName()}
</DrawerItem> </DrawerItem>
<DrawerItem name="Priority Class"> <DrawerItem name="Priority Class" hidden={pod.getPriorityClassName() === ""}>
{pod.getPriorityClassName()} {pod.getPriorityClassName()}
</DrawerItem> </DrawerItem>
<DrawerItem name="QoS Class"> <DrawerItem name="QoS Class">
{pod.getQosClass()} {pod.getQosClass()}
</DrawerItem> </DrawerItem>
<DrawerItem name="Runtime Class" hidden={pod.getRuntimeClassName() === ""}>
{pod.getRuntimeClassName()}
</DrawerItem>
<DrawerItem <DrawerItem
name="Conditions" name="Conditions"
@ -155,7 +158,8 @@ export class PodDetails extends React.Component<PodDetailsProps> {
<PodDetailsSecrets pod={pod} /> <PodDetailsSecrets pod={pod} />
</DrawerItem> </DrawerItem>
{initContainers.length > 0 && ( {
initContainers.length > 0 && (
<> <>
<DrawerTitle>Init Containers</DrawerTitle> <DrawerTitle>Init Containers</DrawerTitle>
{initContainers.map(container => ( {initContainers.map(container => (
@ -166,20 +170,23 @@ export class PodDetails extends React.Component<PodDetailsProps> {
/> />
))} ))}
</> </>
)} )
}
<DrawerTitle>Containers</DrawerTitle> <DrawerTitle>Containers</DrawerTitle>
{containers.map(container => ( {
containers.map(container => (
<PodDetailsContainer <PodDetailsContainer
key={container.name} key={container.name}
pod={pod} pod={pod}
container={container} container={container}
metrics={getItemMetrics(toJS(this.containerMetrics), container.name)} metrics={getItemMetrics(toJS(this.containerMetrics), container.name)}
/> />
))} ))
}
<PodVolumes pod={pod} /> <PodVolumes pod={pod} />
</div> </div >
); );
} }
} }