* timelion deprecation doc wip
* Create Timelion Deprecation section to Visualize
* Code review changes
* minor changes
* Make some changes in order to give priotization on how to replace an existing timelion worksheet to a dashboard
* Syntax related improvements
* Final touch
* Remove extra lines and some minor changes
- Introduce `indexPattern.fields.getAll()` and use where possible
- Rename `index_patterns/fields/fields.mocks.ts.ts => index_patterns/fields/fields.mocks.ts`
- FieldSpec - make `count` and `scripted` fields optional
- use `indexPattern.fields.getByName` instead of filter where possible
- Better distinction and relationship between IndexPatternField and its spec
- IndexPatternField class is no longer defined via object mutation
- Reduction of dependencies
- UI code moved into Index Pattern class (will be removed in next ticket)
- IndexPattern field list was previously composed of IndexPatternFields or specs, now only IndexPatternFields
- IndexPattern field list was previously redefined when loading fields, now only its contents are replaced.
Fixes#71461 regression since 7.7
New state syncing utils didn't properly handle errors,
Errors happening during URL parsing or writing wasn't handled, so state syncing could stop or in worth case blow out. (see #71461)
There are not much scenarios where missing proper error handling could really impact users, except the one described in #71461:
Kibana users state:storeInSessionStorage
Users often intuitively share hashed dashboard urls directly
When someone opens those urls - there is a blank screen with warning
In 7.6 - dashboard would still load with default state.
Since 7.7 these still could be achieved by removing query params for URL, but it is not obvious for regular users.
This PR makes sure that behaviour is similar to one we had before 7.7.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Search] Send ID in path, rather than body
* Fix typo in merge
* Update docs
* Revert to using POST instead of GET
* Revert accidental change
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Search] Fix telemetry collection to not send extra requests
* Update tracker to collect duration from ES response
* Fix type check
* Update docs and types
* Fix typescript
Co-authored-by: Liza K <liza.katz@elastic.co>
* mark legacy ES client types as deprecated
* expose es client to plugins and update mocks
* ElasticSearchClientMock --> ElasticsearchClientMock
* expose es client mocks
* expose es client via RequestHandlerContext
* convert test/plugin_functional/config into ts
* convert top_nav test into ts
* add an integration test for the es client
* update comments to refer to the new es client
* fix import paths. do not use extensions
temp
* update docs
* fix other refs
* add test for a custom client
* fix context
* add test for scoped client
* update docs
* improve test stability
* query string input manager (needed for search demo)
* docs
* dashboard
* Fix jest
* mock fix
* Allow restoring a saved query
* sync url
* Luke's fix to test
* cleanup
* lens jest tests
* docs
* use queryStringManager.getDefaultQuery
Don't sync query to global state
* Update app.test.tsx
lens mock
* jest fix
* jest
* use new api in the example
* Rename state param to query to match url state
* Apply changes to discover
* Update src/plugins/data/public/query/query_string/index.ts
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
* Improve query string state manager
* Cleanup dashboard code
* Handle refresh button
* Set initial dashboard state
* visualize state
* remove unused
* docs
* fix example
* fix jest
* fix filter app state in discover
* fix maps test
* jest
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
By default the upload time limit for payloads is 10 seconds. This is really too short and we were getting internal QA bug reports that uploads are timing out on large value list importing. This PR adds the plumbing and unit tests to make the timeout configurable for routes.
* Adds a single timeout option for routes and then normalizes that through Hapi for the socket, payload, and server timeouts.
* Adds unit tests which test the various options
* Adds integration tests which test the various options
* Adds some NOTES about where there are odd behaviors/bugs within Hapi around validations and the timeouts
* Adds a configurable 5 minute timeout to the large value lists route
**Manual testing of the feature**
You can manually test this by adding a configurable option to your chrome network throttle like so below where you throttle upload by some configurable amount. I chose to use 300 kbs/s upload
<img width="556" alt="Screen Shot 2020-07-23 at 11 26 01 AM" src="https://user-images.githubusercontent.com/1151048/88318015-5ab3f700-ccd7-11ea-9d9b-7e3649ec65de.png">
And then run an import of large value lists using a large enough file that it will exceed 5 minutes:
![screen-shot-upload](https://user-images.githubusercontent.com/1151048/88318584-28ef6000-ccd8-11ea-90a1-8ca4aafabcb4.png)
After 5 minutes you should see this message within your server side messages if you have configured your kibana.dev.yml to allow for these messages:
```ts
server respons [10:52:31.377] [access:lists-all] POST /api/lists/items/_import?type=keyword 408 318292ms - 9.0B
```
Note that it should show you that it is trying to return a `408` after `318292ms` the timeout period. Sometimes you will get the 408 in the browser and sometimes the browser actually will not respect the 408 and continue staying in a pending state forever. This seems to be browser side issue and not a client/user land issue. If you get the browser message it will be this error toaster
![timeout-message](https://user-images.githubusercontent.com/1151048/88318760-74a20980-ccd8-11ea-9b7b-0d27f8eb6bce.png)
### Checklist
- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
- [x] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials
- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
### For maintainers
- [x] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
* Copying api integration tests into their own directory
* Removing api integration tests and using ingest docker image
* Fixing typo
* Fixing type errors and empty string and reenabling tests
* Rebuilding docs
* Renaming url override variable
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* move http.anonymousPaths.register('/status'); logic into core, remove status_page plugin
* move status_page to core & migrate lib
* migrate the status_app components to TS/KP APIs
* update rendering snapshots
* use import type syntax
* moves `/status` server-side route to core
* fix route registration
* update generated file
* change statusPage i18n prefix
* (temporary) try to restore legacy plugin to check behavior
* add some FTR tests
* do not import whole lodash
* update snapshots
* review comments
* improve / clean component unit tests
* change url for legacy status app
* set status app as chromeless
* fix FTR test due to chromeless app
* fix typings
* add unit test for CoreApp /status registration
* use KibanaClient interface instead of Client
* add back helpers to ElasticsearchClient interface
* use TransportRequestPromise for transport.request
* update generated doc
* Add a few asciidoc readmes
* add updated code-exploration. Need to fix the script in another go to add asciidoc support. The snippet didn't show up anyway.
* rename float to discrete
* use same section title level on all source files
* Elasticsearch => {es}
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>