Commit Graph

9 Commits

Author SHA1 Message Date
Francesco Torchia eac3deaa4b
Add harvester features
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-11-13 15:38:36 +01:00
Giuseppe Leo 01eeb0548f
Add recommended lint rules globally (#8997)
* Update configuration

* Create default config for eslint

* Restore plugin:vue/recommended

* Add exceptions and overrides

* Correct manually remaining issues

* Adding further picked exceptions groupped up

* Fix or disable specific cases manually and singularly

* Add naming linting exception

* Remove unused variable in component

* Move rules to default

* Autocorrect rancher/components linting issues

* Configure VSCode to use multiple files, to display linting for rancher components

* Disable jest lint hook restriction for string list component

* Autofix
2023-06-23 17:02:55 +02:00
Neil MacDougall da0d60720d
Auth Provider: Support Okta with LDAP search (#8679)
* Auth Provider: Support Okta with LDAP search

* Minor fixes

* Update UX and add detail of LDAP configuration

* Fix issues when logging out

* Fix i18n key
2023-05-03 10:07:58 +01:00
Phillip Rak 3d410d0974 Apply linter auto-fixes
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2022-11-16 18:38:20 -07:00
Richard Cox 2fac6c1d36 Fix two setup & one setting issues
- Geniune bug in GC during setup flow
- Ensure setup e2e tests check for successful setup
- Ensure that updates to settings don't incorrectly stop GC on interval

Also improved docker:local:stop when running locallyTEMP - Add screenshots
2022-10-11 12:08:29 +01:00
Richard Cox 12f6b38dee Changes following review
- update preferences layout
- disable interval by setting, rather than 0
- move out preference update logic to gc land
- ensure new interval time period picked up by always stopping interval
2022-10-10 17:08:43 +01:00
Richard Cox bdb9f7b9f7 Multiple changes
- Update text
- Add enabled settings for both types of gc initiator (interval and route change)
- Add sensible defaults
- Remove TODOs
2022-10-10 17:08:43 +01:00
Richard Cox 64dd1e9512 Refactor
- Don't cache gc state in store (avoids any chance of prompting change detection when update type accessed time)
- use TS instead of JS where possible
- split out two prompts into own file (on interval and on route change)
2022-10-10 17:08:43 +01:00
Richard Cox 694310352b Garbage Collect Stale Resources
Remove resources from the store if they meet certain criteria. This will reduce the memory footprint of the dashboard and load on the backend (less watchers for large collections)

- GC is disabled by default and can be enabled via the Global Settings --> Performance tab
  - User can configure
    - The age in milliseconds in which a resource has to exceed in order to be gc'd
    - The count which a resource has to exceed in order to be gc'd
- GC occures in stores that have it enabled
  - ATM this is just the `cluster` store... but could be enabled for dashboard-store's such as the harvester one (one liner plus optional `gcIgnoreTypes` override for ignoring types)
- GC will be kicked off in two cases
  - Route Change for a logged in state
  - At a given interval

- Resource type _not_ GC'd if
  - The store is ignoring the type
    - For example the `cluster` store doesn't want to gc things like `schema` and `count`
  - We're going to a page for that resource (list, detail, etc)
    - For example don't GC pods if we're going to a pods page
  - The last time the resource was accessed was recently
    - We store the resource accessed time via hooking into actions and getters
    - Setting the last accessed time will cause watchers of that type to trigger (only an issue for duplicate watchers)... but importantly not watchers of other types
  - The resource is being used in the current page/context
    - We store the route changed time and compare it to the resource accessed time
  - There's too few resources
    - We might as well keep them to avoid a network request to re-populate

// TODO:
- Should additional features be added to preferences
  - if GC on route change is enabled
  - if GC on interval is enabled, and how often it runs
- Sensible default preferences
- Remove some logging
2022-10-10 17:08:43 +01:00