mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
rename attach shell to attach to pod
Signed-off-by: Luca Kröger <l.kroeger01@gmail.com>
This commit is contained in:
parent
9e16f2353c
commit
135a4e1e9a
@ -45,7 +45,7 @@ export interface PodAttachMenuProps extends Renderer.Component.KubeObjectMenuPro
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class PodAttachMenu extends React.Component<PodAttachMenuProps> {
|
export class PodAttachMenu extends React.Component<PodAttachMenuProps> {
|
||||||
async attachShell(container?: string) {
|
async attachToPod(container?: string) {
|
||||||
Navigation.hideDetails();
|
Navigation.hideDetails();
|
||||||
const { object: pod } = this.props;
|
const { object: pod } = this.props;
|
||||||
const containerParam = container ? `-c ${container}` : "";
|
const containerParam = container ? `-c ${container}` : "";
|
||||||
@ -56,7 +56,7 @@ export class PodAttachMenu extends React.Component<PodAttachMenuProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const shell = createTerminalTab({
|
const shell = createTerminalTab({
|
||||||
title: `Pod: ${pod.getName()} (namespace: ${pod.getNs()}) (Attached)`
|
title: `Pod: ${pod.getName()} (namespace: ${pod.getNs()}) [Attached]`
|
||||||
});
|
});
|
||||||
|
|
||||||
terminalStore.sendCommand(command, {
|
terminalStore.sendCommand(command, {
|
||||||
@ -72,9 +72,9 @@ export class PodAttachMenu extends React.Component<PodAttachMenuProps> {
|
|||||||
if (!containers.length) return null;
|
if (!containers.length) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MenuItem onClick={Util.prevDefault(() => this.attachShell(containers[0].name))}>
|
<MenuItem onClick={Util.prevDefault(() => this.attachToPod(containers[0].name))}>
|
||||||
<Icon material="pageview" interactive={toolbar} title="Pod shell (attached)"/>
|
<Icon material="pageview" interactive={toolbar} title="Attach to Pod"/>
|
||||||
<span className="title">Shell (Attached)</span>
|
<span className="title">Attached Pod</span>
|
||||||
{containers.length > 1 && (
|
{containers.length > 1 && (
|
||||||
<>
|
<>
|
||||||
<Icon className="arrow" material="keyboard_arrow_right"/>
|
<Icon className="arrow" material="keyboard_arrow_right"/>
|
||||||
@ -84,7 +84,7 @@ export class PodAttachMenu extends React.Component<PodAttachMenuProps> {
|
|||||||
const { name } = container;
|
const { name } = container;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MenuItem key={name} onClick={Util.prevDefault(() => this.attachShell(name))} className="flex align-center">
|
<MenuItem key={name} onClick={Util.prevDefault(() => this.attachToPod(name))} className="flex align-center">
|
||||||
<StatusBrick/>
|
<StatusBrick/>
|
||||||
<span>{name}</span>
|
<span>{name}</span>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user