1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

address review comments

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Jim Ehrismann 2021-10-22 17:38:57 -04:00
parent 264045cd37
commit 005b993933
2 changed files with 5 additions and 7 deletions

View File

@ -134,12 +134,10 @@ export class PortForwardRoute {
if (!portForward) {
logger.info(`Creating a new port-forward ${namespace}/${resourceType}/${resourceName}:${port}`);
let thePort = 0;
if (forwardPort > 0 && forwardPort < 65536) {
thePort = forwardPort;
}
const thePort = 0 < forwardPort && forwardPort < 65536
? forwardPort
: 0;
portForward = new PortForward(await cluster.getProxyKubeconfigPath(), {
clusterId: cluster.id,
kind: resourceType,

View File

@ -61,7 +61,7 @@ export class PortForwardDialog extends Component<Props> {
static open(portForward: ForwardedPort, options: PortForwardDialogOpenOptions = { openInBrowser: false }) {
dialogState.isOpen = true;
dialogState.data = portForward;
dialogState.useHttps = Boolean(portForward.protocol === "https");
dialogState.useHttps = portForward.protocol === "https";
dialogState.openInBrowser = options.openInBrowser;
}