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

Add fallback to KubeObjectMeta if still no details exist

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-08-03 11:21:49 -04:00
parent dc60517e48
commit 4e50593a7e

View File

@ -34,6 +34,7 @@ import { KubeObjectMenu } from "./kube-object-menu";
import { KubeObjectDetailRegistry } from "../../api/kube-object-detail-registry";
import logger from "../../../main/logger";
import { CrdResourceDetails } from "../+custom-resources";
import { KubeObjectMeta } from "./kube-object-meta";
/**
* Used to store `object.selfLink` to show more info about resource in the details panel.
@ -178,6 +179,11 @@ export class KubeObjectDetails extends React.Component {
}
}
if (details.length === 0) {
// if we still don't have any details to show, just show the standard object metadata
details.push(<KubeObjectMeta key={object.getId()} object={object} />);
}
return (
<Drawer
className="KubeObjectDetails flex column"