* Making cluster area hoverable
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Move sidebar cluster block to separate component
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Clean up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Add keyboard support
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Navigate cluster context menus via broadcastMessage
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Ability to navigate context in different frames
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Renaming an argument
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Redirect from /catalog to last catalog page
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up more
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Splitting url params to pass in catalogURL()
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using entity name as cluster name in sidebar
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Use entity name if preferences name is empty
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* simplify
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* Adding home button
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Highlight catalog entity on route match
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Wait for general entites to load
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding WelcomePage catalog entity
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Highlight general entities in hotbar if their route matches
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving active entities sync to helper function
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix welcome page test
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Check only webcontent type === 'window' instead of using webContents.getFocusedWebContents(), as other webview can capture focus
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
* Update test
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
* HistoryStore initial draft
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding history icons
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Jump history using electron methods
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using 1 topbar component for all views
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Add Catalog title to sidebar
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Show cluster name in sidebar
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Updating topbar tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing Welcome tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing padding for external topbar items
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix cluster name prop
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using material icons for history buttons
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using RemovableItem for items in Kubernetes page
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Helm Charts empty state
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Empty state for kubeconfig sync list
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Remove unused styles
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Kubeconfig syncs from Catalog
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Allow to select directory to sync
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Convert Preferences to Route-based component
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Jump from notification to Preferences
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding navigateWithoutHistoryChange() method
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing integration tests (no check for Telemetry tab)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing tests harder
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Making inputs consistent
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing hover effect in inputs
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding separators to sidebar menu
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fine-tuning general section
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fine-tuning hidden metrics area
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* EntityIcon in Settings sidebar
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving cluster icon settings on top
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Shrink Apply button a big
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* rename PageLayout to SettingLayout
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* expose to extensions
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* fix
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* fix
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* Rendering close button in cluster view
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Changing Icon hover style
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving onClick handler away
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing sidebar compact view
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing 'compact' refs in SidebarItem
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Wrapping Catalog with MainLayout
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Making sidebar resizing indicator visible on hover
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding TopBar to catalog view
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using TopBar in cluster views
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up Sidebar styles
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using getActiveClusterEntity() for searching
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix resizing anchor position
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Align cluster name on left
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing unused files
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing unused css var
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Showing Topbar in ClusterStatus page
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing TopBar from ClusterManager
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* remove isClusterScoped from ItemListLayout
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Move <NamespaceSelectFilter> to KubeObjectListLayout
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* revert to simpler NamespaceSelectFilter fix
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* mobx-6 migration -- part 1
Signed-off-by: Roman <ixrock@gmail.com>
* mobx-6 migration -- part 2 (npx mobx-undecorate --keepDecorators)
Signed-off-by: Roman <ixrock@gmail.com>
* mobx-6 migration -- part 3 (more fixes)
Signed-off-by: Roman <ixrock@gmail.com>
* unwrap possible observables from IPC-messaging
Signed-off-by: Roman <ixrock@gmail.com>
* mobx-6 migration -- remove @autobind as class-decorator
Signed-off-by: Roman <ixrock@gmail.com>
* mobx-6: replacing @autobind() as method-decorator to @boundMethod
Signed-off-by: Roman <ixrock@gmail.com>
* mobx-6: use toJS()-wrapper since monkey-patching require(mobx).toJS doesn't work
Signed-off-by: Roman <ixrock@gmail.com>
* removed `@observable static`
Signed-off-by: Roman <ixrock@gmail.com>
* use {useDefineForClassFields: true} in tsconfig.json
Signed-off-by: Roman <ixrock@gmail.com>
* remove ExtendedObservableMap
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* fix: removed makeObservable(this) from "terminal-tab.tsx"
Signed-off-by: Roman <ixrock@gmail.com>
* storage-helper refactoring
Signed-off-by: Roman <ixrock@gmail.com>
* normalize usages of #observable-value.toJSON() / attempt to catch the wind
Signed-off-by: Roman <ixrock@gmail.com>
* refactoring, more possible branch fixes + lint
Signed-off-by: Roman <ixrock@gmail.com>
* debugging cluster-view error -- part 1
Signed-off-by: Roman <ixrock@gmail.com>
* fix: refreshing cluster-view on ready
Signed-off-by: Roman <ixrock@gmail.com>
* fix: various app-crashes related to KubeObject.spec.* access from "undefined"
fix: config-map-details crash
Signed-off-by: Roman <ixrock@gmail.com>
* fix: namespace-store refactoring / saving selected-namespaces to external json-file
Signed-off-by: Roman <ixrock@gmail.com>
* fix: don't cache mobx.when(() => this.someObservable) cause might not work as expected due later call of makeObservable(this) in constructor
Signed-off-by: Roman <ixrock@gmail.com>
* fix: app-crash on editing k8s resource
Signed-off-by: Roman <ixrock@gmail.com>
* fix: restore "all namespaces" on page reload
Signed-off-by: Roman <ixrock@gmail.com>
* - fix: persist table-sort params and cluster-view's sidebar state to lens-local-storage
- new-feature: auto-open main-window's devtools in development-mode (yes/no/ugly?)
Signed-off-by: Roman <ixrock@gmail.com>
* fix: crd definition details -> crashing with <AceEditor mode="json"> (added missing mode-file in ace-editor.tsx)
Signed-off-by: Roman <ixrock@gmail.com>
* fix: crd definitions -> groups selector couldn't deselect last selected option
Signed-off-by: Roman <ixrock@gmail.com>
* refactoring: extensions-api exports clarification for "@k8slens/extensions"
Signed-off-by: Roman <ixrock@gmail.com>
* fix: various app-crashes related to kube-events (events page, some details page, overview, etc.)
Signed-off-by: Roman <ixrock@gmail.com>
* Reverted "use {useDefineForClassFields: true} in tsconfig.json" (various app-crash fixes)
This flag seems to be not possible to use with class-inheritance in some cases.
Example / demo:
`KubeObject` class has initial type definitions for the fields like: "metadata", "kind", etc.
and constructor() has Object.assign(this, data);
Meanwhile child class, e.g. KubeEvent inherited from KubeObject and has it's own extra type definitions for underlying resource, e.g. "involvedObject", "source", etc.
So calling super(data) doesn't work as expected for child class as it's own type definitions overwrites data from parent's constructor with `undefined` at later point.
Signed-off-by: Roman <ixrock@gmail.com>
* master-merge lint-fixes
Signed-off-by: Roman <ixrock@gmail.com>
* catalog.tsx / catalog-entities.store.ts refactoring & fixes
Signed-off-by: Roman <ixrock@gmail.com>
* fix: Catalog -> Browse all tab
Signed-off-by: Roman <ixrock@gmail.com>
* fix: CommandPalette doesn't appear from global menu by click/hotkey
Signed-off-by: Roman <ixrock@gmail.com>
* - Merging interfaces & classses to avoid overwriting fields from parent's super(data)-call with Object.assign(this, data). Otherwise use "declare" keyword at class field definition.
- Revamping {useDefineForClassFields: true} to avoid issues with non-observable class fields in some cases (from previous commit):
```
@observer
export class CommandContainer extends React.Component<CommandContainerProps> {
// without some defined initial value "commandComponent" is non-observable for some reasons
// when tsconfig.ts has {useDefineForClassFields:false}
@observable.ref commandComponent: React.ReactNode = null;
constructor(props: CommandContainerProps) {
super(props);
makeObservable(this);
}
```
Signed-off-by: Roman <ixrock@gmail.com>
* update KubeObject class type definition
Signed-off-by: Roman <ixrock@gmail.com>
* clean up / responding to comments
Signed-off-by: Roman <ixrock@gmail.com>
* fix: app-crash when navigating to catalog from active cluster-view, refactoring `catalog-entity-store`
Signed-off-by: Roman <ixrock@gmail.com>
* catalog-pusher clean up, replaced .observe_() to external observe() helper from "mobx"
Signed-off-by: Roman <ixrock@gmail.com>
* fix: catalog's items stale/non-observable (after connection to the cluster status still "disconnected"), lint-fixes
Signed-off-by: Roman <ixrock@gmail.com>
* fix: Catalog is empty after closing main-window and re-opening app from Tray
Signed-off-by: Roman <ixrock@gmail.com>
* fix: HotBar's icon context menu items non-observable (no "disconnect cluster", etc.)
Signed-off-by: Roman <ixrock@gmail.com>
* lint-fix/license check
Signed-off-by: Roman <ixrock@gmail.com>
* fix: redirect to catalog when disconnecting active cluster
Signed-off-by: Roman <ixrock@gmail.com>
* fix: refresh visibility of active cluster-view on switching from hotbar/catalog
Signed-off-by: Roman <ixrock@gmail.com>
* updated package.json for built-in extensions to use "*" version for packages served from main app
Signed-off-by: Roman <ixrock@gmail.com>
* - added missing makeObservable(this) to metrics-settings.tsx
- updated package-lock.json for built-in extensions
- lint fixes
Signed-off-by: Roman <ixrock@gmail.com>
* master-merge clean up fix, updated package-lock.json for built-in extensions after `make clean-extensions && make build-extensions`
Signed-off-by: Roman <ixrock@gmail.com>
* fix unit-tests
Signed-off-by: Roman <ixrock@gmail.com>
* master-merge fixes
Signed-off-by: Roman <ixrock@gmail.com>
* make lint happy
Signed-off-by: Roman <ixrock@gmail.com>
* reverted some changes, removed auto-opening devtools in dev-mode
Signed-off-by: Roman <ixrock@gmail.com>
* merge fixes
Signed-off-by: Roman <ixrock@gmail.com>
* master-merge conflict fixes:
- proper handling and navigating into catalog's active category via URL-builder
Signed-off-by: Roman <ixrock@gmail.com>
* reverting splitted params for catalog's page route to "/catalog/:group?/:kind?"
Signed-off-by: Roman <ixrock@gmail.com>
* clean-up: remove app's injecting dependencies from `extensions/kube-object-event-status/package.json`
Signed-off-by: Roman <ixrock@gmail.com>
* master-merge fix: added missing makeObservable(this) for extensions.tsx
Signed-off-by: Roman <ixrock@gmail.com>
* fix: catalog entity context menu stale/unobservable
Signed-off-by: Roman <ixrock@gmail.com>
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* Setting up tailwind and css modules env
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using tailwind with scss files also
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Introducing react-table
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Spread extensions to smaller components
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Add table sorting
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing inputs line-height
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fine-tuning page view
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Align table rows
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding extension notice
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fine-tuning overall styling
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding a extensions placeholder
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Updating MaterialIcons font
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Aligning not found state
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Making extension components observable
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing search input cross icon
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix drag-n-drop indication
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing extension name sorting
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix linter
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Ignoring ts files to tailwind purge
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Renaming Table -> ReactTable
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing integration tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving tailwind imports into app.scss
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving userExtensionList() out from extension-loader
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Transform extension list to array
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Expand install input placeholder a bit
Signed-off-by: Alex Andreev <alex.andreev.email@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>
* Configure ts to use react-jsx rule
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving HotbarSelector to separate component
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Initial drag-n-drop implementation
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Revert tsconfig and linter changes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Reverting back active cell effect
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding drag-n-drop behavior
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix drag-n-drop logic
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* White border on dragging over
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding test coverage
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing cell hover effect
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Increase PageLayout z-index
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Styling hotbar selector tooltip
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* 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>
* - fix: highlight active sidebar section / link
- fix: caching crd definitions to prevent sidebar's scroll jumps
- refactored & simplified `Sidebar` and `SidebarItem`
Signed-off-by: Roman <ixrock@gmail.com>
* responding to comments
Signed-off-by: Roman <ixrock@gmail.com>
* adding @jsdoc comments to SidebarItem
Signed-off-by: Roman <ixrock@gmail.com>