1
0
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:
Alex Andreev 2020-11-03 16:22:54 +03:00 committed by GitHub
parent 484de2ec21
commit e3354f3b75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View File

@ -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}/>

View File

@ -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"/>

View File

@ -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">