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"
|
||||
},
|
||||
"config": {
|
||||
"bundledKubectlVersion": "1.17.11",
|
||||
"bundledKubectlVersion": "1.17.15",
|
||||
"bundledHelmVersion": "3.3.4"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@ -56,12 +56,12 @@ export class DistributionDetector extends BaseClusterDetector {
|
||||
return { value: "docker-desktop", accuracy: 80};
|
||||
}
|
||||
|
||||
if (this.isCustom()) {
|
||||
return { value: "custom", accuracy: 10};
|
||||
if (this.isCustom() && await this.isOpenshift()) {
|
||||
return { value: "openshift", accuracy: 90};
|
||||
}
|
||||
|
||||
if (await this.isOpenshift()) {
|
||||
return { value: "openshift", accuracy: 90};
|
||||
if (this.isCustom()) {
|
||||
return { value: "custom", accuracy: 10};
|
||||
}
|
||||
|
||||
return { value: "unknown", accuracy: 10};
|
||||
@ -88,7 +88,7 @@ export class DistributionDetector extends BaseClusterDetector {
|
||||
}
|
||||
|
||||
protected isAKS() {
|
||||
return this.cluster.apiUrl.endsWith("azmk8s.io");
|
||||
return this.cluster.apiUrl.includes("azmk8s.io");
|
||||
}
|
||||
|
||||
protected isMirantis() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { randomBytes } from "crypto";
|
||||
import { SHA256 } from "crypto-js";
|
||||
import { app } from "electron";
|
||||
import { app, remote } from "electron";
|
||||
import fse from "fs-extra";
|
||||
import { action, observable, toJS } from "mobx";
|
||||
import path from "path";
|
||||
@ -31,7 +31,7 @@ export class FilesystemProvisionerStore extends BaseStore<FSProvisionModel> {
|
||||
if (!this.registeredExtensions.has(extensionName)) {
|
||||
const salt = randomBytes(32).toString("hex");
|
||||
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);
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ import "../common/system-ca";
|
||||
import "../common/prometheus-providers";
|
||||
import * as Mobx from "mobx";
|
||||
import * as LensExtensions from "../extensions/core-api";
|
||||
import { app, dialog } from "electron";
|
||||
import { app, dialog, powerMonitor } from "electron";
|
||||
import { appName } from "../common/vars";
|
||||
import path from "path";
|
||||
import { LensProxy } from "./lens-proxy";
|
||||
@ -59,6 +59,10 @@ app.on("ready", async () => {
|
||||
logger.info(`🚀 Starting Lens from "${workingDir}"`);
|
||||
await shellSync();
|
||||
|
||||
powerMonitor.on("shutdown", () => {
|
||||
app.exit();
|
||||
});
|
||||
|
||||
const updater = new AppUpdater();
|
||||
|
||||
updater.start();
|
||||
|
||||
@ -92,13 +92,10 @@ export class CrdResources extends React.Component<Props> {
|
||||
renderTableContents={(crdInstance: KubeObject) => [
|
||||
crdInstance.getName(),
|
||||
isNamespaced && crdInstance.getNs(),
|
||||
...extraColumns.map((column) => {
|
||||
return {
|
||||
renderBoolean: true,
|
||||
children: jsonPath.value(crdInstance, parseJsonPath(column.jsonPath.slice(1))),
|
||||
};
|
||||
}
|
||||
),
|
||||
...extraColumns.map(column => ({
|
||||
renderBoolean: true,
|
||||
children: JSON.stringify(jsonPath.value(crdInstance, parseJsonPath(column.jsonPath.slice(1)))),
|
||||
})),
|
||||
crdInstance.getAge(),
|
||||
]}
|
||||
/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user