1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Commit Graph

403 Commits

Author SHA1 Message Date
Sebastian Malton
21f4769f65
Cherry Pick from master to release/v5.4 (#4945) 2022-03-01 11:14:47 -05:00
Janne Savolainen
81819dbbe9
Revert accidental breaking change in Extension API (#4904)
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-02-23 13:26:14 +02:00
Sebastian Malton
9c604dcfa1
Fix UnhandledPromiseRejectionWarning in KubeApi.watch (#4919)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-02-22 13:34:49 -05:00
Steven Johnstone
625b00c247
Introduce and use "openBrowser" (#4876)
Co-authored-by: Steven Johnstone <sjohntone@mirantis.com>
2022-02-17 08:37:34 -05:00
Sebastian Malton
8088d3b5c2
Remove ExtenedMap, ToggleSet, and observable versions (#3310)
- Switch to helper functions instead. They don't impact the prototype
  tree and it means that we don't need to introduce versions that are
  both observable and "normal"

- Tidy <ItemListLayout> and hiddenTableColumns to not need
  pre-initialization

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-02-16 18:20:22 -05:00
Sebastian Malton
dd819bb534
Refine UserStore from/to usage (#3292) 2022-02-16 14:43:19 -05:00
Sebastian Malton
600bd659f6
Enforce member-delimiter-style using eslint (#4870) 2022-02-16 14:43:03 -05:00
Jim Ehrismann
733bb543c9
Revert "Upgrade to webpack@5 (#4725)" (#4872) 2022-02-16 09:14:14 -05:00
Roman
d656a9e289
Upgrade to webpack@5 (#4725)
* attempt to upgrade webpack@5 and all relevant packages to latest version -- part 1

Signed-off-by: Roman <ixrock@gmail.com>

* debugging webpack@5 usage -- part 1

Signed-off-by: Roman <ixrock@gmail.com>

* - attempt to use "react-refresh-typescript" with webpack@5 thingy
- extending getTSLoader() to accept more options from ts-loader

Signed-off-by: Roman <ixrock@gmail.com>

* more fixes, updating webpack loaders

Signed-off-by: Roman <ixrock@gmail.com>

* merge-fixes, using internal webpack@5 asset handlers (type: "asset/*")

Signed-off-by: Roman <ixrock@gmail.com>

* fix: raw-loader / <Icon svg="./*">, updated mocked types for importing resources via webpack

Signed-off-by: Roman <ixrock@gmail.com>

* removing webpack-dev-server, clean up

Signed-off-by: Roman <ixrock@gmail.com>

* fix master-merge conflict

Signed-off-by: Roman <ixrock@gmail.com>

* fix/reverted: use sourceMap for styles

Signed-off-by: Roman <ixrock@gmail.com>

* fix lint

Signed-off-by: Roman <ixrock@gmail.com>

* fix: loading svg icons inline as data-url (workaround for "?raw" as it fails in tests and "!!raw-loader!" seems doesn't work at all in webpack@5)

Signed-off-by: Roman <ixrock@gmail.com>

* attempt to use webpack-dev-server via node-api -- part 1

Signed-off-by: Roman <ixrock@gmail.com>

* attempt to use webpack-dev-server via node-api -- part 2

Signed-off-by: Roman <ixrock@gmail.com>

* fix: incorrect parsing svg-icon xml-content by <HotbarEntityIcon/>

Signed-off-by: Roman <ixrock@gmail.com>

* fix: more random fixes related to incorrect parsing svg-icon content, added static Icon.isSvg(content: string)

Signed-off-by: Roman <ixrock@gmail.com>

* attempt to fix: "Uncaught (in promise) DOMException: A network error occurred." when loading cluster frame -- part 1

Signed-off-by: Roman <ixrock@gmail.com>

* fix: loading cluster frame + error in loading terminal default font (which was causing network exception error and hidden cluster-view)
fix: proxying websockets (e.g. terminal)

Signed-off-by: Roman <ixrock@gmail.com>

* fix: wait lensProxy.listen() to obtain lensProxy.port for webpack-dev-server

Signed-off-by: Roman <ixrock@gmail.com>

* fix lint

Signed-off-by: Roman <ixrock@gmail.com>

* fix unit tests

Signed-off-by: Roman <ixrock@gmail.com>

* reverted auto-formatted imports with 2 lines (.idea/webstorm)

Signed-off-by: Roman <ixrock@gmail.com>

* fix: handle warnings in main-process compilation files

Signed-off-by: Roman <ixrock@gmail.com>

* fix: handle warnings in "renderer" compilation

Signed-off-by: Roman <ixrock@gmail.com>

* fix: move app fonts preloading into html/css files, clean up

Signed-off-by: Roman <ixrock@gmail.com>

* update "webpack@5", "typescript@4.5" in bundled extensions / attempt to fix weird errors in build pipeline:

ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/common/catalog/catalog-category-registry.d.ts
6:27-35
[tsl] ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/common/catalog/catalog-category-registry.d.ts(6,28)
      TS1005: ',' expected.

ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/renderer/components/select/select.d.ts
8:14-28
[tsl] ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/renderer/components/select/select.d.ts(8,15)
      TS1005: ',' expected.

ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/renderer/api/catalog-entity-registry.d.ts
8:14-22
[tsl] ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/renderer/api/catalog-entity-registry.d.ts(8,15)
      TS1005: ',' expected.

Signed-off-by: Roman <ixrock@gmail.com>

* fix: handle errors in bundled extensions compilation process

Signed-off-by: Roman <ixrock@gmail.com>

* fix: "webpack" not found in production

Signed-off-by: Roman <ixrock@gmail.com>

* fix: removed preloading fonts in template via <link preload> since it's not bundled with HtmlWebpackPlugin() anyway anda all fonts loaded via css @font-face rule

Signed-off-by: Roman <ixrock@gmail.com>

* apply HMR at least for css/styles and use manual page reload on app/scripts change

Signed-off-by: Roman <ixrock@gmail.com>

* use `react-refresh-typescript` and `@pmmmwh/react-refresh-webpack-plugin` to support HMR in most cases

Signed-off-by: Roman <ixrock@gmail.com>

* responding to comments

Signed-off-by: Roman <ixrock@gmail.com>

* revered extension version in package-lock.json (autoupdated on `make dev`)

Signed-off-by: Roman <ixrock@gmail.com>
2022-02-15 17:04:12 +02:00
Sebastian Malton
81e6dc5d8e
Allow better typings for extending type of KubernetesCluster (#4843) 2022-02-10 15:55:03 -05:00
Sebastian Malton
0745f9c063
Fix Cluster.refresh sometimes taking upwards of 20s (#4826)
- Only read and parse the proxy config once

- Reuse the AuthorizationV1Api instance for the entire refresh instead
  of recreating it between 32 and 302 times, this should allow for
  reusing sockets

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-02-08 15:37:46 +02:00
Sebastian Malton
4abe0d6c20
Only group delete visible items (#4798) 2022-02-07 10:40:20 -05:00
Sebastian Malton
76f48df56b
Fix rerendering of KubeObject views every 30s (#4801)
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
2022-02-03 09:11:28 -05:00
Sebastian Malton
dd4aa30b8d
Update Node.getRoleLabels() to work with kube 1.16's defaults (#4771)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-02-01 07:33:39 -05:00
Sebastian Malton
0b1696fe16
Fix build due to removal of old extended collections (#4779) 2022-01-31 10:46:40 -05:00
Sebastian Malton
0ce4e3d793
Full dependency inversion of <Dock> and all current tab kinds (#4757)
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-31 09:49:36 -05:00
Sebastian Malton
38790eb886
Upgrade to latest for all linting deps (#4755)
* Upgrade to eslint latest

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix OOM error

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* resolve PR comments

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-01-29 07:46:37 -05:00
Sebastian Malton
8d8491a035
Ensure that CatalogEntity.getName() and CatalogEntity.getId() are always used (#4763) 2022-01-27 14:42:19 -05:00
Jari Kolehmainen
1cac3ca74c
Upgrade to Electron 14.2.4 (#4625)
Co-authored-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Jim Ehrismann <jehrismann@mirantis.com>
2022-01-27 10:23:36 -05:00
Sebastian Malton
b3df5b4fc6
Fix pod logs dock tab (#4738)
- Move all dependencies into a transient LogsViewModel

- Remove dependencies on dockStore.selectedTab

- Make all bindings as late as possible, as per mobx rules

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-01-25 07:04:11 -05:00
Sebastian Malton
53ffc62391
Add extension API for registering custom category views (#4733) 2022-01-21 16:44:57 -05:00
Janne Savolainen
4f5a2988cb
Fix infinite render loop in release details (#4710)
* Fix infinite render loop in release details by replacing stateful, UI-triggered releaseStore with reactive async computed

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Update injectable

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove unnecessary return

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove empty lines

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Allow injection of history

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make data required for opening of release details a dependency to make sure it's present

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove dead code

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make arriving release values not re-render whole details

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-21 16:29:10 +02:00
Dmitriy Noa
b7d29f8c49
Font settings for editor and ternimal (#4694)
* Add font settings for editor. Add terminal tab

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Move shell settings to terminal tab

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Add termilan font settings to store

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Fix store crash

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Cleanup

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Remove unsued font-list

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Cleanup. Move default font size to a const

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Remove package.lock

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* PR fixes and cleanup

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Move to settings object

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Test

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Add reaction to update terminals. Cleanup

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Add config field to terminal

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Merge with master and resolve conflicts

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Fix merge issues

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

* Fix lint and resolve conflicts

Signed-off-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>

Co-authored-by: DMYTRO ZHARKOV <dmytrozharkov@DMYTROs-MBP.fritz.box>
2022-01-21 09:18:53 +01:00
Sebastian Malton
411b9a9a88
Add support for custom columns on catalog categories (#4708) 2022-01-19 10:22:22 -05:00
Jari Kolehmainen
b7cb10521e
Drop old (< 3.0) cluster-store migrations (#4718) 2022-01-19 08:27:34 -05:00
Panu Horsmalahti
79c01daf6a
Support extending KubernetesCluster in extensions (#4702)
* Support extending KubernetesCluster in extensions

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Simplify getItemsByEntityClass

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Make apiVersion string.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Improve entity loading for extension custom types.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Improve comment.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Fix lint.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Properly handle loading custom entity in cluster-frame

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Avoid .bind with .loadOnClusterRenderer

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Fix lint.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Revert style change.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Make loadOnClusterRenderer arrow function again, revert autoInitExtensions change as unnecessary

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Remove commented code.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>

* Document extending KubernetesCluster in extension guides.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2022-01-19 14:57:42 +02:00
Roman
e862d5bf1d
Allow to customize terminal theme (#4666) (#4690)
Allow to customize terminal theme, fix #2224

(cherry picked from commit a5e89b79d6)
2022-01-18 18:16:50 +02:00
Janne Savolainen
589472c2b5
Shorten license header to reduce amount of clutter in top of the files (#4709)
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-18 10:18:10 +02:00
Gaurav Agrawal
66d0a354b1
replacing the deprecated substr() with slice() (#4687) 2022-01-17 13:57:03 -05:00
Janne Savolainen
00f6d6bc1f
Merge remote-tracking branch 'origin/master' into eliminate-gst-from-app-paths 2022-01-14 07:59:42 +02:00
Janne Savolainen
7c97303414
Remove duplicated LICENSE header
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-14 07:52:37 +02:00
Roman
0be1ab4ce0
Revert "Allow to customize terminal theme (#4666)" (#4682)
This reverts commit a5e89b79d6.
2022-01-13 12:54:54 +02:00
Janne Savolainen
06379b089b
Add TODO
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-13 09:01:34 +02:00
Roman
a5e89b79d6
Allow to customize terminal theme (#4666)
Allow to customize terminal theme, fix #2224
2022-01-12 17:42:51 +02:00
Sebastian Malton
14b30d84a1
Fix crash for KubeObjectStore.loadAll() (#4675)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-01-12 07:05:27 -05:00
Janne Savolainen
070750e736
Try fixing unit test in windows
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-11 14:51:57 +02:00
Janne Savolainen
883ece7ea2
Make unit test not fail on windows
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-11 14:34:46 +02:00
Janne Savolainen
8d87bd0985
Merge remote-tracking branch 'origin/master' into eliminate-gst-from-app-paths
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-11 13:56:23 +02:00
Janne Savolainen
f7f27a8304
Merge pull request #4424 from lensapp/issue-3258
Command Palette Improvements
2022-01-11 09:20:02 +02:00
Sebastian Malton
56c15e6b0f
Minor cleanup of Kubectl's downloadKubectl and writeInitScripts (#4556) 2022-01-10 10:48:58 -05:00
Janne Savolainen
e1a6d4c4a9
Merge remote-tracking branch 'origin/master' into eliminate-gst-from-app-paths 2022-01-10 17:13:20 +02:00
Janne Savolainen
48948c7286
Fix endless re-rending of logs
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-10 16:54:03 +02:00
Sebastian Malton
fa3708c879
Add eslint:recommended lint rule (#4577) 2022-01-07 08:38:21 -05:00
Janne Savolainen
ff9e9bd169
Re-implement some Extension API features using injectables
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-07 12:10:02 +02:00
Sebastian Malton
3ce9bfe4f9 Move hotbarManagerInjectable to different file
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-01-05 12:10:21 -05:00
Sebastian Malton
f8ae1149fb Make all of Command* injectable, with some others too
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-01-05 11:48:52 -05:00
Sebastian Malton
abe90ad92a Add CRDs to Command Palette and fix bugs
- Deprecate the "scope" on command registrations as it is buggy and
  generally unfixable

- Switch to mounting CommandContainer in each new frame so that there is
  no need to broadcast anything other than opening palette

- Add CRD entries to the command registry within each cluster

- Add navigate to CommandActionContext to simplify handling of root
  frame scoped URLs

- Switch to using DI for some of the deps

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-01-05 11:48:51 -05:00
Sebastian Malton
4f75acf2b4
Ban circular dependencies (#3547) 2022-01-05 11:35:44 -05:00
Sebastian Malton
6a97a7b35b
Fix CRD.getPreferedVersion() to work based on apiVersion (#4553)
* Fix CRD.getPreferedVersion() to work based on apiVersion

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-01-05 07:53:28 -05:00
Janne Savolainen
9d33fff906
Cascade different refactorings to eliminate global shared state from app paths
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-05 13:26:49 +02:00