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:
parent
264045cd37
commit
005b993933
@ -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,
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user