mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Merge branch 'master' into fix/jsonpath_on_additional_printer_columns
This commit is contained in:
commit
3453c337de
@ -44,7 +44,7 @@
|
|||||||
"typedocs-extensions-api": "yarn run typedoc --ignoreCompilerErrors --readme docs/extensions/typedoc-readme.md.tpl --name @k8slens/extensions --out docs/extensions/api --mode library --excludePrivate --hideBreadcrumbs --includes src/ src/extensions/extension-api.ts"
|
"typedocs-extensions-api": "yarn run typedoc --ignoreCompilerErrors --readme docs/extensions/typedoc-readme.md.tpl --name @k8slens/extensions --out docs/extensions/api --mode library --excludePrivate --hideBreadcrumbs --includes src/ src/extensions/extension-api.ts"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"bundledKubectlVersion": "1.17.11",
|
"bundledKubectlVersion": "1.17.15",
|
||||||
"bundledHelmVersion": "3.3.4"
|
"bundledHelmVersion": "3.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@ -56,12 +56,12 @@ export class DistributionDetector extends BaseClusterDetector {
|
|||||||
return { value: "docker-desktop", accuracy: 80};
|
return { value: "docker-desktop", accuracy: 80};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isCustom()) {
|
if (this.isCustom() && await this.isOpenshift()) {
|
||||||
return { value: "custom", accuracy: 10};
|
return { value: "openshift", accuracy: 90};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await this.isOpenshift()) {
|
if (this.isCustom()) {
|
||||||
return { value: "openshift", accuracy: 90};
|
return { value: "custom", accuracy: 10};
|
||||||
}
|
}
|
||||||
|
|
||||||
return { value: "unknown", accuracy: 10};
|
return { value: "unknown", accuracy: 10};
|
||||||
@ -88,7 +88,7 @@ export class DistributionDetector extends BaseClusterDetector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected isAKS() {
|
protected isAKS() {
|
||||||
return this.cluster.apiUrl.endsWith("azmk8s.io");
|
return this.cluster.apiUrl.includes("azmk8s.io");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected isMirantis() {
|
protected isMirantis() {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { randomBytes } from "crypto";
|
import { randomBytes } from "crypto";
|
||||||
import { SHA256 } from "crypto-js";
|
import { SHA256 } from "crypto-js";
|
||||||
import { app } from "electron";
|
import { app, remote } from "electron";
|
||||||
import fse from "fs-extra";
|
import fse from "fs-extra";
|
||||||
import { action, observable, toJS } from "mobx";
|
import { action, observable, toJS } from "mobx";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
@ -31,7 +31,7 @@ export class FilesystemProvisionerStore extends BaseStore<FSProvisionModel> {
|
|||||||
if (!this.registeredExtensions.has(extensionName)) {
|
if (!this.registeredExtensions.has(extensionName)) {
|
||||||
const salt = randomBytes(32).toString("hex");
|
const salt = randomBytes(32).toString("hex");
|
||||||
const hashedName = SHA256(`${extensionName}/${salt}`).toString();
|
const hashedName = SHA256(`${extensionName}/${salt}`).toString();
|
||||||
const dirPath = path.resolve(app.getPath("userData"), "extension_data", hashedName);
|
const dirPath = path.resolve((app || remote.app).getPath("userData"), "extension_data", hashedName);
|
||||||
|
|
||||||
this.registeredExtensions.set(extensionName, dirPath);
|
this.registeredExtensions.set(extensionName, dirPath);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import "../common/system-ca";
|
|||||||
import "../common/prometheus-providers";
|
import "../common/prometheus-providers";
|
||||||
import * as Mobx from "mobx";
|
import * as Mobx from "mobx";
|
||||||
import * as LensExtensions from "../extensions/core-api";
|
import * as LensExtensions from "../extensions/core-api";
|
||||||
import { app, dialog } from "electron";
|
import { app, dialog, powerMonitor } from "electron";
|
||||||
import { appName } from "../common/vars";
|
import { appName } from "../common/vars";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { LensProxy } from "./lens-proxy";
|
import { LensProxy } from "./lens-proxy";
|
||||||
@ -59,6 +59,10 @@ app.on("ready", async () => {
|
|||||||
logger.info(`🚀 Starting Lens from "${workingDir}"`);
|
logger.info(`🚀 Starting Lens from "${workingDir}"`);
|
||||||
await shellSync();
|
await shellSync();
|
||||||
|
|
||||||
|
powerMonitor.on("shutdown", () => {
|
||||||
|
app.exit();
|
||||||
|
});
|
||||||
|
|
||||||
const updater = new AppUpdater();
|
const updater = new AppUpdater();
|
||||||
|
|
||||||
updater.start();
|
updater.start();
|
||||||
|
|||||||
@ -92,13 +92,10 @@ export class CrdResources extends React.Component<Props> {
|
|||||||
renderTableContents={(crdInstance: KubeObject) => [
|
renderTableContents={(crdInstance: KubeObject) => [
|
||||||
crdInstance.getName(),
|
crdInstance.getName(),
|
||||||
isNamespaced && crdInstance.getNs(),
|
isNamespaced && crdInstance.getNs(),
|
||||||
...extraColumns.map((column) => {
|
...extraColumns.map(column => ({
|
||||||
return {
|
renderBoolean: true,
|
||||||
renderBoolean: true,
|
children: JSON.stringify(jsonPath.value(crdInstance, parseJsonPath(column.jsonPath.slice(1)))),
|
||||||
children: jsonPath.value(crdInstance, parseJsonPath(column.jsonPath.slice(1))),
|
})),
|
||||||
};
|
|
||||||
}
|
|
||||||
),
|
|
||||||
crdInstance.getAge(),
|
crdInstance.getAge(),
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user