Commit graph

6614 commits

Author SHA1 Message Date
Melissa Alvarez 6b35b97e96
do not render the tablist element if there are no sub menus (#54838) 2020-01-15 16:04:27 -05:00
Steph Milovic 5ba24b8f54
[SIEM] [Case] Service Now Kibana Action (#53890) 2020-01-15 13:50:38 -07:00
Vadim Dalecky 22369c9992
📕 Storybook for everyone (take 2) (#43529)
* chore: 🤖 add Infra sample Storybook story

* chore: 🤖 add @kbn/storybook package

* chore: 🤖 add sample SIEM stories

* chore: 🤖 add Canvas new Storybook config

* fix: 🐛 fix TypeScript errors

* chore: 🤖 add @kbn/babel-preset to package.json

* chore: 🤖 move dependencies to devDependencies

* chore: 🤖 make Storybook dependencies non-dev

* chore: 🤖 upgrade Storybook dependencies

* chore: 🤖 add packages to webpack

* fix: 🐛 fix TypeScript type check

* chore: 🤖 disable ESLint warnings

* chore: 🤖 remove Storybook info plugin

* chore: 🤖 upate yarn.lock

* chore: 🤖 add Storbook to Embeddables

* feat: 🎸 add --clean flag to Storybook CLI

* coalesce yarn.lock versions

* update kbn/pm dist

* This reverts commit 97d8ff9f53 and 49b07cd007.

* chore: 🤖 use fs instead of mkdirp

* chore: 🤖 use debug for message logging

* chore: 🤖 update yarn.lock

* feat: 🎸 add link to kbn-storybook package

* docs: ✏️ add Storybook readme

* chore: 🤖 remove packages that failed DLL build

* style: 💄 add ESLint comma

* chore: 🤖 apply changes from #52209

* fix: 🐛 make Canvas Storybook build again

* chore: 🤖 move Canvas stories to global Storybook

* chore: 🤖 move more Canvas components to global Storybook

* chore: 🤖 move more Canvas stories to global Storybook

* chore: 🤖 move <ItemGrid> and <KeyboardShortcutsDoc> to NP SB

* chore: 🤖 move shape picker Canvas stories to global Storybook

* chore: 🤖 move Canvas sidebar stories to global Storybook

* fix: 🐛 split imports to not import path.resolve in Storybook

* chore: 🤖 move tag and PDF panel Canvas stories to global SB

* chore: 🤖 move Canvas share website flyout stories to global SB

* fix: 🐛 clean up <ShareWebsiteFlyout> imports

* chore: 🤖 add back Canvas withInfo decorator

* chore: 🤖 look for Canvas stories everywhere in /canvas folder

* test: 💍 mock correct files in Storyshots

* test: 💍 update Canvas Storyshot snapshots

* chore: 🤖 move more Canvas components to global Storybook

* chore: 🤖 move more Canvas components to global Storybook

* test: 💍 update Canvas Storyshots

* chore: 🤖 rebuild @kbn/pm

* chore: 🤖 refresh @kbn/pm dist/index.js artifact

* chore: 🤖 update yarn.lock

* chore: 🤖 update @kbn/pm artifact

* feat: 🎸 address review comments

* fix: 🐛 remove circular import

* chore: 🤖 update yarn.lock

* test: 💍 disable a test suite

* test: 💍 update Canvas storyshots

* chore: 🤖 remvoe build step from @kbn/storybook

* chore: 🤖 enable disabled functional test suite

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-15 12:30:59 -08:00
Joel Griffith 5b2e315e5a
Getting flaky tests back in shape for reporting (#46076)
* Rebasing from master, updating test utils and getting report pdf/png generation

* Removing legacy functions, packages and updating README/Licenses

* Dropping duplicitive test

* Better URL check for lens reporting

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-15 11:28:39 -08:00
Davis Plumlee cab5925c59
Resolver nonlinear zoom (#54936) 2020-01-15 12:17:17 -07:00
Elizabet Oliveira ed3c8991db
Color blind palette (#54918) 2020-01-15 18:55:33 +00:00
Peter Pisljar 297aa7bd23
visualize embeddable to visualizations plugin (#54840) 2020-01-15 13:53:56 -05:00
Robert Austin 63ad7a9cb2
Resolver test plugin not using mount context. (#54933)
Mount context was deprecated. Use core.getStartServices() instead.
2020-01-15 13:10:03 -05:00
Jean-Louis Leysens 781ef7a2c0 [Mappings Editor] Remove Joi (#54913) 2020-01-15 12:42:02 -05:00
patrykkopycinski b758b78e1e
[SIEM] Add support for IP details flow target in url (#54546) 2020-01-15 18:31:54 +01:00
igoristic 884fe91c1e
Added new index pattern (#54681)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-15 11:44:22 -05:00
Shahzad f2695c4d25
[Uptime] Ping list, margin before expand arrow (#54905)
* added margin

* Update x-pack/legacy/plugins/uptime/public/components/functional/ping_list/ping_list.tsx

Co-Authored-By: Katrin Freihofner <katrin.freihofner@elastic.co>

Co-authored-by: Katrin Freihofner <katrin.freihofner@elastic.co>
2020-01-15 17:14:54 +01:00
Melissa Alvarez 5fc691f775
Ensure result field columns can be deselected and re-selected (#54766) 2020-01-15 09:19:37 -05:00
Maja Grubic 7ca858ee8d
[Dashboard][Lens] Small code fixes (#54625)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-15 14:02:46 +00:00
Cauê Marcondes 1a6239289c
[APM] Traces with identical transactions names are combined, even though they are from different services (#54247)
* Adding services aggregation

* Adding services aggregation

* Adding services aggregation

* removing counter from ui

* adding size to service aggregation

* sorting on server

* changing to composite aggregation

* changing aggregation name
2020-01-15 13:58:10 +00:00
Dima Arnautov d082c03e9d
[ML] Calculate model memory limit API integration tests (#54557)
* [ML] calculate model memory limit api integration tests

* [ML] extra test cases
2020-01-15 13:42:35 +01:00
CJ Cenizal 33713cbdc0
Skip flakey index template component integration tests. (#54878) 2020-01-15 02:28:38 -08:00
Joe Reuter b9a0f958bc
Reverse dependency of home plugin and apm/ml/cloud (#52883) 2020-01-15 10:10:12 +01:00
Frank Hassanabad 9c43e3ad93
[SIEM][Detection Engine] Order JSON keys, fix scripts, update pre-packaged rules
## Summary

* Updates pre-packaged rules
* Adds rule_id duplicate check into the linter
* Updates the scripts for converting saved objects to rules
* Adds a script for re-generating the `index.ts` for the rules

### 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

~~- [ ] 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)
2020-01-15 00:55:55 -07:00
spalger 94a409964b update invalid snapshot 2020-01-14 23:26:20 -07:00
Patrick Mueller d3a3cefc73
add readme note about alerting / manage_api_key cluster privilege (#54639)
partially resolves https://github.com/elastic/kibana/issues/54525
2020-01-14 23:47:55 -05:00
Andrew Goldstein 56ff721867
[SIEM] New Overview Page (#54783)
## [SIEM] Overview Page "1.5"

A redesigned SIEM Overview page that includes `Recent timelines`, a `Security news` feed, visualizations, and rolled-up event counts

![overview-day](https://user-images.githubusercontent.com/4459398/72396016-90f53600-36f8-11ea-9b41-6d54d09de589.png)

![overview-night](https://user-images.githubusercontent.com/4459398/72394575-fb57a780-36f3-11ea-868e-8fcd2c5c4543.png)

### Overview enhancements
- Added the global Search bar and Date picker to the Overview page
- New `Recent timelines` widget affords quick access to favorite and recently modified timelines
- New `Security news` widget
- New Kibana advanced settings (toggle switch) for enabling or disabling the news widget and configuring the news URL
![news-settings](https://user-images.githubusercontent.com/4459398/72362776-fd4c4700-36b0-11ea-805b-3c7353f2c1cd.png)
- New `Events count by dataset` widget
- Updated the `Host Events` and `Network Events` widgets to integrate with the Search bar and date picker input
- Enhanced the `Host Events` and `Network Events` widgets to use an accordion paradigm that summarizes stats by source (e.g. `Auditbeat`, `Endgame`)
- Enhanced the `Host Events` and `Network Events` widgets to visualize relative percentages of events collected as progress bars
- New `Alerts count by category` widget
- New `Signals count by MITRE ATT&CK™ category` widget
- New `View events`, `View alerts`, and `View signals` navigation buttons for their respective visualizations


### FTUE enhancements
- FTUE "no data" view design refresh
![ftue](https://user-images.githubusercontent.com/4459398/72361771-43a0a680-36af-11ea-969f-5872ac4a01a1.png)
- When the FTUE "no data" page is displayed, hide all global navigation links (i.e. `Hosts`, `Network`, `Detection engine`), such that only `Overview` appears in the global nav
- App Help popover design refresh
![help](https://user-images.githubusercontent.com/4459398/72362132-d80b0900-36af-11ea-9b58-1fd3b923b7c8.png)
- Removed the `Beta` badge and `Security Information & Event Management with the Elastic Stack` from the Overview header

- Tested in Chrome `79.0.3945.117`, Firefox `72.0.1`, and Safari `13.0.4`

## Known issues

- The `siem:newsFeedUrl` advanced setting is defaulted to `https://feeds.elastic.co/kibana`
- The `Signals count by MITRE ATT&CK™ category` visualization does not display all categories
- The `Signals count by MITRE ATT&CK™ category` visualization may require a different index pattern
- `EuiButtonGroup` throwing a `Can't perform a React state update on an unmounted component` warning when switching from the Overview tab

https://github.com/elastic/siem-team/issues/484
2020-01-14 21:03:57 -07:00
Shahzad 1ae2d00ab6 [Uptime] Feature/refactor context initialization (#54494)
* update refactor

* refactor context initilization

* rename values

* fix tests

Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
2020-01-14 22:51:17 -05:00
Greg Thompson bd9d67ccc0
Upgrade EUI to v18.2.0 (#54786)
* 18.2.0

* ts update

* Updated `euiColorVis0`

* Update `euiColorVis1`

* Updating `euiColorVis2`

* Updated `euiColorVis3`

* Updated the rest

* Updated hard-coded viz palette hexes to latest

* src snapshot updates

* x-pack test updates

* mock jest fn

* Updated two vegalite visualization screenshots

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
2020-01-14 20:19:35 -06:00
Xavier Mouligneau 26bc76520e
[SIEM] [Detection engine] from signals to timeline (#54769)
* remove batch action on signals

* fix callback dependency bug

* open timeline in signals table + add a way to pick between signal and raw events in timeline

* add status on all rules

* fix i18n

* review I

* fix test
2020-01-14 20:14:18 -05:00
Jean-Louis Leysens dfce824e8e [Index Management] Add Mappings Editor to Index Template Wizard (#47562) 2020-01-14 17:09:29 -08:00
Frank Hassanabad b36ec40458
[SIEM][Detection Engine] Removes deprecated filter from mapping
## Summary

Removes a one-liner deprecated filter from the mapping. We no longer use or need it since we only use filters now.

### 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~~

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

- [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)
2020-01-14 18:06:26 -07:00
Thomas Neirynck 0ff668ba46
[Maps] Add categorical styling (#54408)
This allows users to style fields by category. Users can either uses one of default color palettes or specify a custom ramp.
2020-01-14 19:30:21 -05:00
Nick Peihl 2e7b35e232
Add mapbox-gl-rtl-text library (#54842)
This adds support for RTL languages (Arabic and Hebrew) in the basemaps.
Without this library the RTL languages appear backwards.
2020-01-14 16:30:00 -08:00
Garrett Spong b4e42d52c0
[SIEM][Detection Engine] Adds actions to Rule Details (#54828)
## Summary

This PR adds the following actions to the `Rule Details` page via the `RuleActionsOverflow` component (which is permission-aware):
* Duplicate
* Export
* Delete 

Additional fixes include:
* Fixes duplication action (recent regression as part of status update additions)
* i18n of `Duplicate` postfix when duplicating rules
* Adds success toast when duplication is a success
* Enabled `Edit Index Patterns` batch action
* Removes unused `Run Rule Manually` action

Rule Details Actions:
![image](https://user-images.githubusercontent.com/2946766/72385375-9c3a6880-36dc-11ea-8249-4ae92eb72dd1.png)

Edit Index Patterns Batch Action:
![image](https://user-images.githubusercontent.com/2946766/72385468-c5f38f80-36dc-11ea-93c8-b70e4982f01a.png)



### Checklist

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

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

- [ ] ~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)~
2020-01-14 17:05:49 -07:00
Andrew Cholakian 6cac02e6c1
Lexicographically sort location tags (#54832)
Sort location tags lexicographically, fixes skipped test by providing a stable, non-time-based sort order
2020-01-14 17:29:49 -06:00
Nathan Reese 75d6842a71
[Maps] expand extent filter to tile boundaries (#54276)
* [Maps] expand extent filter to tile boundaries

* fix functional test

* simplify expandToTileBoundaries

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 18:28:47 -05:00
Nick Peihl 6c9e4ec762
[Maps] Use v7.6 Elastic Maps Service API (#54399)
* Use v7.6 Elastic Maps Service API
2020-01-14 15:10:26 -08:00
Xavier Mouligneau daeddfdd78
add status to detail page with failure history (#54812) 2020-01-14 17:22:18 -05:00
Brian Seeders c3430fefd9
Skip failing uptime test suite 2020-01-14 17:05:50 -05:00
Nathan L Smith 52709b8deb
[APM] Service map popover (#53524)
Add a popover when clicking on service map nodes and an endpoint to fetch metrics to show in the popover.

Closes #52869.
2020-01-14 15:35:52 -06:00
Wylie Conlon 4869e02b62
[Lens] Show fields when using indexpattern without time field (#54804) 2020-01-14 16:31:44 -05:00
Poff Poffenberger 60f647572e
[Canvas] Adds functional test for Canvas custom elements (#52920)
* Adds functional test for Canvas custom elements

feedback cleanup

* Opening up Canvas app first

* Add skip firefox tag to custom element test
2020-01-14 21:29:40 +00:00
Frank Hassanabad f2615c29ad
[SIEM][Detection Engine] Removes deprecated keys from configuration
## Summary

Removes deprecated keys from configuration since the backend gives out where the index is located and it is based on spaces.

### 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~~

~~- [ ] [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)~~
2020-01-14 13:58:42 -07:00
Dario Gieselaar b91b123206
[APM] Make sure errors per minute are reported correctly (#54751)
Closes #54350.
2020-01-14 21:34:01 +01:00
Shahzad f547b76312
[Uptime] Details page map handle geo information missing (#54483)
* update API

* update query

* hide layer control and added loc tags

* update test

* remove unused comment

* update API

* remove capitalization

* style fix

* update types

* added location status number on details page

* useref instead of createRef

* update interface

* update import

* removed redundant file

* fix header for empty data

* refactor for most recent check

* remove redundant code

* remone unused translation

* update status bar

* update styling

* update snaps

* added API tests

* fix types

* fixing integration tests and a typo

* remove unused translations

* update tests

* fixed PR feedback

* update feedback

* update messaging

* update snap

* added timestamp in front of tags

* update missing

* update locs

* update geo info missing

* use formatted message

* update snaps

* updated types

* update test

* fix test

* update tests

* update more skipped tests

* update test

* update warning message

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 21:27:40 +01:00
Poff Poffenberger 2ac0c91c7a
[Canvas] Fix asset image preview (#54659)
* fix image preview

* Center image in asset box

* Updating snapshot

Co-authored-by: Ryan Keairns <rkeairns@chef.io>
2020-01-14 20:22:45 +00:00
Robert Austin 387da985ee
Resolver component w/ sample data (#53619)
Resolver is a map. It shows processes that ran on a computer. The processes are drawn as nodes and lines connect processes with their parents.

Resolver is not yet implemented in Kibana. This PR adds a 'map' type UX. The user can click and drag to pan the map and zoom using trackpad pinching (or ctrl and mousewheel.)

There is no code providing actual data. Sample data is included. The sample data is used to draw a map. The fundamental info needed is:

process names
the parent of a process
With this info we can topologically lay out the processes. The sample data isn't yet in a realistic format. We'll be fixing that soon.

Related issue: elastic/endpoint-app-team#30
2020-01-14 14:56:16 -05:00
Tim Sullivan c622a2ffa2
[Reporting/Mocha] Fix and unskip a test (#54598) 2020-01-14 12:42:33 -07:00
Felix Stürmer 8d00dc64d7
[Logs UI] Disable ML job setup form while setup is pending (#54705)
This disables the configuration for in the log rate and categories setup screens while the setup process is ongoing.
2020-01-14 20:16:46 +01:00
Angela Chuang f6890d4416
[SIEM] Histogram enhancement (#54544)
* generic histogram container

* generic histogram container

* rename params

* fix inspect

* fix update with timerange

* clean up props

* send stackByField to server side

* fix inspect button

* helper node xavier

* fix DNS histogram

* fix DNS query params

* move utils for fetch data into containers

* cleanup graphql template on client side

* rename grqphql data

* i18n

* fix type

* fix i18n

* fix i18n

* fix subtitle

* fix subtitle

* fix i18n

* fix for reviews

* fix types

* remove unused test

* fix integration

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-15 03:15:51 +08:00
Dima Arnautov 1b076171f3
[ML] Data Visualizer redesign (#54358)
* [ML] change basic page structure

* [ML] adjust search panel

* [ML] adjust fields_panel.tsx

* [ML] card icon styles

* [ML] styles

* [ML] adjust actions_panel.tsx

* Update styling of panels, spacing

* [ML] change basic page structure

* [ML] adjust search panel

* [ML] adjust fields_panel.tsx

* [ML] card icon styles

* [ML] styles

* [ML] adjust actions_panel.tsx

* [ML] fix i18n

* [ML] fix styles

* [ML] adjust top values styles

* [ML] remove conflicts artifacts

* Use EuiBorderColor

* [ML] fix i18n

* [ML] fix i18n

* [ML] fix counters

* [ML] fixed width for sample size select

* [ML] fix layout for file viz

* [ML] fix empty cards rendering

* Update text styling and spacing

* [ML] fix field stats card

* [ML] fix counter for showAllFields

* [ML] reset title for the badge

* [ML] boolean_content.tsx with the bar chart

* [ML] fix counters

Co-authored-by: DeFazio <michael.defazio@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 19:52:58 +01:00
Chandler Prall 6bed80bbd8
Upgraded EUI to 18.0.0 (#54042)
* Upgraded EUI to 18.0.0

* Fix breaks from `palette._.colors` changes

* snapshots

* Updated hard coded hex color codes in tests, fixed TS errors

* Updated a functional test's selector; added (BSD-3-Clause AND Apache-2.0) to license checker whitelist

* Functional test selector update

* Updated vega browser-ci tests for palette changes

* rebased on master

* One more location for EUI package number update and yarn lock

* Fixed lurking [but introduced] TypeScript logic bug

* Swap a prop definition for the same value but tied closer to its source

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 11:23:43 -07:00
Dario Gieselaar 8d57df0fe6
[APM]: Fix render error when license has not been loaded (#54718) 2020-01-14 18:57:21 +01:00
James Gowdy b598c9dc7f
[ML] Categorization jobs improvements (#54579)
* chunking token examples

* disabling bucket span estimator

* passing sample size to client

* better handing of token errors

* changes based on review
2020-01-14 17:53:52 +00:00
patrykkopycinski 14be0ee8f4
Bump to stable styled-components@5 (#54698) 2020-01-14 18:53:20 +01:00
Jean-Louis Leysens e4c73ffbbb
[Console][Chore] Update spec (#54564)
* Update spec conversion to exclude deprecated completions

* Update OSS spec

* Remove console.log

* Add skip deprecated endpoints option to script

* Actually, remove skip deprecated flag for now. Just do not include deprecated. See this issue: https://github.com/elastic/kibana/issues/48375

* x-pack: Delete data from transform completions

* Update to existing x-pack autocomplete extensions

* Added ml explain with overrides

* Added put trained model with doc override

* Added SLM get_status, start and stop with URL param overrides where needed

* Add data completion for clear scroll

* Remove include_type_name flag from indices and delete create.json override

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 18:47:13 +01:00
Joe Reuter 97d460e051
Fix safari layout issue in Visualize, Graph and Lens (#54694) 2020-01-14 18:40:12 +01:00
Chris Davies 79054afb5a [Lens] Add support for scripted fields and aliases to the existence API (#54064)
* Add support for scripted fields and
default index pattern

* Add scripted fields and aliases to existence API

* Fix TypeScript errors.

* Fix mappings parsing

* Default to the index pattern timeFieldName

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 12:39:50 -05:00
Chris Davies 8c0440f29d [Lens] Add clear layer feature (#53627)
* [Lens] Add clear layer feature

* Move clear / remove layer out of the context menu

* Address code review comments

* Remove xpack.lens.xyChart.deleteLayer translation

* Get rid of unused Lens translations

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 12:06:51 -05:00
Joe Reuter 8c878bcaa8
add graph sample data (#54558) 2020-01-14 18:02:49 +01:00
Tim Schnell b298dd4c20
fixing color and toggle accessibility (#54661)
* fixing color and toggle accessibility

* updating snapshots

* fixing more snapshots

* fixing toggle console warning
2020-01-14 10:53:27 -06:00
Garrett Spong 569b1f6606
[SIEM] Use import/export API instead of client implementation (#54680)
## Summary

This PR switches the Rule Import / Export functionality away from the client-side implementation (that was leveraging the create/read Rule API) to the new explicit `/rules/_import` & `/rules/_export` API introduced in https://github.com/elastic/kibana/pull/54332.

Note: This PR also disables the ability to export `immutable` rules.

![image](https://user-images.githubusercontent.com/2946766/72311962-c0963680-3643-11ea-812f-237bc51be7dc.png)


Sample error message:

<img width="800" alt="Screen Shot 2020-01-13 at 20 22 45" src="https://user-images.githubusercontent.com/2946766/72311909-8cbb1100-3643-11ea-94ab-023a5ff56e20.png">


### Checklist

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

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

- [ ] ~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)~
2020-01-14 09:25:07 -07:00
Nathan Reese 643912e4f5
[Maps] add labels to sample data maps (#54671)
* [Maps] add count labels to sample data maps

* [Maps] add labels to sample data maps

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 11:12:53 -05:00
Dmitry Lemeshko 040aee9fed
Functional tests: refactor dashboard_page (#54588)
* [test/functional] cleanup & tsfy dashboard_page

* fix & improvement

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 16:56:38 +01:00
James Gowdy c2abc12c7e
[ML] Adding categorization job wizard icon (#54721) 2020-01-14 15:56:08 +00:00
patrykkopycinski e20fbd8e8f
[SIEM] Detection Engine UI improvements (#54712) 2020-01-14 16:36:15 +01:00
Robert Oskamp 6a45241b79
[ML] Functional tests - basic tests for single metric viewer and anomaly explorer (#54699)
This PR adds basic functional UI tests for the single metric viewer and the anomaly explorer.
2020-01-14 16:29:43 +01:00
Felix Stürmer c1cf970fe1
[Logs UI] Move beta badges from tabs to headings (#54572)
This moves the beta badges for the Ml integration tabs from the tabbed navigation bar into the primary headings of the respective setup and result pages.
2020-01-14 16:28:27 +01:00
Ahmad Bamieh 1a34375fa0
[i18n] integrate translation files ja and zh (#54722) 2020-01-14 17:03:58 +02:00
Phillip Burch 2927373f8b
Add aria labels to fields (#54510)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 08:46:49 -06:00
Shahzad 038c2b1ce3
[Uptime] Fix Jest test with absolute time (#54684)
* fix test

* update more skipped tests

* update test
2020-01-14 15:18:07 +01:00
Melissa Alvarez 69730cef73
[ML] DataFrame Analytics use field caps api to set column type (#54543)
* wip: initialize newJobCaps service in parent element

* wip: use jobCaps service to create columns

* add render and types to talble columns

* add keyword suffix when constructing query. ensure pagination works

* Ensure search query and sorting works

* wip: update regression table to use jobCaps api

* move shared resources to central location

* ensure 0 and false values show up in table

* add error handling to jobCaps initialization

* ensure outlier detection table can toggle columns

* check for undefined before using moment to create date

* add tests for fix for getNestedProperty
2020-01-14 08:58:36 -05:00
Katrin Freihofner 45f8ca90a3
changes alignment of location column in monitor details view (#54709) 2020-01-14 14:52:52 +01:00
Gidi Meir Morris 5216b382f4
fix broken configuration in Task manager (#54695)
Fixes an issue that prevents custom configuration in Task Manager
2020-01-14 13:49:43 +00:00
Devin W. Hurley c976094f54
[SIEM][Detection Engine] Rule Status Monitoring (#54452)
* Working status updates in executor. Need to update read rules api endpoint to only respond with 'status' and not status info. Will create another endpoint to get status details for a rule which will include last five errors (if there are any). Still need tests

* adds new route for getting statuses for a list of given alert ids, adds try-catch and more logic in executor for logging errors, adds scripts and rules for testing, updates find_rules endpoint to display statuses too. Would like to look into using the alerts executor state to better manage logic for statuses, and need to update some types. Also needs unit tests still.

* updated types for routes, updated how merging of alert-to-rule and rule status happens when formatting REST response.

* typecast test server as ServerFacade type

* fix bug where we were not awaiting the accumulated result in the reducer

* update rule status saved object interfaces to play nicely with interfaces provided by saved objects module. Update tests to pass - Need to write new unit tests in an upcoming commit. Next commit will be cleanup from comments then new unit tests.

* fix missed conflicts after rebase

* replace id param with rule.id when searching in statuses, adds sort fields to the saved objects find queries.

* fixes bug where 'executing' statuses were being written into failing historical status list

* camelCase to snake_case in new statuses route, also fix merge conflict

* add deletion of rule statuses to delete_rules_bulk_route. Statuses are created inside of executor so we will not be needing to create statuses directly inside of the create rules bulk route, so I removed that extraneous code.

* pr feedback I forgot to fix earlier

* remove unused import. fixes type check error generated in previous commit

* removes status information from rule when saved to signals index and updates tests to represent this change. Also removes extraneous quotes inserted around alertId field when creating a new historical status.

* adds new bash script to delete all rule statuses, updates error messages in rule statuses to just store actual message, moved querying of rules statuses under a null check, initialize everything to null when first creating rule status, update number of results returned when querying saved objects based on usage, updates saved objects mapping types to use date for dates and keyword for alertId.

* use lodash snake case and update total number of saved objects to return for find rules, delete rules, and read rules.

* updates how statuses are transformed inside of read_rules_route, only update updated_at in rule on update of rule, removes unlabeled todo comment, updates scripts descriptions, removes interval from query_with_rule_id.json sample query, removes debug statement, removes verbose from curl script.

* display rule status on update
2020-01-14 07:59:57 -05:00
Felix Stürmer cd9ead87c5
[Logs UI] Reduce panel paddings in ML integration result tabs (#54574)
This reduces the panel paddings on the log rate and categorization result tabs from `l` to `m` as per elastic/logs#7 and brings a title padding in line with the rest.
2020-01-14 12:00:36 +01:00
Dario Gieselaar 3f46e2bec6
[APM] Support error.{log,exception}.stacktrace.classname (#54577)
In elastic/apm-server/pull/3096, an alternative to stacktrace.filename was introduced: stacktrace.classname. This change makes sure classname is properly represented in the UI and in our types.
2020-01-14 09:37:22 +01:00
Dima Arnautov 9a871d2a7a
[ML] MML calculator enhancements for multi-metric job wizard (#54573)
* [ML] fix fieldNames provided to calculateModelMemoryLimit

* [ML] calculateModelMemoryLimit when the influencers are changed
2020-01-14 08:58:43 +01:00
patrykkopycinski 7c4a531ae7
[SIEM] Fix Inspect query 'request timestamp' value changes when curso… (#54223) 2020-01-14 08:50:49 +01:00
Andrew Cholakian 72dd68e3b4 [Uptime] Temporarily skip flakey tests (#54675)
* [Uptime] Temporarily skip flakey tests

* Fix further flakey tests due to hardcoding times + using snapshots
2020-01-13 22:05:07 -05:00
Brian Seeders e5c17fb0cd
Skip failing uptime tests 2020-01-13 21:53:35 -05:00
Yuliia Naumenko 8259445350
Create UI for alerting and actions plugin (#48959)
* Refactored reducers type definitions

* Fixed dependancy objects

* Fixed action add

* Fixed logging app icon

* Added action types params fields

* Added fields for check and re-notify alert

* Add tags to alert list

* Adjusted threshold expression with validation, added visualization

* Move delete button to the left and hide when no selection

* Rename action list title column to name

* fixed request

* Removed watcher labels

* Design cleanup

* Added expression default values

* Added visualization for index threshold alert

* Rename Actions tab to Connectors

* Rename "create action" to "create connector"

* Remove actions column name

* Add count per action type

* Hide checkboxes when user can't delete

* Add title to home, rename Alerting UI breadcrumb (remove UI part)

* Added correct binding for interval and throttle

* Added tags support for create Alert UI

* Added server error display in UI on save alert

* Added connectors for action forms

* Update button styles

* Switch inputs to compressed forms

* Fixed some fields for add alert form

* Fixed updating action by index

* Fixed filter for index/fields api requests

* Remove the test alert type that was in the init function

* Fixed action type icon on add connector form and did small refactoring on action forms; added action validation

* Rename alerting UI plugin to triggers and actions UI (or something else) #50305

* Implemented action connector edit UI

* Add bulk actions to alerts list

* Update home title spacing

* Fixed editing secrets action property

* Changing behaviour of bulk actions and disable buttons during request

* Refactored plugin definition with appdependency interface

* Moved add dependencies to the separate file

* Enable visualization if only hasExpressionErrors passed

* Fixed add action twice on click card

* Fix actions column in alert list

* Fixed action canSave capability

* Renamed Actions to ActionConnectors in appropriate UI files

* Renamed alertTypeParams to params in UI code

* Add filter for tags

* Cleanup previous commit

* Fix alert type filter

* Refactored edit form to use ActionTableItem

* Renamed ActionTableItem to ActionConnectorTableItem

* Fixed missing button key error for alerts list filter

* Renamed translation labels for connectors

* Enable UI plugin by default

* Rename buildin to builtin

* Fix some type checks

* Add API tests

* Split API file into smaller files

* Rename plugin id

* Remove dependency on actions plugin (should be optional dep in NP)

* Fix some translation ids

* Revert "Rename plugin id"

This reverts commit f6daeb3d5e.

* Rename method for loading connectors

* Added functional tests base

* Fix functional test type filter

* Add test alert type for now

* Initial connectors functional tests

* Rename description to name

* Use unique connector names to allow re-running tests

* Assert on more things

* Update alert/action menu items. Flyout width. Add index.scss file

* Added action connector list unit tests

* Add bulk delete functional test

* Move tests to SSL functional environment

* Fix tests

* Added unit tests for actionTypeRegistry and alertTypeRegistry

* Fixed update connector with only properties

* Added some functional tests for alerts with TODOs

* connectors list page cleanup

* empty state cleanup

* Added connector edit flyout unit test

* Fix functional tests

* text cleanup

* zindex fix for index threshold trigger

* Expand the functional tests, add assertions

* Fixed edit connector from the Name column, and removed pencil button

* Remove tags filter, use search bar instead

* Finalize functional tests

* Support filtering alerts by action type

* Rename plugin name for translations

* Rename default breadcrumb title to alerts and actions

* Added unit tests for connectors empty prompt, fixed api tests

* Added unit test for select action type menu for create connector; Fixed update selected connector for edit form

* Added unit test for edit connector flyout

* Added alerts list unit tests

* Added connector form unit tests

* Added connector reducer unit tests

* Fixed some failing unit tests

* Fixed alerts list unit tests

* Set alert tab default if it is available

* Added doc_title and get_time_units unit tests

* Added some test fixes

* Fixed index threshold expression to display only index and fields

* Added email building action unit tests

* Added unit tests for builtin action types

* Remove test alert type

* Move create alert UI behind feature flag 'createAlertUiEnabled'

* Fix functional tests

* Update codeowners

* Update codeowners for tests

* Revert watcher changes

* Fix type check failure

* Fix unit test failures

* Fixed typecheck failures

* Fixed language check errors

* Did some text/type fixes

* Fixed typecheck

* Fixed unit tests warning

* Fix failing functional tests

* Fix registry tests to have cleaner diff when it fails

* Make DEFAULT_SECTION a Section type

* Remove unused constructor

* Make app dependency error string same line

* Remove unused error pages

* Set interface to alerts context

* Fix action_connector_form.tsx label

* Fix label in connector_add_flyout.tsx

* Fix label in alert_add.tsx

* Move alert_types to builtin_alert_types

* Move some threshold constants into threshold folder

* Move api.ts within threshold folder

* Removed duplication logic from action type and alert type registry list

* Fixed email action type test and adjusted validation to support arrays ony

* Added missing connector fields for email action type

* Fixed building action types issues due to comments

* Refactored with more new platform structure; fixed some comments from review

* Capitalize Actions in 'Alerts and Actions' labels

* Skip flaky tests

* Fix failing functional test

* Fixed failing unit tests, added new deps

* Fixed type checks

* Fixed language check failing

* Fix broken functional tests

* Refactored actionConnectors and alerting context

* Removed doc title service

* added get time options type definitions

* removed obsolete code

* Made generic registry type for actionTypes and alert types

* Fixed some enum types

* fixed type check CI

* Convert EuiSearchBar to normal text field

* Fix typo

* Fix conditional rendering

* Fix bug where selection doesn't reset

* Fix broken functional test, wait for ENTER key to search alerts

* Make app section hide from menu when user doesn't have access

* Fixed connector name validation (error due to renaming from description)

* Removed obsolete useEffect

* Removed unused ShareRouter

* Fixed key validation error

* Mobed wrongly wrapped objects

* Removed useEffect from connectors form

* Replaced error forms with eui controls props

* Added delete confirmation dialog for connectors list

* Fixed build errors

* Fixed failing test

* Skip flaky tests

* Added null check for app context - render components tree only if it isn't null

* Fixed type check eror

* Did changes on the UX and text/labels commnets

* Fixed failing tests

* Fixed error handling

* Refactored Webhook form http headers due to the mockup

* Fixed build

* Fix labels issue

* Fix spacing and form row alignment

* Fixed failing type check

* put ownfocus on popover in actions list

* fix spacing and flex

* fix color on conectors list

* clean up webhook headers form

* fix logic check for headers

* Made changes due to review comments

* Fixed delete connector test

* Fixed all flaky test for delete connectors 53956

* Fixed type check due to NP changes

* Disable plugin by default

* Added configuration props for functional tests to enable triggers and actions ui

* removed timeout from test

* added enable triggers and actions to functional/config.js

* fix the build

* Changed ci group and disabled plugin

* changed config setting to root

* Changed disable approach

* Experiment with index managment

* Set back configuration settings for triggers and actions

* Enable plugins

* Set index management to disabled to see the failing issue

* Revert experimental back for index_managment

* Fixed type check

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: dave.snider@gmail.com <dave.snider@gmail.com>
Co-authored-by: DeFazio <michael.defazio@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>
2020-01-13 16:16:20 -08:00
Garrett Spong 6f54c06695
[SIEM] Use bulk actions API when updating or deleting rules (#54521)
## Summary

This PR updates the `All Rules Table` actions to use the new bulk API introduced in https://github.com/elastic/kibana/pull/53543. More robust error reporting has also been added to let the user know exactly which operation has failed. Note that individual `update`/`delete` requests now also go through the bulk API as this simplifies the implementation and error handling.

Additional features:
* Adds toast error when failing to activate, deactivate or delete a rule (related https://github.com/elastic/kibana/issues/54515)
* Extracted commonly used toast utility for better re-use
* Removes ability to delete `immutable` rules


##### Activate/Deactivate Before:
![bulk_activate_before](https://user-images.githubusercontent.com/2946766/72196245-0ea50300-33d4-11ea-8d49-5ebdb63db1a1.gif)
(Ignore failed requests from test env -- request count is important here)


##### Activate/Deactivate After:
![bulk_activate_after](https://user-images.githubusercontent.com/2946766/72196361-c0443400-33d4-11ea-9a42-11f66c64e925.gif)



##### Delete Before:
![bulk_delete_before](https://user-images.githubusercontent.com/2946766/72196249-149ae400-33d4-11ea-80fc-b2f7fb83245f.gif)
(Ignore failed requests from test env -- request count is important here)

##### Delete After:
![bulk_delete_after](https://user-images.githubusercontent.com/2946766/72196366-c803d880-33d4-11ea-90d8-f1917b18035f.gif)

### Checklist

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

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

- [ ] ~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)~
2020-01-13 15:25:24 -07:00
Nathan Reese e9e44ec851
[Maps] add text halo color and width style properties (#53827)
* [Maps] add text halo color and width style properties

* fix jest test

* update for new editor UI

* add removed styling

* get halo size from label size

* fix label border size with dynamic label size

* clean up

* fix jest test

* fix jest test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 16:34:56 -05:00
Oliver Gupte b65710d33d
Service Map Data API at Runtime (#54027)
* [APM] Runtime service maps

* Make nodes interactive

* Don't use smaller range query on initial request

* Address feedback from Ron

* Get all services separately

* Get single service as well

* Query both transactions/spans for initial request

* Optimize 'top' query for service maps

* Use agent.name from scripted metric

* adds basic loading overlay

* filter out service map node self reference edges from being rendered

* Make service map initial load time range configurable with
`xpack.apm.serviceMapInitialTimeRange` default to last 1 hour in
milliseconds

* ensure destination.address is not missing in the composite agg when
fetching sample trace ids

* wip: added incremental data fetch & progress bar

* implement progressive loading design while blocking service map interaction during loading

* adds filter that destination.address exists before fetching sample trace ids

* reduce pairs of connections to 1 bi-directional connection with arrows on both ends of the edge

* Optimize query; add update button

* Allow user interaction after 5s, auto update in that time, otherwise
show toast for user to update the map with button

* Correctly reduce nodes/connections

* - remove non-interactive state while loading
- use cytoscape element definition types

* - readability improvements to the ServiceMap component
- only show the update map button toast after last request loads

* addresses feedback for changes to the Cytoscape component

* Add span.type/span.subtype do external nodes

* PR feedback

Co-authored-by: Dario Gieselaar <d.gieselaar@gmail.com>
2020-01-13 13:25:14 -08:00
patrykkopycinski e9319360e2
[SIEM] Detection Engine Create Rule Design Review #1 (#54442) 2020-01-13 21:59:45 +01:00
Brian Seeders 51d96e52ec
Skip flaky test 2020-01-13 15:54:58 -05:00
Corey Robertson 24b3ecbae0
[Canvas] Enable Embeddable maps (#53971)
* Enables Embeddable maps in Canvas. Updates expressions as maps are interacted with

* Fix type check errors

* Update imports. Remove filters from initial embed expressions

* Adds hide layer functionality to canvas map embeds

* Fix typecheck error

* Fix Type check

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 15:40:05 -05:00
Frank Hassanabad 054bbbbc46
[SIEM][Detection Engine] Increases the number or rules you can view on a single page (#54628)
* Increased the number or rules you can view on a single page

* messed up one line
2020-01-13 13:36:51 -07:00
Matthew Kime 2178ee38c0
uiSettings - use validation field for image field maxSize (#54522)
* uiSettings - use validation field for image field maxSize
2020-01-13 13:58:59 -06:00
robbruce 62e7edbe26 Fixes #45896 (#50229)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 14:50:33 -05:00
Shahzad e90ca93687
[Uptime] Most recent checks info on details page (#54340)
* update API

* update query

* hide layer control and added loc tags

* update test

* remove unused comment

* update API

* remove capitalization

* style fix

* update types

* added location status number on details page

* useref instead of createRef

* update interface

* update import

* removed redundant file

* fix header for empty data

* refactor for most recent check

* remove redundant code

* remone unused translation

* update status bar

* update styling

* update snaps

* added API tests

* fix types

* fixing integration tests and a typo

* remove unused translations

* update tests

* fixed PR feedback

* update feedback

* update messaging

* update snap

* added timestamp in front of tags

* update snaps

* improve readability

* PR feedbacka and snaps

* PR feedbacka and snaps

* update txt

* snaps

* fix timestamp issue in tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 20:31:28 +01:00
Shahzad 6f3ff99968
[Uptime] Monitor SSL Certificate Color version for warning (#54040)
* update monitor list columns

* update columns

* update snaps

* enhance ui

* update SSL Cert to badge warning

* fix i18n errors

* removed unnecessary margin

* update snaps

* update ssl

* update snaps

* added test for warning state

* added test for warning state

* update test name

* update test name

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 20:30:11 +01:00
Brian Seeders 70cedb08f9
Update alerting task_runner test snapshots (#54627) 2020-01-13 14:29:08 -05:00
Felix Stürmer 5ef4aa10e7
[Logs UI] Add categories table to the categorization tab (#53004)
This renders the log entry categories after the ML jobs have been set up previously.

closes #42776
closes #42065
2020-01-13 20:15:15 +01:00
Gidi Meir Morris ea9a7b8a16
migrate TaskManager Plugin to the Kibana Platform (#53869)
Migrates the existing TaskManager plugin from Legacy to Kibana Platform.
We retain the Legacy API to prevent a breaking change, but under the hood, the legacy plugin is now using the Kibana Platform plugin.

Another reason we retain the Legacy plugin to support several features that the Platform team has yet to migrate to Kibana Platform (mapping, SO schema and migrations).
2020-01-13 19:09:57 +00:00
Jimmy Kuang 79ee978fc4 [SR] Support capitalized date formats in snapshot names (#53751)
Snapshot names that contain date math may require capital letters, e.g. "<snapshot-{now/d{yyyy.MM.dd|+09:00}}>". This change fixes a bug which complained that capital letters are not allowed in snapshot names, by scoping this validation to only the name part of this pattern, ignoring the date math part.
2020-01-13 09:58:20 -08:00
Catherine Liu 70aa7b3c5c
Migrates ES Fields Route to NP (#54398)
* Migrated es fields route to NP and added tests

* Removed extraneous import

* Removed check for index query

* Fixed broken test
2020-01-13 10:50:00 -07:00
Maja Grubic 7543b0c7b2
[Lens][Dashboard] Adding Lens to Dashboard (#53110)
* First version of adding Lens to dashboard

* Fix failing unit test

* Replacing explicit Lens query param with a more generic one

* Fixing failing unit test

* Adding a unit test for redirect

* Do not show Save New if adding from Dashboard

* Adding functional test

* Adding functional test

* Fixing type issues

* Renaming query params

* Fixing failing unit test

* Removing unused constants

* Fixing erroneous imports

* Fixing erroneous import

* Fixing import

* Fix failing typecheck

* Removing timefilter from Dashboard URL

* Fixing type error

* Replacing time parsing with rison

* Replacing URL regex parsing with legacy URLs

* Fixing failing test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 17:38:47 +00:00
Gidi Meir Morris e8b2b28aef
[alerting] gracefully handle error in initialization of Alert TaskRunner (#54335)
Prevents an edge cases where Alerts can end up in a zombie state.

1. Decrypting attributes throws an error
2. Fetching an Api Key throws an error
3. Getting Services with user permissions throws an error
2020-01-13 17:16:25 +00:00
Poff Poffenberger 71dfdea7ae
[Canvas] Fix expression updating bug (#54297)
* Fix expression updating bug

* Add functional test for expression editor

* Add page object helper to open expression editor

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 17:16:12 +00:00
Gidi Meir Morris e54a7175da
pass previousStartedAt as Date into Alert executor (#54576)
Corrects how we pass previousStartedAt into Alert executor
2020-01-13 17:15:08 +00:00
Walter Rafelsberger 6826ece3b0
[ML] Fix appState/globalState (#52987)
Replaces appState/globalState with a custom hook useUrlState().
2020-01-13 18:14:36 +01:00
Corey Robertson 3ce2025c75
[CANVAS] Relax workpad schema to allow existing templates to work (#54019)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 11:53:47 -05:00
Brandon Kobel ea4a1ac12c
Fixing the spaces header aria-controls a11y issue (#54512)
* Fixing the spaces header aria-controls a11y issue

* Updating snapshots

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 07:21:24 -08:00
Frank Hassanabad 641c67091f
[SEIM][Detection Engine] Time gap detection and logging
## Summary

This adds utilities and logging of time gap detection. Gaps happen whenever rules begin to fall behind their interval. This isn't a perfect works for all inputs and if it detects unexpected input that is not of an interval format (but could be valid date time math) it will just return null and ignore it.

This also fixes a bug with interval where we were using the object instead of the primitive since alerting team changed their structure.

For testing, fire up any rule and shutdown Kibana for more than 6 minutes and then when restarting you should see the warning message. 



### 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

~~- [ ] 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)
2020-01-13 08:09:55 -07:00
cachedout 05c48cf153
Display APM server memory in bytes (#54275)
* Display APM server memory in bytes

* Add tests for helpers
2020-01-13 13:42:33 +00:00
Nathan Reese 14df4c096c
[Maps] refactor isPointsOnly, isLinesOnly, and isPolygonsOnly to make synchronous (#54067)
* [Maps] refactor isPointsOnly, isLinesOnly, and isPolygonsOnly to make synchronous

* fix jest test

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 07:28:39 -05:00
Joe Reuter 204155b4e2
[Graph] Fix various a11y issues (#54097) 2020-01-13 10:26:57 +01:00
Pierre Gayvallet aeebedfa4d
Add ApplicationService app status management (#50223)
* add unimplemented registerAppStatusUpdater & remove observers for apps and legacyApps

* adapt NavLinksService to use new application observables

* merge availableApps$ and availableLegacyApps$

* updating core docs

* adapt the navLink updating methods

* filters the inaccessible apps from availableApps$

* restrict access to navigateToApp depending on app status

* fixes due to merge

* add statusUpdater$ to AppBase

* export new types

* disable navlink depending on app status

* update generated doc

* update snapshots for disabled prop

* Address josh review

* Address review comments

* fix merge conflicts

* adapt changes due to merge

* update generated doc

* add comment and fix navlink url for custom url apps

* add AppNavLinkStatus type to split app/navlink states

* fix typo

* review comments and improvements

* add functional tests

* update generated docs and migration guide

* fix wrong type cast on AppsMenuProvider.readLinks

* properly type return of navigateToApp
2020-01-12 22:37:42 +01:00
MadameSheema 794bb02249
logs in one time (#54447) 2020-01-12 12:25:19 +01:00
Larry Gregory e6e1373db2
Security - Role Mappings UI (#53620)
* Initial role mappings UI

* apply design edits

* address PR feedback

* fix type cast for number field

* Update x-pack/legacy/plugins/security/public/views/management/role_mappings/edit_role_mapping/components/mapping_info_panel/mapping_info_panel.tsx

Co-Authored-By: Joe Portner <5295965+jportner@users.noreply.github.com>

* Cleanup FTR configuration, and handle role mapping 404 errors properly

* align naming of role mappings feature check

* Apply suggestions from code review

Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>

* add missing test assertions

* inlining feature check logic

* switch to using snapshot

* use href instead of onClick

* adding delete unit test

* consolidate href building

* unify page load error handling

* simplify initial loading state

* documenting unconditional catch blocks

* use nodes.info instead of transport.request

* Apply suggestions from code review

Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>

* move model out of LP into NP

* convert except_field_rule to except_any_rule

* docs, take 1

* update gif

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-11 13:26:31 -05:00
Xavier Mouligneau b057f18d16
[SIEM] [Detection engine] Permission II (#54292)
* allow read only user with no CRUD

* use ../../lib/kibana

* fix timeline-template

* add re-routing on page

* bug

* cleanup

* review I

* review II

* a pretty shameful bug I will live thanks Frank

* bug select rule

* only activate deactivate if user has the manage permission

* add permissions rule with manage api key

* bug on batch action for rules

* add permissions to write status on signal
2020-01-11 08:19:01 -05:00
John Dorlus 10733b5415
Allow User to Cleanup Repository from UI (#53047)
* Added repository cleanup button. Added logic for spinner while loading, added new repository request, type and telemetry metric.

* Added additional bindings for server side to hit the cleanup endpoint.

* fix cleanup request

* Added data test subject to the code editors to differentiate them and fixed a broken inport of RepositoryCleanup.

* Added files for a component integration test. The tests are failing right now so we need to get those green. Added a functional test. Need to set up kbn-es to be able to set up a file repository before being able to run the functional tests.

* Added change to the way data-test-subjects were created for the repository list table so that columns can be individually identified. Added functional test to allow checking the details of repositories.

* Removed the jest tests for repository details until we get jest fixed.

* Fixed jest test to reflect updated test subjects.

* Made changes per feedback in PR comments.

* Fixed i10n issues using <FormattedMessage>. Removed reference to blueBird and used Promise.all(). Fixed all nits in PR comments.

* Added i10n fixes for header.

* Added i10n fixes for header.

* Added name parameter for i18n strings.

* Removed i18n string from JSON.stringify call since it's already a string.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2020-01-11 02:51:35 -05:00
Xavier Mouligneau 51e51ca434
[Detection engine] Some UX for rule creation (#54471)
* wip

* update timelien select to design

* Rename label to design
Timeline Select match design with favorite
Now, you are able to add mutiple items for url and false positive
Add tm for Mitre Att&ck (tnaks Frank)
And match mitre selection to design

* cleanup with michael

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 17:37:38 -05:00
Spencer 357be5970d
share specific instances of some ui packages (#54079)
* share specific instances of some ui packages

* remove unnecessary eslint changes, every package will define deps anyway

* remove mentions of moment webpackShims in eslint resolver

* remove use of lodash

* list angular as dep for x-pack

* add operations as codeowner of shared-deps pkg
2020-01-10 15:22:18 -07:00
Dima Arnautov 51c1a8f805
[ML] APM modules configs for RUM Javascript and NodeJS (#53792)
* [ML] apm modules

* [ML] apm modules

* [ML] update mocha test

* [ML] fix config

* [ML] single line JSON formatting for queries

* [ML] remove an empty path component with a trailing slash

* [ML] change detector descriptions, remove scroll size

* [ML] remove chunking_config from datafeeds

* [ML] fix configs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 23:19:26 +01:00
Dario Gieselaar c87ba85141
[APM] Delay rendering invalid license notification (#53924)
* [APM] Delay rendering invalid license notification

Don't render an invalid license notification if the license information has not been loaded. (Don't render any UI either).

* Show UI if license has not loaded
2020-01-10 22:07:55 +01:00
Joe Reuter d459270be2
[Graph] Improve error message on graph requests (#54230) 2020-01-10 22:00:49 +01:00
Jimmy Kuang 63d0bf84c8 [ILM] Kibana should allow a min_age setting of 0ms in ILM policy phases (#53719) 2020-01-10 15:22:13 -05:00
Tim Schnell c9e4304770
Unit Tests for common/lib (#53736)
* converting mocha tests to jest

* adding a few lib tests

* adding more lib tests

* moving test files and adding autocomplete tests

* updating test definition

* fixing import and test definitions
2020-01-10 14:02:11 -06:00
Joe Reuter 51e07f27f2
[Graph] Only show explorable fields (#54101) 2020-01-10 20:34:15 +01:00
Chris Roberson bf7c25332e
[Monitoring] Fetch shard data more efficiently (#54028)
* For the nodes listing page, do not fetch shard data for indices

* Optimize our shard queries for the index and node listing pages

* This change isn't necessary

* Rename file and function

* Use optimized query for ml jobs and es overview

* Apply to node/index detail page, and more renaming

* Unnecessary change

* Fix tests

* Add basic tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 14:06:54 -05:00
Corey Robertson 934d6b3eeb
[Maps] Add hiddenLayers option to embeddable map input (#54355)
* Add hiddenLayers option to embeddable map input

* Move hiddenLayers logic to actions and reducers. Adds Documentation

* Address code review suggestions
2020-01-10 12:58:37 -05:00
CJ Cenizal 2e3ce5c0f8
Pass termOrder and hasTermsAgg properties to serializeThresholdWatch function (#54391)
* Fix Watcher regression in which a threshold watch's termOrder and hasTermsAgg properties weren't being passed to the serializeThresholdWatch function.
* Remove unused upstreamJson getter method from server models.
2020-01-10 09:53:06 -08:00
James Gowdy 1a3aef0d21
[ML] Job validation loading spinner (#54450)
* [ML] Job validation loading spinner

* adding to modal version

* updating snapshots
2020-01-10 16:26:23 +00:00
Justin Kambic aa9126ec04
[Uptime] Add tags dropdown to Overview filters group (#50837)
* Finish implementing snapshot count redux code.

* Replace GQL-powered Snapshot export with Redux/Rest-powered version.

* Add tests for Snapshot API call.

* Rename new test file from tsx to ts, it has no JSX.

* Rename outdated snapshot file.

* Update filter groups to use redux and add tags dropdown.

* Delete obsolete graphql filter bar query.

* Add fetch effect factory.

* Use generic fetch effect factory to avoid code redundancy.

* Infer isDisabled status from data for filter group buttons and disable when there are no items.

* Fix removal of overview filter from previous rebase.

* Rename generator-related functions from *saga to *effect.

* WIP trying to make filters filterable.

* WIP cleaning up.

* Delete obsolete API test.

* Add API test for filters endpoint.

* Remove obsolete fields from overview filters.

* Add functional testing attributes and delete a comment for filter popover.

* Update obsolete unit test snapshots and test props for filter popover.

* Fix broken types and delete obsolete test snapshots for filters api call.

* Modify filters endpoint to adhere to np routing contracts.

* Add functional test and associated helper functions for filters API.

* Remove obsolete resolver function for filter bar.

* Remove obsolete FilterBar type from graphql schema.

* Delete static types generated for obsolete GQL schema types.

* Delete obsolete fields from default filters state.

* Delete obsolete method from graphql schema.

* Add default values to unit test that requires complete app state mock.

* Extract helper logic to dedicated module.

* Finish working on adapter/helper tests.

* Add state field for overview page search query.

* Apply search kuery to filters.

* Simplify creation of overview filter fetch actions and API call.

* Add tests for overview filter action creators.

* Simplify api query parameterizaton.

* Improve a variable name.

* Update formatting of file.

* Improve a variable name.

* Improve a variable name.

* Simplify API endpoint typing.

* Clean up helper code and rename some functions/vars.

* Clean up parameterization of filter values.

* Move function from dedicated file back to calling file.

* Clean up naming in a function.

* Move function from dedicated file to caller's file.

* Modify interface of function return value.

* Have function throw error when it receives invalid input instead of returning empty object.

* Extract constant value to dedicated function value and remove parameter from function.

* Clean up object declarations.

* Rename a property.

* Fix issue where function was not handling empty input.

* Delete unnecessary snapshots.

* Add message to internal server error response.

* Fix broken type.

* Delete type that was added as a result of a merge error.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 11:15:20 -05:00
nnamdifrankie 1d4c2f6ca1
EMT-65:always return accurate endpoint count (#54423)
EMT-65:always return accurate endpoint count, independent of paging properties
2020-01-10 11:08:11 -05:00
Jimmy Kuang 919126160f [Watcher] Support scheme field when creating a Threshold alert with a Webhook action (#53757) 2020-01-10 09:42:02 -05:00
Shaunak Kashyap 402322c7a9
Enable functionbeat telemetry (#54267)
* Adding placeholder for functionbeat telemetry in test fixture

* Adding placeholder for functionbeat telemetry expectation

* Adding placeholder for aggregating functionbeat telemetry per cluster

* Update test + fixture

* Updating code
2020-01-10 06:16:47 -08:00
Anton Dosov a7a557babe
[State Management] State syncing utilities (#53582)
Today, apps rely on AppState and GlobalState in the ui/state_management module to deal with internal (app) and shared (global) state. These classes give apps an ability to read/write state, when is then synced to the URL as well as sessionStorage. They also react to changes in the URL and automatically update state & emit events when changes occur.

This PR introduces new state synching utilities, which together with state containers src/plugins/kibana_utils/public/state_containers will be a replacement for AppState and GlobalState in New Platform.
2020-01-10 17:14:33 +03:00
Pete Harverson 0bafcb9e50
[ML] Display anomaly actual in chart tooltip when model plot enabled (#54364)
* [ML] Display anomaly actual in chart tooltip when model plot enabled

* [ML] Fixes translations for chart tooltip fixes

* [ML] Edits to chart tooltip div following review
2020-01-10 14:12:07 +00:00
James Gowdy cda91cf0cb
[ML] Auto selecting categorization field (#54365)
* [ML] Auto selecting categorization field

* updating translations

* reverting unrelated translation changes
2020-01-10 13:07:28 +00:00
MadameSheema 9ee9f3d038
[SIEM] Improves navigation Cypress tests time execution (#54273)
* extracts before

* fixes the type check failure
2020-01-10 13:48:10 +01:00
MadameSheema 07d56f73f7
[SIEM] Improves event viewer Cypress tests time execution (#54117)
* groups tests in context

* makes tests fully order-independent

* updates Readme file

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 13:46:54 +01:00
MadameSheema cc09f61d3b
[SIEM] Improves fields browser Cypress tests time execution (#54236)
* groups fields browser tests by context

* saves cookies between tests

* fix types

* renames 'cleansFieldsBrowser' to 'clearFieldsBrowser'

* adds 'SID cookie to whitelist'

* fixes type check

Co-authored-by: patrykkopycinski <contact@patrykkopycinski.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 13:07:29 +01:00
Pierre Gayvallet c0d6b932f1
Allow the mounted application to prompt a confirm message before leaving (#54221)
* add onAppLeave to AppMountParameters

* adapt legacy shims of app mount

* update generated doc

* returns properly typed AppLeaveAction from leave handler instead of raw strings

* add openConfirm to modal service and use it instead of window.confirm

* fix unit test

* update querystringinput snapshots

* add integration tests

* nits and review comments

* add functional tests
2020-01-10 12:17:21 +01:00
Casper Hübertz 4d659477ad
[APM] Update annotation icon for service.version (#54428)
Updating the service version annotation icon in the chart and legend
2020-01-10 11:39:43 +01:00
Jean-Louis Leysens 753eb53448
[SearchProfiler] Remove sources of recursion over potentially deeply nested objects (#54015)
* Added max tree depth guard
Removed recursive normalizeTimes functions (one fewer iteration through the entire data structure)
Optimizied appliation of tree mutations by taking `if` out of tight loop
Cleaned up types

* Tidy up data being passed into store (and through immer)

* Fix max tree depth logic

* Remove immer from non-test code.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 10:56:28 +01:00
Garrett Spong 482faae799
[SIEM] Adds Signals Histogram (#53742)
## Summary

Detection Engine Meta Issue: #50405

This PR adds the `Signals Histogram` component for use on the main `Detection Engine` page, `Rule Details` page, and the newly designed `Overview` page.

Out of the box configuration includes an `EuiSelect` for stacking by the following:
* Risk Scores
* Severities
* Event Actions
* Event Categories
* Host Names
* Rule Types
* Rules
* Users
* Destination IPs
* Source IPs

Additional configuration properties are available to configure the component as needed depending on where it will be displayed (e.g. no `Stack By` option on `Overview`, filter to specific `rule_id` on `Rule Details`, etc):

``` ts
interface SignalsHistogramPanelProps {
  defaultStackByOption?: SignalsHistogramOption;
  filters?: esFilters.Filter[];
  from: number;
  query?: Query;
  legendPosition?: 'left' | 'right' | 'bottom' | 'top';
  loadingInitial?: boolean;
  showLinkToSignals?: boolean;
  showTotalSignalsCount?: boolean;
  stackByOptions?: SignalsHistogramOption[];
  title?: string;
  to: number;
  updateDateRange: (min: number, max: number) => void;
}
```
##### Light Theme:
![de_hist_light](https://user-images.githubusercontent.com/2946766/71299977-41685800-234e-11ea-93bd-05a0c4cb6ee1.gif)

##### Dark Theme:
![de_histogram_dark](https://user-images.githubusercontent.com/2946766/71299980-45947580-234e-11ea-9d26-380bae5c4aa6.gif)


##### Overview:

Example props for overview impl:

``` jsx
<SignalsHistogramPanel
  filters={filters}
  from={from}
  loadingInitial={loading}
  query={query}
  showTotalSignalsCount={true}
  showLinkToSignals={true}
  defaultStackByOption={{
    text: 'Signals count by MITRE ATT&CK category',
    value: 'signal.rule.threats',
  }}
  legendPosition={'right'}
  to={to}
  title="Signals count by MITRE ATT&CK category"
  updateDateRange={updateDateRangeCallback}
/>
```
![image](https://user-images.githubusercontent.com/2946766/72030438-2fd7e900-3246-11ea-8404-40905ca5f85c.png)


Note @andrew-goldstein @angorayc @MichaelMarcialis -- looks like the MITRE ATT&CK Tactics are stored as a nested object in `signal.rule.threat`, so we may have to do some finangling to get it to show on the histogram. 

e.g. format:

``` json
{
  "framework": "MITRE ATT&CK",
  "tactic": {
    "id": "TA0010",
    "reference": "https://attack.mitre.org/tactics/TA0010",
    "name": "Exfiltration"
  },
  "techniques": [
    {
      "id": "T1002",
      "name": "Data Compressed",
      "reference": "https://attack.mitre.org/techniques/T1002"
    }
  ]
}
```




### 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)
- [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)
- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials
  * Will work with @benskelker on any specific documentation
- [ ] [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)~
2020-01-09 17:52:57 -07:00
Frank Hassanabad 68883c6333
[SIEM][Detection Engine] pre-packaged rule changes and addition of one new rule
## Summary

pre-packaged rule changes and addition of one new rule

### 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~~

~~- [ ] [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)~~
2020-01-09 17:17:34 -07:00
Frank Hassanabad 7eb88c4d13
[SIEM][Detection Engine] Import/Export REST endpoints (#54332)
## Summary

* Adds Import and Export REST endpoints
* Fixes minor misc issues with types
* Changes camel case from bulk api to become snake_case

For the API and testing it is very similar to the saved objects API

For import:

```ts
POST /api/detection_engine/rules/_import
```

With a ndjson body of:

```ts
{"created_at":"2020-01-09T01:38:00.740Z","updated_at":"2020-01-09T01:38:00.740Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"6688f367-1aa2-4895-a5a8-b3701eecf57d","immutable":false,"interval":"5m","rule_id":"query-rule-id-1","language":"kuery","output_index":".siem-signals-frank-hassanabad-default","max_signals":100,"risk_score":1,"name":"Query with a rule id Number 1","query":"user.name: root or user.name: admin","references":[],"severity":"high","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threats":[],"version":1}
{"created_at":"2020-01-09T01:38:00.745Z","updated_at":"2020-01-09T01:38:00.745Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"7a912444-6cfa-4c8f-83f4-2b26fb2a2ed9","immutable":false,"interval":"5m","rule_id":"query-rule-id-2","language":"kuery","output_index":".siem-signals-frank-hassanabad-default","max_signals":100,"risk_score":2,"name":"Query with a rule id Number 2","query":"user.name: root or user.name: admin","references":[],"severity":"low","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threats":[],"version":1}
{"exported_count":2,"missing_rules":[],"missing_rules_count":0}
```

If you want to overwrite existing objects you can use the overwrite query parameter like so:

```ts
POST /api/detection_engine/rules/_import?overwrite=true
```

See and run the scripts of:
```ts
import_rules.sh
import_rules_no_overwrite.sh
```

For exporting everything:

```ts
POST /api/detection_engine/rules/_export
```

For exporting just a handful of things you would send a body like so:

```ts
POST /api/detection_engine/rules/_export
{
  "objects": [
    {
      "rule_id": "query-rule-id-1"
    },
    {
      "rule_id": "query-rule-id-2"
    }
  ]
}
```

To change either the filename of the file that gets downloaded or to remove the extra appended export details you can do the following:

```ts
POST /api/detection_engine/rules/_export?exclude_export_details=true&file_name=my_file.ndjson"
```

See the scripts of:
```ts
export_rules.sh
export_rules_by_rule_id.sh
export_rules_by_rule_id_to_file.sh
export_rules_to_file.sh
```

### 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

~~- [ ] 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)
2020-01-09 17:16:45 -07:00
Patrick Mueller 5853360d75
pass more alert info into alert executor (#54035)
resolves https://github.com/elastic/kibana/issues/50522

The alert executor function is now passed these additional alert-specific
properties as parameters:

- spaceId
- namespace
- name
- tags
- createdBy
- updatedBy
2020-01-09 18:14:53 -05:00
Phillip Burch 32e61592ec
Remove graphql types (#54176)
* Fix server types

* Remove graphql types from the frontend

* More type cleanup

* Replace more types. Delete unused files

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-09 17:09:57 -06:00
Justin Kambic 6826368842
Add separate describe blocks for different functional test data sources. (#54395) 2020-01-09 16:26:35 -05:00
Chris Roberson dfac5d894e
[Monitoring] Ensure setup mode work in a ccs environment (#54361)
* Ensure setup mode work in a ccs environment

* Missed this file
2020-01-09 13:14:05 -05:00
Joe Portner 719ff259fc
Add support for certificates in PKCS#12 (P12) key stores (#53810)
Kibana now supports the usage of PKCS#12 (P12) key stores and trust stores for certificates and keys.
2020-01-09 13:03:16 -05:00
Chris Cowan a6605f21cc
[Metrics UI & Logs UI] Deprecate the override fields in settings (#54206) 2020-01-09 10:59:16 -07:00
Shahzad 31a0bfd540
[Uptime] Monitor details page left side title (#53529)
* update API

* update query

* hide layer control and added loc tags

* update test

* remove unused comment

* update API

* remove capitalization

* style fix

* update types

* added location status number on details page

* useref instead of createRef

* update interface

* update import

* removed redundant file

* fix header for empty data

* refactor for most recent check

* remove redundant code

* remone unused translation

* update status bar

* update styling

* update snaps

* added API tests

* fix types

* fixing integration tests and a typo

* remove unused translations

* update tests

* fixed PR feedback

* update feedback

* update messaging

* update snap

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-09 18:23:44 +01:00
Tim Sullivan c2362d4807
[Reporting] Update some runtime validations (#53975)
* [Reporting] Update some runtime validations

* fix unit test

* i18n

* make warning logging of encryptionKey possible

* update snapshot

* revert unrelated config change
2020-01-09 10:13:22 -07:00
Pedro Luiz Cabral Salomon Prado 599a470f54 Added space char (#49997)
added space to improve readability

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-09 10:10:55 -06:00
cachedout 459cad534c
[Monitoring] h1 elements for accessibility (#52276)
* Add header element to indices page for WCAG

* Add h1 element for WCAG to node page

* Add h1 element for WCAG to stack monitoring overview page

* Add h1 to advanced nodes page in stack monitoring

* Add h1 to nodes page in stack monitoring

* Add h1 header for index advanced page in stack monitoring

* Standarize more on ide for h1 tag

* Give heading element to beats overview

* Update Beats listing page for H1 compat with WAVE

* Modified beat page to comply with heading rules from WCAG

* Kibana instance listing page updated for header WCAG

* Add WCAG header fix to logstash listing page

* Added headings for WCAG to logstash overview page

* Update pipeline listing page for WCAG A headings

* Fix WCAG heading problems in pipeline viewer

* Fix screen reader heading for APM overview page

* Update APM instances page for screen reader headings

* Update APM instance page for screen reader heading

* Update ccr page for screen reader headings

* More a11y fixes for headings in stack monitoring

* Fixup

* Consistant captalization per review

* Removed help text per review comment

* Include Elasticsearch node into screen reader message, per review feedback

* Update snapshots

* Linting

* Implement review suggestion for i8n compat

* Revert back to just plain string

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-09 15:30:58 +00:00
James Gowdy 36abed3496
[ML] Categorization wizard (#53009)
* [ML] Categorization wizard

* fixing js prettier issues

* adding basic category field validation

* adding rare or count selection

* fixing types

* category examples changes

* improving results search

* adding analyzer editing

* improving callout

* updating callout text

* fixing import path

* resetting cat analyser json on flyout open

* disabling model plot by default

* minor refactoring

* fixing types

* hide estimate bucket span

* setting default bucket span

* removing ml_classic workaround

* changing style of detector selection

* fixing convert to advanced issue

* removing sparse data checkbox

* changes based on review

* use default mml

* fixing job cloning

* changes based on review

* removing categorization_analyzer from job if it is same as default

* fixing translations

* disabling model plot for rare jobs

* removing console.error in useResolver
2020-01-09 15:21:40 +00:00
Nathan L Smith 9befff1236
[APM] Fix service map license check and controls (#54286)
* Check for a trial license as well as platinum when loading the map
* Increase the z-index of the controls so clicking on them works
* Rename the styled component to `ControlsContainer` from `Container` to make a less ambiguous class name on the element
2020-01-09 09:03:50 -06:00