From 21adda2c6449761a651248562bef76ee31ccf54e Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Tue, 2 Feb 2021 15:34:12 +0200 Subject: [PATCH 01/11] Fix release-drafter yaml error (#2062) Signed-off-by: Jari Kolehmainen --- .github/release-drafter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 0807f640ab..4f61dc9d36 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -10,7 +10,7 @@ categories: - title: '🧰 Maintenance' labels: - 'chore' - - 'area/ci + - 'area/ci' - 'area/tests' template: | From e273bd71f229070f8483ce91603bf3e606356e7c Mon Sep 17 00:00:00 2001 From: Arthur Lutz Date: Tue, 2 Feb 2021 15:07:13 +0100 Subject: [PATCH 02/11] Tray: change order of items, Open first (#2059) Fixes #2032 Signed-off-by: Arthur Lutz --- src/main/tray.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/tray.ts b/src/main/tray.ts index 47f641ad72..44a22d27bf 100644 --- a/src/main/tray.ts +++ b/src/main/tray.ts @@ -62,16 +62,6 @@ function buildTray(icon: string | NativeImage, menu: Menu, windowManager: Window function createTrayMenu(windowManager: WindowManager): Menu { return Menu.buildFromTemplate([ - { - label: "About Lens", - async click() { - // note: argument[1] (browserWindow) not available when app is not focused / hidden - const browserWindow = await windowManager.ensureMainWindow(); - - showAbout(browserWindow); - }, - }, - { type: "separator" }, { label: "Open Lens", async click() { @@ -124,6 +114,15 @@ function createTrayMenu(windowManager: WindowManager): Menu { } }, }, + { + label: "About Lens", + async click() { + // note: argument[1] (browserWindow) not available when app is not focused / hidden + const browserWindow = await windowManager.ensureMainWindow(); + + showAbout(browserWindow); + }, + }, { type: "separator" }, { label: "Quit App", From 068ab855c1a9aa09f097f50ba75763368d114386 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Feb 2021 10:42:31 -0500 Subject: [PATCH 03/11] Bump @typescript-eslint/eslint-plugin from 4.12.0 to 4.14.2 (#2056) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.12.0 to 4.14.2. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.14.2/packages/eslint-plugin) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 76 +++++++++++++++++++++++++--------------------------- 2 files changed, 37 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index a929c5b59b..a21aba3e05 100644 --- a/package.json +++ b/package.json @@ -291,7 +291,7 @@ "@types/webpack-dev-server": "^3.11.1", "@types/webpack-env": "^1.15.2", "@types/webpack-node-externals": "^1.7.1", - "@typescript-eslint/eslint-plugin": "^4.12.0", + "@typescript-eslint/eslint-plugin": "^4.14.2", "@typescript-eslint/parser": "^4.0.0", "ace-builds": "^1.4.11", "ansi_up": "^4.0.4", diff --git a/yarn.lock b/yarn.lock index dd9ec0c1c9..114e2f8b5a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1838,28 +1838,29 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^4.12.0", "@typescript-eslint/eslint-plugin@^4.5.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.12.0.tgz#00d1b23b40b58031e6d7c04a5bc6c1a30a2e834a" - integrity sha512-wHKj6q8s70sO5i39H2g1gtpCXCvjVszzj6FFygneNFyIAxRvNSVz9GML7XpqrB9t7hNutXw+MHnLN/Ih6uyB8Q== +"@typescript-eslint/eslint-plugin@^4.14.2", "@typescript-eslint/eslint-plugin@^4.5.0": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.2.tgz#47a15803cfab89580b96933d348c2721f3d2f6fe" + integrity sha512-uMGfG7GFYK/nYutK/iqYJv6K/Xuog/vrRRZX9aEP4Zv1jsYXuvFUMDFLhUnc8WFv3D2R5QhNQL3VYKmvLS5zsQ== dependencies: - "@typescript-eslint/experimental-utils" "4.12.0" - "@typescript-eslint/scope-manager" "4.12.0" + "@typescript-eslint/experimental-utils" "4.14.2" + "@typescript-eslint/scope-manager" "4.14.2" debug "^4.1.1" functional-red-black-tree "^1.0.1" + lodash "^4.17.15" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.12.0.tgz#372838e76db76c9a56959217b768a19f7129546b" - integrity sha512-MpXZXUAvHt99c9ScXijx7i061o5HEjXltO+sbYfZAAHxv3XankQkPaNi5myy0Yh0Tyea3Hdq1pi7Vsh0GJb0fA== +"@typescript-eslint/experimental-utils@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.2.tgz#9df35049d1d36b6cbaba534d703648b9e1f05cbb" + integrity sha512-mV9pmET4C2y2WlyHmD+Iun8SAEqkLahHGBkGqDVslHkmoj3VnxnGP4ANlwuxxfq1BsKdl/MPieDbohCEQgKrwA== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.12.0" - "@typescript-eslint/types" "4.12.0" - "@typescript-eslint/typescript-estree" "4.12.0" + "@typescript-eslint/scope-manager" "4.14.2" + "@typescript-eslint/types" "4.14.2" + "@typescript-eslint/typescript-estree" "4.14.2" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -1873,13 +1874,13 @@ "@typescript-eslint/typescript-estree" "4.8.2" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.12.0.tgz#beeb8beca895a07b10c593185a5612f1085ef279" - integrity sha512-QVf9oCSVLte/8jvOsxmgBdOaoe2J0wtEmBr13Yz0rkBNkl5D8bfnf6G4Vhox9qqMIoG7QQoVwd2eG9DM/ge4Qg== +"@typescript-eslint/scope-manager@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.14.2.tgz#64cbc9ca64b60069aae0c060b2bf81163243b266" + integrity sha512-cuV9wMrzKm6yIuV48aTPfIeqErt5xceTheAgk70N1V4/2Ecj+fhl34iro/vIssJlb7XtzcaD07hWk7Jk0nKghg== dependencies: - "@typescript-eslint/types" "4.12.0" - "@typescript-eslint/visitor-keys" "4.12.0" + "@typescript-eslint/types" "4.14.2" + "@typescript-eslint/visitor-keys" "4.14.2" "@typescript-eslint/scope-manager@4.8.2": version "4.8.2" @@ -1889,23 +1890,23 @@ "@typescript-eslint/types" "4.8.2" "@typescript-eslint/visitor-keys" "4.8.2" -"@typescript-eslint/types@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.12.0.tgz#fb891fe7ccc9ea8b2bbd2780e36da45d0dc055e5" - integrity sha512-N2RhGeheVLGtyy+CxRmxdsniB7sMSCfsnbh8K/+RUIXYYq3Ub5+sukRCjVE80QerrUBvuEvs4fDhz5AW/pcL6g== +"@typescript-eslint/types@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.2.tgz#d96da62be22dc9dc6a06647f3633815350fb3174" + integrity sha512-LltxawRW6wXy4Gck6ZKlBD05tCHQUj4KLn4iR69IyRiDHX3d3NCAhO+ix5OR2Q+q9bjCrHE/HKt+riZkd1At8Q== "@typescript-eslint/types@4.8.2": version "4.8.2" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.2.tgz#c862dd0e569d9478eb82d6aee662ea53f5661a36" integrity sha512-z1/AVcVF8ju5ObaHe2fOpZYEQrwHyZ7PTOlmjd3EoFeX9sv7UekQhfrCmgUO7PruLNfSHrJGQvrW3Q7xQ8EoAw== -"@typescript-eslint/typescript-estree@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.12.0.tgz#3963418c850f564bdab3882ae23795d115d6d32e" - integrity sha512-gZkFcmmp/CnzqD2RKMich2/FjBTsYopjiwJCroxqHZIY11IIoN0l5lKqcgoAPKHt33H2mAkSfvzj8i44Jm7F4w== +"@typescript-eslint/typescript-estree@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.2.tgz#9c5ebd8cae4d7b014f890acd81e8e17f309c9df9" + integrity sha512-ESiFl8afXxt1dNj8ENEZT12p+jl9PqRur+Y19m0Z/SPikGL6rqq4e7Me60SU9a2M28uz48/8yct97VQYaGl0Vg== dependencies: - "@typescript-eslint/types" "4.12.0" - "@typescript-eslint/visitor-keys" "4.12.0" + "@typescript-eslint/types" "4.14.2" + "@typescript-eslint/visitor-keys" "4.14.2" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -1927,12 +1928,12 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.12.0.tgz#a470a79be6958075fa91c725371a83baf428a67a" - integrity sha512-hVpsLARbDh4B9TKYz5cLbcdMIOAoBYgFPCSP9FFS/liSF+b33gVNq8JHY3QGhHNVz85hObvL7BEYLlgx553WCw== +"@typescript-eslint/visitor-keys@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.2.tgz#997cbe2cb0690e1f384a833f64794e98727c70c6" + integrity sha512-KBB+xLBxnBdTENs/rUgeUKO0UkPBRs2vD09oMRRIkj5BEN8PX1ToXV532desXfpQnZsYTyLLviS7JrPhdL154w== dependencies: - "@typescript-eslint/types" "4.12.0" + "@typescript-eslint/types" "4.14.2" eslint-visitor-keys "^2.0.0" "@typescript-eslint/visitor-keys@4.8.2": @@ -8654,12 +8655,7 @@ lodash.without@~4.4.0: resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= -lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.3.0, lodash@^4.8.0, lodash@~4.17.10: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== - -lodash@^4.17.19: +lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.3.0, lodash@^4.8.0, lodash@~4.17.10: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== From 2c99cd0429c166d63404cd5cdf391cdf8e6941df Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 3 Feb 2021 18:24:12 +0200 Subject: [PATCH 04/11] 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 05/11] 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 (