* Fix local cluster delete flow
- Now checks for the cluster being the current cluster and confirms the
action
- <ConfirmDialog> is fixed to work with several confirmations happinging
at once
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Custom delete cluster dialog
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Saving kubeconfig file refactoring
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Switching current-context from dialog
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up css styles
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Show Delete menu item only for local cluster
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Make all dialogs rounded
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Releasing kubeconfig file after lock
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding delete cluster dialog tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Delete cluster dialog refactoring
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing typo
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing temp file on error
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Updating tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Do not switch context if select is hidden
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing spread symbols
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving cluster delete event from catalog initializer to ipc
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Refactor warning messages
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Getting spread (...) back to fix Select render
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using async form without promises
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Do not show context switcher if no contexts left
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Updating the tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* don't allow delete of the active cluster before setting to new active cluster (#3749)
* don't allow user to delete the active cluster before setting to new active cluster
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
* fix lint issues
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
* Show delete button if no more contexts available
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Co-authored-by: Jim Ehrismann <40840436+jim-docker@users.noreply.github.com>
* test build on macos arm64
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* fix syntax
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* fix syntax
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* clean first
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* node-gyp 7.1.2
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* test
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* test
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
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>
* 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>
- Use Proxy for backwards compatability
- Fix a bunch of unit tests that needed all the Singleton's created
- Add comments on the order required for the store migrations
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>
* 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>
* Add the ability to sync kube config files
- Will update when the files changes
- add KUBECONFIG_SYNC label
- fix rebase and change to addObservableSource
- move UI to user settings
- support shallow folder watching
- add some unit tests for the diff-er
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* responding to review comments
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix tests and add try/catch
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* always sync c&p folder, remove bad rebase
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix preferences
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix settings saving and catalog view
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix unit tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix synced clusters not connectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* change to non-complete shallow watching
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix sizing
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Catch readStream errors
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* don't clear UserStore on non-existant preference field, fix unlinking not removing items from source
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* change label to file
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* use generated background color for hotbar icons
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* style fixes
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* Wrap app into emotion CacheProvider to isolate styles
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix CacheProvider key
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving CacheProvider into more specific components
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Align @emotion/react & @emotion/cache version with ones inside react-select
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Covering more components with CacheProvider
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Changing emotion versions a bit more
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving CacheProvider into bootstrap
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Updating react-select types
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* A bit of cleaning up types
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Specifying types a bit more
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix gradients in namespace selector
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Importing types separately
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using generic NonceProvider in bootstrap
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
- Add lens:// protocol handling with a routing mechanism
- document the methods in an extension guide
- remove handlers when an extension is deactivated or removed
- make sure that the found extension when routing a request is currently enabled (as a backup)
- added documentation about the above behaviour to the guide
- tweaked the naming convention so that it is clearer that the router uses extension names as not IDs (which currently are folder paths)
- Convert the extension API to use an array for registering handlers
- switch design to execute both main and renderer handlers simultaneously, without any overlap checking
- change open to be a dev dep
- improve docs, export types for extensions, skip integration tests
- switch to event emitting renderer being ready
- Add logging and fix renderer:loaded send to main
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix lint
Signed-off-by: Roman <ixrock@gmail.com>
* fixes & refactoring
Signed-off-by: Roman <ixrock@gmail.com>
* fix lint, micro-refactoring
Signed-off-by: Roman <ixrock@gmail.com>
* more refactoring, clean up, responding to comments
Signed-off-by: Roman <ixrock@gmail.com>
* fix: remove extra check for cluster.allowedApi from processing buffered watch-api events
Signed-off-by: Roman <ixrock@gmail.com>
* refactoring, detaching NamespaceStore from KubeObjectStore
Signed-off-by: Roman <ixrock@gmail.com>
* fix: wait for contextReady in NamespaceStore
Signed-off-by: Roman <ixrock@gmail.com>
* refactoring & fixes
Signed-off-by: Roman <ixrock@gmail.com>
* fix lint
Signed-off-by: Roman <ixrock@gmail.com>
* fixes: reloading context stores on NamespaceSelect-change
Signed-off-by: Roman <ixrock@gmail.com>
* optimize loading all resources when "all namespaces" selected -> single request per resource (when have rights)
Signed-off-by: Roman <ixrock@gmail.com>
* use native k8s api watches
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* retry watch when it makes sense
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* workaround for browser connection limits
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>
* use always random subdomain for getResponse
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* resubscribe stores on contextNamespace change
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* fix
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* modify watch event before calling callback
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Co-authored-by: Roman <ixrock@gmail.com>
* Adding LogTabStore
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding Pod selector in logs tab
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Refresh containers on pod change
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding <LogResourceSelector /> tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding LogTabStore tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Clearn getPodsByOwnerId method
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Extracting dummy pods into mock file
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Eliminating containers and initContainers from store
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Refreshing tab pods if pod amount is changed in store
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* A bit of cleaning up, fixing tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix lint newline errors
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Return getPodsByOwner() method
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Rename log tab when pod changes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding context menu to dock tabs
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Allowing to open menu by contextmenu event
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding DockTab tests with fine-tuning jest config
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding disable state to menu items
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing empty lines
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving jest-canvas-mock to dev dependencies
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* optimise Cluster.getAllowedResources()
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* make it faster (max 5 concurrent requests)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* Types for Select and Slider components are not fully exported, fix#1824
Signed-off-by: Roman <ixrock@gmail.com>
* remove unused @types/material-ui package
Signed-off-by: Roman <ixrock@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>
* Option to install an extension from filesystem/url #1227 -- part 1 (UI)
Signed-off-by: Roman <ixrock@gmail.com>
* DropFileInput: common component to handle droped files (replaced also in add-cluster-page)
Signed-off-by: Roman <ixrock@gmail.com>
* fix: install via url-string on input.submit
Signed-off-by: Roman <ixrock@gmail.com>
* ui tweaks & minor fixes
Signed-off-by: Roman <ixrock@gmail.com>
* more ui/ux tweaks & fixes
Signed-off-by: Roman <ixrock@gmail.com>
* layout fixes
Signed-off-by: Roman <ixrock@gmail.com>
* component renaming: `copy-to-click` => `copy-to-clipboard` => `clipboard`
Signed-off-by: Roman <ixrock@gmail.com>
* reworks -- part 1
Signed-off-by: Roman <ixrock@gmail.com>
* fix downloading file, added common/utils/downloadFile
Signed-off-by: Roman <ixrock@gmail.com>
* confirm before install, unpack tar first steps
Signed-off-by: Roman <ixrock@gmail.com>
* installation flow, extracting .tgz
Signed-off-by: Roman <ixrock@gmail.com>
* clean up, fix lint issues
Signed-off-by: Roman <ixrock@gmail.com>
* update .azure-pipelines.yml
Signed-off-by: Roman <ixrock@gmail.com>
* fixes & refactoring
Signed-off-by: Roman <ixrock@gmail.com>
* fix lint harder :/
Signed-off-by: Roman <ixrock@gmail.com>
* fix validation
Signed-off-by: Roman <ixrock@gmail.com>
* fix validation harder
Signed-off-by: Roman <ixrock@gmail.com>
* responding to comments, fixed package validation
Signed-off-by: Roman <ixrock@gmail.com>
* common/utils/tar.ts: reject with Error-type
Signed-off-by: Roman <ixrock@gmail.com>
* fix: unit-tests
Signed-off-by: Roman <ixrock@gmail.com>
* Add webpack-dev-server (for hot module replacement) to serve statics, add HardSourceWebpackPlugin to improve re-compiling speed
* Serve statics using webpack-dev-server instead of lens-proxy, redirect request of Lens.html/Lens.js to webpack-dev-server
* Add react-refresh-webpack-plugin and its dep for hot-reload
* Add hot-reload plugin, and make proxy redirects requests to webpackdevserver
* Add hard-source webpack plugin to main process
* Remove parameter 'path' of handleStaticFile
* Upgarde webpack to v4 latest stable
* Fix build error: plugins shouldnt be null
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
* Add @testing-library/jest-dom and @testing-library/react for writing test cases
* Make eslint check __mocks__/*.ts files
* Mock electron.ipcRenderer.on to prevent errors in React compoment test cases
* Mock <Trans /> from @lingui/macro as a component simplely returns children components
* Use optional chaining operator (?.) to avoid TypeError: Cannot read property 'replicas' of undefined
* Add jest-fetch-mock for mocking global.fetch, activate for all test cases in jest.setup.ts
* Add basic tests for <DeploymentScaleDialog /> to ensure it initialises/renders without errors
* Add +/- button for changing desired replicas, and its test cases
* Adjust the styles of +/- buttons container to make sure it aligns with the slider
* Refactor after rebase from master
* Use var defined in vars.scss
* Add flex align-center to slider-container and remove margin-top: -4px
* Use <Icon /> to replace <i/>
* Add flex gaps to plus-minus-container
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
* Tray icon #833 -- part 1
Signed-off-by: Roman <ixrock@gmail.com>
* Tray icon #833 -- part 2
Signed-off-by: Roman <ixrock@gmail.com>
* Tray icon #833 -- part 3
Signed-off-by: Roman <ixrock@gmail.com>
* Tray icon #833 -- part 4
Signed-off-by: Roman <ixrock@gmail.com>
* fix: lint / linux build failed
Signed-off-by: Roman <ixrock@gmail.com>
* allow to disable tray from preferences
Signed-off-by: Roman <ixrock@gmail.com>
* allow to tweak svg-icon before applying as tray-icon
Signed-off-by: Roman <ixrock@gmail.com>
* add checkbox indication, setActive workspace on cluster select
Signed-off-by: Roman <ixrock@gmail.com>
* fix build version (cannon find module 'react')
Signed-off-by: Roman <ixrock@gmail.com>
* - switching dark/light icon depending on os-x theme settings
- optimization: don't re-create tray icon on menu udpates (avoid blinking)
Signed-off-by: Roman <ixrock@gmail.com>
* fix: refresh icon after turning on/off + switching dark-mode
Signed-off-by: Roman <ixrock@gmail.com>
* allow to close main window and re-open from dock or tray icon
Signed-off-by: Roman <ixrock@gmail.com>
* small fix
Signed-off-by: Roman <ixrock@gmail.com>
* fix: ensure main-window from global menu
Signed-off-by: Roman <ixrock@gmail.com>
* chore
Signed-off-by: Roman <ixrock@gmail.com>
* fix: hide traffic-light buttons for tray window
Signed-off-by: Roman <ixrock@gmail.com>
* removed redundant tray window
Signed-off-by: Roman <ixrock@gmail.com>
* removed delay from base-store
Signed-off-by: Roman <ixrock@gmail.com>
* adding cluster fix (reverted changes from master)
Signed-off-by: Roman <ixrock@gmail.com>
* - hide icon in dock when main-window closed (mac-os only)
- added preferences checkbox to open app at system start-up
Signed-off-by: Roman <ixrock@gmail.com>
* handle quit app action from tray menu
Signed-off-by: Roman <ixrock@gmail.com>
* moved generating tray icons to build step
Signed-off-by: Roman <ixrock@gmail.com>
* Fix integration tests (#1080)
* Fix integration tests
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* Update integration/helpers/utils.ts
Co-authored-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
* fix-build: invisible app icon when there are more files within "build/icons/*.png"
Signed-off-by: Roman <ixrock@gmail.com>
* chore
Signed-off-by: Roman <ixrock@gmail.com>
* yarn i18n.extract
Signed-off-by: Roman <ixrock@gmail.com>
* clean-up
Signed-off-by: Roman <ixrock@gmail.com>
* navigation refactoring, move out `buildUrl` to common/utils so `react` and `react-router` not required as package.json dependecies in runtime (main)
Signed-off-by: Roman <ixrock@gmail.com>
* Ignore namespace query param on integration tests (#1109)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
* merge-conflicts fixes
Signed-off-by: Roman <ixrock@gmail.com>
* support page fixes
Signed-off-by: Roman <ixrock@gmail.com>
* make eslint happy again
Signed-off-by: Roman <ixrock@gmail.com>
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
- Added check to see if the program being referenced in the command field of the
exec object in the User construct exists. If it doesn't an error will be raised.
If more than 1 context is selected when adding a kubeconfig then valid contexts
will be added and any with an error will not be.
Signed-off-by: Steve Richards <srichards@mirantis.com>
Co-authored-by: Steve Richards <srichards@mirantis.com>
* Add some basic unit tests for cluster, kube-auth-proxy, and kubeconfig-manager
- src/main/cluster.ts
- src/main/kube-auth-proxy.ts
- src/main/kubeconfig-manager.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Rename `Draggable` as `ResizingAnchor` since that is what it is used for and shouldn't be mistaken as a general draggable item
* Refactor `ResizingAnchor` to be much more smart about how it handles mouse movements. Allow it to know which direction the resizing should be in allowing it to produce exact resized values.
* Add event handlers for the min and max extents so that actions can be triggered when those extents are passed (in either direction)
* Add double click support
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* remove make-syncronous and file-type calls from migration
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>