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

229 Commits

Author SHA1 Message Date
Gabriel Accettola
e790757302
Show Message Box when no update is available after manually checking for updates (#7390)
* no updates available

Signed-off-by: Gabriel <gaccettola@mirantis.com>

* lint fix

Signed-off-by: Gabriel <gaccettola@mirantis.com>

* lint padding-line-between-statements

Signed-off-by: Gabriel <gaccettola@mirantis.com>

* test stubs - wip

Signed-off-by: Gabriel <gaccettola@mirantis.com>

* tray - when no new update is discovered showMessagePopupMock toHaveBeenCalled & toHaveBeenCalledWith

Signed-off-by: Gabriel <gaccettola@mirantis.com>

* fake tray and fake menu parity

Signed-off-by: Gabriel <gaccettola@mirantis.com>

* tray and menu passing tests and lint

Signed-off-by: Gabriel <gaccettola@mirantis.com>

---------

Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-04-03 15:36:25 -04:00
Sebastian Malton
b22d7af291
fix: Add check in release-tool for no relevant PRs (#7478)
* fix: Add check in release-tool for no relevant PRs

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* fix: Change wording of message while picking PRs

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-04-03 13:05:04 -04:00
Juho Heikka
fef9443064
Fix node metrics line progress (#7466)
Signed-off-by: Juho Heikka <juho.heikka@gmail.com>
2023-04-03 16:12:35 +03:00
dependabot[bot]
47796228d0
Bump @types/react-beautiful-dnd from 13.1.3 to 13.1.4 (#7459)
Bumps [@types/react-beautiful-dnd](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-beautiful-dnd) from 13.1.3 to 13.1.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-beautiful-dnd)

---
updated-dependencies:
- dependency-name: "@types/react-beautiful-dnd"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 08:28:49 -04:00
dependabot[bot]
8872b2f94a
Bump playwright from 1.31.2 to 1.32.1 (#7460)
Bumps [playwright](https://github.com/Microsoft/playwright) from 1.31.2 to 1.32.1.
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.31.2...v1.32.1)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 08:28:29 -04:00
dependabot[bot]
9d1464c39a
Bump webpack-dev-server from 4.11.1 to 4.13.2 (#7457)
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.11.1 to 4.13.2.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.11.1...v4.13.2)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 08:27:35 -04:00
Janne Savolainen
f4cb1d3ff4
Introduce Feature for Keyboard Shortcuts (#7442)
* Introduce feature for assigning keyboard shortcuts

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Enable keyboard shortcuts automatically instead of requiring explicit listener to be used in the application

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Start using keyboard shortcuts feature

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Update package-lock after rebase

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Tweak scripts for a package

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Introduce modifier for ctrl or command based on platform in use

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

---------

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2023-04-03 08:23:42 -04:00
Juho Heikka
a73586d844
Fix metrics visibility logic (#7465)
Signed-off-by: Juho Heikka <juho.heikka@gmail.com>
2023-04-03 08:06:53 -04:00
Panu Horsmalahti
3b8ef07a9e
conf v10.2.0 (#7462)
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2023-04-03 13:44:57 +03:00
Sebastian Malton
b5a085b55c
Get dev mode fixed (#7447)
* Get dev mode fixed

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add empty scripts for windows to satisfy run-script-os

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-31 15:30:21 -04:00
Sebastian Malton
fe2fd4c1fd
Move Cluster.apiUrl to seperate injectable (#7354)
* Refactor out Cluster.apiUrl to direct reading

- Should help prevent using stale data

- Removes some uses of synchronous FS operations

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Rename helper function to better communicate intent

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Improve prometheus handler tests to override less things

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-31 15:28:14 -04:00
Sebastian Malton
18d660ea77
Add temporal dependency to initializeExtensions (#7454)
- So that extensions can ensure that the shell env is up to date

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-31 14:33:05 -04:00
Sebastian Malton
9b8d6e4e44
Fix crash due to non base64 encoded secrets (#7448)
* Fix crash due to non base64 encoded secrets

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshot

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-31 14:21:40 -04:00
Sebastian Malton
908a3cabe1
Close Lens Proxy on quit of backend (#7453)
- Extract global shared state of shell sessions

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-31 14:21:31 -04:00
Sebastian Malton
2884dea195
Fix app crash on quit (#7407) (#7452)
* Fix app crash on quit (#7407)

* Fix app crash on quit

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Back out disabling extensions on quit

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fixup cherry-pick

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-31 14:21:07 -04:00
Sebastian Malton
c48b53fd5e
Correct dependencies of open-lens (#7451)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-31 13:49:46 -04:00
Sebastian Malton
a0fea20300
Stop all extensions before quitting app (#7450)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-31 13:37:29 -04:00
Jim Ehrismann
37c92c8fd1
Make ServiceAccount kubeconfig context name differ from cluster context name (#7433)
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
2023-03-31 10:37:59 -04:00
dependabot[bot]
799c120407
Bump rimraf from 4.4.0 to 4.4.1 (#7406)
Bumps [rimraf](https://github.com/isaacs/rimraf) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/isaacs/rimraf/releases)
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v4.4.0...v4.4.1)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-31 09:09:58 -04:00
dependabot[bot]
67dc74530b
Bump @swc/core from 1.3.40 to 1.3.44 (#7439)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.3.40 to 1.3.44.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/compare/v1.3.40...v1.3.44)

---
updated-dependencies:
- dependency-name: "@swc/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-31 14:14:04 +03:00
Jari Kolehmainen
7bae712703
wait app to be ready before creating a BrowserWindow for system proxy resolver (#7443)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2023-03-31 13:33:13 +03:00
Janne Savolainen
b5e564271e
Extract React Application as a Feature (#7441)
* Fix webpack config for react

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Introduce package for discovering html elements in unit tests

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Switch to using discovery of html elements from package

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Introduce competition for starting react application inside the Feature

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Move stuff in application start to earlier timeslot having no real need to be done so late

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Switch to using react application root feature being more friendly to extending

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Switch to using more familiar pattern of higher order components for wrapping react application

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Adapt to more familiar pattern for higher order components

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Rename feature for clarity

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

---------

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2023-03-31 11:57:20 +03:00
dependabot[bot]
5827fc9d9a
Bump webpack and @types/webpack (#7438)
Bumps [webpack](https://github.com/webpack/webpack) and [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack). These dependencies needed to be updated together.

Updates `webpack` from 5.76.1 to 5.77.0
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.76.1...v5.77.0)

Updates `@types/webpack` from 5.28.0 to 5.28.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/webpack"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-31 10:41:45 +03:00
Sebastian Malton
5b680e8870 Fix computed-channel tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-30 13:58:18 -04:00
Sebastian Malton
132c51018b
Remove requirement for JSON of messages (#7426)
* Remove requirement for JSON of messages

- Remove backhanded requirements of reactive contexts, overriding
  application configurations.

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix type error

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-30 10:28:32 -04:00
Jim Ehrismann
d8c485a79f
Restore disk metrics to PersistentVolumeClaim details page (#7427)
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
2023-03-29 07:40:22 -04:00
Alex Andreev
15762615d2
Block renderering non http(s):// links via <HelmChartIcon> (#7419)
* Adding HelmChartIcon tests

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

* HelmChartIcon refactoring

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

* Fine-tune styles in HelmChartDetails

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

* Adding styles to separate module

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

* Clean up

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

* Linter fixes

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

* Updating snapshots

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

---------

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-03-29 07:39:57 -04:00
Sebastian Malton
49f0a1af9c
Remove BaseStore<T> and replace with composition of dependencies (#7002)
* Rename ExtensionStore -> BaseExtensionStore
- The name was too close to ExtensionsStore

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Move ExtensionsStore to new format

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Move ClusterStore to new format

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Move UserStore to new format

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Cleanup types to remove multiple cast locations

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Move HotbarStore to new format

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Move WeblinkStore to new format

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Move FileSystemProvisionerStore to new format

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshots

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Clean up impl and rename to better describe intent

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix remaining type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fully split apart the enabled extensions storage

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fully split apart the clusters storage

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fully split apart the hotbar storage

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fully split apart the weblinks storage

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fully split apart the user preferences storage

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix crashing

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix tests and snapshots

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix integration test failures

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Improve typing to prevent errors in the future.

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Cleanup @k8slens/messaging and friends

- To fix type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix lint issue

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix global override not being complete enough causing tests to fail

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Bump memory for unit tests on CI

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Attempt to fix memory issue on CI again

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fixup test because of new injectables

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Upgrade Jest

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix unit tests falling over

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Back out jest config change

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove console log

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshot

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix tests by matching equality instead of snapshots

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix tests by forcing specific snapshot style

- Ubuntu CI seems to format arrays in snapshots differently than macOS locally

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-28 17:54:25 +03:00
Jari Kolehmainen
ba4a283af9
Refactor electron window setCertificateVerifyProc (#7185)
* refactor electron window setCertificateVerifyProc

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

* use ChromiumNetError enum in tests

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

* Fix unit tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
2023-03-28 09:42:51 -04:00
Alex Andreev
4f2ba5df48
Fix Cannot find module '@k8slens/cluster-settings' while running in dev mode (#7412)
* Adding 'prepare' commands to cluster-settings package

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

* Remove unused "lint" command from cluster-settings package

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

---------

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-03-27 12:14:57 -04:00
Alex Andreev
7d71873135
Fix download all logs for pod with few containers (#7413)
* Use container name as downloaded file name

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

* Specify container to call for logs query

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

* Fixing tests

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

---------

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-03-27 12:22:37 +03:00
Antti Lustila
8dc0177cb2
Export getPodsByOwnerId to extension API (#7225)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
2023-03-24 10:17:13 -04:00
Roman
3931c90d30
Support using Eviction API where applicable (#7372)
* Support using Eviction API when deleting Pods and Deployments, fix #5602

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

* fix: `KubeStatus` message/status/info full explanation

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

* added some tests for `PodApi.evict(resourceDescriptor)`

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

* revert props.editable & props.removable for `KubeObjectMenu`

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

* revert props.editable & props.removable for `KubeObjectMenu` -- missing parts

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

---------

Signed-off-by: Roman <ixrock@gmail.com>
2023-03-23 12:16:50 -04:00
Alex Andreev
a0d13e8003
Adding package exporting injection tokens for cluster settings (#7395)
* Add clusterIconSettingsComponentInjectionToken

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

* Adding tests for new token

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

* Create cluster-settings package

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

* Fix cluster-settings package build process

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

* Use tolens from @k8slens/cluster-settings

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

* Linter fixes

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

* Remove typescript 5.x.x from cluster-settings package

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

* Adding prepare:test command to package.json

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

* Test small cleanup

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

* Fix getByText check

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

* Clean up

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

* Linter fix

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

---------

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-03-23 11:40:56 +03:00
Alex Andreev
4a3f08d798
Fix Check for updates menu item title capitalisation (#7396)
* Check for updates -> Check for Updates

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

* Revert debugging changes

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

* Adding ellipsis to every Check for Updates items

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

---------

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-03-23 11:37:10 +03:00
Sebastian Malton
4b1d740d61
Fix behaviour of auto generated CRD KubeApis and KubeObjectStores (#7384)
* Simplify CRD KubeApi registrations

- Switch to auto injectable registrations

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Make sure that stores can still be retrieved

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Cleanup get extension fake to simplify impl

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Simplify logic for extensionInjectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix test in differencing registrator

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Cleanup code style

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix some tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix HPA details tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-22 17:51:26 +02:00
Sebastian Malton
8a80607d85
Add behavioural tests for Cluster Menu K8s Resources in Sidebar menu not being shown (#7280)
* Add behavioural tests to cover bug fix

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove previous fix to fix last test

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* More consistent impl of flushPromises

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fixup tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove ContextHandler test (dead code)

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix PrometheusHandler describe text

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add useful case test-utils helper

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Rename file to match token

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Cleanup tests to fix type errors and use tables

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-21 22:00:12 -04:00
Sebastian Malton
5409324236
Revert "Renderer file logging through IPC" (#7393)
This reverts commit 48db54ec9e.
2023-03-21 16:13:27 -04:00
Sami Tiilikainen
48db54ec9e
Renderer file logging through IPC (#7300)
* Renderer file logging through IPC

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

* Remove pagehide event listener as it may cause UI to freeze

Pagehide was needed in cluster frame to better handle main frame close/reload situation. But even empty pagehide listener in cluster frame seems to freeze the UI at least on some situations (multiple clusters open).

Beforeunload is not always executed in cluster frame when main frame is reloaded/closed, leaving log files open. To fix that, `stopIpcLoggingInjectable` is introduced to close all log files.

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

* Remove unnecessary formatting changes

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

* Lint fix

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

* Winston logger override

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

* Remove usage of doGeneralOverrides as it has been removed

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

* Update imports to match the new base

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

* Remove unnecessary id

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

* Review improvements

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

* Extract beforeunload listener to injectable

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

* Typo fix

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>

---------

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>
2023-03-21 15:04:22 -04:00
Sebastian Malton
517e2fe17d
Fix type error in new @k8slens/messaging (#7392)
* Fix type error in new @k8slens/messaging

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Better fix to conform to tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-21 17:12:29 +02:00
Jari Kolehmainen
a920f2c057
Electron 22.3.3 (#7389)
* electron 22.3.3.

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

* fix typo

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

* fix crash on quit

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

* fix sessionData app path

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

* Fix errors after merging new feature

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
2023-03-21 11:07:27 -04:00
Janne Savolainen
0f1f030a06
Switch to using messaging and startable stoppable from NPM package (#7368)
* Add custom jest resolver to fix requiring "uuid" module

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Update dependencies

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Introduce test utils for rendering and running with thrown mobx reactions

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Extract startable-stoppable to NPM package

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Extract messaging to NPM package

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Switch to using startable-stoppable from NPM package

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Switch to using messaging from the Feature

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove old implementation of messaging

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make setupping app paths happen earlier in renderer

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix typo

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Add kludge to make testing-library work properly from test-utils package

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix code style

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Add lint:fix -root script

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix unrelated failing unit tests

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Turn of no-floating-promises from typescript linting for being broken

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make linting not happen for dist -directories

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make linting failures appear as failure

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Stop running prettier twice

It already gets ran as eslint-plugin.

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make CI run unit tests for all packages by consolidating name of NPM script

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Add missing unit tests for coverage

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Skip coverage for test utils

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove check for coverage in packages which are not ready for it

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Stop collecting coverage from index.ts files them being indirections to the implementation

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Implement sending message to channel in main

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Add missing feature dependencies

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Add dummy implementations for requesting in main from renderer

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Re-enable communicating from main to cluster frames

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Ignore trivial files from coverage

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Update package-lock

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Extract message-bridge to separate NPM package to prevent dev dependencies being in the production bundle

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Extract computed channel to own NPM package for clear dependencies

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Consolidate electron related stuff to a directory

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Add missing publish configurations

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Ignore test implementation from coverage being not interesting

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

---------

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2023-03-21 11:38:43 +02:00
Sebastian Malton
df49ff9b96
Fix problems when using 'npm link' (#7380)
* Fix problems when using 'npm link'

- Add missing peerDependencies and devDependencies

- Move 'overrides' to root package to fix audit issues

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix type issue and remove deprecated @types/* deps

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fixing type errors harder

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-20 15:43:08 -04:00
Jari Kolehmainen
7ed99255cd
Fix resolveSystemProxyFromElectron causing a crash on quit (#7379)
* destroy resolve system proxy window on before quit

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

* resolve system proxy window: load blank page

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

* disable paintWhenInitiallyHidden

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

---------

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2023-03-20 09:25:04 -04:00
Jari Kolehmainen
52ede670bb
Fix resolve system proxy error when no windows available (#7375)
* fix resolve system proxy error when no windows available

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

* fix electronBrowserWindowInjectable id

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

---------

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2023-03-17 15:03:55 -04:00
Sebastian Malton
37513dee29
Remove direct dependency on 'abort-controller' package (#7366)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-17 12:59:57 -04:00
Alex Andreev
d7b2202c1f
Fix catalog & workloads table view (#7371)
* Fix catalog list table view

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

* Wrap ingresses rules

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

* Reduce Badge sizing

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

* Do not text-overflow:ellipsis in Pod names

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

* Save a room to table head cells

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

* Update snapshots

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

---------

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-03-17 12:57:32 -04:00
Sebastian Malton
8035f92dbd
Fix findClosestVersionTagLessThanVersion in release tool (#7374)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-17 11:49:58 -04:00
Alex Andreev
763816f71f
Respect cluster avatars entity background color (#7365)
* Add iconBackgroundColor cluster preference type

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

* Set custom backround for hotbar entities

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

* Remove unused code from Catalog

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

* Update entity background if preferences background changes

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

* Set avatar backgrounds from entity

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

* Clean up

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

* Clean up in hotbar entity icon

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

* Fix setting up entity background

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

* Use single icon prop

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

* Cleaning up hotbar entity icon

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

* Fixing test to ensure icon has data:image

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

* Add more test cases

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

---------

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-03-17 13:50:30 +03:00
Sebastian Malton
1a6b11525d
Release 6.5.0-alpha.3 (#7361)
* Release 6.5.0-alpha.3

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update lock-file

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-03-15 12:21:55 -04:00