* Refactor all functions operating on requestQueue to be instance methods of the SearchRequestQueue class.
* Rename requestQueue to searchRequestQueue.
Adding new documentation about the APM UI and definitions of terminology and more.
* Images added to docs
* Adding Using APM UI page contents
* Including new APM UI page
* Updated Watcher copy
* Copy feedback from @gchaps
* Refactor SearchLooper by removing unused interface methods and internal logic.
* Rename SearchLooper to SearchPoll.
* Remove use of Angular $timeout.
* Make courier responsible for stopping the search poller when there's a fatal error.
* Integrate _search promises with the digest cycle.
* Allow setting offset relative to kibana time
* remove changes to kibana.yml
* use timerange instead of kibana_time, do not allow default value, better help text
* throw error when zero is provided, round number to avoid decimals - which are not allowed
* do not allow offsets larger than zero
This upgrades x-pack dependencies to the following versions:
* `redux@4.0.0` (to support TypeScript in the upcoming infra-ui migration, `redux-observable@1.0.0` in particular)
* `redux-thunk@2.3.0` (to support `redux@4.0.0`)
* `react-redux@^5.0.7` (to support `redux@4.0.0`)
**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.
When running the optimizer in dev mode, with new or updated entry files, the optimizer will run once and then a second time immediately after. This is because the webpack watcher uses really loose timestamp checks and since the entry files are created immediately before initializing the optimizer they are considered to be "changed" even when they aren't. To avoid this I've integrated the `webpack.WatchIgnorePlugin` to ignore the entry files from the watcher.
This could also be fixed by modifying the timestamps of the files after writing them to disk, but I didn't want extra FS access and it's not actually possible to change the entry files without completely restarting the optimizer.
* ES 6 visualize tests
* metric_chart es6
* correct test names, no screenshots
* switch spy panel to inspector
* ES 6 visualize tests
* metric_chart es6
* correct test names, no screenshots
* switch spy panel to inspector
* es6 some more tests
* un-skip tag_cloud tests
* fix data table indentation
* Replace test:api with @kbn/test runTests
* Improve CLI help menu 🆘
* Use --es-from
* Replace jenkins:selenium with kbn-test
* Validate cli args, fixing test in the process
* Clean up some stuff
* Code review fixes
* Explanation for collectCliArgs
* Remove exit codes, they're useless anyway.
* Make markdown vis test pass with dev_mode setting
* Tests
* Remove unneeded export
* Code review: move console logging up to cli.js
* Code review: refactor startServers and runTests to take single options collection
* Code review: Remove all things I am sure we do not use
* Improve tests
* Code review fixes
* Pass created log to runFtr, runElasticsearch, runKibanaServer
* Update --es-from option to --esFrom
* use uiSettingsClient instead of angular config service
* replace timefilter service with singleton
* remove all other uses of timefilter service, get timefilter singleton working
* remove Private from brush event
* globalState
* fix timefilter jest test
* clean up rebase artifacts
* lint errors
* another lint error
* fix broken functional test _shared_links
* fix broken mocha test doc.js
* fix service load order breaking status page
* remove Provider from change_time_filter
* another round of mocha test updates
* convert create_brush_handler test to jest
* fix kbnGlobalTimepicker toogle mocha test
* remove _root_search_source - removed in another PR and somehow I added it back during rebase
* better comments around Object.assign and proper js-docs format
* use so listerners get cleaned up when scope is destroyed
* listen to correct timefilter update event
* update APM to use timefilter singleton
* update angular scope when timefilter changes
* fix APM jest test
* add listenAndDigestAsync to listen.js
* fix apm breadcrumbs jest test
* move diffTime and diffInterval into timefilter
* pass mode to updateFilter to resolve functional test failure
* call registerTimefilterWithGlobalState from APM application
* remove rootScope from kbn_global_timepicker
* use to subscribe to timefilter in cases where results need to happen in digest async
* spalger review changes
* ensure monitoring timefilter callbacks are executed inside evalAsync
* remove unneeded evalAsync calls around setTime