Commit graph

30257 commits

Author SHA1 Message Date
Chris Cowan
0e09e5f455
[Metrics UI] Fix Metrics Explorer exception when deleting metric (#55893) 2020-01-24 15:44:04 -06:00
Xavier Mouligneau
459b8c4df8
[SIEM] Detections bugs rules (#55885)
* Fix flow of all rules

* fix the multitude http request + fix table timeline re-rendering

* Update x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx

Co-Authored-By: Garrett Spong <spong@users.noreply.github.com>

Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
2020-01-24 16:42:53 -05:00
Frank Hassanabad
5801de0800
[SIEM][Detection Engine] critical blocker, fixs broken rules versioning
## Summary

* Fixes broken rules versioning
* Fixes unit tests

Implementation is more safe in that it ensures that if you have a factory/immutable rule it will do an early bail out unless the immutable rule is asking for a version change from the file system.

If it's not an immutable it will still _not_ bump the version number if it is a change to the enabled/disabled only.

Testing:
---

* Test that if you enable either a factory or non-factory rule it does not bump the version number. 
* Test that if you go to an immutable rule on the file system and bump the version number on the file system and reinitialize it either through the UI or backend scripts then it will bump the version number.
* Test that if you update a non-factory rule then it does auto-increment the version number.

Things to look out for
---
Did I forget to whitelist anything in the code that would cause it to _not_ bump the version number for some reason?

## 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-24 13:54:07 -07:00
Mike Côté
4db0382259
Update CONTRIBUTING.md --ssl documentation to mention it covers Elasticsearch as well (#55876)
* Update CONTRIBUTING.md to mention --ssl flag works with Elasticsearch as well

* Change while to for
2020-01-24 15:35:04 -05:00
Wylie Conlon
25765a9d36 [Canvas] Improve expression autocomplete (#52035)
* [Canvas] Autocomplete improvements

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Poff Poffenberger <poffdeluxe@gmail.com>
2020-01-24 13:04:34 -06:00
Jamie Smith
7165b26b51
fix URL for handlebar docs for markdown, and make sure they are https (#55866) 2020-01-24 13:58:31 -05:00
Ryland Herrick
157ed3945b
[Fix] Hide timeline and ML Popover when SIEM has no data (#55754)
* Hide ML Popover when SIEM index DNE

* Hide timeline when SIEM has no data

In cases where there's nothing to inspect (i.e. the user hasn't
populated data), we don't want to show them the mostly inert timeline.

* Update snapshot for header

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-24 12:37:44 -06:00
Dima Arnautov
510587e431
[ML] Fix Anomaly Explorer swimlane tooltip issue (#55827)
* [ML] check drag start element

* [ML] remove conditional chaining from js
2020-01-24 18:51:25 +01:00
Mike Côté
ea3aa9c9b1
Fix skipped alerting UI tests (#55058)
* Fix skipped alerting UI tests

* Fix switch click to use new pageobject function

* Use .click function directly instead of find then click

* Merge state variables into one for alerts and alert types

* Fix flaky tests by fixing react code

* Could this be it?? The one thing missing that caused all this flakiness??

* Cleanup convertAlertsToTableItems function

* Remove I from interface names, fix disabled boolean logic

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-24 12:50:22 -05:00
Andrew Cholakian
06aeb8196f
[Uptime] Expand timespan range to fix missing data in UI (#55250)
* [Uptime] Expand timespan range to fix missing data in UI

With a short timespan range of 10s as originally here we can miss data
in the case of long refresh intervals in ES or other delays in data
coming from heartbeat to ES. If data is more than 10s stale we show
empty screens. Expanding this to 5m provides most of the performance
benefits and also quite a bit of safety in terms of delays. It lets
users query very large timespans (say a year), and still only really
query 5m of data, keeping the general purpose of this perf enhancement
going.

* Remove unnecessary complexity

* Revert "Remove unnecessary complexity"

This reverts commit 97c74804f4.

* Check for data rather than field

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-24 10:07:49 -07:00
Gidi Meir Morris
bb29cec20b
fixes shared types across alerting plugins (#55824)
This addresses two issues that have come up:

Alerting and Actions have TypeScript types that are needed across server and public plugins, and need to be extracted to a common path (thanks @chrisronline for bringing this to our attention)
Due to the above, types have been duplicated between the alerting and actions when needed in the Alerting UI, which has led to them diverging. This forces the UI to type check against the API, which will help reduce these errors in the future.
2020-01-24 17:06:59 +00:00
Chris Mark
943e450ead
Add dashboard in Stan kibana tutorial (#55837) 2020-01-24 18:16:31 +02:00
Thomas Neirynck
837c9092e3
[Maps] Should be able to open layer settings from add layer wizard 2020-01-24 10:59:08 -05:00
Thomas Neirynck
5c19f9db4e
[Maps] Do not mutate state in resetDataRequest (#55624) 2020-01-24 10:58:14 -05:00
Jean-Louis Leysens
f7c53b5690
Disallow importing Joi client side (#55018)
* Disallow importing Joi client side

* Move elasticsearch lib into server folder

* Add a comment about the 'joi' eslint rule

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-24 15:38:44 +01:00
Jean-Louis Leysens
b8f774866c
[SearchProfiler] Fix handling of bad profile data and update tab behaviour (#55806)
* Fix searchprofiler's ability to handle badly formed profile data
Also fix tab changing upon subsequent requests

* Fix comment typo
2020-01-24 15:37:03 +01:00
Nick Partridge
2eb6a2f3bc
Move response handlers into plugins (#55489)
* Duplicate and move response handlers into resp directories
* Fix agg_table mocha test failures
2020-01-24 08:24:19 -06:00
Dario Gieselaar
b39076e2bd
[APM] Treat error.exception.stacktrace.line as optional (#55733) 2020-01-24 14:31:51 +01:00
Shahzad
6beb2b2c06
fix refresh pause (#55499)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-24 13:47:14 +01:00
Andrew Goldstein
b9cd82d9d1
[SIEM] Security news feed (production) URL (#55811)
## [SIEM] Security news feed (production) URL

* Replaces the placeholder SIEM `News feed URL` setting `siem:newsFeedUrl`, with the production URL: `https://feeds.elastic.co/security-solution`

### Security news in the SIEM Overview Page (default theme)

![security-news-default](https://user-images.githubusercontent.com/4459398/73054746-64ec5a00-3e48-11ea-9dad-033a70ef00df.png)

### Security news in the SIEM Overview Page (dark theme)

![security-news-dark](https://user-images.githubusercontent.com/4459398/73054754-6c136800-3e48-11ea-8ab3-cf64e8ad9dbc.png)

### New default advanced setting

![siem-advanced-settings](https://user-images.githubusercontent.com/4459398/73054814-982ee900-3e48-11ea-8d12-4291b79dfe5d.png)

* We now handle a special case where in some environments, the version reported by Kibana includes `-SNAPSHOT` in the version, e.g. `8.0.0-SNAPSHOT`, which was resulting in an invalid feed URL (cc @tsg)

* Improves code coverage

* Desk-tested additional news feed translations

![translations](https://user-images.githubusercontent.com/4459398/73058250-7b96af00-3e50-11ea-9b7b-8cf1a9264f8c.png)
2020-01-24 05:32:25 -07:00
James Gowdy
47bfd11dd1
[ML] Adding text fields to datafeed start modal (#55560)
* [ML] Adding text fields to datafeed start modal

* updating strings

* fixing issue with date text being out of sync

* moving tab check to useEffect
2020-01-24 12:15:52 +00:00
Jean-Louis Leysens
6984cf1711
Move SplitPanel to kibana_react (#55529)
* split_panel component -> kibana_react

* Update useEffect for console warning

* `console` -> `kibana-react` i18n namespace

* Update when warning about children is emitted in split panel component

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-24 13:10:59 +01:00
Jean-Louis Leysens
43a7aa7fc0
[Console] Remove z-index from editor panes and move it to the resizer (#55813)
* Remove z-index from editor panes and move it to the resizer

* Update comment
2020-01-24 12:26:25 +01:00
Walter Rafelsberger
fee22e8d94
[ML] Anomaly Explorer: Fix view by selection when filter is active. (#55717)
Fixes the view-by selection when a KQL filter gets active and restores previous behavior:
- If the filter includes AND view-by switches to Job ID.
- Otherwise the view-by selection switches to the first available option present in the KQL filter
- Additionally, the view-by dropdown options get filtered down to the options present in the KQL filter
2020-01-24 11:25:55 +01:00
Walter Rafelsberger
ef4b395873
[ML] Singel Metric Viewer: Fix full refresh check. (#55726)
Fixes the check whether to do a full refresh of the page or not. lastRefresh was mistakenly part of the check. This fixes keeping the flyout open for rules editing.
2020-01-24 11:22:31 +01:00
Alejandro Fernández
d40269c748
Fix the scale of the search markers (#55731)
The search markers where placed on the minimap using a different scale
than the density chart and time ruler. That made the log stream jump to
unexpected time positions when the user clicked on a search marker.

This also fixes an problem where the search markers didn't move
alongside the rest of the minimap when the user dragged and dropped it.
2020-01-24 11:16:11 +01:00
Sébastien Loix
d3151327de
Fix text highlight in search result (#55695) 2020-01-24 14:52:46 +05:30
Shahzad
d25d1bd84e
[Uptime] Clean Url to remove undefined/empty query params (#55386)
* fix usage of useParams

* update code

* update defaults

* update snaps
2020-01-24 09:13:17 +01:00
Maryia Lapata
14a559bfc4
[Discover] DocViews uses local angular (#55389)
* DocViews uses local angular

* Clean up

* Create embeddableInjector only when it's used

* Revert occasional changes

* Update unit test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-24 10:45:46 +03:00
Mikhail Shustov
2f1628784a
[NP] add platform main principles (#53866)
* add platform main principles

* update docs

* unify styles

* remove guidelines. principles should cover this

* Apply suggestions from code review

Co-Authored-By: Josh Dover <me@joshdover.com>

* Apply suggestions from code review

Co-Authored-By: Rudolf Meijering <skaapgif@gmail.com>

* address comments

Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
2020-01-24 07:54:06 +01:00
spalger
e67cc8514a Revert "[csp] allow blob styles when running from source (#54991)"
This reverts commit 375f0b42a7.
2020-01-23 23:32:10 -07:00
Matthias Wilhelm
ac0953e08b
[Discover] Change default sort handling for index patterns without timefield (#54427)
Default sort is no longer in state. There's now a separate function to provide default sort for ES and UI, in case the user didn't actively select a field to sort by
2020-01-24 06:23:53 +01:00
patrykkopycinski
1e91775a7f
[SIEM] Overview Page - Expand Winlogbeat Stats (#55696) 2020-01-24 00:11:13 +01:00
Peter Schretlen
e39ef65c4c
Add developer docs for built-in pagerduty and webhook actions. Add TOC. (#55352) 2020-01-23 17:00:14 -05:00
Brian Seeders
6fcf3f0005
Skip flaky custom appRoute tests 2020-01-23 16:58:13 -05:00
Thomas Neirynck
5a15ad123d
[Maps] use style-prop methods to determine state (#55607) 2020-01-23 15:56:11 -05:00
Anton Dosov
5daed94c30
[Filters] Incorrect result, when calling setFilters() with multiple duplicates between app and global filters (#55591) 2020-01-23 21:45:11 +01:00
Tim Sullivan
e102ae673c
[Reporting/New Platform] Use the logger service from core (#55442)
* More Typescript Fixes

* [Reporting/New Platform] Use the logger service from core

* Add log tag

* fix jest tests

* ts fixes

* fix mocha test

* convert to jest
2020-01-23 13:40:05 -07:00
Wylie Conlon
cda6b13f23
[Lens] Fix regression in field list for beats (thousands of fields) (#55625)
* [Lens] Fix regression in field list for beats

* Add api test
2020-01-23 14:52:43 -05:00
patrykkopycinski
d97526e88c
[SIEM] Attach VisibilitySensor to the TimelineBody instead of window (#55620) 2020-01-23 20:01:10 +01:00
Thomas Watson
bb30bb4fd4
Update .github/CODEOWNERS (#55728) 2020-01-23 19:07:40 +01:00
Joe Reuter
38fd963ed3
Timelion api migration (#53005) 2020-01-23 18:19:33 +01:00
Walter Rafelsberger
a4cf4f4b75
[ML] Single Metric Viewer: Fix zoom on forecast selection. (#55685)
Fixes adjusting the focus chart zoom range when a forecast gets selected. The code is cleaned up so appStateHandler to set the zoom range in the url is only called in one place within contextChartSelected().
2020-01-23 17:16:09 +01:00
Matthew Kime
0c25cb53b2
Advanced Settings management => typescript (#54477)
* advanced settings => typescript
2020-01-23 09:21:46 -06:00
Jimmy Kuang
3d59414038 [ILM] Index Lifecycle Policies show wrong unit in Kibana UI (#55228)
* Added timing and byte size units to hot, cold, warm, and delete phase
2020-01-23 07:14:35 -08:00
Chris Mark
63d3cbc941
Add Kibana tutorial for Statsd Metricbeat module (#55700) 2020-01-23 17:09:36 +02:00
Eli Perelman
fe5e470aae
Explicitly test custom appRoutes (#55405)
* Explicitly test custom appRoutes

* Extract common navigation function
2020-01-23 09:08:13 -06:00
Dima Arnautov
a895977aca
[ML] fix chartTooltip$ observable usage (#55694) 2020-01-23 15:49:54 +01:00
Joe Reuter
841afe32fc
exclude tutorials from code ownership (#55705) 2020-01-23 15:39:43 +01:00
Jean-Louis Leysens
bb37b0f613
[Watcher] Move out of legacy (#54752)
* Moved out of legacy folder

* First iteration of watcher plugin that renders

* Move create Timebuckets to plugin root
Update route registration and fix license checking for NP

* Re-enable Component integration tests

* Minor fix for data deserializer in api.ts

* Slight logic refactor, more defensive plugin startup

* Re-add legacy folder for SCSS pipeline

* Remove duplicate style sheet

* Fix type issue with TimeBuckets export

* Update license management routing logic (issued warning for using basepath on navigating away from license management)
Remove commented out code in watcher

* More defensive plugin registration

* Fix i18n issues and restore registration of feature on home view

* Remove watcher license error check copy

* Restore license error message in watcher

* Fix mock context value

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-23 15:35:36 +01:00