Janne Savolainen and Mikko Aspiala
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
Janne Savolainen and Mikko Aspiala
908a40975e
Extract minimal dependencies over a god class to satisfy Interface Segregation Principle and make stubbing in unit testing easier
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com >
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
2021-12-28 11:51:35 +02:00
Janne Savolainen and Mikko Aspiala
13873f5d85
Replace a dependency to full implementation with an interface to allow minimal stubbing
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com >
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
2021-12-28 11:51:34 +02:00
Janne Savolainen and Mikko Aspiala
a9189f82e6
Stop using global shared state for ExtensionDiscovery and it's relatives
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com >
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
2021-12-28 11:51:34 +02:00
Janne Savolainen and Mikko Aspiala
6f0686e9a4
Adapt to changes in injectable
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com >
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
2021-12-27 14:17:38 +02:00
Juho Heikka
9284741df5
Show splash window until bundled extensions have been loaded ( #4570 )
...
* Show splash window until bundled extensions have been loaded
Signed-off-by: Juho Heikka <juho.heikka@gmail.com >
* Remove unnecessary variable.
Signed-off-by: Juho Heikka <juho.heikka@gmail.com >
* Refactor autoInitExtensions
Signed-off-by: Juho Heikka <juho.heikka@gmail.com >
* Add timeout to waiting for bundled extensions to load
Signed-off-by: Juho Heikka <juho.heikka@gmail.com >
2021-12-23 11:00:18 +02:00
Sebastian Malton
bde0a9ef91
Change isEnabledForCluster to use KubernetesCluster instead of Cluster ( #4584 )
2021-12-17 08:28:47 -05:00
Janne Savolainen
2189679a30
Merge remote-tracking branch 'upstream/master' into make-menu-registry-obsolete
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
2021-12-15 16:14:08 +02:00
Janne Savolainen
9f7515db0e
Revert "Introduce a way to start replacing usages of Singleton base-class with no changes required on use places"
...
This reverts commit 34a47f5f
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
2021-12-15 15:37:37 +02:00
Janne Savolainen
c92c8f8a11
Replace global state usages of ExtensionLoader with DI
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
2021-12-15 15:37:36 +02:00
Sebastian Malton
1e22cffcd8
Fix extension engine range not working for some ^ ranges ( #4554 )
2021-12-14 11:57:34 -05:00
Alex Andreev
3dd6b432c9
Export KubeJsonApi to extensions ( #4496 )
...
* Export KubeJsonApi to extensions
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com >
* Make forCluster() to consume clusterId as arg
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com >
* Fix lint
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com >
2021-12-09 15:11:34 +03:00
Janne Savolainen
b4a1c2af9f
Make ExtensionLoader injectable to avoid confusion when instance should be created
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
2021-12-09 08:14:15 +02:00
Janne Savolainen
f9cf08b4a8
Make sure that extensions have been initialized before exposing them as enabled extensions
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
2021-12-09 07:41:43 +02:00
Janne Savolainen
717b62d2e6
Remove obsolete code
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
2021-12-08 13:10:50 +02:00
Janne Savolainen and Mikko Aspiala
67c24cac9a
Switch to getting menu items by observing change in extensions instead local state
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi >
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com >
2021-12-08 13:10:50 +02:00
Alex Andreev
d73df7fe0d
Show active hotbar on bottom ( #4476 )
...
- Extends extension API to support choosing sides for bottom bar entries
2021-12-03 09:41:08 -05:00
Sebastian Malton
8f84f394fe
Fix all-or-nothing when initially loading extensions ( #4384 )
...
* Fix all-or-nothing when initially loading extensions
Signed-off-by: Sebastian Malton <sebastian@malton.name >
* Log error instead of displaying error box
Signed-off-by: Sebastian Malton <sebastian@malton.name >
2021-11-22 20:30:47 -05:00
Sebastian Malton
78a4e2a126
Catch and display load errors for WorkloadsOverview ( #4393 )
2021-11-22 12:27:54 -05:00
Sebastian Malton
885af07d0b
Improve bootstrap logging for help with iframe debugging ( #4020 )
2021-11-18 16:54:43 -05:00
Panu Horsmalahti
3214d8dfd5
Export KubeStatus to extensions api. ( #4339 )
...
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com >
2021-11-15 15:51:29 +02:00
Roman
368e2d9a00
Monaco editor refactoring ( #4225 )
...
* monaco editor refactoring
Signed-off-by: Roman <ixrock@gmail.com >
* clean up / responding to comments
Signed-off-by: Roman <ixrock@gmail.com >
* move custom monaco themes to own folder
Signed-off-by: Roman <ixrock@gmail.com >
* fix lint
Signed-off-by: Roman <ixrock@gmail.com >
* removed unused rules from webpack's config (renderer)
Signed-off-by: Roman <ixrock@gmail.com >
2021-11-03 17:19:17 +02:00
Sebastian Malton
c6dce043a7
Lint: comma-spacing (error) & comma-dangle (error) ( #4200 )
...
Signed-off-by: Sebastian Malton <sebastian@malton.name >
2021-11-02 17:38:20 -04:00
Sebastian Malton
d8538eaa75
Use user configured kubectl path in node and pod menu items ( #3506 )
2021-11-02 09:29:45 -04:00
Sebastian Malton
41863e87ce
Lint: object-curly-spacing (error) ( #4198 )
2021-11-01 08:45:45 -04:00
Sebastian Malton
f297407156
Stop using @electron/remote to obtain app.getPath() ( #4078 )
...
* Stop using remote to obtain app.getPath()
- Initialize entire map in bootstrap()
- Updated unit tests
Signed-off-by: Sebastian Malton <sebastian@malton.name >
* Resolve PR comments
Signed-off-by: Sebastian Malton <sebastian@malton.name >
* Fix test
Signed-off-by: Sebastian Malton <sebastian@malton.name >
* Fix build
Signed-off-by: Sebastian Malton <sebastian@malton.name >
* Ensure that init can only be called once and catch errors
Signed-off-by: Sebastian Malton <sebastian@malton.name >
* Replace basically all uses of app.getPath() with AppPaths.get()
Signed-off-by: Sebastian Malton <sebastian@malton.name >
* Fix unit tests
Signed-off-by: Sebastian Malton <sebastian@malton.name >
2021-10-27 21:07:41 -04:00
Sebastian Malton
9d5689ce69
Only allow extensions to use non-lens specific cluster phases ( #4036 )
2021-10-14 10:25:48 -04:00
Juho Heikka and Sebastian Malton
724b9450a6
Change onBeforeRun API ( #3981 )
...
Co-authored-by: Sebastian Malton <sebastian@malton.name >
2021-10-07 12:43:50 -04:00
chh and Sebastian Malton
4af796c532
Before hook for onRun of Catalog entities ( #3911 )
...
Co-authored-by: Sebastian Malton <sebastian@malton.name >
2021-10-05 15:36:44 -04:00
Sebastian Malton
cfd89fa7ba
Pin @k8slens/extensions dependencies instead of wildcarding them ( #3930 )
2021-10-01 15:46:25 -04:00
Sebastian Malton
3c77c06519
Add ability to search and activate entities via the command dialog ( #3692 )
2021-09-23 13:18:31 -04:00
Panu Horsmalahti
9d9f9c0072
Expose forRemoteCluster in the extension API. ( #3786 )
...
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com >
2021-09-13 16:59:41 +03:00
Panu Horsmalahti
936927af98
Add CatalogCategory filter to the extension API ( #3718 )
...
* Add CatalogCategory filter to the extension API.
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com >
* Fix test.
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com >
2021-09-13 15:46:28 +03:00
Jari Kolehmainen
3262b13926
Allow KubeApi connect directly to remote k8s ( #3766 )
...
* allow KubeApi to connect directly to remote k8s
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* backward compat
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* backward compat
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
2021-09-13 10:14:05 +03:00
Jari Kolehmainen
41fcd73c69
expose logger to extensions ( #3708 )
...
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
2021-09-01 13:15:38 +03:00
Sebastian Malton and Panu Horsmalahti
6fdb2f0b58
Support filtering catalog entities ( #3647 )
...
* Support filtering catalog entities
- This allows extensions and OpenLens to restrict which of the entities
the sources have provied are "visible" to the rest of Lens
Signed-off-by: Sebastian Malton <sebastian@malton.name >
* Fix lint
Signed-off-by: Sebastian Malton <sebastian@malton.name >
* switch to filtering only for catalog view
Signed-off-by: Sebastian Malton <sebastian@malton.name >
* Fix test
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com >
* Add test to iter reduce
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com >
Co-authored-by: Panu Horsmalahti <phorsmalahti@mirantis.com >
2021-08-31 16:00:56 +03:00
59933507e4
Upgrade to electron 12 and Node 14 ( #3572 )
...
Upgrade to electron 12 and Node 14
- Compute cluster ID for tests
- Switch to temporary appData path while testing
Signed-off-by: Sebastian Malton <sebastian@malton.name >
Co-authored-by: Sebastian Malton <smalton@mirantis.com >
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
2021-08-26 12:13:31 -04:00
chh
54ac311933
Add WelcomeBanner.width extension API ( #3663 )
...
* Allow to add WelcomeBannerRegistration.width and use that to caculate to width of Banner container
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com >
* Export at const
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com >
2021-08-24 10:05:08 +03:00
chh
d3ce43e73d
Add 'welcome banner' extension API ( #3656 )
...
* Add react-material-ui-carousel
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com >
* Add welcomeBanners extension api
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com >
2021-08-23 14:31:24 +03:00
pashevskii and Alex Andreev
e4c393244a
Replace Ace Editor with monaco ( #2949 )
...
Signed-off-by: Pavel Ashevskii <pashevskii@mirantis.com >
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com >
2021-08-12 13:00:52 +03:00
Jari Kolehmainen
21c7af1887
Expose KubeObjectStore to main extension ( #3597 )
...
* allow to pass KubeObjectStore.api via constructor
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* expose KubeObjectStore to main extension
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
2021-08-12 11:39:27 +03:00
Jari Kolehmainen
58a446bd45
Refactor k8s api to common ( #3553 )
...
* refactor kube api to common
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* refactor more utils to common
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* refactor more utils to common
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* fix tests
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* switch to use node-fetch on both sides
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* improve logger
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* fix lint errors
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* fix/improve tests
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* fix tests
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* fix node-fetch require error on prod build
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* preload fix
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* fixes
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* read serverAddress from apiBase
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
* cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
2021-08-10 13:26:14 +03:00
Sebastian Malton
2b3351bf9b
Remove circular dependency with isAllowedResource function ( #3545 )
...
Signed-off-by: Sebastian Malton <sebastian@malton.name >
2021-08-04 16:01:47 -04:00
Sebastian Malton
fb74859f66
Split KubeObject related components into seperate folders ( #3533 )
2021-08-03 17:39:29 -04:00
Sebastian Malton
a6e91fc34a
Move cluster related types and function into seperate files ( #3530 )
2021-08-03 10:36:14 -04:00
Sebastian Malton
1b88e63343
Set default type params for KubeObjectDetail related APIs ( #3528 )
...
Signed-off-by: Sebastian Malton <sebastian@malton.name >
2021-07-29 10:55:41 -04:00
Sebastian Malton
1437f8a945
Fix auto cleanup of Extension's IPC classes ( #3505 )
2021-07-23 15:14:11 -04:00
Sebastian Malton
cdb7c95b8f
Fix typings for KubeObjectDetailsRegistration ( #3460 )
2021-07-21 10:22:32 -04:00
Sebastian Malton
fe33296ba5
Bundled extensions are always compatible in dev mode ( #3459 )
...
Signed-off-by: Sebastian Malton <sebastian@malton.name >
2021-07-21 07:19:46 +03:00
Jari Kolehmainen
ba0581d982
Skip previously bundled extensions ( #3420 )
...
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com >
2021-07-19 09:35:51 -04:00