mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Support port forwarding https protocol (#4119)
* added support for port-forwarding https Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * added protocol to the port-forward list and details page. Added the port-forward address to the details page title Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * predict the protocol based on the port name, some cleanup Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * address review comments Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * code reorg Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * fix lint Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
1 parent
bd7ba9ff43
commit
353b79ab76
11 files changed
+120
-39
No files matched your search
@@ -28,7 +28,7 @@ import { observable, makeObservable, reaction } from "mobx";
|
||||
import { cssNames } from "../../utils";
|
||||
import { Notifications } from "../notifications";
|
||||
import { Button } from "../button";
|
||||
import { addPortForward, getPortForward, openPortForward, PortForwardDialog, portForwardStore, removePortForward } from "../../port-forward";
|
||||
import { addPortForward, getPortForward, openPortForward, PortForwardDialog, portForwardStore, predictProtocol, removePortForward } from "../../port-forward";
|
||||
import type { ForwardedPort } from "../../port-forward";
|
||||
import { Spinner } from "../spinner";
|
||||
|
||||
@@ -91,6 +91,7 @@ export class PodContainerPort extends React.Component<Props> {
|
||||
namespace: pod.getNs(),
|
||||
port: port.containerPort,
|
||||
forwardPort: this.forwardPort,
|
||||
protocol: predictProtocol(port.name),
|
||||
};
|
||||
|
||||
this.waiting = true;
|
||||
@@ -149,6 +150,7 @@ export class PodContainerPort extends React.Component<Props> {
|
||||
namespace: pod.getNs(),
|
||||
port: port.containerPort,
|
||||
forwardPort: this.forwardPort,
|
||||
protocol: predictProtocol(port.name),
|
||||
};
|
||||
|
||||
PortForwardDialog.open(portForward, { openInBrowser: true });
|
||||
|
||||
Reference in new issue
Block a user