-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cluster Explorer: Restrict / Remove usages of findAll: traditional types #13025
Cluster Explorer: Restrict / Remove usages of findAll: traditional types #13025
Conversation
- Functional Changes - SSP now works after vue3 bump - Home Page Clusters list now uses server-side pagination - Side Bar clusters list now uses server-side pagination - Wire in now supported sorting / filtering by id and name used for table columns - Allow pagination to be enabled given a specific context - Call findPage without persisting to store - New Pagination Tools - PaginatedResourceTable - Convenience Component, wraps ResourceTable with pagination specific props - PaginationWrapper - Convenience class to handle requests for resources and updates to them (avoiding store) - Regressions - Side Nav menu ready state was `mgmtCluster.isReady && !pCluster?.hasError`, now ???
…would incorrectly fetch all resources anyway - convert reminaing storage lists
- Functional Changes - SSP now works after vue3 bump - Home Page Clusters list now uses server-side pagination - Side Bar clusters list now uses server-side pagination - Wire in now supported sorting / filtering by id and name used for table columns - Allow pagination to be enabled given a specific context - Call findPage without persisting to store - New Pagination Tools - PaginatedResourceTable - Convenience Component, wraps ResourceTable with pagination specific props - PaginationWrapper - Convenience class to handle requests for resources and updates to them (avoiding store) - Regressions - Side Nav menu ready state was `mgmtCluster.isReady && !pCluster?.hasError`, now ???
- remove from resource list, put in resource-fetch (used also by pag res table)
…ation-cluster-explorer
- remove from resource list, put in resource-fetch (used also by pag res table)
…ation-cluster-explorer
…ation-cluster-explorer
- opens up to event header e2e failures again...
promises.push(this.fetchSecondaryResources({ canPaginate: this.canPaginate })); | ||
const res = this.fetchSecondaryResources({ canPaginate: this.canPaginate }); | ||
|
||
promises.push(Array.isArray(res) ? res : [res]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By any chance do you mean to deconstruct the array before pushing?
promises.push(...(Array.isArray(res) ? res : [res]));
I don't think Promise.all() accepts nested arrays of promises.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. That's a bug. There was another as well, as map of promises was the alternative
I reworked this in the end and now the response to fetchSecondaryResources
will always be a single promise (the map was pointless as it would be just mapped into an array of promises). This might affect your PR
:paginated-resource-settings="paginateResourceSetting" | ||
:all-resources-settings="allResourceSettings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By any chance do we want to keep the interface consistent with PaginatedResourceTable? i.e. api-filter
and local-filter
.
Or maybe update PaginatedResourceTable to use a settings style object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when i stumbled over this again i had the same thought.
i'll update cover
- prop names
- make a common type to fetch / filter the resources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
went full circle.
the prop names here better describe what the control is doing (showing all in a dropdown or showing pages in a dropdown), the function calls are also different in nature.
did tidy it up though and move the types into their own file, added jsdocs, etc c19aabe
if (!!existing) { | ||
Object.assign(existing, required); | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be nice to emit a warning or something in the console if this happens, I can imagine a case where things overwritten leading to an author having to dig to figure out why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This use case covers the user hitting the refresh button and the same pagination settings come through again. It's also restricted to the events table, so the chance of a dev overriding it somewhere is low.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just requesting changes based on my individual comments.
- fix and simplify FetchPageSecondaryResources - ensure resource detail page events list doesn't add ns filters (not needed)
Blocked on
Requires squash-merge
Summary
Fixes #13045
Does not cover others from #9965 or those related to #10417
Occurred changes and/or fixed issues
Resource
typerancher-demo
selector
s locally scales badly #10417selector
s locally scales badly #10417Areas or cases that should be tested
Resources
type (see above)Areas which could experience regressions
Checklist