Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Query Filter \ Filter Manager: de-angularize and move to data plugin (#…
…37311) * Embeddable and Visualize to use type definitions from kbn-es-query package * moved state watching to new filter manager and removed query filter dependency on rootScope * Deleted unused pinFilter * Extracted merge fitlers function * Changed mappedFilters name * Move state management to new filter management as well. query filter is now just a wrapper. * Code works correctly with new setup of query filter * improved typing * Moved mapping into new filter manager * removed promise dependency from query filter * Extracted filter state manager from query filter * Moved addFiltersAndChangeTimeFilter logic into new filter manager * Fixed addFiltersAndChangeTimeFilter implementation * Moved all logic to new filter manager - query filter is just a wrapper now! * Connected query_filter observable management to new filter manager as well * Usage example in discover * filter state management tests + fire less events from filter state manager * Tests for filter manager and filter state manager * Moved new filter manager to data plugin * Got rid of FilterManagerProvider and turned it into a getFilterGenerator function that works with the new FilterManager. Need to merge this code with FilterManager. * Added tests that make sure that filter manager listens to filter state manager * fix typo * Fixed action add filter test * Fixed increasePredecessorCount test * Fixed increaseSuccessorCount test * Fixed setPredecessorCount test * Fixed setQueryParameters test * Fixed setSuccessorCount test * Fixed doc table filter actions test * Fixed filter generator tests * rename argument * Moved push filters into vis filters (only place where its used) * Filter type fix, test fix * Removed irrelevant filter tests (for deleted methods) Added state to filters * Fixed most of get filters errors by sleeping (TODO!) * Added destroy methods Improved merge logic Improved remove filter tests to use add filter (to avoid having for filter state manager to catch up) * Fixed discover functional tests Added default empty filter state in filter generator Some more browser test adjustments * Allow filter $state to be empty * Fixed types * Code review with @splager - subscribeWithScope - query filter to return angular promises - remove unneeded Promise.resolve * Separate class\type defenitions from plugin instance setup in shim plugin definition This helps avoiding circular dependency issues that were obsereved in filter-manager branch (due to code starting to use the data plugin). * typescript fun * Fixed merge * updated some get filter tests to work with add filter, and therefore moved them to add_filters.js * Remove shouldFetch and add comment explaning the observable. * Minor code style fixes * Code review fixes and changes * Moved Karma tests to jest * Fixed merge * Fixed some type errors * Improved watchFilterState logic * Removed addFiltersAndChangeTimeFilter test for now, as I'm having TS difficulties * filters can also be null * Further watch state fine tuning * Get data instance inside provider to avoid circular deps * mock chrome * Removed change to range filter * Deleted unnecessary injects * dedup setFilters as well * deleted unused subscription * Added tests for setFilters de-dupe * Update src/legacy/core_plugins/data/public/filter/filter_manager/filter_state_manager.ts Co-Authored-By: Stacey Gammon <[email protected]> * Update src/legacy/core_plugins/data/public/filter/filter_manager/filter_manager.ts Co-Authored-By: Stacey Gammon <[email protected]> * Code review minor fixes
- Loading branch information