Upon deselecting every filter, the search returns nothing. This serves
no useful purpose as discussed in #1117. Now deselecting every filter
automatically selects 'All'.
Remove duplicate ClickAwayController implementation that was obscuring actual
implementation. Debounce clickaway action in case toggle is invoked in a
click handler.
Resolves https://github.com/nasa/openmct/issues/888
Pass model directly when indexing is triggered via object mutation,
to avoid issuing an extra, unnecessary request to the server.
Additionally supports indexing of objects which have been created
but not yet persisted.
Addresses #377.
Update field name in GenericSearchProvider to reflect changes
from nasa/openmctweb#193. Avoids exceptions on mutation.
Additionally, add test case exercising relevant code and verifying
that reindexing is scheduled upon mutation as expected.
The SearchAggregator exposes it's constants to add stability to
tests.
It also has a fudge factor which increaases the number of results
it requests from providers to better support pagination when using
client side filtering.
Rewrite the generic search provider to use prototypes. Increase performance
by utilizing the model service instead of the object service, and use a
simplified method of request queueing.
Search providers return search results as models for domain objects, as the
actual number of max results is enforced by the aggregator, and because the
individual providers store and return the models for their objects already.
This lowers the amount of resources consumed instantiating domain objects, and
also allows the individual search providers to implement function-based
filtering on domain object models, which is beneficial as it allows the search
filtering in the search controller to be done before paginating of results.
The generic search worker now does indexing work during the index operation,
ensuring that queries do not have to do extraneous or repeat calculations.
Change the return format slightly and fixed a bug in the GenericSearchProvider
which caused more objects than intended to be returned from the provider.
Rewrite the search controller, making numerous changes and using prototypical
style.
First, the search controller immediately hides previous results when a new
search is started. Secondly, the search controller ensures that search results
displayed match the currently entered query, preventing race conditions. Finally,
the search controller uses a poor filtering option that means it may not display
all results.
Per discussion from nasa/openmctweb#141, minimize the
interval at which new objects get indexed, instead of
presuming requirements for CPU utilization.
When indexing for generic search, issue new batches of
requests as individual requests finish (instead of waiting
for whole batches to finish) varying size to keep the
number of outstanding requests below some maximum.
nasa/openmctweb#141
This reverts commit 4b8a5ac0b257737ee33effc966816afca6c11b94.
Performance measurements indicates this is harmful for performance,
although this is not well-explained.
Move function used to listen for mutation changes (to trigger
reindexing) up in scope, to avoid retaining references to
domain objects via closure. nasa/openmctweb#141
Also, includes misc. whitespace normalization (provided by
code editor.)
Updated the generic provider test. Removed index
checking from the generic search worker, because
that checking is already done (more efficiently)
in the generic search provider.