1
0
mirror of https://github.com/lensapp/lens.git synced 2024-09-20 13:57:23 +03:00
Commit Graph

43 Commits

Author SHA1 Message Date
Sebastian Malton
4fc340d0c6
Cleanup integration and unit tests (#3531)
- Make mockWindow a function and call it when needed

- Change timeouts so that better error messages happen more often in
  integration tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-08-03 08:51:52 -04:00
Sebastian Malton
eba44d76aa
Fix integration test not assigning to clusterAdded correctly (#3168) 2021-06-24 09:21:53 -04:00
Sebastian Malton
e49576ee8c
Fix <Icon>'s not using tooltip and fix toolbar not being boolean (#3038)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-06-23 09:14:59 -04:00
Alex Andreev
d9ceb8fa08
General catalog category (#3106)
* Adding General Entities and General Category

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Usign material icons for general entities

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Setting background for hotbar icon explicitly

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding Catalog initially to first hotbar

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Tuning hotbar store tests

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Changing type from GeneralEntity to General

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Search for catalog hotbar item in tests

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Removing Catalog link from bottom bar

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Waiting for hotbar catalog entity

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Opening cluster list by data-testId

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Replacing types on interfaces

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing integration tests

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding general entities throught initializers

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Removing icon refs from CatalogEntitySpec

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2021-06-21 10:59:54 +03:00
Sebastian Malton
5ee2ab5b4a
Move all RouteParam's and URL builders to src/common (#2778)
- Prevents some circular dependencies

- Allowed main to use them as needed

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-06-10 08:52:09 -04:00
Luca Kröger
22c9d03edb
Add container attach feature (#2927) 2021-06-07 10:47:27 -04:00
Alex Andreev
0899ace037
Restyling extensions page with tailwindcss (#2796)
* 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>
2021-05-23 15:15:42 +03:00
Sebastian Malton
5ed4537979
Turn on noUnusedLocals, noImplicitReturns, importsNotUsedAsValues: error, and isolatedModules (#2777) 2021-05-19 12:11:54 -04:00
Jari Kolehmainen
f8b939bf59
Check license header using eslint (#2780)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2021-05-17 09:43:53 -04:00
Jari Kolehmainen
8fff064e0c
Fix kubeconfig-sync issues (#2692)
- 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>
2021-05-04 15:21:15 -04:00
Jari Kolehmainen
b1274cbb33
Extensible welcome page (#2637)
* welcome/landing page

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix integration tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2021-04-27 11:24:39 +03:00
Sebastian Malton
9563ead2e6
Fixing Singleton typing to correctly return child class (#1914)
- 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>
2021-04-21 09:59:59 -04:00
Jari Kolehmainen
05a3494acb
Don't bundle extension with eula on default build (#2542) 2021-04-20 09:35:37 -04:00
Alex Andreev
d5bc7425f5
Polishing settings styles (#2534)
* Polishing settings css

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing inputs border-radius

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Removing Box component

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Removing unused import

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Remove content region style fixes

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Revert theme colors

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Set new colors in theme files

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Change Cluster extectedText

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2021-04-19 15:19:09 +03:00
Jari Kolehmainen
e948fc047c
Allow register actions to "add to catalog" button (#2497)
* registrable add-to-catalog button

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix integration tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix integration tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2021-04-13 14:51:43 +03:00
Jari Kolehmainen
99a464c61d
Catalog & Hotbar - initial groundwork (#2418)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2021-04-09 09:11:58 +03:00
Alex Andreev
84cc0cdf55
Preferences page redesign (#2446)
* Removing header part

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Restyling PageLayout

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Restyling .round-black Input

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding Tab navigation to Preferences

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Styling Application tab

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Add esc button

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Add media queries

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Introducting Switcher component

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Styling Proxy tab

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Moving start-up switcher to Other tab

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Styling Kubernetes tab

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Styling Extensions tab

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Styling inputs and selects

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Styling helm chart section

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Create a telemetry tab with extensions

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding lens Select theme

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Remove Other tab

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fix mainBackground color

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Simplifying Tabs boilerplate

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Replacing button font

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing one-column settings layout

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing integration tests

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixin tests harder

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Showing bottom bar in workspaces

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2021-04-06 15:45:23 +03:00
Sebastian Malton
8eb8fb6234
Fix integration test lifecycle fuctions not failing tests (#2259) 2021-03-30 10:14:59 -04:00
Sebastian Malton
503a49261e
Fix unit tests and make tests fail if a promise rejects after the test harness is finishes (#2034) 2021-03-30 10:14:05 -04:00
Roman
aedcc6d70e
Persist local-storage in external json-file (#2279) 2021-03-18 08:36:34 -04:00
Jim Ehrismann
713ec8c69d
Basic workspace overview (#2047)
* basic workspace overview

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* css tweaks for landing page as a PageLayout

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* address review comments

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* more review comment addressing, added overview to workspace command palette

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* added back the landing page startup hint

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* refactoring as per review comments

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* added original landing page back only for default workspace with no clusters

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* Workspace overview layout tweaks (#2302)

* tweaks workspace overview layout

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cluster settings on top

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* header logo for add cluster page

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* tweak landing page

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* combine left menu icons

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* always show bottom status bar

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* tweak

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* integration test fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* change cluster menu

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* first attempt to fix integration test

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* lint

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* get selectors right for integration test

Signed-off-by: Jim Ehrismann <jehrismann@miranits.com>

Co-authored-by: Jim Ehrismann <jehrismann@mirantis.com>
Co-authored-by: Jim Ehrismann <jehrismann@miranits.com>

* address review comments, and rebased to master

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Co-authored-by: Jim Ehrismann <jehrismann@miranits.com>
2021-03-11 09:56:12 +02:00
Jari Kolehmainen
b5e7be7591
Initial command palette feature (#1957)
* wip: command palette

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* register shortcut to global menu

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* introduce openCommandDialog & closeCommandDialog

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix ipc broadcast to frames from renderer

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* tweak

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* add more commands

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* ipc fix

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* add integration tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* ipc fix

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* implement workspace edit

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* workspace edit fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* make tests green

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fixes from code review

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup ipc

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup CommandRegistry

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* ipc fix

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix ClusterManager cluster auto-init

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* ensure cluster view is active before sending a command

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* switch to last active cluster when workspace change

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* tweak integration tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* run integration tests serially

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fixes based on code review

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup more

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* add workspace fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* cleanup

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2021-02-02 12:34:13 +02:00
Lauri Nevala
5f19606129
Fix Helm repositories and pod logs integration tests (#2015)
* Fix Helm repository and pod logs integration tests

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>

* Return parsed object

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
2021-01-26 13:26:45 +02:00
Sebastian Malton
41e012d83f
do not assume that bitnami is guanteed to be in the helm repo list (#1960)
* do not assume that bitnami is guanteed to be in the helm repo list

* more robust test by checking for added helm repos

Co-authored-by: Jim Ehrismann <40840436+jim-docker@users.noreply.github.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-01-18 11:23:50 -05:00
Alex Andreev
83ed44f670
Adding logs tab bottom toolbar (#1951)
* Adding bottom toolbar to logs tab

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Making bottom toolbar responsive

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Using generic search input clear button

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing log test selectors

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2021-01-15 11:34:11 +03:00
Violetta
c48816ca5c
Add support for LimitRange (#1796)
Signed-off-by: vshakirova <vshakirova@mirantis.com>
2021-01-14 11:49:39 +03:00
Alex Andreev
a61e20965d
ClusterOverview page refactorings (#1696)
* ClusterOverview page refactorings

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Minor test fix for MainLayoutHeader

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Replacing class name in tests

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Remove unnecessary parenthesis

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2020-12-11 07:36:47 +02:00
Violetta
d143b234b7
Full support for ReplicaSets (#1704)
Signed-off-by: vshakirova <vshakirova@mirantis.com>
2020-12-10 15:23:51 +03:00
Panu Horsmalahti
dcf253e7d5
Add eslint rule padding-line-between-statements (#1593)
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-12-02 09:55:52 +02:00
Panu Horsmalahti
335778aeef
Enforce template strings in eslint (#1574)
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-11-30 15:35:16 +02:00
Sebastian Malton
7451869c25
add no-unused and react/recommended to eslint (#1523)
* 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>
2020-11-27 08:48:38 -05:00
Alex Andreev
ab24325e69
Fix workspace flaky tests (#1520)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2020-11-25 16:03:45 +02:00
Sebastian Malton
4e6b8ee10e
Add designated folder for extensions (#1245)
* add store for mapping extension names to filesystem paths

- add extension mechinism for getting a folder to save files to

- add test to make sure that extensions are being loaded

- skip extension loading test

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2020-11-24 10:28:08 -05:00
Lauri Nevala
6a0dd4edfb
Replace deprecated stable helm repository with bitnami (#1479)
* Replace deprecated stable repo with bitnami

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
2020-11-23 09:07:37 +02:00
Alex Andreev
8c73861962
Open last active cluster after switching workspaces (#1444)
* 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>
2020-11-20 14:53:28 +03:00
Panu Horsmalahti
0b182ccf6f Add a few missing folders to be linted.
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-11-19 17:05:30 +02:00
Roman
faa1cef307
PageRegistration & BaseRegistry refactoring (#1334)
Signed-off-by: Roman <ixrock@gmail.com>
Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-11-12 16:29:02 +02:00
Jim Ehrismann
033a91f002
implemented app menu testing support (#1105)
* implemented app menu testing support

* addded Preferences page helm repo test

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
2020-11-09 15:10:30 -05:00
Alex Andreev
16fb35e3f9
Log search (#1114)
* Moving logs to virtual list

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Introducing log search

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Setting ref for VirtualList to access its methods

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Introducing search store

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Centering overlay when scroll to it

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Using SearchInput in PodLogSearch

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Using Prev/Next icons for search

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* No trigger logs load when scrolled by method

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* SearchInput refactoring

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding find counters

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Clean search query on dock tab change

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Refresh search when logs get changed

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Case-insensitive search

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Improve logs scrolling experience

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Catching empty logs in various places

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing downloading logs

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Clean up some duplicated styles

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Removing jump-to-bottom animation

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing since label

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Reducing container selector size

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Scroll down to bottom after each reload

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fix search within timestamps if they not provided

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Use log row hover color from theme

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Add search bindings for 'Esc' & 'Enter' hits

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Focus input fields on CmdOrCtrl+F

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Move search.store.ts in to /common folder

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* search.store.ts -> search-store.ts

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding test for search store

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding integration tests for logs

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fixing scroll jumping bug

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Removing download icon check for testing purpose

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Removing clicking on nginx-create-pod-test

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Moving log tests before cluster operations

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Build extensions before integration tests

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>

* Build also npm before integration tests

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>

* Move npm build and extension build into own build step

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>

* Removing separator sketches

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Horizontal scrolling to founded keyword

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Delaying horizontal scrolling

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

Co-authored-by: Lauri Nevala <lauri.nevala@gmail.com>
2020-11-09 17:46:14 +03:00
Roman
334815f71a
Tray icon (#1005)
* 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>
2020-10-27 15:25:29 +02:00
Jim Ehrismann
4a15e65fea
fix cluster page integration test (#1088)
(make it independent of prometheus metrics install)

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
2020-10-17 09:36:48 +03:00
Sebastian Malton
0960259279
Add some basic unit tests for the following files: (#1050)
* 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>
2020-10-09 11:25:20 -04:00
Sebastian Malton
87061cee9e
Refactor testing harness to use defaults (#808)
* 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>
2020-10-02 10:05:59 -04:00