From 2c99cd0429c166d63404cd5cdf391cdf8e6941df Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 3 Feb 2021 18:24:12 +0200 Subject: [PATCH 1/3] Release v4.1.0-alpha.2 (#2064) Signed-off-by: Jari Kolehmainen --- package.json | 4 ++-- static/RELEASE_NOTES.md | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index a21aba3e05..1b060a49d2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "kontena-lens", "productName": "Lens", "description": "Lens - The Kubernetes IDE", - "version": "4.1.0-alpha.1", + "version": "4.1.0-alpha.2", "main": "static/build/main.js", "copyright": "© 2020, Mirantis, Inc.", "license": "MIT", @@ -160,7 +160,7 @@ "nsis": { "include": "build/installer.nsh", "oneClick": false, - "allowToChangeInstallationDirectory": true + "allowToChangeInstallationDirectory": true }, "publish": [ { diff --git a/static/RELEASE_NOTES.md b/static/RELEASE_NOTES.md index cdcf919304..adbc18c6cf 100644 --- a/static/RELEASE_NOTES.md +++ b/static/RELEASE_NOTES.md @@ -2,13 +2,16 @@ Here you can find description of changes we've built into each release. While we try our best to make each upgrade automatic and as smooth as possible, there may be some cases where you might need to do something to ensure the application works smoothly. So please read through the release highlights! -## 4.1.0-alpha.1 (current version) +## 4.1.0-alpha.2 (current version) - Change: list views default to a namespace (insted of listing resources from all namespaces) +- Command palette - Generic logs view with Pod selector - Possibility to add custom Helm repository through Lens -- Possibility to change visibility of Pod list columns +- Possibility to change visibility of common resource list columns - Suspend / resume buttons for CronJobs +- Allow namespace to specified on role creation +- Allow for changing installation directory on Windows - Dock tabs context menu - Display node column in Pod list - Unify age column output with kubectl @@ -16,6 +19,8 @@ Here you can find description of changes we've built into each release. While we - Improve Pod tolerations layout - Lens metrics: scrape only lens-metrics namespace - Lens metrics: Prometheus v2.19.3 +- Update bundled kubectl to v1.18.15 +- Improve how watch requests are handled - Export PodDetailsList component to extension API - Export Wizard components to extension API - Export NamespaceSelect component to extension API From 1b492f27addee7a5e1a146afea5a0719bd6b665d Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 3 Feb 2021 19:01:45 +0200 Subject: [PATCH 2/3] Allow to quick select/deselect all namespaces in `NamespaceSelect` (#2068) * allow to quick select/deselect all namespaces in `NamespaceSelect` Signed-off-by: Roman * fixes & refactoring Signed-off-by: Roman --- .../+namespaces/namespace-select.tsx | 87 ++++++++++++------- .../components/+namespaces/namespace.store.ts | 76 +++++++++------- .../item-object-list/page-filters.store.ts | 2 +- 3 files changed, 100 insertions(+), 65 deletions(-) diff --git a/src/renderer/components/+namespaces/namespace-select.tsx b/src/renderer/components/+namespaces/namespace-select.tsx index 6ee7ea2d57..5bcf07e1cf 100644 --- a/src/renderer/components/+namespaces/namespace-select.tsx +++ b/src/renderer/components/+namespaces/namespace-select.tsx @@ -13,17 +13,14 @@ import { kubeWatchApi } from "../../api/kube-watch-api"; interface Props extends SelectProps { showIcons?: boolean; - showClusterOption?: boolean; // show cluster option on the top (default: false) - clusterOptionLabel?: React.ReactNode; // label for cluster option (default: "Cluster") - customizeOptions?(nsOptions: SelectOption[]): SelectOption[]; + showClusterOption?: boolean; // show "Cluster" option on the top (default: false) + showAllNamespacesOption?: boolean; // show "All namespaces" option on the top (default: false) + customizeOptions?(options: SelectOption[]): SelectOption[]; } const defaultProps: Partial = { showIcons: true, showClusterOption: false, - get clusterOptionLabel() { - return `Cluster`; - }, }; @observer @@ -39,13 +36,17 @@ export class NamespaceSelect extends React.Component { } @computed get options(): SelectOption[] { - const { customizeOptions, showClusterOption, clusterOptionLabel } = this.props; + const { customizeOptions, showClusterOption, showAllNamespacesOption } = this.props; let options: SelectOption[] = namespaceStore.items.map(ns => ({ value: ns.getName() })); - options = customizeOptions ? customizeOptions(options) : options; + if (showAllNamespacesOption) { + options.unshift({ label: "All Namespaces", value: "" }); + } else if (showClusterOption) { + options.unshift({ label: "Cluster", value: "" }); + } - if (showClusterOption) { - options.unshift({ value: null, label: clusterOptionLabel }); + if (customizeOptions) { + options = customizeOptions(options); } return options; @@ -64,7 +65,7 @@ export class NamespaceSelect extends React.Component { }; render() { - const { className, showIcons, showClusterOption, clusterOptionLabel, customizeOptions, ...selectProps } = this.props; + const { className, showIcons, customizeOptions, ...selectProps } = this.props; return (