Commit graph

4542 commits

Author SHA1 Message Date
Alexey Antonov
3e75f304b2
[Inspector Views] [Data View] - Migrate inspector_views to new platform (#43349)
* [Inspector Views] [Data View] - Migrate inspector_views to new platform

* fix PR comments
2019-08-21 16:40:12 +03:00
Corey Robertson
54e2edce19
[Canvas] Canvas embeddable (#39839)
* Adds embeddable objects to canvas

* Handle embeddable_api -> NewPlatform changes

* Addressing PR feedback

* Properly mock new platform

* Snake case filenames{

* Switch relative paths to src/
2019-08-21 08:08:15 -05:00
Walter Rafelsberger
6ab5be15f0
[ML] Data frame analytics: Outlier detection results page (#43578)
Introduces a page to view results of outlier detection jobs. Users can navigate from the analytics jobs list to the results page by clicking on the View button.
2019-08-21 05:40:12 -07:00
Gidi Meir Morris
21c4430d0e
[Alerting] Refactored External Service Simulators (#43570) 2019-08-21 10:01:28 +01:00
James Gowdy
74e7af9df6
[ML] Updating wizard help text (#43464)
* [ML] Updating wizard help text

* adding population placeholder text

* updating population description

* updating split field description
2019-08-21 09:16:15 +01:00
WangQianliang
806af68d5a
fix(code/frontend): fix search filters (#43426) 2019-08-21 12:31:41 +08:00
Yulong
33e9e0c1a9
[Code] fix workspace dir case-sensitive problem (#43571) 2019-08-21 11:10:22 +08:00
Patrick Mueller
ba470f9fb1
i18n-ize messages from actions (#43239)
Where appropriate, use i18n support for messages coming from the
x-pack actions plugin.
2019-08-20 20:44:58 -04:00
Nathan Reese
aa8c55a2e2
[Maps] Add cancel draw button and draw instructions (#43593)
* cancel draw

* show tooltip with draw instructions

* add jest test for ToolsControl

* throttle mousemove callback
2019-08-20 17:16:26 -06:00
Mengwei Ding
dee690ded3
[Code] Initial commit Indexer (#39599)
* [Code] change

* [Code] initial commit indexer

* initial call of git commit api

* sync to update-to-date

* Add checkpointing to commit indexer

* fix lint errors

* add git api to pull all commits

* calculate progresses

* unit tests for commit indexer

* add some comments

* minor change
2019-08-20 15:03:48 -07:00
Mengwei Ding
ec6d067a32
[Code] fix functional test (#43599) 2019-08-20 14:55:16 -07:00
Mike Côté
bb6aa330e8
Disable security plugin in spaces only test suite (#43608) 2019-08-20 17:00:31 -04:00
Mike Côté
ada30ab7aa
Task manager to queue calls that require it to be initialized (#43589)
* Initial work

* Add unit tests
2019-08-20 16:57:53 -04:00
Nathan Reese
243a03672c
[Maps] increase tooltip max width so create filter button not clipped (#43602) 2019-08-20 14:53:11 -06:00
Tim Sullivan
b30dec1ae5
[Reporting/Typescript] Custom types file for each export_type (#43554)
* Custom types file for each export_type

* move get_job_params_from_request

* Update types imports and name refs

* small code change

* cherry-picked change
2019-08-20 13:38:37 -07:00
dave.snider@gmail.com
b0a4181f7d
Upgrade EUI@13.3.0 (#42858)
Upgrades 13.3.0
2019-08-20 13:37:47 -07:00
James Gowdy
2c62fbb872
[ML] Adding sparse data setting to job wizards (#43569)
* [ML] Adding sparse data setting to job wizards

* updating description

* disabling sparse checkbox and fixing types

* changes based on review
2019-08-20 20:44:33 +01:00
Aaron Caldwell
f3cbaf322b
[Maps] Change border color to be darker version of fill color (#43211)
* Change border color to be darker version of fill color. Pass default colors to color picker swatches

* Fix bug preventing last color from ever being used

* Update line/stroke colors in functional tests

* Fill out default colors with eui vis palette colors. Add black & white to border colors

* Move default colors to color utils and use eui color palette per feedback

* Remove old defaults and update imports

* Update join test to omit color from test since it will change
2019-08-20 13:33:03 -06:00
Catherine Liu
aa55a322d5
Translates Canvas app description for kibana home page (#43479) 2019-08-20 10:05:43 -07:00
James Gowdy
88ff920e48
[ML] Fixing model plot rendering for count detectors (#43588) 2019-08-20 17:39:28 +01:00
Steph Milovic
48241672bd
[SIEM] [Cypress] Url State Tests (#43555) 2019-08-20 10:29:49 -06:00
Mike Côté
5734f1c1be
Add security support for alerts and actions (#41389)
* Initial work

* Cleanup add createAPIKey fn pt1

* Change getServices function to take request as parameter

* Use API key when executing alerts

* Revert task manager using encrypted saved objects

* Store fired actions within a saved object to encrypt API keys

* Fix fireActionId

* Cleanup code, fix type check error

* Add a type for getScopedSavedObjectsClient

* Fix getBasePath and spaceIdToNamespace functions

* Add safety check for API key and action

* Fix integration tests

* Fix broken jest tests

* Cleanup

* Rename generatedApiKey to apiKeyValue

* Ensure access to action record

* Cleanup

* Add unit tests

* Fix variable conflict

* Revert task manager specific code (no longer needed)

* Remove fire terminology

* Move tests to spaces and security folder

* Use ES Archiver to remove spaces (empty_kibana)

* Fix missing pieces

* Convert action tests to run per user

* Convert alerting tests to run per user

* Fix type check issue

* Fix failing test

* Add callCluster and savedObjectsClient authorization tests

* Make savedObjectsClient return 403 for authorization tests

* Cleanup

* Fix test failure

* Common function to get data from test index

* Create ObjectRemover

* Cleanup

* useApiKey now provided to functions instead of relying on condition of two strings

* Fix typo

* Make tests it(...) start with should

* Rename useApiKey to isSecurityEnabled

* Merge apiKeyId and apiKeyValue into one

* Update docs

* Use feature controls for list alert / action types API

* Remove need to add ! in TypeScript for required plugins

* Fix ESLint issue

* Include actions and alertTypeParams into AAD and genereate new API key on update

* Generate random id for API key name attribute

* Include interval in AAD

* Send pre-encoded string

* Fix ExecutorError

* Fix apiKey snapshot

* Fix 'default' typo

* De-compose apiKey

* Refresh API key when enabling / disabling an alert

* Add updatedBy

* Make unauthorized APIs return 404
2019-08-20 11:42:15 -04:00
Nathan Reese
7d09b9dfa6
[Maps] use partial icon instead of iInCircle to denote layers with partial results (#43550) 2019-08-20 09:13:29 -06:00
Melissa Alvarez
cca899f0e7
[ML] Kibana Management Jobs list: Ensure proper title, tagline, and link to documentation (#43418)
* Update KM jobs list title and add tag line and link to docs

* add spaces column to analytics table for use in Kibana management

* add refresh button to kibana management analytics jobs list

* ensure refresh button does not cause bounce when loading

* move refreshInterval hook to page component

* add default value for analyticsTable prop
2019-08-20 11:09:38 -04:00
Dario Gieselaar
53063d532c
[APM] Make aggregations optional in ES response type definition (#43451)
* [APM] Make aggregations optional in ES response type definition

Closes #43436.

Our type definition for ElasticSearch aggregations suggests that the aggregations key will always be defined if we request aggregations. However, that is not the case, as there is an edge case where if no matching indices were found, the aggregations key will be undefined.

* Review feedback

* Support undefined values in number formatters

* Expect 200s for all API requests even without matching indices

* Bail early for asDynamicBytes as well
2019-08-20 08:32:11 +02:00
Xavier Mouligneau
a498d3964a
Re-Bootstrap siem app (#43421)
* Change the bootstrap of the app to allow embeddable

* add embeddable library

* make sure to use new platform to get kibana version

* review
2019-08-19 18:12:30 -04:00
Tim Sullivan
91c8ad5595
[Reporting] Convert more typescript in server/lib (#43496) 2019-08-19 14:07:46 -07:00
Ryan Keairns
b33e1978a5
fix help text on tilt angle input (#43540) 2019-08-19 15:33:56 -05:00
Luke Elmers
1c0813e926
Move ui/index_patterns code to data plugin. (#42994) 2019-08-19 14:12:53 -06:00
Mike Côté
d13df2d24b
Convert task manager to use new platform style plugin (#43073)
* Convert task manager to use new platform style plugin

* Fake new platform logger

* Add stop function

* Add plugin.test.ts

* Fix confusing comment
2019-08-19 15:57:59 -04:00
Aaron Zhao
83e3db0beb Add large field collapse for doc viewer table rows in Discover (#21379)
* Add large field collapse for doc viewer table rows in Discover

* Add tests

* Remove unused translations
2019-08-19 17:16:24 +02:00
Aaron Caldwell
795bd5feab
[Maps][Telemetry] Add cancel function to maps telemetry task (#42769)
* Add cancelable promise wrapper to telemetry task. Add cancel function to task runner

* Add tests for task run and cancel operations
2019-08-19 09:14:25 -06:00
Liza Katz
c05598f8c7
Deleted old kbn-top-nav directive (#43168)
* Deleted old kbn-top-nav directive.
Can be merged only when monitoring replace their last usage.

* fix texts

* Remove CSS import
Removed fix to config in monitoring (fix is on #43187)

* rename monitoring directive
2019-08-19 14:34:12 +03:00
James Gowdy
cf2b5b6a1a
[ML] Fixing cloning of single metric distinct count job (#43435) 2019-08-19 10:37:37 +01:00
Alexey Antonov
9f0de8dc6c
[Inspector Views] [Request View] - Migrate inspector_views to new platform (#43191)
* [Inspector Views] [Request View] - Migrate inspector_views to new platform

* fix i18n keys

* rename scss files

* fix PR comments
2019-08-19 16:54:28 +08:00
James Gowdy
c19a2d5b57
[ML] Adding loading indicators to all wizard charts (#43382) 2019-08-19 09:18:25 +01:00
spalger
9056dc41ad disable flaky test (#43492) 2019-08-18 22:48:58 -07:00
WangQianliang
6c286122df
feature(code/frontend): cancel file blob and directory commits request if outdated (#43348) 2019-08-18 11:57:28 +08:00
WangQianliang
d28690d6d8
fix(code/frontend): button group url should have previous query string (#43428) 2019-08-18 11:56:23 +08:00
Garrett Spong
0d635d8f1d
[SIEM] Fixes index substring incorrectly matching configured indices and failing to install ML job (#43409)
## Summary

As described in https://github.com/elastic/siem-team/issues/441, when checking which ML ConfigTemplates are valid to install, a substring of a configured index would match and the job would fail to install. This fixes this by ensuring the complete index name matches.
2019-08-16 20:07:27 -06:00
Frank Hassanabad
9b92f8423c
[SIEM] Adds performance enhancements such by removing wasted renderers and adding incremental DOM rendering (#43157)
## Summary

Whenever you wiggle the "resize" bar on the timeline or any other action within the UI which alters the redux store, all the components `mapStateProps` will and redux will re-render if it sees any of the properties have a shallow compare that returns false.

Ref: https://react-redux.js.org/using-react-redux/connect-mapstate

This PR fixes Super Date Selector which unnecessarily causes re-renders due to not using selectors or memoizations per guidance from the react-redux project.

---

Super Date Selector will re-render on every single change to the redux store regardless of if it needs to render or not.

<img width="2072" alt="Screen Shot 2019-08-12 at 11 49 13 AM" src="https://user-images.githubusercontent.com/1151048/62900648-eaa39f80-bd17-11e9-91fd-ed4b1e81e27b.png">

You can see that with something as simple as a slight wiggle of the resizer of timeline causes around 23'ish re-renders
 
<img width="2338" alt="Screen Shot 2019-08-12 at 11 52 54 AM" src="https://user-images.githubusercontent.com/1151048/62900666-f7c08e80-bd17-11e9-8ddd-77093553aaf9.png">

After the fixes it no longer shows it being re-rendered on a redux change and the number or renders drop significantly when resizing timeline.

It renders only once: 
<img width="1857" alt="Screen Shot 2019-08-12 at 3 51 20 PM" src="https://user-images.githubusercontent.com/1151048/62901080-1c693600-bd19-11e9-8f8e-f19df029dd31.png">

---
Some parts of the application are expensive to render and are wasted renders by something such as anonymous functions. By swapping out the `pure` for `React.memo` and using the property compare we can cut out those renders and speed up the application considerably.

Before with all the flyout sections causing re-renders when state did not change:
<img width="1718" alt="Screen Shot 2019-08-12 at 4 46 29 PM" src="https://user-images.githubusercontent.com/1151048/62959566-589ea400-bdb6-11e9-89f1-047c268e74fd.png">

After with the fix to where the ms is really cheap and the expensive pieces are not rendered unless needed now:
<img width="1682" alt="Screen Shot 2019-08-13 at 10 32 55 AM" src="https://user-images.githubusercontent.com/1151048/62959667-82f06180-bdb6-11e9-9cc9-c9c609a0fb71.png">

---
For the timeline and its properties section it contained a large volume of JSX logic called "PropertiesLeft" and "PropertiesRight" in which both were having re-renders involving expensive calculations such as width changes to the date time when you did something as simple as type in a new title or description into the timeline. I broke those two out into PropertiesLeft and PropertiesRight subsections utilizing `React.Memo` for performance improvements.

Before when typing a title of timeline, PropertiesRight renders 49+ times:
<img width="2030" alt="properties-right-before" src="https://user-images.githubusercontent.com/1151048/63056285-f7093300-bea4-11e9-8f33-a2e63d0468ac.png">

Now it renders only 2 times and most of the time it is skipped with something as simple as a title changing:
<img width="2020" alt="properties-right-after" src="https://user-images.githubusercontent.com/1151048/63056339-10aa7a80-bea5-11e9-9c0c-ae12be5b5851.png">

---

When rending feature rich renderers on the timeline it was having a difficult time rendering them all within a reasonable amount of time. This introduces a simple scheduler of incremental loading using `requestIdleCallback` when it is available from the browser, otherwise this will fall back on a `setTimeout` as a polyfill/shim.

Ref:
https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback
https://developers.google.com/web/updates/2015/08/using-requestidlecallback
https://www.w3.org/TR/requestidlecallback/

Tested on Safari, Firefox, and Chrome. IE-11 looked like it didn't crash :-)

Gif of each of the browsers incrementally rendering the rows:

Chrome:
![incremental-load-1](https://user-images.githubusercontent.com/1151048/63057036-8fec7e00-bea6-11e9-83f9-7bad3f79746f.gif)
![incremental-load-2](https://user-images.githubusercontent.com/1151048/63057043-92e76e80-bea6-11e9-8f0d-95ea2559b6c7.gif)

Firefox:
![firefox-incremental-1](https://user-images.githubusercontent.com/1151048/63057052-97138c00-bea6-11e9-8e15-19f5b7cb0a5e.gif)
![firefox-incremental-2](https://user-images.githubusercontent.com/1151048/63057060-98dd4f80-bea6-11e9-9bf3-c8ae798db9e4.gif)

Safari (polyfil/shim only working):
![safari-polyfill-1](https://user-images.githubusercontent.com/1151048/63057099-adb9e300-bea6-11e9-9b94-32a08b5905ad.gif)
![safari-polyfill-2](https://user-images.githubusercontent.com/1151048/63057101-b01c3d00-bea6-11e9-9261-77444272992d.gif)


Before Performance picture of the full load. You can see that it will render all rows of 25+ and that causes a lag of up to 2 seconds depending on how complex the renderers are:
<img width="1346" alt="Screen Shot 2019-08-13 at 4 24 56 PM" src="https://user-images.githubusercontent.com/1151048/63059739-77339680-bead-11e9-818a-ee19df596855.png">


Afterwards you can see it chops it more evenly up between the rendering and tries to get in 5 at a time and maintain a 60 FPS:

<img width="691" alt="Screen Shot 2019-08-14 at 3 59 31 PM" src="https://user-images.githubusercontent.com/1151048/63059764-83b7ef00-bead-11e9-84da-bf66de8a35e6.png">



 
### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] 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)~~

~~- [ ] [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

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### 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)
- [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2019-08-16 19:35:33 -06:00
spalger
ae855534ef disable flaky test (#37859) 2019-08-16 14:20:07 -07:00
Andrea Del Rio
dbab52aded
Added sass lint to Canvas (#43410)
Added sass lint to Canvas
2019-08-16 13:32:25 -07:00
Nathan Reese
f882584ddd
[Maps] add indicator when layer is filtered by search bar (#43283)
* [Maps] add indicator when layer is filtered by filter pills and/or query bar

* add message about icon to tooltip
2019-08-16 13:48:04 -06:00
Aleh Zasypkin
36b1760481
Properly validate current user password during password change. (#43447) 2019-08-16 20:58:55 +02:00
Larry Gregory
b8303e4cb1
Spaces - allow for hex color codes that include uppercase characters (#43470)
* allow for mixed case hex codes

* remove stray newline

* lint and style improvements
2019-08-16 14:36:46 -04:00
Tim Sullivan
85cc838c70
[Reporting] Add a bit more logging and a few more logging level promotions (#43415) 2019-08-16 11:34:09 -07:00
Sonja Krause-Harder
2110b9c3c8
[Infra UI] Use sum for aggregating AWS metrics. (#43293)
* Use sum for aggregations.

* Use cumulative sum/derivative instead of hard coded rate

* Fix typo.

* Add positive_only after derivatives.
2019-08-16 20:06:43 +02:00
Steph Milovic
38ace24694
[SIEM] Format bytes columns in timeline (#43147) 2019-08-16 11:58:37 -06:00
Nicolas Chaulet
034fca7300
Upgrade slapshot to 1.4.0 (#43466) 2019-08-16 13:53:41 -04:00
James Gowdy
ca393e622d
[ML] Reordering aggregation options in wizards (#43445)
* [ML] Reordering aggregation options in wizards

* fixing tests
2019-08-16 18:51:05 +01:00
Mengwei Ding
5088548820
[Code] Enforce progress update at the end of the index job (#43381) 2019-08-16 10:37:35 -07:00
Thomas Neirynck
d0e48497f4
[Maps] Use EMS vector tiles (#42846) 2019-08-16 13:16:12 -04:00
Nathan Reese
b92bb8c448
[Maps] exluce index pattern from draw tools and shape filtering when layer ignores global filter (#43380) 2019-08-16 10:05:19 -06:00
Spencer
2ed1d1ec57
use @elastic/eslint-plugin-eui (#43397)
* use `@elastic/eslint-plugin-eui`

* add exceptions to the new rule
2019-08-16 08:29:46 -07:00
Spencer
e8409c0160
Move src/dev/run to @kbn/dev-utils (#43387)
* move src/dev/run into `@kbn/dev-utils`

* forgot to save a replacement
2019-08-16 07:13:54 -07:00
Phillip Burch
5e14f9ec19
Cleanup loading states for node detail page. (#43311)
* Cleanup loading states for node detail page.

* Return the loading screen instead of null
2019-08-16 08:34:05 -05:00
James Gowdy
ba117e7b9e
[ML] Fixing influencer population issue in wizards (#43355) 2019-08-16 13:57:12 +01:00
WangQianliang
b96b81dab6
fix(code/frontend): fix error when import existing repo (#43425) 2019-08-16 16:50:09 +08:00
James Gowdy
24b5648a0d
[ML] Adding translatable strings to new job wizards (#43344)
* [ML] Adding translatable strings to new job wizards

* missed string
2019-08-16 07:34:57 +01:00
WangQianliang
488cc176fd
fix(code/frontend): fix files and directories overlap in ie 11 (#43246) 2019-08-16 13:39:16 +08:00
WangQianliang
750b446149
[Code] fix flaky functional test (#42906)
* fix(code/frontend): fix flaky functional test
2019-08-16 11:34:47 +08:00
WangQianliang
c3d421fcc4
[Code] run test on both chrome and firefox (#42663)
* fix(code/frontend): run test on both chrome and firefox
2019-08-16 11:30:41 +08:00
Tim Sullivan
90892da940
[Reporting] Promote many debug log events to info (#43241)
* [Reporting] Move some log lines out of screenshots/index.ts

* promote some getScreenshots logs from debug to info

* promote some queue lifecycle event logs from debug to info

* Comments and renaming

* more info logging: csv from saved search

* rollback code changes to be done in future PR

* log success above error handling
2019-08-15 13:10:34 -07:00
Chris Roberson
0751c8f625
[Monitoring] Replace old kbn-top-nav with new one (#43187)
* Replace old kbn-top-nav with new one

* Fix up our implementation
2019-08-15 15:31:25 -04:00
Chris Roberson
54b9aeeb3b
Only fetch live data if we are fetching from the live cluster (#43209) 2019-08-15 15:00:17 -04:00
Andrew Goldstein
3e14b02055
[SIEM] Removes an extra js-yaml entry from devDependencies
## Summary

Removes an extra entry for `js-yaml` in the `devDependencies` section of `x-pack/package.json`, which was introduced in https://github.com/elastic/kibana/pull/42804

The change in this PR did _not_ generate a new `yarn.lock`

### Checklist

- [ ] ~~This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~
- [ ] ~~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)~~
- [ ] ~~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
- [ ] ~~[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~~
- [ ] ~~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

- [ ] ~~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
- [ ] ~~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
2019-08-15 12:28:23 -06:00
Nathan Reese
c6335656d1
[Maps] custom color ramp (#41603)
* [Maps] custom color ramp

* round value down to find center color

* do not update redux state with invalide color stops

* rename EuiColorStop to ColorStop

* remove untracked file

* fix jest tests

* review feedback

* use steps instead of interpolate

* add percy functional test to verify rendering of interpolate and step color expressions

* add padding to color stop row so add/remove icons do not overlap color select
2019-08-15 12:21:28 -06:00
Daniil Suleiman
df72f91878
[Vis: Default editor] EUIficate region map options tab (#42944)
* EUIficate region_map_options

* Reuse types

* Remove wms_options directive

* Remove style import

* Fix issue with join field default value
2019-08-15 21:09:28 +03:00
Spencer
b2515c780d
[watcher] add missing await (#41351)
* [watcher] add missing await

* run x-pack-firefoxSmoke ciGroup 40 times, run watcher tests 20 times per job

* Fix failing watcher test

* Revert "run x-pack-firefoxSmoke ciGroup 40 times, run watcher tests 20 times per job"

This reverts commit c5d891d44d.

* Clean up watches via api

* fix linting errors

* don't swallow errors, wait for completion

* strip trailing numbers in suite tags

* run x-pack-firefoxSmoke group 40 times

* Revert "run x-pack-firefoxSmoke group 40 times"

This reverts commit cc4eb6ce54.

* run x-pack-firefoxSmoke group 40 times

# Conflicts:
#	.ci/jobs.yml

* run tests 80 times

* Revert "run tests 80 times"

This reverts commit 4320c9488a.

* Revert "run x-pack-firefoxSmoke group 40 times"

This reverts commit cf0d4056d7.
2019-08-15 10:49:36 -07:00
Nathan Reese
b95469fd73
[Maps] filter by shape (#43141)
* [Maps] feature geometry filters

* geo field select

* add logic to filter geo fields when geometry is line

* create filters on button click

* support multi_polygon geometries for filtering geo_points

* pass geo field name to filter method

* close tooltip when filter created

* add relation select

* fix jest test

* ui feedback

* fix typo

* review feedback

* call this.props.reevaluateTooltipPosition to ensure tooltip is not clipped

* reset to properties view when tooltip changes location
2019-08-15 11:24:03 -06:00
Jonathan Budzenski
e6e92ac2bf
[test] remove x-pack mocha configuration (#42979)
* update scripts

* run mocha from root

* rm mocha grunt task

* rm x-pack mocha setup

* rm x-pack/mocha*

* Revert "rm x-pack/mocha*"

This reverts commit fb56005e77.
2019-08-15 12:21:42 -05:00
Ahmad Bamieh
6de3870165
[telemetry] update logic to fix misisng kibana stats when moni… (#43343)
* update logic to fix misisng kibana stats when monitoring is just enabled

* test unsuccessful scenario

* fix test

* update timer only on success
2019-08-15 19:22:58 +03:00
Chris Roberson
cb2dd9f006
[Monitoring] Metricbeat migration improvements (#42600)
* Support for logstash

* Beats support

* Fix cherry-pick api issue

* Support for logstash

* Updates for beats and logstash

* APM migration working

* Tweaks for beats migration

* Update copy for setup new button

* If on cloud, disable setup mode

* Handle new beat flow better

* Better phrasing for APM

* Add beat type to disable step

* Fix i18n issue

* Fix jest tests

* Fix api tests

* PR feedback

* Update copy

* Remove unnecessary code

* Support shortcut to finish ES migration if we are on the connected cluster

* Undo changes that are now in a separate PR

* Share code better by exposing a single route with an optional parameter

* Disable more links

* Fix overview link for logstash

* PR feedback

* Fix tests

* PR feedback

* Fix tests

* We still need this route

* Updates

* Only show if there are instances too

* Change how we set the newly discovered cluster uuid

* Move this to support beats/apm weirdness

* Fix tests

* Remove out of date translations

* PR feedback

* Detect products a different way, to detect empty indices

* Look against the production cluster instead of the monitoring one

* When disabling ES internal collection, only disable ES - do not disable all internal collection
2019-08-15 12:14:22 -04:00
Chris Roberson
518312fde6
Ensure we ignore the global cluster uuid in route init for the listing page (#43305) 2019-08-15 12:13:45 -04:00
Jean-Louis Leysens
bd8984b12d
[Rollup] Metrics multiple selection (#42927)
* remove duplicate columns declaration

* First iteration of select all menu working

* A lot of bugfixes and started on row-level selection using flatMap

* Wip on row selection

* Fix formatting

* More bug fixes and and first iteration of row selection and column selection working

* Minor refactors, cleaned up logging. Still has nasty UX bug on Popover menu

* Added translations and empty tests

* Tests are WiP

* Move checkboxes out of popover

* Implemented first iteration of select all functionality

* Move row select all into checkbox area

* Remove unused code and simplify select all if-else

* First iteration of tests

* fix tests and update name data-test-subj name

* Move checkboxes into popover with button

* - Fix tests
- Refactor test helpers for metric step
- Cleanup some JS style nits
- Make popover button disabled if all metric checkboxes are disabled

* Remove extra newline

* - Moved constants from metrics to own file so that it's more re-usable
- Removed unnecessary styling
- Fixed typos
- Updated comments
- i18n
2019-08-15 16:46:18 +02:00
Shahzad
dbb140df46
[Uptime] update monitor list configs for mobile view (#43218)
* update monitor list configs for mobile view

* [uptime] update unit test snapshot
2019-08-15 11:36:12 +02:00
Dario Gieselaar
4b05fd9f31
[APM] Local UI filters (#41588)
* Add snapshot tests for query search params

* Use projections to fetch data

* Add configuration and aggregations for local filters

* Add endpoints for local filters

* UseLocalUIFilters hook

* Parse Local UI filters from URL params

* LocalUIFilters component

* TransactionTypeFilter

* replace useServiceTransactionTypes with useTransactionTypes

* Support transactionType for trace projection/api

* Configure Local UI Filters

* Use units instead of hardcoded px

* Fix i18n error

* Remove unused labels from translation files

* Update URL of API integration test for transaction_types API call

* Revert "replace useServiceTransactionTypes with useTransactionTypes"

This reverts commit bae7fa44a0fc1ace0b498cc78626fabb2d310437.

* Revert "Support transactionType for trace projection/api"

This reverts commit 2edb32cf04ca2c38885c457ba57ce0a1547fd199.

* Remove transaction type filter for traces,error groups

* Address review feedback

* Don't clone in mergeProjection; add tests

* Address review feedback

* Revert transaction_types API path in functional tests

* More review feedback

* More review feedback:

- Add transactions projection
- Merge traces/transaction groups projections

* Don't persist local UI filters in HistoryTabs

* Move projections to server folder

* Move transactionName into options

* Use pod name instead of pod uid
2019-08-15 10:53:20 +02:00
Pengcheng Xu
1e978ad067
[Code] Upgrade ctags langserver (#43252)
* [Code] Upgrade ctags langserver

* Disable yaml and xml support
2019-08-15 16:10:47 +08:00
Yulong
676f4d20ed
[Code] show multiple definition results in panel (#43249)
* [Code] show multiple definition results in panel
2019-08-15 13:27:20 +08:00
Corey Robertson
4432b9116f
Adds Metric Type to full screen launch tracking (#42692) 2019-08-14 18:32:12 -05:00
Corey Robertson
67cc190ad4
[Canvas] Convert Autocomplete to Typescript (#42502)
* Move the files around

* Convert Auto Complete to TS. Convert Collectors to ExpressionAST type

* Remove TS-Lint ignores

* Add comment for getFnArgPosition method
2019-08-14 18:31:37 -05:00
Ahmad Bamieh
09196aa6fd
[telemetry] add spacesEnabled config back to xpack_main (#43312)
* add spacesEnabled config back to xpack

* move some variables back to xpack_main

* fix import path
2019-08-15 02:08:19 +03:00
Melissa Alvarez
7aa7f5afd0
[ML] Adds DF Transform Analytics list to Kibana management (#43151)
* disable job link if ml not enabled in space

* add analytics table in managment page

* update css for analytics table

* only show ML section if license if trial/platinum

* remove actions column for analytics list in KM

* fix typescript error on columns

* update props interface for analytics table

* plain text instead of disabled link if not enabled in space
2019-08-14 17:49:04 -04:00
Court Ewing
e2e194174c
[csp] Telemetry for csp configuration (#43223)
We collect the boolean configurations which can be derived by any
end-user of Kibana by making any HTTP request. Since the rules
configuration involves strings that can leak identifiable information,
we only collect whether the rules have been changed from their defaults.
2019-08-14 16:03:36 -04:00
Andrew Goldstein
017c860a3f
[SIEM] Run Cypress Tests Against Elastic Cloud & Cypress Command Line / Reporting (#42804)
# [SIEM] Run Cypress Tests Against Elastic Cloud & Cypress Command Line / Reporting (#42804)

This PR contains enhancements to the `Cypress` end-to-end (e2e) testing support in the SIEM app, as discussed with @spalger

Note: this PR depends on test refactorings in https://github.com/elastic/kibana/pull/42766

## New: Run `Cypress` Tests Against Elastic Cloud

Cypress tests may now be run against a remote Elastic Cloud instance
(override `baseUrl`), interactively or via the command line.

Credentials are specified via `kibna.dev.yml` or environment variables.

## New: Run `Cypress` Tests On the Command Line

Run tests on the command line (override `baseUrl` and pass credentials via
the `CYPRESS_ELASTICSEARCH_USERNAME` and `CYPRESS_ELASTICSEARCH_PASSWORD`
environment variables), via command line.

## New: Reporting

Reports are configured to include:

- An HTML report, suitable for e-mail notifications
- Screenshots
- Junit reports (for integration with Kibana CI)
- Videos (optional)

Reports generated when `Cypress` tests are run on the command line are output
to the `target` directory, which follows specific conventions used by the
Kibana CI process:

* Any directory under `target` that begins with `kibana-`, e.g. `kibana-siem` will be uploaded as an artifact to a bucket
* Junit reports are picked up from the `target/junit` directory

The artifacts generated by running `Cypress` tests on the command line conform to the above conventions.

### HTML Reports

An HTML report (e.g. for email notifications) is output to:

```
target/kibana-siem/cypress/results/output.html
```

### Screenshots

Screenshots of failed tests are output to:

```
target/kibana-siem/cypress/screenshots
```

### `junit` Reports

The Kibana CI process reports `junit` test results from the `target/junit` directory.

Cypress `junit` reports are generated in `target/kibana-siem/cypress/results`
and copied to the `target/junit` directory.

### Videos (optional)

Videos are disabled by default, but can optionally be enabled by setting the
`CYPRESS_video=true` environment variable:

```
CYPRESS_video=true yarn cypress:run
```

Videos are (optionally) output to:

```
target/kibana-siem/cypress/videos
```

# Updated `README`

The full details and instructions for running Cypress tests are in the
`siem/cypress/README.md`, which was updated to reflect the changes
in this in this PR, but in a nutshell, you may run tests interactively with
the following (new) environment variables:

```sh
cd x-pack/legacy/plugins/siem
CYPRESS_baseUrl=http://localhost:5601 CYPRESS_ELASTICSEARCH_USERNAME=elastic CYPRESS_ELASTICSEARCH_PASSWORD=<password> yarn cypress:open
```

Running the command line version of the tests, which will output
the reports described above, is a similar experence:

```sh
cd x-pack/legacy/plugins/siem
CYPRESS_baseUrl=http://localhost:5601 CYPRESS_ELASTICSEARCH_USERNAME=elastic CYPRESS_ELASTICSEARCH_PASSWORD=<password> yarn cypress:run
```

https://github.com/elastic/siem-team/issues/435
https://github.com/elastic/siem-team/issues/437
2019-08-14 13:38:23 -06:00
James Gowdy
f4b0a9c962
[ML] Adding bucket span estimator to new wizards (#43288)
* [ML] Adding bucket span estimator to new wizards

* disabling next button when estimating

* fixing population
2019-08-14 20:09:22 +01:00
spalger
c65b9752cb disable flaky tests (#43017) 2019-08-14 11:12:47 -07:00
James Gowdy
4acfc04f85
[ML] Adding post create job options (#43205)
* [ML] Adding post create job options

* adding toasts

* fixing toast string

* tweaking continue job function

* updating ids

* removing ts-ignore
2019-08-14 17:23:00 +01:00
Stacey Gammon
a9b479a667
Per panel time range (#43153)
* Per panel time range

* Added tests and fixed lack of await check for incompatibility

* Remove a couple more unneccessary `anys`
2019-08-14 11:54:11 -04:00
Chris Cowan
4a1f41ece6
[Infra UI] Add APM to Metadata Endpoint (#42197)
* [Infra UI] Add APM to Metadata Endpoint

- Adds APM feature to metadata
- Closes #42167
- Based on #41836

* migrating to new http api
2019-08-14 08:16:44 -07:00
Phillip Burch
b1fefc302f
Sentence case copy changes (#43215)
* Change casing for options and labels to be sentence case

* More sentence-case copy changes

* Fix min and max capitalization
2019-08-14 10:15:09 -05:00
Maryia Lapata
a892d58677
[Vis: Default editor] EUIficate Panel Setting tab (#42828)
* EUIficate pointe-series and grid

* Apply TS

* Show grid on a panel

* Remove extra space

* Add TS

* Use BasicOptions

* Adjust func test

* Add dataTestSubj prop to SelectOption

* Use id instead of data-sest-subj

* Disable show x-axis lines when there is histogram agg

* Add tooltip for disabled 'Show x-axis lines' config

* Remove extra space
2019-08-14 17:52:36 +03:00
Walter Rafelsberger
97a6e8acc3
[ML] Data frame transforms: Fix getting nested properties. (#43262)
- Fixes a regression where values were not properly extracted from nested objects.
- Moves inline code we had to solve this to a utility function getNestedProperty(). Kibana's idx is a lodash-get replacement with TypeScript support. However, it requires that you'd know the accessor up front, it doesn't work with dynamic string values. getNestedProperty() allows you to pass a string like lodash-get, but it uses idx on the inside so you still get TypeScript support.
2019-08-14 16:35:15 +02:00
Felix Stürmer
054d4e5ddf [Logs UI] Create ML module for log analysis (#42872)
* Add ml module with hard-coded timestamp field

* Fix data_recognizer test

* Parameterize the bucket span normalization

* Remove max agg which will be specified during setup

The overrides are recursively merged and therefore additive. Therefore
we can't specify the timestamp agg here, because it could not be
overridden later with a different field and agg name. It needs to be
solely specified at setup time.
2019-08-14 08:08:12 -04:00
Walter Rafelsberger
fd8011284e
[ML] Data frame analytics: Hook unit tests. (#43199)
- moves use_create_analytics_form.ts inside a use_create_analytics_form directory to be able to split up the large file
- moves code related to the plain reducer function from ``use_create_analytics_form.tsto its own filereducer.ts`
- adds unit tests for use_create_analytics_form.ts and reducer.ts.
- Changes the button and modal header text from 'Create data frame analytics job' to 'Create outlier detection job'.
2019-08-14 10:20:19 +02:00
Shahzad
627bc54510
[Uptime] Context Menu Improved for integrations links in monitors list (#43068)
* up time integerations context menu, wrapping remove to make it more symmetric

* Updated unit test snapshot
2019-08-14 08:39:43 +02:00
Yulong
d681368743
[Code] fixed lang server install status (#43164) 2019-08-14 14:12:02 +08:00
Yulong
4e7cecc6c9
[Code] make ctag lang server embed (#43170)
* [Code] add an abstraction for child processes
* [Code] make CTag lang server embed
2019-08-14 14:11:16 +08:00
Tim Sullivan
94a35cdb9d
[Reporting/API Testing] Simplify config (#43216)
- Remove injection of `x-pack/test/functional/config.js`
- No more starting the optimizer when running thees tests
2019-08-13 17:42:12 -07:00