* Turn on strict mode in tsconfig.json
- Add route, clusterRoute, and payloadValidatedClusterRoute helper
functions to improve types with backend routes
- Turn on the following new lints:
- react/jsx-first-prop-new-line
- react/jsx-wrap-multilines
- react/jsx-one-expression-per-line
- react/jsx-max-props-per-line
- react/jsx-indent
- react/jsx-indent-props
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix build
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Replace KubeObject scope strings with enum
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Revert package.json version changes
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* revert move hostedCluster(Id)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* change some type param names to be not single letters
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove copy-extension-themes
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* add new make clean action
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix build to not use webpack for generating types
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix kube-object-menu.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix select.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix catalog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* revert move fileNameMigration to index
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix ref logic error
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix log-resource-selector.test.tsx tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix dock-store.test.ts test by overriding createStorage to not touch file system
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix cluster.test.ts tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix kube=api.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fixed hotbar-store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix kubeconfig-manager.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix cluster-role-bindings/__tests__/dialog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix role-bindings/__tests__/dialog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix pods.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix delete-cluster-dialog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix daemonset.store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix replicaset.store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix statefulsets/dialog/dialog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix replicasets/scale-dialog/dialog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix deployments.store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix deployments/scale/dialog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix cronjob.store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix stateful-set.api.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix deployment.api.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix api-manager.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix statefulset.store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix job.store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix pods.store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix scroll-spy.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix hotbar-remove-command.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix catalog-entity-registry.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix welcome.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix verify-that-all-routes-have-route-component.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix pod-tolerations.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* better fix for previous 3 fixes, plus also select.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix kube-object-menu.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix app-paths.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix dock-tabs.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix isReactNode typing
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix sub-title.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix drawer.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix list-layout.tsx and header.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix error-boundary.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix upgrade-chart/store.ts and dock-tab.store.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix install-chart/store.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix edit-resource/store.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix create-resource/store.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix namespace-select.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix namespace-select-filter.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix crd-list.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix wrong types for extensions
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix circular dependency
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix circular dependency on catalogCategoryRegistry
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix api-kube
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix type errors, most <Select /> errors
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fixing more type errors
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* some more fixing type errors
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* convert all KubeApis to injectable with legacy global backups
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* factor out into a common file all the exports
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* convert all KubeObjectStores to injectable with legacy global backups
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix lint
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove unused legacy KubeApi globals
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix bad previous commit
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* more crash fixing
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* try and fix behavioural tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix sidebar-and-tab-navigation-for-core.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix sidebar-and-tab-navigation-for-extensions.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-using-application-menu.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix catalog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Make ThemeStore non-singleton and fix navigation-to-terminal-preferences.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* extensions.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix catalog-entity-registry.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-using-application-menu.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix log-resource-selector.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix dock-tabs.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix delete-cluster-dialog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-to-kubernetes-preferences.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-to-editor-preferences.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-to-proxy-preferences.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-using-application-menu.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-to-application-preferences.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix dock-store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix select.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix role-bindings/__tests__/dialog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix hotbar-remove-command.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix cluster-role-bindings/__tests__/dialog.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-to-extension-specific-preferences.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-to-telemetry-preferences.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix closing-preferences.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-to-editor-preferences.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix navigation-to-proxy-preferences.test.ts
- Fix other type errors too
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* final tweaks
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Add more tsconfig files, fix bug in <Catalog>
- Make all of history, navigation injectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix type errors
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Convert all of kube-details-params/ and navigate/ to injectable
- This fixes a runtime error that was encountered during testing
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix runtime errors on renderer
- remove all static uses of `createPageParam` (and then removed the
legacy global)
- Made LensRendererExtension and LensMainExtension just used
dependencies and not the getLegacyDi
- Fixed circular dep in extension-loader
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Move registerStore calls to after injectMany
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* replace all the rest of the legacy uses of apiManager
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix stack overflow and cycles in DI
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix NamespaceSelectFilter not opening
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix WizardStep and AddNamespaceDialog
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix KubeApi's not being registered
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* cleanup WindowManager
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Proper fix for Wizard, fix NamespaceStore.subscribe
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Rewrite withTooltip to be more type correct
- Fixes mobx related "too many recursive actions" error
- Change all the uses of withTooltips to be functional components
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Add e2e test to cover kube api registration
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* cleanup internal-commands
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove cast in <Animate>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix command-palette e2e test
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix type error after rebase
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix test name
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix lint
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix code to help CodeQL scanner
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* update intree extension lock files
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix build-extensions picking wrong @types/react
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix tests from rebase
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix type error
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Make KubeconfigSyncManager more injectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix crash in test mode for Dialog
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* make Select snapshots deterministic
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix new type error
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix kube-object.store.test.ts typing
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix merge build issues
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix snapshots after merge
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix lint after merge
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* reexport BaseKubeJsonApiObjectMetadata
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix typo in terminalSpawningPool
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove duplicate license header
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix typo to waitUntilDefined
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove iter use from getLegacyGlobalDiForExtensionApi
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove complex createStorage override
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* override logger with mocks only when needed for tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove specialized overrideStore flags for getDiForUnitTesting
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove unnecessary | undefined types from the exactOptionalFieldTypes experiment
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* use more descriptive name for local test mocks
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove unnecessary addition to 'make clean' target
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove oddity of KubeObjectStore.getById(undefined) being allowed
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* rename KubeObject.getDescriptor in favour of name without fundemental JS meaning
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Simplify legacyRegisterApi when working in behaviour unit tests
- Don't emit within main environment as there should be no auto
registering there
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* change confusing variable name in ReactiveDuration
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* make visitor pattern more explicit for Entity contextMenuOpen
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* toggleDetails -> toggleKubeDetailsPane is more specific
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove outdated comment
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix bug where LensExtension dependencies are not set
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix tests from the revert of react 18
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix more tests from merge
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix typings with new is-compatible-extension tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* more type fixing
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Revert in-tree extension versions
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Improve name of guarding injectable for stores and apis
- New name better implies that it is just a guard state and does not do
anything
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Add helper for <Select>.isMulti for storing in a Set<Value>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix is-compatible-extension.test.ts types
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Implement a lot of technical requirements for behavioural unit tests
Note: the crux of this was to make routing env-agnostic, and not based on URLs as magic strings, but instead something type-enforced.
Note: extension-based routes comply to same exact interface by "late-registering" their routes when installed. Routes are just injectables.
Note: another chunk of global shared state is no more.
Note: a lot of explicit side effects have been cornered to injectables.
Note: a lot of stuff has become reactive as part if this.
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make a directory commonly available
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Require id for <Select /> to prevent non-deterministic renders
This was caused by global state in a 3rd party lib: "react-select".
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Specify id for all <Select /> to satisfy previous commit
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Prevent explicit side effect in component by using existing dependency instead
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Extract instantiation of "conf" as injectables for causing side effects
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Introduce a legacy-helper to make gradual refactoring of inheritors of Singleton easier
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Make legacy unit tests for hotbar green and more simple by using the new legacy helper
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Temporarily kludge all unit tests green with a disclaimer about allowing side-effects
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Remove kludge in previous commit by explicitly permitting specific side effects where old unit tests require it
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Prevent old unit test with side effects from accessing file system
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Migrate to actual typing for di.permitSideEffects
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Prevent unit tests from failing because of non-standard method of HTML-element not present in js-dom
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Adapt integration tests to recent changes
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Fix code style
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Fix artifact from bad rebase
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Add a deprecation from a review comment
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Remove change that is not required
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove redundant comment
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix code style
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove redundant file
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix bad merge
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Improve variable name
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Tweak logger interface to be more descriptive
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make injecting legacy singleton always provide new instance
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove conditional typing when not needed
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Improve naming of variable
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove unnecessary code style changes
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove flag for causing side effects from too broad scope
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Override side-effects in unit test using injectable instead of monkey patching
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Flag some side-effects and add general overrides
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Fix unit tests in CI by removing explicit side-effect
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Remove explicit side-effect from getting default shell
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce abstraction for getting absolute paths
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Switch to using abstraction for getting absolute path to control explicit side effect
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce abstraction for joining paths
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Switch to using abstraction for joining paths to control explicit side effect
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix fake implementation for join paths
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix test after removing explicit side effect
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove explicit side effects from kubeconfig-syncs
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix arguments after removing explicit side effect
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make registrators not async for not being needed anymore
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make generalCatalogEntities non-observable, as there is no requirement
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Remove redundant code
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Simplify logic for registering general catalog entity sources
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Add TODO
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Replace function for getting application menu items with reactive solution
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix typo in interface name
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove global shared state usages of hot bar store
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove redundant enum
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
* wip: enable tls on lens-k8s-proxy
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* type -> interface
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* more dependencies
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* refactor
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* run di.runSetups() after app is ready
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* tls fixes & refactor
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* refactor
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* refactor
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* 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>
- Only shows editor, and will save all text to file
- Reports some validation errors, but doesn't block the add cluster
button
- Cleanup kube helpers to facilitate clearer FS interactions
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Cluster commands disappeared from Command Palette, close#2760
Signed-off-by: Roman <ixrock@gmail.com>
* refactoring: get rid of ClusterStore.active && ClusterStore.activeCluster (managed via catalog's entity)
Signed-off-by: Roman <ixrock@gmail.com>
* check source files for license header
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* tweak
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* add license header to all relevant source files
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
- Removed `getFreePort` as its use is always a race condition. Change
all uses of it to retrive the port after listening
- Added `getPortFrom` as a helper function to read a port from a stream
- Remove `Cluster.ownerRef` as it is outdated and no longer needed for 5.0
- Remove `Cluster.enabled`, no longer needed because of above
- Removed `Cluster.init`, moved its contents into `Cluster.constructor`
as nothing in that function is asyncronous. Currently only being run
on `main` as a stop gap until `renderer` gets its own version of
`Cluster`
- Refactored `LensProxy` so as to prevent `pty.node` (a NodeJS
extension) being included in `webpack.extension.ts`'s run
- Removed the passing around of the proxy port as that can now be
accessed from an instance of `LensProxy`
- purge ContextHandler's cache on disconnect
Co-authored-by: Sebastian Malton <sebastian@malton.name>
* Fix: logs data disapearing causing crashes (#2566)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Refactor helm-chart.api and improve kube validation and error handling (#2265)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix: HPA's not sortable by age (#2565)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Conditionally render status icon for kube meta (#2298)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix custom resource loading spinner appears above extensions' cluster menus (#2344)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Lens should point to the release docs (#2268)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Refactor the Extensions settings page (#2221)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* try and get jest to not core dump
Signed-off-by: Sebastian Malton <sebastian@malton.name>
- Add distinction between `getInstance` and `getInstanceOrCreate` since
it is not always possible to create an instance (since you might not
know the correct arguments)
- Remove all the `export const *Store = *Store.getInstance<*Store>();`
calls as it defeats the purpose of `Singleton`. Plus with the typing
changes the appropriate `*Store.getInstance()` is "short enough".
- Special case the two extension export facades to not need to use
`getInstanceOrCreate`. Plus since they are just facades it is always
possible to create them.
- Move some other types to be also `Singleton`'s: ExtensionLoader,
ExtensionDiscovery, ThemeStore, LocalizationStore, ...
- Fixed dev-run always using the same port with electron inspect
- Update Store documentation with new recommendations about creating
instances of singletons
- Fix all unit tests to create their dependent singletons
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Ignore clusters with invalid kubeconfig
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Improve error message
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Mark cluster as dead if kubeconfig loading fails
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Fix tests
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Validate cluster object in kubeconfig when constructing cluster
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Add unit tests for validateKubeConfig
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Refactor validateKubeconfig unit tests
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Extract ValidationOpts type
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Add default value to validationOpts param
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Change isDead to property
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Fix lint issues
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Add missing new line
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Update validateKubeConfig in-code documentation
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Remove isDead property
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Display warning notification if invalid kubeconfig detected (#2233)
* Display warning notification if invalid kubeconfig detected
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* add no-unused-vars and no-unused-imports
* added quotes: double, and remove ignore pattern
* move itif and describeif into utils
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Save and restore lastActiveClusterId
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Activate clusters from workspaces page
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix saving last cluster while jumping from tray
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding workspace switch tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Remove console.log()
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Clean duplicated ClusterId definition
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving lastActiveClusterId field into WorkspaceModel
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* fix extensionLoader error on dev environments where renderer might start early (#1447)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* Add Search by Ip to Pod View (#1445)
Signed-off-by: Pavel Ashevskii <pashevskii@mirantis.com>
* Make BaseStore abstract (#1431)
* make BaseStore abstract so that implementers are forced to decide how to store data
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Enforce semicolons in eslint
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
* Add a few missing folders to be linted.
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
* Use @typescript-eslint/semi.
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
* Allow extension cluster menus to have a parent (#1452)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* fix SwitchCase indent rule in eslint (#1454)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Revert "fix SwitchCase indent rule in eslint (#1454)"
This reverts commit 082774fe6e.
* Revert "Allow extension cluster menus to have a parent (#1452)"
This reverts commit 622c45cd6d.
* Revert "Use @typescript-eslint/semi."
This reverts commit 890fa5dd9e.
* Revert "Add a few missing folders to be linted."
This reverts commit c7b24c2922.
* Revert "Enforce semicolons in eslint"
This reverts commit ca67caea60.
* Revert "Make BaseStore abstract (#1431)"
This reverts commit 4b56ab7c61.
* Revert "Add Search by Ip to Pod View (#1445)"
This reverts commit 4079214dc1.
* Revert "fix extensionLoader error on dev environments where renderer might start early (#1447)"
This reverts commit 8a3613ac6f.
* Split workspace tests to smaller ones
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Missing semicolons
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Split workspace tests a bit more
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding extra click in Add Cluster button
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding more awaits to check running cluster
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Wait for minikube before running tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Co-authored-by: pashevskii <53330707+pashevskii@users.noreply.github.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
* Refactor testing harness to use defaults
- Move tests into defaultly named test folders
- Use default test suffix of ".test" instead of "_test"
- Make cluster-store tests unit tests by adding more
nesting, so that order of tests doesn't matter
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>