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:
parent
dc60517e48
commit
4e50593a7e
@ -34,6 +34,7 @@ import { KubeObjectMenu } from "./kube-object-menu";
|
|||||||
import { KubeObjectDetailRegistry } from "../../api/kube-object-detail-registry";
|
import { KubeObjectDetailRegistry } from "../../api/kube-object-detail-registry";
|
||||||
import logger from "../../../main/logger";
|
import logger from "../../../main/logger";
|
||||||
import { CrdResourceDetails } from "../+custom-resources";
|
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.
|
* 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 (
|
return (
|
||||||
<Drawer
|
<Drawer
|
||||||
className="KubeObjectDetails flex column"
|
className="KubeObjectDetails flex column"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user