mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
some cleanup
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
2d75fd6717
commit
fe1105b60b
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kube-object-event-status",
|
"name": "kube-object-event-status",
|
||||||
"version": "0.0.1",
|
"version": "5.2.0-beta.2.1629813675276",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kube-object-event-status",
|
"name": "kube-object-event-status",
|
||||||
"version": "0.0.1",
|
"version": "5.2.0-beta.2.1629813675276",
|
||||||
"description": "Adds kube object status from events",
|
"description": "Adds kube object status from events",
|
||||||
"renderer": "dist/renderer.js",
|
"renderer": "dist/renderer.js",
|
||||||
"lens": {
|
"lens": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lens-metrics-cluster-feature",
|
"name": "lens-metrics-cluster-feature",
|
||||||
"version": "0.0.1",
|
"version": "5.2.0-beta.2.1629813675276",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lens-metrics-cluster-feature",
|
"name": "lens-metrics-cluster-feature",
|
||||||
"version": "0.0.1",
|
"version": "5.2.0-beta.2.1629813675276",
|
||||||
"description": "Lens metrics cluster feature",
|
"description": "Lens metrics cluster feature",
|
||||||
"renderer": "dist/renderer.js",
|
"renderer": "dist/renderer.js",
|
||||||
"lens": {
|
"lens": {
|
||||||
|
|||||||
2
extensions/node-menu/package-lock.json
generated
2
extensions/node-menu/package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lens-node-menu",
|
"name": "lens-node-menu",
|
||||||
"version": "0.0.1",
|
"version": "5.2.0-beta.2.1629813675276",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lens-node-menu",
|
"name": "lens-node-menu",
|
||||||
"version": "0.0.1",
|
"version": "5.2.0-beta.2.1629813675276",
|
||||||
"description": "Lens node menu",
|
"description": "Lens node menu",
|
||||||
"renderer": "dist/renderer.js",
|
"renderer": "dist/renderer.js",
|
||||||
"lens": {
|
"lens": {
|
||||||
|
|||||||
2
extensions/pod-menu/package-lock.json
generated
2
extensions/pod-menu/package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lens-pod-menu",
|
"name": "lens-pod-menu",
|
||||||
"version": "0.0.1",
|
"version": "5.2.0-beta.2.1629813675276",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lens-pod-menu",
|
"name": "lens-pod-menu",
|
||||||
"version": "0.0.1",
|
"version": "5.2.0-beta.2.1629813675276",
|
||||||
"description": "Lens pod menu",
|
"description": "Lens pod menu",
|
||||||
"renderer": "dist/renderer.js",
|
"renderer": "dist/renderer.js",
|
||||||
"lens": {
|
"lens": {
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"productName": "OpenLens",
|
"productName": "OpenLens",
|
||||||
"description": "OpenLens - Open Source IDE for Kubernetes",
|
"description": "OpenLens - Open Source IDE for Kubernetes",
|
||||||
"homepage": "https://github.com/lensapp/lens",
|
"homepage": "https://github.com/lensapp/lens",
|
||||||
"version": "5.2.0-beta.2",
|
"version": "5.2.0-beta.2.1629813675276",
|
||||||
"main": "static/build/main.js",
|
"main": "static/build/main.js",
|
||||||
"copyright": "© 2021 OpenLens Authors",
|
"copyright": "© 2021 OpenLens Authors",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@ -48,7 +48,6 @@ function getSubFrames(): ClusterFrameInfo[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function broadcastMessage(channel: string, ...args: any[]) {
|
export function broadcastMessage(channel: string, ...args: any[]) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const views = (webContents || remote?.webContents)?.getAllWebContents();
|
const views = (webContents || remote?.webContents)?.getAllWebContents();
|
||||||
|
|
||||||
if (!views) return;
|
if (!views) return;
|
||||||
|
|||||||
@ -19,13 +19,14 @@
|
|||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { app, ipcMain, remote } from "electron";
|
import { ipcMain } from "electron";
|
||||||
import winston, { format } from "winston";
|
import winston, { format } from "winston";
|
||||||
import type Transport from "winston-transport";
|
import type Transport from "winston-transport";
|
||||||
import { consoleFormat } from "winston-console-format";
|
import { consoleFormat } from "winston-console-format";
|
||||||
import { isDebugging, isTestEnv } from "./vars";
|
import { isDebugging, isTestEnv } from "./vars";
|
||||||
import BrowserConsole from "winston-transport-browserconsole";
|
import BrowserConsole from "winston-transport-browserconsole";
|
||||||
import { SentryTransport } from "./logger-transports";
|
import { SentryTransport } from "./logger-transports";
|
||||||
|
import { getPath } from "./utils/getPath";
|
||||||
|
|
||||||
const logLevel = process.env.LOG_LEVEL
|
const logLevel = process.env.LOG_LEVEL
|
||||||
? process.env.LOG_LEVEL
|
? process.env.LOG_LEVEL
|
||||||
@ -69,7 +70,7 @@ if (!isTestEnv) {
|
|||||||
handleExceptions: false,
|
handleExceptions: false,
|
||||||
level: logLevel,
|
level: logLevel,
|
||||||
filename: "lens.log",
|
filename: "lens.log",
|
||||||
dirname: (app ?? remote?.app)?.getPath("logs"),
|
dirname: getPath("logs"),
|
||||||
maxsize: 16 * 1024,
|
maxsize: 16 * 1024,
|
||||||
maxFiles: 16,
|
maxFiles: 16,
|
||||||
tailable: true,
|
tailable: true,
|
||||||
|
|||||||
@ -33,6 +33,5 @@ export function getPath(name: Parameters<typeof app["getPath"]>[0]): string {
|
|||||||
return app.getPath(name);
|
return app.getPath(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
return remote.app.getPath(name);
|
return remote.app.getPath(name);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,13 +19,13 @@
|
|||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { app, remote } from "electron";
|
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import * as uuid from "uuid";
|
import * as uuid from "uuid";
|
||||||
import type { ClusterId } from "../cluster-types";
|
import type { ClusterId } from "../cluster-types";
|
||||||
|
import { getPath } from "./getPath";
|
||||||
|
|
||||||
export function storedKubeConfigFolder(): string {
|
export function storedKubeConfigFolder(): string {
|
||||||
return path.resolve((app || remote.app).getPath("userData"), "kubeconfigs");
|
return path.resolve(getPath("userData"), "kubeconfigs");
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCustomKubeConfigPath(clusterId: ClusterId = uuid.v4()): string {
|
export function getCustomKubeConfigPath(clusterId: ClusterId = uuid.v4()): string {
|
||||||
|
|||||||
@ -26,14 +26,9 @@ import { ClusterManager } from "./cluster-manager";
|
|||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
|
|
||||||
export function exitApp() {
|
export function exitApp() {
|
||||||
console.log("before windowManager");
|
|
||||||
const windowManager = WindowManager.getInstance(false);
|
const windowManager = WindowManager.getInstance(false);
|
||||||
|
|
||||||
console.log("before clusterManager");
|
|
||||||
const clusterManager = ClusterManager.getInstance(false);
|
const clusterManager = ClusterManager.getInstance(false);
|
||||||
|
|
||||||
console.log("after clusterManager");
|
|
||||||
|
|
||||||
appEventBus.emit({ name: "service", action: "close" });
|
appEventBus.emit({ name: "service", action: "close" });
|
||||||
windowManager?.hide();
|
windowManager?.hide();
|
||||||
clusterManager?.stop();
|
clusterManager?.stop();
|
||||||
|
|||||||
@ -65,7 +65,7 @@ export function createAppStorage<T>(key: string, defaultValue: T, clusterId?: st
|
|||||||
// bind auto-saving data changes to %storage-file.json
|
// bind auto-saving data changes to %storage-file.json
|
||||||
reaction(
|
reaction(
|
||||||
() => toJS(storage.data),
|
() => toJS(storage.data),
|
||||||
async (state: Record<string, any> = {}) => {
|
async state => {
|
||||||
logger.info(`${logPrefix} saving ${filePath}`);
|
logger.info(`${logPrefix} saving ${filePath}`);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user