1
0
mirror of https://github.com/lensapp/lens.git synced 2024-11-10 10:36:25 +03:00
Commit Graph

25 Commits

Author SHA1 Message Date
Sebastian Malton
e977890677
Remove webpack.*.ts importing values from src/ (#4992) 2022-04-13 10:39:35 -04:00
Panu Horsmalahti
1a29759bff
Enable consistent-type-imports eslint rule (#5205) 2022-04-06 10:34:16 -04:00
Jari Kolehmainen
b3574e1a21
TLS cert per cluster for lens-k8s-proxy (#5081)
Co-authored-by: Sebastian Malton <sebastian@malton.name>
2022-03-28 08:39:57 -04:00
Jari Kolehmainen
0fa89ecbfa
Enable TLS on lens-k8s-proxy (#4941)
* wip: enable tls on lens-k8s-proxy

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

* cleanup

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

* type -> interface

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

* more dependencies

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

* refactor

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

* run di.runSetups() after app is ready

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

* tls fixes & refactor

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>

* refactor

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

* refactor

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2022-03-17 15:07:40 +02:00
Roman
ff55719ffa
Upgrade to webpack@5 (#4894) 2022-02-25 10:20:06 -05:00
Sebastian Malton
600bd659f6
Enforce member-delimiter-style using eslint (#4870) 2022-02-16 14:43:03 -05:00
Jim Ehrismann
733bb543c9
Revert "Upgrade to webpack@5 (#4725)" (#4872) 2022-02-16 09:14:14 -05:00
Roman
d656a9e289
Upgrade to webpack@5 (#4725)
* attempt to upgrade webpack@5 and all relevant packages to latest version -- part 1

Signed-off-by: Roman <ixrock@gmail.com>

* debugging webpack@5 usage -- part 1

Signed-off-by: Roman <ixrock@gmail.com>

* - attempt to use "react-refresh-typescript" with webpack@5 thingy
- extending getTSLoader() to accept more options from ts-loader

Signed-off-by: Roman <ixrock@gmail.com>

* more fixes, updating webpack loaders

Signed-off-by: Roman <ixrock@gmail.com>

* merge-fixes, using internal webpack@5 asset handlers (type: "asset/*")

Signed-off-by: Roman <ixrock@gmail.com>

* fix: raw-loader / <Icon svg="./*">, updated mocked types for importing resources via webpack

Signed-off-by: Roman <ixrock@gmail.com>

* removing webpack-dev-server, clean up

Signed-off-by: Roman <ixrock@gmail.com>

* fix master-merge conflict

Signed-off-by: Roman <ixrock@gmail.com>

* fix/reverted: use sourceMap for styles

Signed-off-by: Roman <ixrock@gmail.com>

* fix lint

Signed-off-by: Roman <ixrock@gmail.com>

* fix: loading svg icons inline as data-url (workaround for "?raw" as it fails in tests and "!!raw-loader!" seems doesn't work at all in webpack@5)

Signed-off-by: Roman <ixrock@gmail.com>

* attempt to use webpack-dev-server via node-api -- part 1

Signed-off-by: Roman <ixrock@gmail.com>

* attempt to use webpack-dev-server via node-api -- part 2

Signed-off-by: Roman <ixrock@gmail.com>

* fix: incorrect parsing svg-icon xml-content by <HotbarEntityIcon/>

Signed-off-by: Roman <ixrock@gmail.com>

* fix: more random fixes related to incorrect parsing svg-icon content, added static Icon.isSvg(content: string)

Signed-off-by: Roman <ixrock@gmail.com>

* attempt to fix: "Uncaught (in promise) DOMException: A network error occurred." when loading cluster frame -- part 1

Signed-off-by: Roman <ixrock@gmail.com>

* fix: loading cluster frame + error in loading terminal default font (which was causing network exception error and hidden cluster-view)
fix: proxying websockets (e.g. terminal)

Signed-off-by: Roman <ixrock@gmail.com>

* fix: wait lensProxy.listen() to obtain lensProxy.port for webpack-dev-server

Signed-off-by: Roman <ixrock@gmail.com>

* fix lint

Signed-off-by: Roman <ixrock@gmail.com>

* fix unit tests

Signed-off-by: Roman <ixrock@gmail.com>

* reverted auto-formatted imports with 2 lines (.idea/webstorm)

Signed-off-by: Roman <ixrock@gmail.com>

* fix: handle warnings in main-process compilation files

Signed-off-by: Roman <ixrock@gmail.com>

* fix: handle warnings in "renderer" compilation

Signed-off-by: Roman <ixrock@gmail.com>

* fix: move app fonts preloading into html/css files, clean up

Signed-off-by: Roman <ixrock@gmail.com>

* update "webpack@5", "typescript@4.5" in bundled extensions / attempt to fix weird errors in build pipeline:

ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/common/catalog/catalog-category-registry.d.ts
6:27-35
[tsl] ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/common/catalog/catalog-category-registry.d.ts(6,28)
      TS1005: ',' expected.

ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/renderer/components/select/select.d.ts
8:14-28
[tsl] ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/renderer/components/select/select.d.ts(8,15)
      TS1005: ',' expected.

ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/renderer/api/catalog-entity-registry.d.ts
8:14-22
[tsl] ERROR in /home/runner/work/lens/lens/src/extensions/npm/extensions/dist/src/renderer/api/catalog-entity-registry.d.ts(8,15)
      TS1005: ',' expected.

Signed-off-by: Roman <ixrock@gmail.com>

* fix: handle errors in bundled extensions compilation process

Signed-off-by: Roman <ixrock@gmail.com>

* fix: "webpack" not found in production

Signed-off-by: Roman <ixrock@gmail.com>

* fix: removed preloading fonts in template via <link preload> since it's not bundled with HtmlWebpackPlugin() anyway anda all fonts loaded via css @font-face rule

Signed-off-by: Roman <ixrock@gmail.com>

* apply HMR at least for css/styles and use manual page reload on app/scripts change

Signed-off-by: Roman <ixrock@gmail.com>

* use `react-refresh-typescript` and `@pmmmwh/react-refresh-webpack-plugin` to support HMR in most cases

Signed-off-by: Roman <ixrock@gmail.com>

* responding to comments

Signed-off-by: Roman <ixrock@gmail.com>

* revered extension version in package-lock.json (autoupdated on `make dev`)

Signed-off-by: Roman <ixrock@gmail.com>
2022-02-15 17:04:12 +02:00
Janne Savolainen
589472c2b5
Shorten license header to reduce amount of clutter in top of the files (#4709)
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-01-18 10:18:10 +02:00
Roman
2d279a6b99
using both sass + modules + tailwind (optional) (#4604)
using sass + css-modules + tailwind for styling, part of #3701
2021-12-23 12:29:36 +02:00
Sebastian Malton
c6dce043a7
Lint: comma-spacing (error) & comma-dangle (error) (#4200)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-11-02 17:38:20 -04:00
chh
b06c33383b
Prevent injection of expired "DST Root CA X3" from host CA stores; Electron to 13.6 (#4185) 2021-11-02 18:16:10 +02:00
Sebastian Malton
7e0aeca119
Remove exec.command checking (#3881) 2021-10-14 08:46:23 -04:00
Sebastian Malton
d72158cc63
Fix local cluster delete flow (#3473)
* 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>
2021-09-08 15:06:14 +03:00
Alex Andreev
4fe0a7d73e
Catalog render optimizations (#3422) 2021-07-21 08:51:46 -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
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
Sebastian Malton
2e2283bcc9
enfore unix line endings and always ending files with line endings (#1997)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-01-21 08:09:41 -05:00
Sebastian Malton
f3f9f08c0a
lint whole repo (#1600)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2020-12-02 17:22:10 +08: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
steve richards
4fcac6b0d0
Added additional checks on the command used in the Exec plugin in a kubeconfig (#1013)
- 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>
2020-10-12 10:20:08 +03:00
Roman
5670312c47
Migrating Vue components to React and stores refactoring (#585)
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>
2020-08-20 08:53:07 +03:00
Roman
d90be46a1f
use common vars in router, minor clean up (#551)
Signed-off-by: Roman <ixrock@gmail.com>
2020-07-02 17:21:38 +03:00
Roman
b7974827d2
Lens restructure (#540)
Signed-off-by: Roman <ixrock@gmail.com>
2020-06-30 14:35:16 +03:00
Jari Kolehmainen
1d0815abd2
Lens app source code (#119)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-03-15 09:52:02 +02:00