Commit Graph

4 Commits

Author SHA1 Message Date
Richard Cox b88ceb6e5a Fix project/namespace --> cluster manager blank page bug
- caused by circular dependency of
  - index.vue --> resource-fetch mixin --> resource-fetch-namespaced mixin --> index.vue
- not sure why the works on most pages... but bugs out for this one... but the fix makes sense
2022-12-23 11:34:12 +00:00
Richard Cox 762b3e4163 Updates following review
- Tweak settings text
- Use new filter icon
- Tweak "too many" text
- Allow only selecting a single namespace when in 'too many' mode
2022-12-02 12:37:35 +00:00
Richard Cox 8924b34888 Disable ns filtering for fleet / workspace world
- This might be possible (as fleet workspaces are similar to namespaces
- To address though would need to re-fetch resources when workspace changes
  - Currently when ns changes we always go to an invalid state first
  - Single NS (show list & fetch resources) --> Multiple NS (hide list) --> Single NS (show list & fetch resources)
  - For workspace we skip the middle part and don't fetch with latest
2022-12-02 12:30:13 +00:00
Richard Cox 75aa51fab9 Enforce Namespace Filter
- When there are over a configurable amount of resources to display in a list force the user to select a single namespace and use it to fetch resources related to the list
- Disabled by default, this can be enabled via the usual Global Settings --> Performance setting as usual

Functional Comments
- Gates for forcing the filter (count, resource type is namespaced, etc) apply only to the resources shown in the list.
  - For example PV's aren't namespaced, so no enforced filtering. However they fetch PVC's which are namespaced
  - For example we could have 10 resources to show in the list, but the resource types list component fetches 10000 other resources. The secondary resources are not taken in to account
- If we're under the threshold and have fetched all resources, if in that session we go over the threshold we won't fetch NS specific resources (because we have them all already)
- If we're over the threshold and have fetched namespaced resources, if in that session we go under the threshold we will fetch all resources
- If we're over the threshold and have fetched namespaced resources, going to a page that needs them all will result in us fetching them all (for instance from `events` to `cluster dashboard`)
- Deselecting a namespace and selecting it again should not kick off another http request

General Commit Comments
- The threshold to enforce the filter is set at 1500 as per manual fresh and incremental loading
- Optimised some code in ResourceList, resource-fetch and $loadingResources
2022-12-02 12:30:13 +00:00