- 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>