Revert "Add a few missing folders to be linted."

This reverts commit c7b24c2922.
This commit is contained in:
Alex Andreev committed 2020-11-20 07:51:42 +03:00
1 parent 2cd5e129f1
commit 20cc91bf30
29 files changed
+397 -399

No files matched your search

+3 -3
View File
@@ -1,7 +1,7 @@
import { LensRendererExtension } from "@k8slens/extensions";
import { PodShellMenu, PodShellMenuProps } from "./src/shell-menu";
import { PodLogsMenu, PodLogsMenuProps } from "./src/logs-menu";
import React from "react";
import { PodShellMenu, PodShellMenuProps } from "./src/shell-menu"
import { PodLogsMenu, PodLogsMenuProps } from "./src/logs-menu"
import React from "react"
export default class PodMenuRendererExtension extends LensRendererExtension {
kubeObjectMenuItems = [
+5 -5
View File
@@ -19,7 +19,7 @@ export class PodLogsMenu extends React.Component<PodLogsMenuProps> {
}
render() {
const { object: pod, toolbar } = this.props;
const { object: pod, toolbar } = this.props
const containers = pod.getAllContainers();
const statuses = pod.getContainerStatuses();
if (!containers.length) return null;
@@ -33,25 +33,25 @@ export class PodLogsMenu extends React.Component<PodLogsMenuProps> {
<Component.SubMenu>
{
containers.map(container => {
const { name } = container;
const { name } = container
const status = statuses.find(status => status.name === name);
const brick = status ? (
<Component.StatusBrick
className={Util.cssNames(Object.keys(status.state)[0], { ready: status.ready })}
/>
) : null;
) : null
return (
<Component.MenuItem key={name} onClick={Util.prevDefault(() => this.showLogs(container))} className="flex align-center">
{brick}
{name}
</Component.MenuItem>
);
)
})
}
</Component.SubMenu>
</>
)}
</Component.MenuItem>
);
)
}
}
+9 -9
View File
@@ -9,16 +9,16 @@ export interface PodShellMenuProps extends Component.KubeObjectMenuProps<K8sApi.
export class PodShellMenu extends React.Component<PodShellMenuProps> {
async execShell(container?: string) {
Navigation.hideDetails();
const { object: pod } = this.props;
const containerParam = container ? `-c ${container}` : "";
let command = `kubectl exec -i -t -n ${pod.getNs()} ${pod.getName()} ${containerParam} "--"`;
const { object: pod } = this.props
const containerParam = container ? `-c ${container}` : ""
let command = `kubectl exec -i -t -n ${pod.getNs()} ${pod.getName()} ${containerParam} "--"`
if (window.navigator.platform !== "Win32") {
command = `exec ${command}`;
command = `exec ${command}`
}
if (pod.getSelectedNodeOs() === "windows") {
command = `${command} powershell`;
command = `${command} powershell`
} else {
command = `${command} sh -c "clear; (bash || ash || sh)"`;
command = `${command} sh -c "clear; (bash || ash || sh)"`
}
const shell = Component.createTerminalTab({
@@ -32,7 +32,7 @@ export class PodShellMenu extends React.Component<PodShellMenuProps> {
}
render() {
const { object, toolbar } = this.props;
const { object, toolbar } = this.props
const containers = object.getRunningContainers();
if (!containers.length) return null;
return (
@@ -51,13 +51,13 @@ export class PodShellMenu extends React.Component<PodShellMenuProps> {
<Component.StatusBrick/>
{name}
</Component.MenuItem>
);
)
})
}
</Component.SubMenu>
</>
)}
</Component.MenuItem>
);
)
}
}