mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Release 6.1.19 (#6552)
* Release 6.1.19 Signed-off-by: Sebastian Malton <sebastian@malton.name> * detach shell process in computeUnixShellEnvironmentInjectable (#6551) Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * Bump electron from 19.1.4 to 19.1.5 (#6546) Bumps [electron](https://github.com/electron/electron) from 19.1.4 to 19.1.5. - [Release notes](https://github.com/electron/electron/releases) - [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md) - [Commits](https://github.com/electron/electron/compare/v19.1.4...v19.1.5) --- updated-dependencies: - dependency-name: electron dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix cron jobs not being viewable on newer kube (#6542) * Replace use of legacy globals with injectables Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove dead code Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix error shown to users when load fails Signed-off-by: Sebastian Malton <sebastian@malton.name> * Switch CronJob default apiBase Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
4c75b43007
commit
28728aeee4
@ -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": "6.1.18",
|
"version": "6.1.19",
|
||||||
"main": "static/build/main.js",
|
"main": "static/build/main.js",
|
||||||
"copyright": "© 2022 OpenLens Authors",
|
"copyright": "© 2022 OpenLens Authors",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -376,7 +376,7 @@
|
|||||||
"css-loader": "^6.7.1",
|
"css-loader": "^6.7.1",
|
||||||
"deepdash": "^5.3.9",
|
"deepdash": "^5.3.9",
|
||||||
"dompurify": "^2.4.0",
|
"dompurify": "^2.4.0",
|
||||||
"electron": "^19.1.4",
|
"electron": "^19.1.5",
|
||||||
"electron-builder": "^23.6.0",
|
"electron-builder": "^23.6.0",
|
||||||
"electron-notarize": "^0.3.0",
|
"electron-notarize": "^0.3.0",
|
||||||
"esbuild": "^0.15.7",
|
"esbuild": "^0.15.7",
|
||||||
|
|||||||
@ -13,7 +13,12 @@ const cronJobApiInjectable = getInjectable({
|
|||||||
instantiate: (di) => {
|
instantiate: (di) => {
|
||||||
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "cronJobApi is only available in certain environments");
|
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "cronJobApi is only available in certain environments");
|
||||||
|
|
||||||
return new CronJobApi();
|
return new CronJobApi({
|
||||||
|
fallbackApiBases: [
|
||||||
|
"/apis/batch/v1beta1/cronjobs",
|
||||||
|
],
|
||||||
|
checkPreferredVersion: true,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
injectionToken: kubeApiInjectionToken,
|
injectionToken: kubeApiInjectionToken,
|
||||||
|
|||||||
@ -73,7 +73,7 @@ export class CronJob extends KubeObject<
|
|||||||
> {
|
> {
|
||||||
static readonly kind = "CronJob";
|
static readonly kind = "CronJob";
|
||||||
static readonly namespaced = true;
|
static readonly namespaced = true;
|
||||||
static readonly apiBase = "/apis/batch/v1beta1/cronjobs";
|
static readonly apiBase = "/apis/batch/v1/cronjobs";
|
||||||
|
|
||||||
getSuspendFlag() {
|
getSuspendFlag() {
|
||||||
return (this.spec.suspend ?? false).toString();
|
return (this.spec.suspend ?? false).toString();
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import type { ClusterContext } from "./cluster-context";
|
|||||||
|
|
||||||
import { action, computed, makeObservable, observable, reaction, when } from "mobx";
|
import { action, computed, makeObservable, observable, reaction, when } from "mobx";
|
||||||
import type { Disposer } from "../utils";
|
import type { Disposer } from "../utils";
|
||||||
import { waitUntilDefined, autoBind, includes, isRequestError, noop, rejectPromiseBy } from "../utils";
|
import { waitUntilDefined, autoBind, includes, noop, rejectPromiseBy } from "../utils";
|
||||||
import type { KubeJsonApiDataFor, KubeObject } from "./kube-object";
|
import type { KubeJsonApiDataFor, KubeObject } from "./kube-object";
|
||||||
import { KubeStatus } from "./kube-object";
|
import { KubeStatus } from "./kube-object";
|
||||||
import type { IKubeWatchEvent } from "./kube-watch-event";
|
import type { IKubeWatchEvent } from "./kube-watch-event";
|
||||||
@ -221,11 +221,7 @@ export abstract class KubeObjectStore<
|
|||||||
try {
|
try {
|
||||||
return await res ?? [];
|
return await res ?? [];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
onLoadFailure((
|
onLoadFailure(String(error));
|
||||||
isRequestError(error)
|
|
||||||
? error.message || error.toString()
|
|
||||||
: "Unknown error"
|
|
||||||
));
|
|
||||||
|
|
||||||
// reset the store because we are loading all, so that nothing is displayed
|
// reset the store because we are loading all, so that nothing is displayed
|
||||||
this.items.clear();
|
this.items.clear();
|
||||||
|
|||||||
@ -105,6 +105,7 @@ const computeUnixShellEnvironmentInjectable = getInjectable({
|
|||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const shellProcess = spawn(shellPath, shellArgs, {
|
const shellProcess = spawn(shellPath, shellArgs, {
|
||||||
signal: opts.signal,
|
signal: opts.signal,
|
||||||
|
detached: true,
|
||||||
env,
|
env,
|
||||||
});
|
});
|
||||||
const stdout: Buffer[] = [];
|
const stdout: Buffer[] = [];
|
||||||
|
|||||||
@ -7,14 +7,18 @@ import "./cronjobs.scss";
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { cronJobStore } from "./legacy-store";
|
|
||||||
import { jobStore } from "../+workloads-jobs/legacy-store";
|
|
||||||
import { eventStore } from "../+events/legacy-store";
|
|
||||||
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
import { KubeObjectListLayout } from "../kube-object-list-layout";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { SiblingsInTabLayout } from "../layout/siblings-in-tab-layout";
|
import { SiblingsInTabLayout } from "../layout/siblings-in-tab-layout";
|
||||||
import { KubeObjectAge } from "../kube-object/age";
|
import { KubeObjectAge } from "../kube-object/age";
|
||||||
|
import type { CronJobStore } from "./store";
|
||||||
|
import type { JobStore } from "../+workloads-jobs/store";
|
||||||
|
import type { EventStore } from "../+events/store";
|
||||||
|
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||||
|
import cronJobStoreInjectable from "./store.injectable";
|
||||||
|
import jobStoreInjectable from "../+workloads-jobs/store.injectable";
|
||||||
|
import eventStoreInjectable from "../+events/store.injectable";
|
||||||
|
|
||||||
enum columnId {
|
enum columnId {
|
||||||
name = "name",
|
name = "name",
|
||||||
@ -26,9 +30,21 @@ enum columnId {
|
|||||||
age = "age",
|
age = "age",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface Dependencies {
|
||||||
|
cronJobStore: CronJobStore;
|
||||||
|
jobStore: JobStore;
|
||||||
|
eventStore: EventStore;
|
||||||
|
}
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class CronJobs extends React.Component {
|
class NonInjectedCronJobs extends React.Component<Dependencies>{
|
||||||
render() {
|
render() {
|
||||||
|
const {
|
||||||
|
cronJobStore,
|
||||||
|
eventStore,
|
||||||
|
jobStore,
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SiblingsInTabLayout>
|
<SiblingsInTabLayout>
|
||||||
<KubeObjectListLayout
|
<KubeObjectListLayout
|
||||||
@ -80,3 +96,11 @@ export class CronJobs extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const CronJobs = withInjectables<Dependencies>(NonInjectedCronJobs, {
|
||||||
|
getProps: (di, props) => ({
|
||||||
|
cronJobStore: di.inject(cronJobStoreInjectable),
|
||||||
|
eventStore: di.inject(eventStoreInjectable),
|
||||||
|
jobStore: di.inject(jobStoreInjectable),
|
||||||
|
...props,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { asLegacyGlobalForExtensionApi } from "../../../extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api";
|
|
||||||
import cronJobStoreInjectable from "./store.injectable";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated use `di.inject(cronJobStoreInjectable)` instead
|
|
||||||
*/
|
|
||||||
export const cronJobStore = asLegacyGlobalForExtensionApi(cronJobStoreInjectable);
|
|
||||||
@ -5199,10 +5199,10 @@ electron-window-state@^5.0.3:
|
|||||||
jsonfile "^4.0.0"
|
jsonfile "^4.0.0"
|
||||||
mkdirp "^0.5.1"
|
mkdirp "^0.5.1"
|
||||||
|
|
||||||
electron@^19.1.4:
|
electron@^19.1.5:
|
||||||
version "19.1.4"
|
version "19.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-19.1.4.tgz#545a23061746ea0d031c622d2b11f9f25aaba72e"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-19.1.5.tgz#c03d5ffd5596870bdd5e95849056738779acd098"
|
||||||
integrity sha512-eOjkxgnQr90Ti7a5BWSUorkDkbwuRZZ4QnHg8LvvWapVWKhVhtaTF26mX1HpS+MGMzlRZtUmdW/d495BnYbu1g==
|
integrity sha512-hOPMeJqNUEcZ/gT+BjaPWJfFIUMeUWrCXn1b4z6Xyk+yQ4NeN3cE4subLJz7SUkeeqmvmlw1HE26M2Oyn3o/YA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get" "^1.14.1"
|
"@electron/get" "^1.14.1"
|
||||||
"@types/node" "^16.11.26"
|
"@types/node" "^16.11.26"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user