1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Commit Graph

21 Commits

Author SHA1 Message Date
Sebastian Malton
652319ac89
Refactor PrometheusProviders (#2707) 2021-05-27 09:50:18 -04:00
Sebastian Malton
5ed4537979
Turn on noUnusedLocals, noImplicitReturns, importsNotUsedAsValues: error, and isolatedModules (#2777) 2021-05-19 12:11:54 -04:00
Jari Kolehmainen
2d0609ed24
Check source files for license header (#2763)
* check source files for license header

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

* tweak

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

* add license header to all relevant source files

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2021-05-12 18:33:26 +03: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
Lauri Nevala
4afec72ceb
Fix: Recreate proxy kubeconfig if it is deleted (#2372) 2021-03-23 08:12:01 -04: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
Lauri Nevala
badabff90e
Store prometheus cluster metadata based on metrics request responses (#1438)
* Store prometheus metadata for clusters based on metrics requests

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

* Use ClusterMetadataKey.PROMETEHUS as key

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

* Update metadata only if it is changed

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

* Use structural comparer as default for store sync reaction

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

* No need to compare metadata as json anymore

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

* Use structural comparer only in cluster-store

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

* Refactoring

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

* React only prometeheus preference changes to re-initialise prometheus connection

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

* Add missing semicolons

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

* Fix imports

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

* Report metrics status in cluster-report (#1443)

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

* Apply suggestions from code review

Co-authored-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>

* Fix logger reference

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

Co-authored-by: Sebastian Malton <sebastian@malton.name>
2020-11-26 09:41:47 +02:00
Panu Horsmalahti
ff93760dc4
Enable object-shorthand rule (#1500)
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-11-24 13:16:35 +02:00
Panu Horsmalahti
460dfe4d2b Use @typescript-eslint/semi.
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-11-19 18:12:52 +02:00
Panu Horsmalahti
1477bb8274 Enforce semicolons in eslint
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-11-19 16:35:04 +02:00
Lauri Nevala
9d9867f674
Add path to auth proxy url if present in cluster url (#856)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
2020-09-11 14:24:24 +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
Sebastian Malton
4bd29a6d88
fix format duration rounding days error (#582)
* fix format duration rounding days error
* added tests

Signed-off-by: Sebastian Malton <smalton@mirantis.com>

Co-authored-by: Sebastian Malton <smalton@mirantis.com>
2020-07-15 09:45:52 -04:00
Jussi Nummelin
55687b7d35
Kubeconfigs as file references (#466)
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>
2020-07-03 16:53:23 +03:00
Lauri Nevala
c15aa7972c
Remove redundant applyHeaders method (#469)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
2020-07-03 11:22:58 +03:00
Roman
b7974827d2
Lens restructure (#540)
Signed-off-by: Roman <ixrock@gmail.com>
2020-06-30 14:35:16 +03:00
Jari Kolehmainen
5c1974f07b
Auto-detect prometheus installation (#343)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-05-06 18:55:49 +03:00
Alexis Deruelle
6412d73a5a
Fix port availability test (#333)
* 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>
2020-05-05 07:31:58 +03:00
Lauri Nevala
ac552087d5
Do not timeout watch requests (#273)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
2020-04-19 17:48:14 +03:00
Jari Kolehmainen
1aaa695cfe
Refactor dashboard server logic to electron main (#146)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-03-24 07:37:47 +02: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