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) {
|
if (!portForward) {
|
||||||
logger.info(`Creating a new port-forward ${namespace}/${resourceType}/${resourceName}:${port}`);
|
logger.info(`Creating a new port-forward ${namespace}/${resourceType}/${resourceName}:${port}`);
|
||||||
|
|
||||||
let thePort = 0;
|
const thePort = 0 < forwardPort && forwardPort < 65536
|
||||||
|
? forwardPort
|
||||||
if (forwardPort > 0 && forwardPort < 65536) {
|
: 0;
|
||||||
thePort = forwardPort;
|
|
||||||
}
|
|
||||||
|
|
||||||
portForward = new PortForward(await cluster.getProxyKubeconfigPath(), {
|
portForward = new PortForward(await cluster.getProxyKubeconfigPath(), {
|
||||||
clusterId: cluster.id,
|
clusterId: cluster.id,
|
||||||
kind: resourceType,
|
kind: resourceType,
|
||||||
|
|||||||
@ -61,7 +61,7 @@ export class PortForwardDialog extends Component<Props> {
|
|||||||
static open(portForward: ForwardedPort, options: PortForwardDialogOpenOptions = { openInBrowser: false }) {
|
static open(portForward: ForwardedPort, options: PortForwardDialogOpenOptions = { openInBrowser: false }) {
|
||||||
dialogState.isOpen = true;
|
dialogState.isOpen = true;
|
||||||
dialogState.data = portForward;
|
dialogState.data = portForward;
|
||||||
dialogState.useHttps = Boolean(portForward.protocol === "https");
|
dialogState.useHttps = portForward.protocol === "https";
|
||||||
dialogState.openInBrowser = options.openInBrowser;
|
dialogState.openInBrowser = options.openInBrowser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user