**Interface changes** There are two goals behind the interface changes: * Make it clearer which courier modules are meant for public consumption by exporting them from the top level. * Simplify the courier object by removing responsibilities and focusing its responsibility solely on scheduling search requests via the fetch method and timefilter.refreshInterval Angular event. I did this by taking the following steps: * Removing redirectWhenMissing, indexPatterns, SearchSource, and SavedObject from the courier object. I also removed some unused methods from its interface. * redirectWhenMissing is now a service registered on the kibana/url Angular module. * indexPatterns is now a service registered on the kibana/index_patterns Angular module. * SearchSourceProvider and SavedObjectProvider are now top-level exports of ui/courier. * migrateFilter, decorateQuery, buildQueryFromFilters, and luceneStringToDsl are now top-level exports of ui/courier. **Internal changes** I also made some internal changes in an effort to organize the code clearly and reduce unnecessary complexity. * I refactored the async code in CallClient to appear sync with async/await and encapsulated chunks of logic in helper functions. I also used an isAborted flag instead of overwriting the esPromise var with an enum. * I combined Looper and SearchLooper into a single class and deleted unused functions. * I reorganized the courier/fetch/request code into SearchRequest, SegmentedSearchRequest, and serializeFetchParams modules. * Renamed various other methods and variables to improve clarity. |
||
---|---|---|
.. | ||
common | ||
public | ||
server | ||
index.js | ||
jsconfig.json |