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

1736 Commits

Author SHA1 Message Date
alexfront
2d69bbcfd8 Fix linter errors
Signed-off-by: alexfront <alex.andreev.email@gmail.com>
2022-09-08 16:04:57 +03:00
alexfront
d951f3a017 Move all side effects to hooks
Signed-off-by: alexfront <alex.andreev.email@gmail.com>
2022-09-08 16:00:01 +03:00
alexfront
ac8ed1478e Scroll list to bottom when new logs arrived
Signed-off-by: alexfront <alex.andreev.email@gmail.com>
2022-09-08 14:14:35 +03:00
alexfront
d37ae1bffe Fixing ts compilation errors
Signed-off-by: alexfront <alex.andreev.email@gmail.com>
2022-09-07 15:24:47 +03:00
alexfront
1898a4d68e Remove unused code
Signed-off-by: alexfront <alex.andreev.email@gmail.com>
2022-09-07 15:21:23 +03:00
alexfront
dadd69ef03 Add useIntersectionObserver() hook
Signed-off-by: alexfront <alex.andreev.email@gmail.com>
2022-09-07 15:10:32 +03:00
Alex Andreev
05a3ed0e57 Fix scrolling to items on search
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-06 19:28:01 +03:00
Alex Andreev
7b53650628 Hook function renaming
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-06 19:05:10 +03:00
Alex Andreev
51c059f1ba Give more room to the LogRows content
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-06 18:54:26 +03:00
Alex Andreev
6ec761868b Restyling Jump to bottom button
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-06 18:49:50 +03:00
Alex Andreev
b8f4fa14bf Show Jump to bottom button
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-06 18:35:02 +03:00
Alex Andreev
4c74d5a780 Add useInitialScrollToBottom() hook
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-06 18:26:16 +03:00
Alex Andreev
8ed40ffb8f Create useScrollToBottomButton hook
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-06 17:40:05 +03:00
Alex Andreev
b989340f84 Refresh rows measurement by refreshing their keys
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-06 16:56:06 +03:00
Alex Andreev
5443f40259 Highlight log row on hover
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-06 16:44:52 +03:00
Alex Andreev
c4ae074abd Add wrapper switch
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-05 15:26:24 +03:00
Alex Andreev
f90ede1026 Scroll to overlay from the search
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-05 13:54:57 +03:00
Alex Andreev
f09974fd1f Move LogRow to its own file
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-05 13:36:49 +03:00
Alex Andreev
da8570d974 Add more styles
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-05 13:27:32 +03:00
Alex Andreev
2e0b4d15b3 Add LogList external styles
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-05 13:21:23 +03:00
Alex Andreev
1679ba14e1 Scroll to bottom on tab change
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-05 13:15:13 +03:00
Alex Andreev
c4538e928b Scroll to bottom on pod id change
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-02 14:33:00 +03:00
Alex Andreev
968621f7c6 Fix scroll position when more logs loaded
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-02 13:46:44 +03:00
Alex Andreev
6d0d524f4f Merge branch 'master' into wrap-pod-logs 2022-09-02 12:49:48 +03:00
Alex Andreev
62cc0d7689 Keep scrolling position when loaded more logs
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-02 10:28:37 +03:00
Sebastian Malton
0d28af3fe5
Update snapshots from other work (#6160) 2022-09-01 11:26:10 -04:00
Sebastian Malton
b0d72b78d0
Bump typescript, @typescript-eslint/eslint-plugin, and @typescript-eslint/parser (#6143) 2022-09-01 10:05:32 -04:00
Alex Andreev
37318cab4e
Fix: align sidebar menu items (#6138)
* Introduce sitebar-items.module.scss

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

* Adjust sidebar item styles

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

* Use classnames from a scss module

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

* Set sidebar min width to 150px to keep readability

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

* Break words in long links

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

* Adjust navigation paddings

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

* Remove unused scss file

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

* Updating bunch of snapshots

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

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-01 12:52:55 +03:00
Alex Andreev
af8f39f83a Show logs regarding to showTimestamps flag
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-01 11:28:09 +03:00
Alex Andreev
e16fcf23a7 Remove overflow from the LogControls
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-01 09:51:06 +03:00
Alex Andreev
e02278d515 Merge branch 'master' into wrap-pod-logs 2022-09-01 09:49:29 +03:00
Alex Andreev
88678f63a2 Load more logs when scrolled to top
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-01 09:44:19 +03:00
Alex Andreev
85fadc74e0 Set some list onScroll events
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-01 09:28:31 +03:00
Alex Andreev
843c0f76f6 Remove overflow from the LogControls
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-09-01 09:27:55 +03:00
Alex Andreev
2fe7668edc
Remove requests/limits text data for workload metrics (#6128) 2022-08-31 14:20:35 -04:00
Lauri Nevala
cacc92d37a
Fix Promethes operator metrics provider detection (#6150) 2022-08-31 11:22:17 -04:00
Alex Andreev
6f91071af4 Using new <LogList/>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-08-31 14:34:54 +03:00
Sebastian Malton
c8fe453948
Update failing tests after merge (#6140) 2022-08-30 11:19:14 -04:00
Lauri Nevala
da6b7a5b4b
Update metric queries used for Helm installed Prometheus (#6139) 2022-08-30 09:18:38 -04:00
Alex Andreev
5795452cc3
Add option to download all logs from the container (#5970)
* Creating callForAllLogsInjectable

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

* Add sketch of Download all logs button

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

* Use randomId while creating pod logs tab

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

* Initial draft of download all logs tests

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

* Introduce download logs dropdown

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

* Cleaning up Controls component

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

* Coloring and styling Download logs button

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

* Drop waiting state on network or other error

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

* After clicking on button test cases

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

* Linter fixes

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

* Removing previous Download icon

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

* Respect timestamps and previous props

in callForAllLogsInjectable

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

* Update snapshots

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

* Update snapshots

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

* Remove unused .mockReturnValueOnce

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

* Remove one more unused line

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

* Cleanin up by overriding internals of logsViewModel

injectable

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

* Replace usage of callForAllLogs with

simple callForLogs

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

* Use css modules for the Controls component

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

* Move downloadAllLogs logic to injectable

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

* Move downloadLogs logic to the model

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

* Remove withInjectables wrapper from LogControls

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

* Move downloadAllLogs to model

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

* Testing resolve/reject options for callForLogsInjectable

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

* Catching call for logs errors

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

* Doesn't show save dialog if no logs received

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

* More descriptive describe statement

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

* Introduce Dropdown component with Menu

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

* Use <Dropdown/> in Download All Logs dropdown

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

* Fix line-break symbol

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

* Update snapshots

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

* Return a Promise from downloadAllLogs()

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

* Extend LogTabViewModel mocks in other tests

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

* Fix downloadAllLogs prop typings

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

* Fixing linter

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

* Fix linter harder

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

* Fix selectors in integration test

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

* Move tests into /behaviours

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

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-08-30 16:00:11 +03:00
Sebastian Malton
106c3d246a
Add data-warning prop on button for better snapshot testing (#6040) 2022-08-30 08:28:20 -04:00
Dominic1DL
ac6a5f9b83
Fix IPv6 missing brackets in httpProxy.ServerOptions (#5914) 2022-08-30 08:17:51 -04:00
Sebastian Malton
4b1c9fb5fd
Fix doughnut graphs on workload overview sometimes not showing (#5727) 2022-08-30 07:54:18 -04:00
Sebastian Malton
7767216167
Fix issues when using newer @types/semver (#6132)
- All the removed uses of `includePrerelease` that are removed were not
  actually used within the semver package

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

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-08-30 09:46:52 +03:00
Alex Andreev
da39984cc1 Create functional LogList component
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-08-29 15:53:07 +03:00
Sebastian Malton
e2b854d3af
Fix badge not expanding on click when appropriate (#6029)
* Fix badge not expanding on click when appropriate

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

* Fix snapshots

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

* Fix snapshots

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

* Update other snapshots

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

* Remove unneccessary code

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

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-08-25 09:19:35 -04:00
Alex Andreev
edd5d54e49
Replace deprecated <FormSwitcher/> in metrics-cluster-feature extension (#6060)
* Use new <Switch/> inside deprecated material switcher

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

* Clean up material UI (except types) from FormSwitch

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

* Fix button size in Metrics Settings

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

* Remove material-ui references from

<Switcher/> & <FormSwitcher/>

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

* Change to newer <Switch/> component

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

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-08-25 16:18:58 +03:00
Alex Andreev
0c32490fb0
Make cluster #app component transparent (#6076)
until theme ready

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

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-08-25 16:16:39 +03:00
Alex Andreev
3fe31d5fb5
Fix node conditions column text-align (#6092)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-08-25 08:56:19 -04:00
Janne Savolainen
94629954a3
Prevent massed remounting of dock tabs when dock height changes (#6104)
* Update injectable to make withInjectables have authentic React reconciliation

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

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

* Make some dock tabs have primitive props to have them React reconcile properly

Currently tab objects that are stored in a storage change reference on every change of dock height, making them less usable as React prop for causing involuntary remounting.

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

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

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-08-25 08:56:09 -04:00