Commit graph

18226 commits

Author SHA1 Message Date
Spencer 674d65bb58
Upgrade to TypeScript 3 (#22792) (#22927)
LGTM 🎉 🎉 🎉
2018-09-11 14:14:17 -07:00
Stacey Gammon 7f0eafe510
updated panel_state to ts gridData i vs id (#22515) (#22941)
* updated panel state to ts gridData i vs id property

* changed gridData.id to gridData.i
2018-09-11 16:53:37 -04:00
Stacey Gammon 79f9817bb7
Default to chromium and add deprecation warning for phantom. (#21505) (#22940)
* Default to chromium and add deprecation warning for phantom.

* use int, not float
2018-09-11 16:53:28 -04:00
Lee Drengenberg 4b26d3fe3b
Fix rbac test (#22912) (#22933)
* conditionalize Monitoring tests for Cloud testing

* make security_page/login wait

* revert these files from another PR

* revert these files from another PR
2018-09-11 15:15:04 -05:00
Spencer cfd2a8fee8
[6.x] [core/public/deepFreeze] fix recursive type for better array support (#22904) (#22932)
Backports the following commits to 6.x:
 - [core/public/deepFreeze] fix recursive type for better array support  (#22904)
2018-09-11 10:27:32 -07:00
Matt Bargar 526c48f2cd
Expose max_concurrent_shard_requests for _msearch requests (#22379) (#22930)
Allows Kibana users to configure the max_concurrent_shard_requests param used by Kibana when sending _msearch requests. Exposes the config as an advanced setting. By default we won't send the param at all, relying on the ES default instead.
2018-09-11 13:03:41 -04:00
Spencer 9b03dd6a93
[ui/url] TypeScript-ify (#22849) (#22896)
Looking to use `absoluteToParsedUrl()` in TypeScript and it would be nice if it was TypeScript as well.
2018-09-11 07:23:43 -07:00
Walter Rafelsberger 704667feb8
[ML] Fixes Anomaly Explorer Swimlane race condition, adds tests. (#22814) (#22923)
This PR addresses parts of #22642:
- It gets rid of the use of var that = this;.
- dragSelect's action strings are moved to a constants file.
- Adds jest tests for the ExplorerSwimlane component.

This also fixes the following bugs:
- The way we subscribe listeners to the events of the dragSelect library could result in the same event being triggered multiple times. This in turn could cause race conditions when on each event new data gets fetched but in between angular's scope gets updated and could end up in a non-intended way. The result of this were view-by swimlanes not updating correctly or anomaly charts showing non-related charts. This PR fixes it by filtering out consecutive swimlane click events.
- When the angular based chart container wrapper directive gets destroyed/re-esetup when using the job pick, it missed unmounting the react component, it didn't trigger componentWillUnmount()and didn't unsubscribe from dragSelectListener.
2018-09-11 14:14:30 +02:00
Peter Pisljar d86c0b1d79
decouple agg configs from vis (#21827) (#22914) 2018-09-11 12:49:33 +02:00
Maryia Lapata 1674a3d3b5
Translate Input Control component (#22400) (#22895)
* Translate Input Control component

* Remove export from variables that get wrapped by a helper

* Refactoring

* Update message ids

* Fix unit tests
2018-09-11 08:40:45 +03:00
Nathan Reese 604dd490fb
Controls vis - safely handle case where value can not be extracted from Kibana filter (#22885) (#22899)
* handle case where value can not be extracted from Kibana filter

* review feedback
2018-09-10 17:47:17 -06:00
Chris Roberson 58d7b05a64
Ensure tab works on the banner (#22664) (#22889) 2018-09-10 15:51:43 -05:00
Jonathan Budzenski 540ab9455a
[6.x] [ci] use es snapshots on non pull requests (#22834) (#22894)
* [ci] use es snapshots on non pull requests

* remove extra export

* always clone

* master -> 6.x
2018-09-10 15:16:29 -05:00
Larry Gregory 8da5719582
[6.x] attempt to fix flaky tests (#22852) (#22888)
Backports the following commits to 6.x:
 - attempt to fix flaky tests  (#22852)
2018-09-10 14:33:52 -04:00
CJ Cenizal 850cfcf2de
Replace theme CSS instead of appending it to DOM. (#21709) (#22887) 2018-09-10 10:14:33 -07:00
CJ Cenizal 1193ed0ece
List "Cleaner" plugin for setting index TTL (#22616) (#22884) 2018-09-10 09:08:07 -07:00
Larry Gregory aa1c265c1c
[6.x] Manage telemetry opt-in via a dedicated document (#22268) (#22877)
Backports the following commits to 6.x:
 - Manage telemetry opt-in via a dedicated document  (#22268)
2018-09-10 09:31:09 -04:00
Marco Vettorello e4c7e21324
Fix _source formatting (#22800) (#22864)
* Fix _source formatting

* Update unit test

* Add functional test

* Fix CI error, move functional test to the end
2018-09-10 12:07:05 +02:00
Søren Louv-Jansen 2202d0e900
Refactors properties table, implements typescript (#22402) (#22857)
* Refactors properties table, implements typescript

* Adds type info for imported variables file

* Small fixes based on code review

* Adds tests for new nested key/value table components

* Removes variable reassignment

* Fixes up styled component snapshots, uses mount instead of shallow

* Small review fixes, adds typings to PropertiesTable index file

* Small review fixes, changes method name

* Fixes test after moving back to JSON file
2018-09-09 02:25:08 +02:00
Søren Louv-Jansen 086dc43c5f
[APM] Fix ML links (#22820) (#22856) 2018-09-09 02:24:55 +02:00
Søren Louv-Jansen ed9ee0ddcd
Remove deprecated React lifecycle methods from APM code (#22147) (#22858)
* Removes deprecated React lifecyle hooks from APM files

* Clarifies APM readme

* Adds tests for APM ServiceOverview
2018-09-08 19:02:02 +02:00
Court Ewing 19272328ad
api/export: calculate content length (#22154) (#22847) (#22850) 2018-09-08 12:36:53 -04:00
Søren Louv-Jansen 9d4beec33f
[APM] Minor cleanup (#22827) (#22855)
# Conflicts:
#	x-pack/plugins/apm/public/components/app/TransactionOverview/view.js
2018-09-08 18:34:58 +02:00
Søren Louv-Jansen 800dbfead0
[APM] Revert to using apm-* as default indices (#22445) (#22853)
* [APM] Revert to using apm-* as default indices

* Update docs

# Conflicts:
#	docs/settings/apm-settings.asciidoc
2018-09-08 16:54:03 +02:00
Søren Louv-Jansen a726dd1014
[APM] Fix broken links (#22592) (#22804) 2018-09-08 14:49:30 +02:00
Stacey Gammon 753cfad195
Typings for chromium driver (#22688) (#22839)
* Typings for chromium driver

* buffer => base64

* remove unused param. consolidate imports
2018-09-08 08:05:54 -04:00
Spencer 0161da81b2
[6.x] Migrate base path APIs and UiSettings client to new platform (#22694) (#22848)
Backports the following commits to 6.x:
 - Migrate base path APIs and UiSettings client to new platform  (#22694)
2018-09-08 03:42:10 -07:00
Spencer 9a7fa9a938
Upgrade to Jest 23.5.0 (#22791) (#22846)
I'd really like to upgrade to Typescript 3 for its `unknown` type, but we need to upgrade to `jest@23` to support a recent version of `ts-jest@23`.

The [jest changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) breaks down the breaking changes in 23.x, but I found it to be slightly incomplete so I've broken down the changes that actually caused breaks for us here, and addressed each in individual commits to make review a little easier:

- the `testURL` config default was changed from `about:blank` to `http://localhost`
    - this cause some XHR requests powered by JSdom to start failing. It seems these requests just do nothing in master but start to fail when JSdom is initialized with an actual URL... I think we would ideally stop sending meaningless XHR requests in the tests, but it was a lot easier to just set the config to `about:blank` for now, and we can worry about cleanup later if necessary
- `expect(...).toThrow()` only passes if an actual error was thrown.
     - In two places in the index pattern code we were throwing strings, which broke the assertions. Fortunately/Unfortunately the errors are not being consumed by anything, so I was able to wrap them in `new Error()` without causing any issues.
- snapshots of mock functions now include a `results` array, detailing the return values of the function
- React fragments are now serialized as `<React.Fragment>` instead of `<UNDEFINED>`
- undefined props in React components are now stripped from snapshots
- minor changes to the ordering of mocks, imports resolution, and before hooks caused the uiSettings API tests to start breaking, but I'm replacing them with totally new tests in #22694 so I just deleted them here
- mocks created with `jest.spyOn()` that are restored now have their `mock.calls` reset, so some of the kbn-pm tests stated failing. This was fixed by restoring them with `jest.restoreAllMocks()` rather than trying to do it before the assertions
2018-09-07 20:30:49 -07:00
Matt Bargar a9f06c0595
Force date format in context query (#22684) (#22826)
Fixes issue reported in https://discuss.elastic.co/t/view-surrounding-documents-causes-failed-to-parse-date-field-exception/147234

The default date field format is `strict_date_optional_time||epoch_millis`
so we didn't run into this during testing. If the user has custom
mappings for their timestamp field and `epoch_millis` isn't one of the
optional formats the context query will fail since it always sends the
date in millis. This change forces the query to accept the date in millis.
2018-09-07 17:34:12 -04:00
Matt Bargar 108b524ae8
Add explicit format parameter to docvalue_fields requests (#22771) (#22837)
Fixes https://github.com/elastic/kibana/issues/22484

Elasticsearch 6.4 added an optional `format` parameter for doc_value
fields. In 6.x if the param is not included it defaults to returning
the same values we see in scripted fields. In 7.0 this is changing to
use the mapping configured format by default. In kibana we want our date
values in ISO format, so this PR future proofs us for 7.0. It also eliminates
deprecation warnings ES is returning due to the missing param, which is
currently spamming some users.
2018-09-07 17:28:58 -04:00
Court Ewing 57b6aaf4c4 docs: dashboard import/export API (#22835)
* docs: dashboard import/export API

* docs: clarify response handling of errors in import api
2018-09-07 15:53:26 -04:00
Stacey Gammon 2fed0dc349
Investigate flaky override colors dashboard test (#22726) (#22825)
* Run 30x

* attempt a fix

* go back to a single run
2018-09-07 14:52:17 -04:00
Stacey Gammon 64db863761
Generalize dashboard panel actions to not be dashboard specific (#22775) (#22829) 2018-09-07 14:52:09 -04:00
James Gowdy e3865d5e93
[ML] Disabling single metric viewer links for non-applicable jobs (#22809) (#22822)
* [ML] Disabling single metric viewer links for non-applicable jobs

* renaming variable

* renaming variable again
2018-09-07 18:09:15 +01:00
Larry Gregory 5a28f299e5
[6.x] Only log deprecation warning if xpack:defaultAdminEmail is actually set (#22774) (#22813)
Backports the following commits to 6.x:
 - Only log deprecation warning if xpack:defaultAdminEmail is actually set  (#22774)
2018-09-07 11:49:07 -04:00
Leanid Shutau b825494808
[I18n] Update i18n config (#22799) (#22811) 2018-09-07 18:08:27 +03:00
Leanid Shutau da87111aac
[Tools] Fix line breaks in default JSON serializer (#22653) (#22801)
* [Tools] Fix line breaks in default JSON serializer

* Add test for not escaped line breaks
2018-09-07 16:24:57 +03:00
Aleh Zasypkin d37abe1616
[6.x] Get rid of __tests__ folders in the core. (#22794) 2018-09-07 14:45:41 +03:00
Walter Rafelsberger e571490e7c
[ML] Anomaly Explorer Charts jest tests. (#22759) (#22796)
After the migration to React in #22622, this PR adds more test coverage based on jest to the Anomaly Explorer charts. This is done as preparation for some further refactoring (#22626) and the integration of the support for charts for the rare detector (#21163). The tests use mock data based on a standard multi-metric job using the farequote dataset.
Besided the tests this PR includes the following changes:
- In explore_series.js the path is no longer a concatenanted string but now using a template literal
- The exploreSeries() function is no longer calling window.open by itself, it just returns the link
because of the above, renamed exploreSeries() to getExploreSeriesLink() and moved it to chart_utils.js
- explorer_charts_container_service.js is no longer requiring jQuery itself, it now receiving the required element as a factory argument. Further work on this is planned to get rid of jQuery.
2018-09-07 13:23:43 +02:00
Leanid Shutau 8612a53583
Add logging to messages validation (#22296) (#22798)
* Add logging and parallelization to messages validation

* Refactor dev/i18n

* Resolve comments

* Remove parallelism and fix tests

* Resolve comments
2018-09-07 14:08:41 +03:00
Aleh Zasypkin b0767168af
[6.x] Implement LegacyService. Use core to start legacy Kibana. (#22769)
* Implement `LegacyService`. Use `core` to start legacy Kibana.

* Fix Worker tests

* Do not rely on kbnServer when testing mixins.
2018-09-07 07:56:43 +03:00
Tyler Smalley 31ad5530b3
[ci] Run ES snapshot when possible (#22663) (#22788)
For instances where we would otherwise be running from source in a tracked elastic/elasticsearch branch, let's use a snapshot instead. This will eliminate some gradle issues we are experiencing in master.
2018-09-06 19:12:51 -07:00
Lee Drengenberg b2441c02fb
x-pack tests should use servers from other config files already loaded (#22739) (#22762)
* x-pack tests should use servers from other config files already loaded

* Fix es_test_config that was using TEST_KIBANA_USERNAME/PASSWORD
2018-09-06 11:32:12 -05:00
Larry Gregory 263c9169bc
[6.x] Deprecate xpack:defaultAdminEmail for monitoring alerts (#22195) (#22765)
Backports the following commits to 6.x:
 - Deprecate xpack:defaultAdminEmail for monitoring alerts  (#22195)
2018-09-06 12:21:09 -04:00
Maryia Lapata 295b9bf2d5
translate tutorials(apm) (#22217) (#22761)
* translate tutorials(apm)

* remove tabs from the line beginning

* remove id duplicate

* Remove disabling no-multi-str rule

* Move command to the values
2018-09-06 18:03:41 +03:00
Thomas Watson 69dce7b347 [APM] Update Node.js onboarding instructions (#22562) (#22738) 2018-09-06 15:22:17 +02:00
Maryia Lapata bd7c21efcc
Translations for tutorial common (#22071) (#22752)
* filebeat_instructions translations

* tutorials common

* fix translations

* use unicode code

* folder path to variable

* Fix message id

* Remove disabling no-multi-str rule, remove spaces
2018-09-06 11:58:04 +03:00
Pete Harverson 80520e0b3a
[ML] Makefield type icon component keyboard accessible (#22708) (#22736) 2018-09-06 09:11:41 +01:00
Caroline Horn af0817c39b
Fix IE scrollbar issue on TSVB gauges in dashboard (#22740) (#22748) 2018-09-05 22:11:04 -04:00
Nathan Reese 2f0cf25ac9
Pass scoped context to tutorial providers when building tutorials (#22260) (#22743)
* Pass scoped context to tutorial providers when building tutorials

* only generated scoped context one time

* spelling
2018-09-05 17:49:56 -06:00