mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Make openBrowser->openLinkInBrowser injectable Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove use of deprecated link matcher API from XtermJS Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix type errors Signed-off-by: Sebastian Malton <sebastian@malton.name>
15 lines
468 B
TypeScript
15 lines
468 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
|
|
import type { ForwardedPort } from "./port-forward-item";
|
|
|
|
export function portForwardAddress(portForward: ForwardedPort) {
|
|
return `${portForward.protocol ?? "http"}://localhost:${portForward.forwardPort}`;
|
|
}
|
|
|
|
export function predictProtocol(name: string | undefined) {
|
|
return name === "https" ? "https" : "http";
|
|
}
|