Commit graph

482 commits

Author SHA1 Message Date
Caroline Horn
acd01a4881
Resolve conflicts (#23197) 2018-09-14 15:28:25 -04:00
Jiří Programagor
9183fe8ba5 [Monitoring] Properly Deduplicate Replica shards (#23183)
Issue #23179 was caused by ignoring multiple replicas of the same shard, even if they are on different nodes. This commit fixes that.
2018-09-14 12:41:01 -04:00
Spencer
489779a906
[6.x] [ts] enable support for iterators in browsers (#22986) (#23014)
Backports the following commits to 6.x:
 - [ts] enable support for iterators in browsers  (#22986)
2018-09-13 16:52:20 -07:00
Pete Harverson
067e162aa8
[ML] Add links to rule editor for quick edit of value or filter (#22990) (#22997)
* [ML] Add links to rule editor for quick edit of value or filter

* [ML] Updates to rule editor quick links following review
2018-09-13 20:25:32 +01:00
Walter Rafelsberger
ecfbfa7281
[ML] Fix reloading anomaly charts on resize. (#22967) (#22995)
- Fixes a regression introduced in #22814. Because of the stricter checking for scope/props updates, resizing the browser window would miss updating the Anomaly Explorer Charts widths. This fixes it by adding a check to trigger anomalyDataChange in redrawOnResize().
- Additionally, if only one chart is up for display, this update makes sure a single chart always spans across the full available width.
2018-09-13 17:31:10 +02:00
Walter Rafelsberger
49bfcc6d63
[ML] Fixes loading the influencers for Anomaly Explorer. (#22963) (#22989)
- This fixes a regression introduced in #22814. The influencer list wouldn't update if no cell in the swimlanes was selected.
- Renames getTopInfluencers to loadTopInfluencers to be in line with the other functions loadDataForCharts and loadAnomaliesTableData
- Changes the order of arguments for loadDataForCharts so they are the same like in loadTopInfluencers.
2018-09-13 14:18:57 +02:00
Spencer
a82af2817e
[6.x] Remove testURL hotfix from jest upgrade (#22953) (#22977)
Backports the following commits to 6.x:
 - Remove testURL hotfix from jest upgrade  (#22953)
2018-09-12 17:38:08 -07:00
Walter Rafelsberger
7a788a219d
[ML] Explorer Chart Tweaks (#22955) (#22957)
- The aim of this is to more clearly visualize how the timerange of the cell selected in the swimlane relates to the time span shown in the charts.
- The most important change is that the vertical date axis ticks no longer are randomly positioned by d3. Instead they are aligned with the cell interval of the swimlane. This way, the date information shown in the swimlane tooltip will always align with the date tick shown left of the emphasized area in the chart.
- The highlighted area now features a gray rounded border to resemble the styling of the selected cell in the swimlane.
- The chart also fixes where to long chart headers would wrap the "View" link to a new line.
- The x/y axis labels blackness has been reduced to reduce emphasis on the labels.
2018-09-12 15:06:59 +02:00
Nathan Reese
eadf7e847b
backport (#22949) 2018-09-11 17:07:48 -06:00
Spencer
674d65bb58
Upgrade to TypeScript 3 (#22792) (#22927)
LGTM 🎉 🎉 🎉
2018-09-11 14:14:17 -07: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
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
Chris Roberson
58d7b05a64
Ensure tab works on the banner (#22664) (#22889) 2018-09-10 15:51:43 -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
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
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
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
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
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
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
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
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
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
Pete Harverson
80520e0b3a
[ML] Makefield type icon component keyboard accessible (#22708) (#22736) 2018-09-06 09:11:41 +01:00
Nathan Reese
df9f5ee204
Add instructions for running reporting functional tests to x-pack README (#22683) (#22733)
* add instructions

* rest of instructions

* pdf-image requirements

* typo

* add Ubutnu commands
2018-09-05 15:33:40 -06:00
James Gowdy
2a95660bd1
[ML] Fixing issue with incorrect timezones in jobs list (#22714) (#22721)
* [ML] Fixing issue with incorrect timezones in jobs list

* refactoring min and max calculation

* changes based on review

* changing TimeStamp to Timestamp
2018-09-05 19:57:42 +01:00
Chris Davies
f04a760d6c
Fix #22581 by introducing an artificial delay (#22601) (#22716)
Introduce a delay into reports to allow visualizations time to appear in the DOM. This is intended as a temporary (and hacky) workaround until we come up with a more robust way to determine that all of the visualizations on the page are ready for capture.
2018-09-05 13:24:24 -04:00
Chris Davies
61bb8775b8
Fix #22510, dashboard-only mode doesn't display saved searches (#22685) (#22699) 2018-09-05 10:36:50 -04:00
Tim Roes
46709c62b0
Move timezone settings into autoload file (#22623) (#22706)
* Move timezone settings into autoload file

* Remove applying setting from timelion

* Remove manual set from ML

* Remove manual set from monitoring

* Remove now obsolete code from embedding test plugin
2018-09-05 12:03:59 +02:00
James Gowdy
3095ddad81
[ML] Removing calendars from job when cloning (#22667) (#22677) 2018-09-05 09:18:57 +01:00
James Gowdy
ffd7095bb1
[ML] Adding milliseconds to watch start and end times (#22659) (#22673) 2018-09-04 21:26:40 +01:00
James Gowdy
4e991bbc78
[ML] Fixing links to results for obs with no results (#22650) (#22671) 2018-09-04 21:26:20 +01:00
Stacey Gammon
fef0ba95b9
TypeScript Reporting Layouts (#22454) (#22669)
* wip

WIP

* Changed any ypes to actual types

Made sure all types are set on the new layout classes.

* Changes recommended from code review

Changed location of type interfaces and fixed naming errors

* Latest Code Review Changes

Fix naming on properties and methods as well as a few other fixes

* Name Changes and spacing

Name Changes and spacing

* Name Change

Name Change

* Changes for typescript import and direct reference to layout_factory

Changes for typescript import and direct reference to layout_factory

* Move types locally

* Evaluate function changes for puppeteer

* Removed String as a type and renamed index.d.ts to types.d.ts for consistency

Removed String as a type and renamed index.d.ts to types.d.ts for consistency

* Changed layout_factoy to create_layout
2018-09-04 14:42:08 -04:00
Larry Gregory
23d8efbc3f
[6.x] Fix missing email address on account screen (#22652) (#22661)
Backports the following commits to 6.x:
 - Fix missing email address on account screen  (#22652)
2018-09-04 12:19:31 -04:00
Walter Rafelsberger
52fdc1118b
[ML] Migrates Anomaly Explorer Swimlanes to React (#22641) (#22651)
- This PR migrates the Anomaly Explorer Swimlanes from angularjs to React.
- The approach is similar to the one from #22622: Try to refactor as little of the actual logic as possible, just make sure everything works inside the React component lifecycle. So as a guide for the review: No actual code within all the functions/methods changed, only the bits and pieces which needed to be tied into the React component lifecycle.
- The remaining wrapping angular directive is now only listening for data changes and passes its scope and other necessary data on as props to the React component.
2018-09-04 17:16:36 +02:00
Walter Rafelsberger
4cda7caf95
[ML] Migrate Explorer Charts to React. (#22622) (#22632)
This migrates the Anomaly Explorer charts to React. The PR aims to change as little of the actual logic to create and render the charts.
2018-09-04 10:58:49 +02:00
James Gowdy
6b4383a509
[ML] Adding string type check to jobs list search (#22627) (#22629) 2018-09-04 08:55:18 +01:00
Marco Vettorello
6b504ed8af
Fix possible flakiness of saveVisualization action (#22356) (#22546)
* Updated saveVisualization to wait for toast instead of global indicator

* Fix RBAC tests.

The saveVisualization now fails directly if the visualization is not correctly saved.

* Change editor to use toast for errors

* Change saveVisualization method to new saveVisualizationExpectSuccess

For RBAC tests used also saveVisualizationExpectFail

* Fix wrong exists method call

* Fix missing exist function
2018-09-03 14:14:31 +02:00
Chris Davies
520bdf0f46
Fix #22579 (#22580) (#22600) 2018-08-31 14:12:39 -04:00
Chris Davies
18ca9014e4
Merge puppeteer into 6.x (#22533) 2018-08-30 11:48:10 -04:00
Søren Louv-Jansen
7f2172cfe9
[Fix] Fix bug with missing license data (#22485) (#22519) 2018-08-30 07:40:15 +02:00
Tim Sullivan
19f72c4b9a
[Monitoring] Fix logging when Monitoring reinitializes with HUP signal (#22464) (#22512) 2018-08-29 16:10:27 -07:00
Chris Roberson
b980f6e13a
[Telemetry] Add beats architecture stats to telemetry (#21227) (#22412)
* Add beats architecture stats to telemetry

* Update tests

* PR feedback

* Use values instead of keys
2018-08-29 14:06:07 -04:00