Generation / Executions UI with many data sources #2776 #2789
Generation / Executions UI with many data sources #2776 #2789chrisknoll merged 3 commits intomasterfrom
Conversation
chrisknoll
left a comment
There was a problem hiding this comment.
I noticed the use of subscriptions, but I'd like to remove subscriptions in favor of pureComputed (subscriptions will need to be disposed of, and the 'flow' is more logical to use computed instead of responding to subscriptions. here is how:
Define a prueComputed to yield the filteredExecutionGroups, something like:
this.filteredExecutionGroups = ko.pureComputed(() => {
return (this.showOnlySourcesWithResults() ?
this.executionGroups().filter(eg => eg.submissions().length > 0)
: this.executionGroups());
});
In this way, the pureComputed re-calculates automatically if the checkbox changes (the showOnlySourcesWithResults) or if the executionGroups() changes. Note, may need to add logic that calls this.executionGroups.valueHasMutated() if there is a background process that refreshes the execution groups when jobs are running.
Since your datatables are being bound to filteredExecutionGroups, that code won't need to be changed if filteredExecutionGruops becomes a computed observable.
… computed function
|
@chrisknoll |
chrisknoll
left a comment
There was a problem hiding this comment.
Great PR: the changes were made exactly where this feature request would expect them to be, it's following good coding conventions, and is a great feature with minimal configuration or administrative burden. Good job.
Resolves #2776
-- user can filter sources by name
-- datatables display items (sources) count and add pagination when necessary
-- for Characterizations, Pathways, PLP and PLE (with results versioning)
-- for Cohorts and Incidence Rates (without versioning, displaying results in the table)