* 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>
* License menu item should come from an extension #1141
Signed-off-by: Roman <ixrock@gmail.com>
* fix: expose `Util.openExternal` via extensions-api
Signed-off-by: Roman <ixrock@gmail.com>
* move LICENSE back to root
Signed-off-by: Roman <ixrock@gmail.com>
* Check for path existence and directory type
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Check for package.json availability
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.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>
* Adding extension's label text next to Icon
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing unused registerStatusBarItem()
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Duplicate "support" items in menu, fix#1128
Signed-off-by: Roman <ixrock@gmail.com>
* clean up (contents moved to extensions/core-api/index.ts)
Signed-off-by: Roman <ixrock@gmail.com>
* Preload logs when scrolled to top
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding JumpToBottom button
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving jump-to-bottom button to right
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding old/new logs separator
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Increase font-size in jump to bottom button
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving newLogsSince determination out of component
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Move newLogSince from storage data to observable
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Remove notiifications on log loading errors
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Transform logs into array in store
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Clean up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Remove excessive join('\n\)s
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding pod and namespace data to log controls panel (#1083)
* Move log controls into separate file
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Changing prev container logs icon
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing 'Logs' from the tab title
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Remove unused string template quotes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Hide JumpToBottom btn on error
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Remove mention about dialog
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Sort Pod environment values in alphabetical order
Fixes: #739
Signed-off-by: Steve Richards <srichards@mirantis.com>
* Consolidated to a single lodash import. Corrected Lint failure
- Removed the additional import of flatten and updated as needed;
- Changed the variabled `orderedEnv` to be a const;
Signed-off-by: Steve Richards <srichards@mirantis.com>
Co-authored-by: Steve Richards <srichards@mirantis.com>
* fix bundled kubectl path on dev env
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* fix specs
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Updated regex for isUrl to allow for an empty string aswell as a correct URL.
Signed-off-by: Steve Richards <srichards@mirantis.com>
Co-authored-by: Steve Richards <srichards@mirantis.com>
* initial telemetry extension
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* Fix preferences saving and default value
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
* Show previous terminated container logs
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix for parsing error object
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
- 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>
* Moving pod logs into Dock
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Always set up default container
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Open existent tab if fount
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving logs load and properties into store
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Setting a refresher
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding showButtons prop to InfoPanel
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Hiding sequence number in log tabs
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing PodLogsDialog
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing unused PodLogsDialog import
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Tiny cleaning
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* A bit of cleaning up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Hiding drawer when opening logs
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.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>
* 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>
* Check for location before navigate
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Handling every location type
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving EditorPanel to the top
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Preventing save with empty yaml
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Make tooltips in @withTooltip narrower
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Not showing api errors in icon
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Success notification for create resource operation
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Button outlined style
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Making second button to stay outlined
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fine-tuning dock info panel colors
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing border-radius from ace-editor
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* 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>
Cluster CPU and Memory usage cannot be sum by node as it is rendered as single cluster metrics. Without this changes, the cluster graphs (standard and pie) shows data only from first (or latest) nodes.
For pod specific metrics, when we use prometheus operator the `container_` metics are doubled. Restric search to get those have image tag.
Signed-off-by: Jakub Štiller <stiller@2n.cz>
Co-authored-by: Jakub Štiller <stiller@2n.cz>
* terminal: set NO_PROXY env for localhost communication
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
* Using reason field if no type provided
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Lowecasing condition badge class
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* make download dir option consitent with other settings
* make path to kubectl setting consistent
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
* reduce height on draggable-top and only render it on macos
* move drag bar out of app and into bootstrap
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Auto select one and only cluster from pasted config
- Disable add button with tooltip if no clusters are selected
- Add functionality to tooltip to display correctly over disabled
elements
* feature should work of any method of adding kube config
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
* fix bug: side bar scrolls after clicking on lower item
Signed-off-by: Yangjun Wang <yangjun.wang@wartsila.com>
* fix issue main area missing issue, add mobx observer to TabLayout
Signed-off-by: Yangjun Wang <yangjun.wang@wartsila.com>
Co-authored-by: Yangjun Wang <yangjun.wang@wartsila.com>
* Passing extra routes where to find clusterId
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cluster settings refactorings
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Clean up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cluster dashboard not rendered, fix#811
Signed-off-by: Roman <ixrock@gmail.com>
* refactoring
Signed-off-by: Roman <ixrock@gmail.com>
* actual fix
Signed-off-by: Roman <ixrock@gmail.com>
* reverted back reconnect check in cluster.activate()
Signed-off-by: Roman <ixrock@gmail.com>
* fix: cluster.activate() should not start reconnect on init (if not accessible)
Signed-off-by: Roman <ixrock@gmail.com>
* Preventing to create empty and existent workspaces
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Autofocusing name input
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Save workspace when hitting Enter
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Refactoring of save workspace process
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* 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>
Signed-off-by: Roman <ixrock@gmail.com>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
* add drag and drop capabilities for the order of cluster icons on the side bar
* add type annotations for better clarity
* fix clusters staying in previously icon reordered workspaces
* add some tests to cluster-store
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
* Close Preferences on Esc key
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Close Cluster Settings on Esc
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing typo
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fine-tuning select to show long items
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Update CRD api to use preferred version and implement v1 differences
Signed-off-by: Trevor Nichols <trevor@nichols.id.au>
* Fix unit test failure
Signed-off-by: Trevor Nichols <trevor@nichols.id.au>
* Register alternate API base URL if preferred version changes.
Signed-off-by: Trevor Nichols <trevor@nichols.id.au>
* Adjust for validation moving to the version.schema
Signed-off-by: Trevor Nichols <trevor@nichols.id.au>
* Allow for users to enabled release mode debugging by setting the env var `DEBUG` to "true"
* Adds file logging so that in production logs can still be
obtained. Those log files are limited the size and number and are rotated automatically
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
* Checking for 'kind' to be defined
Inside 'involvedObject' of Event
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fixing resource var definition
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Reverting to link rendering in Events
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Explicitly return emty link if no 'kind' available
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing lowercase of url path
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Allow user to select Kubeconfig from filesystem, fix#738
Signed-off-by: Roman <ixrock@gmail.com>
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
* Making bottom bar slightly thinner
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Moving workspace selector to left
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cluster Menu scrolling & tooltip fixes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Removing forgotten console.log()
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix Landing Page in light theme
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Updating Chart on every componentDidUpdate
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding cluster menu colors
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Adding theme class name flag into #app
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up mixins
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Tuning up Wizard Layout styles
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using theme-light global flag
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Minor style fixes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Using .theme-light flag across components
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Set theme as @computed value
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Preventing Drawer slide-in scroll flickering
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Setting background for settings views
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Minor layout fixes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Switching AceEditor theme reactively
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Cleaning up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* extract missing localizations from last master <- pr-merge
Signed-off-by: Roman <ixrock@gmail.com>
* fix: prevent app-crash in preferences in case of incorrect http-proxy value
Signed-off-by: Roman <ixrock@gmail.com>
* fix: don't repeat ipc-sync message to main renderer process/window when sending to frames
Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Roman <ixrock@gmail.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
* Add support for customreasourcedefinitions under the v1 API
* moving store and views to use v1
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
* use the Kubernetes regex for matching system names
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
* adding port-forward for containers in pods
address review comments
use more idiomatic approach for async code
move some files in advance of merge conflict with Lens restructure work
* Separate the port forward links in the UI (so they don't all spin when one link is clicked)
* minor fixes
* addressed review comments (replaced <p> with <div>, moved key attribute to proper element)
* fix lint issue
* removed extraneous <div> from pod container port details
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
* add parsing of quota values which are non-numeric in the general case
* add unit tests
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
* fix format duration rounding days error
* added tests
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
Signed-off-by: Jussi Nummelin <jussi.nummelin@gmail.com>
Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* add LANG env with UTF-8 specified
* fix precedence of union of env objects
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
* fix parseApi not accepting versions that don't start with 'v'
* add unit tests
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
* fix parseApi not accepting versions that don't start with 'v'
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
* Let OS allocate port number
Port availability might be tricky if some port is already in use on the
'all' interface '0.0.0.0'.
The proposed solution is to let the OS allocate the port for us using 0
as port specifier :
- first create a server instance to allocate a port number
- save port number
- close the server
- return the port number to the caller
This should be safe granted the OS doesn't reuse the port numbers on
consecutive port allocations.
see :
- about Node.js Net module : https://nodejs.org/docs/latest-v12.x/api/net.html#net_server_listen_port_host_backlog_callback
- about safety around reusing port number : https://unix.stackexchange.com/a/132524
Signed-off-by: Alexis Deruelle <alexis.deruelle@gmail.com>