mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add eslint rule padding-line-between-statements (#1593)
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
1 parent
7b77f18376
commit
dcf253e7d5
401 files changed
+2018
-40
No files matched your search
@@ -45,6 +45,7 @@ export class KubeAuthProxy {
|
||||
"--accept-hosts", this.acceptHosts,
|
||||
"--reject-paths", "^[^/]"
|
||||
];
|
||||
|
||||
if (process.env.DEBUG_PROXY === "true") {
|
||||
args.push("-v", "9");
|
||||
}
|
||||
@@ -62,6 +63,7 @@ export class KubeAuthProxy {
|
||||
|
||||
this.proxyProcess.stdout.on("data", (data) => {
|
||||
let logItem = data.toString();
|
||||
|
||||
if (logItem.startsWith("Starting to serve on")) {
|
||||
logItem = "Authentication proxy started\n";
|
||||
}
|
||||
@@ -80,19 +82,23 @@ export class KubeAuthProxy {
|
||||
const error = data.split("http: proxy error:").slice(1).join("").trim();
|
||||
let errorMsg = error;
|
||||
const jsonError = error.split("Response: ")[1];
|
||||
|
||||
if (jsonError) {
|
||||
try {
|
||||
const parsedError = JSON.parse(jsonError);
|
||||
|
||||
errorMsg = parsedError.error_description || parsedError.error || jsonError;
|
||||
} catch (_) {
|
||||
errorMsg = jsonError.trim();
|
||||
}
|
||||
}
|
||||
|
||||
return errorMsg;
|
||||
}
|
||||
|
||||
protected async sendIpcLogMessage(res: KubeAuthProxyLog) {
|
||||
const channel = `kube-auth:${this.cluster.id}`;
|
||||
|
||||
logger.info(`[KUBE-AUTH]: out-channel "${channel}"`, { ...res, meta: this.cluster.getMeta() });
|
||||
broadcastMessage(channel, res);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user