1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer
Alex Andreev 3084b7b8d9
Change update warning level over time (#5445)
* Give an UpdateButton injectables

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

* AppUpdateWarning class and injectable

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

* Rename folder to app-update-warning

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

* Add appPublishDateInjectable

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

* Inject ipcRenderer into app-update-warning

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

* Add setter for downloadedUpdateDate

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

* Add tests for AppUpdateWarning

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

* appPublishDate initial test

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

* Parsing app release date from the package version

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

* Introduce appUpdateWarningLevelInjectable

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

* Fix withInjectables props

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

* Determine warning from days passed after update available

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

* Save update available date in session storage

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

* Move quitAndInstall() to separate function

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

* Register quit-and-install ipc channel

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

* Make update function injectable for button

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

* Update tests

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

* Set proper timeframes

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

* Setting global UTC timezone for tests

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

* Refresh tests

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

* Testing warning level changes over time

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

* Remove unused app-publish-date files

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

* Make linter happy

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

* Pass quitAndInstallUpdateInjectable to UpdateButton

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

* Remove updateAppInjectable

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

* Initial tests for installing update using topbar button

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

* Refactor AppUpdateWarning class using injectables

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

* Permit side effects in injectable
periodicalCheckForUpdateWarningInjectable

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

* Temporarily set noop for UpdateButton update()

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

* Remove previous implementation files

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

* Unoverriding topbar injectables

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

* Render TopBar inside ApplicationBuilder

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

* Move updateWarningLevelInjectable

to /common subfolders from /main

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

* Make UpdateButton warning prop observable

by using computed() structure

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

* Updating snapshots

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

* Add sync box files allowing to restart & install

update from renderer process

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

* Add Update button dropdown tests

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

* Fix jest.advanceTimersByTime usage

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

* Check for severe warning level

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

* Linter fixes

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

* Remove usage of legacy global causing trouble in unit tests

Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>

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

* Make update warning level completely reactive and responsibility of a renderer

Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>

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

* Remove dead code

Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>

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

* Remove tests that are covered by behaviour

Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>

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

* Fix restarting and installing update when pressing update button

Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>

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

* Update snapshots

Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>

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

* Remove dead code

Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>

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

* Update more snapshots

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

* Remove duplication from behavioural unit test

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

* Reducing too large MenuItems height

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

* Reduce too large UpdateButton paddings

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

* Add jest globalSetup into package.json

to fix timezone test

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

* Do not triggering computed value every time it is being used

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

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
2022-06-28 16:27:19 +03:00
..
api Move phenomenon of renderer out from common by introducing different implementations for environments 2022-06-16 08:44:38 -04:00
app-paths Introduce way to install update directly from tray. Make application updater unit testable... (#5433) 2022-06-03 11:21:36 +03:00
application-update Introduce way to install update directly from tray. Make application updater unit testable... (#5433) 2022-06-03 11:21:36 +03:00
ask-boolean Introduce way to install update directly from tray. Make application updater unit testable... (#5433) 2022-06-03 11:21:36 +03:00
before-frame-starts Make starting of application modular and unit testable (#5324) 2022-05-18 16:18:02 +03:00
catalog Add ability to hide KubeObjectMenu Edit and Remove buttons in extensions (#5107) 2022-05-04 12:44:31 -04:00
cluster-frame-context Move phenomenon of renderer out from common by introducing different implementations for environments 2022-06-16 08:44:38 -04:00
components Change update warning level over time (#5445) 2022-06-28 16:27:19 +03:00
create-cluster Fix cluster frame display issue (#5518) 2022-06-20 22:23:15 -04:00
extension-loader Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
fonts Custom terminal fonts support (#5414) 2022-06-06 18:03:12 +03:00
frames Change update warning level over time (#5445) 2022-06-28 16:27:19 +03:00
hooks Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
initializers Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
ipc Fix cluster frame display issue (#5518) 2022-06-20 22:23:15 -04:00
k8s Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
kube-object Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
kube-watch-api Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
navigation Introduce way to install update directly from tray. Make application updater unit testable... (#5433) 2022-06-03 11:21:36 +03:00
port-forward Revert accidental breaking change (#5703) 2022-06-22 09:48:09 -04:00
protocol-handler Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
remote-helpers Change update warning level over time (#5445) 2022-06-28 16:27:19 +03:00
routes Simplify logic for injecting many instances which can reactively change e.g. based on extension being enabled or disabled (#5662) 2022-06-20 10:19:20 +03:00
search-store Make starting of application modular and unit testable (#5324) 2022-05-18 16:18:02 +03:00
start-frame Make starting of application modular and unit testable (#5324) 2022-05-18 16:18:02 +03:00
themes Introduce way to install update directly from tray. Make application updater unit testable... (#5433) 2022-06-03 11:21:36 +03:00
utils Helper to resolve proxy from URL in any environment, or using extension-API (#5690) 2022-06-22 16:09:24 +03:00
window Fix cluster frame display issue (#5518) 2022-06-20 22:23:15 -04:00
bootstrap.tsx Stop using HelmCli from Renderer (#4861) 2022-06-13 11:42:53 +03:00
getDi.tsx Show extension preferences in separate page (#5284) 2022-06-21 11:11:31 -04:00
getDiForUnitTesting.tsx Change update warning level over time (#5445) 2022-06-28 16:27:19 +03:00
mui-base-theme.tsx Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
stores-apis-can-be-created.injectable.ts Turn on strict mode in tsconfig.json, some helpful lints, and required cleanup where strictness necessitates it (#5195) 2022-05-16 07:17:57 -04:00
template.html Custom terminal fonts support (#5414) 2022-06-06 18:03:12 +03:00