mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fixing return statements in Pod menus (#1211)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
484de2ec21
commit
e3354f3b75
@ -22,7 +22,7 @@ export class PodLogsMenu extends React.Component<PodLogsMenuProps> {
|
|||||||
const { object: pod, toolbar } = this.props
|
const { object: pod, toolbar } = this.props
|
||||||
const containers = pod.getAllContainers();
|
const containers = pod.getAllContainers();
|
||||||
const statuses = pod.getContainerStatuses();
|
const statuses = pod.getContainerStatuses();
|
||||||
if (!containers.length) return;
|
if (!containers.length) return null;
|
||||||
return (
|
return (
|
||||||
<Component.MenuItem onClick={Util.prevDefault(() => this.showLogs(containers[0]))}>
|
<Component.MenuItem onClick={Util.prevDefault(() => this.showLogs(containers[0]))}>
|
||||||
<Component.Icon material="subject" title="Logs" interactive={toolbar}/>
|
<Component.Icon material="subject" title="Logs" interactive={toolbar}/>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ export class PodShellMenu extends React.Component<PodShellMenuProps> {
|
|||||||
render() {
|
render() {
|
||||||
const { object, toolbar } = this.props
|
const { object, toolbar } = this.props
|
||||||
const containers = object.getRunningContainers();
|
const containers = object.getRunningContainers();
|
||||||
if (!containers.length) return;
|
if (!containers.length) return null;
|
||||||
return (
|
return (
|
||||||
<Component.MenuItem onClick={Util.prevDefault(() => this.execShell(containers[0].name))}>
|
<Component.MenuItem onClick={Util.prevDefault(() => this.execShell(containers[0].name))}>
|
||||||
<Component.Icon svg="ssh" interactive={toolbar} title="Pod shell"/>
|
<Component.Icon svg="ssh" interactive={toolbar} title="Pod shell"/>
|
||||||
|
|||||||
@ -65,7 +65,6 @@ export class PodDetails extends React.Component<Props> {
|
|||||||
const { nodeName } = spec;
|
const { nodeName } = spec;
|
||||||
const nodeSelector = pod.getNodeSelectors();
|
const nodeSelector = pod.getNodeSelectors();
|
||||||
const volumes = pod.getVolumes();
|
const volumes = pod.getVolumes();
|
||||||
const labels = pod.getLabels();
|
|
||||||
const metrics = podsStore.metrics;
|
const metrics = podsStore.metrics;
|
||||||
return (
|
return (
|
||||||
<div className="PodDetails">
|
<div className="PodDetails">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user