Commit graph

6614 commits

Author SHA1 Message Date
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
Andrew Cholakian 2d15b8c82b
[Uptime] Improve query performance with Heartbeat 7.6+ data. (#52433)
This PR optimizes both the snapshot component and the monitor list on the overview page by using the new monitor.timespan field from elastic/beats#14778. Note that the functionality here will work with heartbeats lacking that patch, but the performance improvements will be absent.

This PR adapts the snapshot tests to use synthetically generated data which should be easier to maintain. As a result some of that code is refactored as well.

See #52433 parent issue as well.
2020-01-09 08:36:31 -06:00
DeFazio 4466059327
[ML] Updates Anomaly Detection job wizard button styles, page panel and titles (#53340)
* Update button styles, page panel and page title

* Add getJobCreatorTitle function for human readable job type name

* Add formatMessage to Create job title

* Fix translation test

* Update tests
2020-01-09 08:46:46 -05:00
Ahmad Bamieh a27c4c4a4e
[Telemetry] [Monitoring] Only retry fetching usage once monito… (#54309)
* fix interval and add tests

* Update x-pack/legacy/plugins/monitoring/server/kibana_monitoring/bulk_uploader.js

Co-Authored-By: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>

Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
2020-01-09 02:55:17 +02:00
Xavier Mouligneau 1e2cbb3710
[SIEM] Detection engine timeline (#53783)
* change create to only have only one form to be open at the same time

* add tick to risk score

* remove compressed

* fix select in schedule

* fix bug to not  allow more than one step panel to be open at a time

* Add a color/health indicator to severity selector

* Move and reword tags placeholder to bottom helper text

* fix ux on the index patterns field

* Reorganize MITRE ATT&CK threat

* add url validation + some cleaning to prerp work for UT

* add feature to get back timeline + be able to disable action on timeline modal

* Add option to import the query from a saved timeline.

* wip

* Add timeline template selector

* fix few bugs from last commit

* review I

* fix unit test for timeline_title

* ui review

* fix truncation on timeline selectable
2020-01-08 19:32:10 -05:00
Matthew Kime 9282f19bf5
Management - New platform api (#52579)
* implement management new platform api
2020-01-08 17:43:10 -06:00
Phillip Burch e1e1d964c6
Reset region and Account when switching inventory (#54287) 2020-01-08 16:37:37 -06:00
Steph Milovic 303e4842ea
[SIEM] [Case] Case workflow api schema (#51535) 2020-01-08 14:28:29 -07:00
Dmitry Lemeshko 26ce6104a9
Code coverage setup on CI (#49003)
* running code coverage in CI

* apply review feedback

* add custom function to upload merged coverage reports

* fix artifacts upload without coverage

* add file extension to fix validation

* Check code_coverage is set

* run oss tests via grunt task

* review fixes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 21:08:48 +01:00
Melissa Alvarez e93c6b8d1a
[ML] DF Analytics Results: adds link to docs (#54189)
* add doc links to evaluate panel for analytics jobs

* fix confusion matrix dataGrid label

* internationalize link text
2020-01-08 15:07:14 -05:00
Joe Portner bbe700d797
Update schemas boolean, byteSize, and duration to coerce strings (#54177)
* Update Duration to coerce number strings to numbers (in millis)

* Coerce in a way that's consistent with kbn-config-schema

* Update ByteSizeValue to coerce strings to numbers

* Update Boolean to coerce strings to boolean values

* Fix Jest test

* Address PR review feedback

* Whoops

* Whoops 2

* Whoops 3
2020-01-08 14:48:00 -05:00
Zacqary Adam Xeper 8edb53ddbc
[Metrics UI] Pass relevant shouldAllowEdit capabilities into SettingsPage (#49781)
* [Metrics UI] Pass relevant shouldAllowEdit capabilities into SettingsPage

* Split settings pages in two; add loading screen to settings page

* Restore timestamp field to metrics screen

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 13:46:01 -06:00
Corey Robertson 89e4daf5bd
[Canvas] Fixes bugs with autoplay and refresh (#53149)
* Fixes bugs with autoplay and refresh

* Fix typecheck

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 14:16:31 -05:00
Melissa Alvarez fc948a0c8e
[ML] DF Analytics Classification: ensure confusion matrix can be fetched (#53629)
* check depVar field type before adding keyword suffix for evaluate endpoint

* update indexPattern type and use FIELD types

* add keyword suffix if field type is keyword

* keyword suffix added if depVar is of type keyword AND text
2020-01-08 13:38:34 -05:00
patrykkopycinski 8e0e4948d5
[SIEM] Fix columns in timeline do not resize (#51816) 2020-01-08 16:33:51 +01:00
Aleh Zasypkin 63ac99b3aa
Re-enable OIDC API integration test. (#54111) 2020-01-08 15:59:06 +01:00
Justin Kambic a93c23cd56 Reorganize structure of component render to avoid errors. (#54251) 2020-01-08 15:53:49 +01:00
Aaron Caldwell 683c138798
Add file upload to telemetry integration tests (#53539)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 07:26:54 -07:00
Xavier Mouligneau 6abfbd1382
filters are back (#54218) 2020-01-08 08:58:44 -05:00
Tim Schnell 3b5a90b51c
fix ecommerce percentages in sample data (#54200) 2020-01-08 07:41:52 -06:00
Ahmad Bamieh 392e62a4de
[Telemetry] Fix license page crashing on telemetry.enabled: fa… (#54174) 2020-01-08 13:31:07 +02:00
Alexey Antonov 71ff2de7e1
[ui/public/utils] Copy rarely used items to where they are consumed (#53819)
* [ui/public/utils] Copy rarely used items to where they are consumed

Closes: #52841

* sort_prefix_first 👉x-pack/legacy/plugins/kuery_autocomplete

* numeric 👉src/legacy/core_plugins/kibana/public/management

* diff_object + tests 👉ui/state_management

* function + tests 👉ui/state_management (function.js was removed!)

* key_map 👉ui/directives

* leastCommonMultiple 👉ui/vis

* string_utils 👉ui/saved_objects

* collection

* parse_interval

* it -> test

* fix CI

* fix PR comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 13:15:54 +03:00
Mikhail Shustov 56041f03ad
Don't expose Elasticsearch client as Observable (#53824)
* expose ES clients without observables

* expose observable-less api to plugins

* update core api and mocks

* update plugins

* NP SO & legacy use updated API

* update SO tests

* update TSDocs

* update types

* update docs

* document createCluster analog in np

* typo
2020-01-08 12:01:47 +03:00
patrykkopycinski 8eb000d629
[SIEM] Cleanup unnecessary use of enzyme-to-json (#53980) 2020-01-08 09:28:38 +01:00
Ryan Keairns 0d11ec7729
change markdown element title (#54194) 2020-01-07 17:26:36 -06:00
Zacqary Adam Xeper f5448bd9f4
[Logs UI] Refactor log position to hooks (#53540)
* Move URL state to hook

* Fix log filter URL state infinite loop

* Initial refactor of log position to hooks

* Simplify and reimplement controlsShouldDisplayTargetPosition

* Fix live streaming

* Flatten logposition destructuring

* Revert "Move URL state to hook"

This reverts commit 4e04aa061d.

# Conflicts:
#	x-pack/legacy/plugins/infra/public/containers/logs/log_filter/use_log_filter_url_state.tsx
#	x-pack/legacy/plugins/infra/public/pages/logs/stream/page_providers.tsx

* Fix unused imports

* Fix link-to test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-07 16:38:25 -06:00
Ryland Herrick b7a534b1b1
[SIEM] Implement NP Plugin Setup (#54030)
* Set up our react app in the NP way

* Defines the setup() method for our UI plugin
* Renders the app in the NP way within our setup() method
* Defines a legacy file that invokes the plugin manually

Things seem to be mostly working; the app mounts with no immediate
errors, at least.

* Move files into NP structure

Our plugin function and class are both direct children of siem/public.
The app folder contains both our React app and the function to render
it.

* Register SIEM in the feature catalogue via NP format

Unfortunately, this can't live in the plugin for now because it doesn't
get invoked when we need it. For now, it's going to live in the same
spot, and once we're a real NP plugin we can move it.

* Eliminate usage of timezoneBrowser UI setting

This seems to be redundant with dateFormat:tz except that it always
returns a real timezone, not just a preference. By wrapping that logic
in our own hook, useTimeZone, we can remove this weird usage and stick
to the standard dateFormat and dateFormat:tz.

* Clean up tests for FormattedDate components

Mocks our simpler wrapping hooks rather than the entire UI Settings
module.

* Remove remaining uses of UI Settings mocks

These remaining tests can mock settings directly, or otherwise were
misusing the settings mocks to retrieve assertion values.

* Remove unnecessary intermediate `describe` blocks

They were not adding any information to the tests.

* Remove use of kibana version in client requests

We were previously passing this version all over the place for the sake
of our framework-specific request header. The sole advantage of supplying
such a header is that the client will receive an informative error modal
in the case of a version mismatch between the client and server.

We can successfully perform these requests with the `kbn-xsrf` header
instead. Long-term, we can use core.http.fetch to perform the requests
and auto-populate the version header, but it would be nicer to abstract
those requests to the framework level rather than threading the HTTP
client throughout the application.

* Remove newly added uses of kbnVersion

These happened on master in the meantime.

* Use helper to generate test assertion

Allows us to change the implementation of the empty string without
breaking the test.

* Remove guard from date formatting component

We're always going to get back usable values from these hooks; while the
user can unset the dateFormat in their settings, we'll still get an
empty string which is effectively the same as no formatting (as
evidenced in the tests).

* Remove default from byte formatting component

If the user has deleted this default, they presumably meant to do so and
we shouldn't supersede it.

* Refactor bytes formatting to allow use in our charts

We need a formatting function to use with our charts, so this splits out
a hook from the original react component, allowing our charts to be
formatted as specified in the user's UI settings.

* Refer to our constant for APP_ID

* Explicit return values for some UI Settings hooks

This forces accidental changes to the return value to be explicit.

* Remove use of ui/chrome in request header

This is an unnecessary use: kibana works the same no matter what
contents the `kbn-xsrf` header contains (as long as it's there).

* Mock UI Settings values in our TestProvider

When using our TestProvider components, we were previously relying on
platform's UISettings mocks instead of our own, more comprehensive ones.
This worked for the most part, and when we needed real settings we would
mock the UI Settings client manually.

When we removed some app code that defaulted UI Settings values when the
client did not return a value, tests that used TestProviders but also
relied on those defaults broke. This adds that behavior back,
and obviates the need for manual calls to jest.mock except when we're a)
not using TestProviders but b) overriding the platform mocks.

Also removes some of those unneeded uses.

* Remove unused import

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-07 13:20:57 -08:00
Lisa Cawley ae1fac4fe5
[DOCS] Updates ML links (#53613) 2020-01-07 13:07:24 -08:00
Larry Gregory 03ec7af044
Spaces - fix flakey api tests (#54154)
* adding terms query

* run x-pack-ciGroup8 44 times

* Revert "run x-pack-ciGroup8 44 times"

This reverts commit 7d10217c2b.
2020-01-07 14:50:02 -05:00
Justin Kambic 7b33fd318c
Remove dependency that was causing effect to re-execute infinitely. (#54160) 2020-01-07 14:20:02 -05:00
patrykkopycinski 0308c9d8ca
[SIEM] Cleanup React imports (#53981) 2020-01-07 19:30:37 +01:00
renovate[bot] 49d6a45788 Update eslint related packages (#54107) 2020-01-07 19:08:36 +01:00
Shahzad 334dff37d4
[Uptime] Added date range filter into expanded list query (#52609)
* added filters into expanded list query

* update filters

* update query

* update snap

* update tests

* update filters

* update test

* remove side effect

* ignore typcehck

* update to remove location filter from query

* update filter groups

* remove code

* update test
2020-01-07 18:47:00 +01:00
patrykkopycinski 23a0513469
[SIEM] Add react/display-name eslint rule (#53107) 2020-01-07 18:05:04 +01:00
patrykkopycinski 677670b929
[SIEM] Enable eslint prefer-template rule (#53983)
* [SIEM] Enable eslint prefer-template rule

* cleanup

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-07 18:02:32 +01:00
patrykkopycinski 6e1328b9f0
[SIEM] Enable eslint react/no-children-prop (#53985) 2020-01-07 17:46:56 +01:00
Chris Roberson 28b6efa260
Fix linting issues (#54068)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-07 11:31:15 -05:00
Joe Reuter c02531a494
NP Migration: Move doc views registry and existing doc views into discover plugin (#53465) 2020-01-07 16:53:16 +01:00
Melissa Alvarez 865462a259
[ML] DF Analytics job creation: Add 'excludes' input field to form (#53856)
* Add exclude fields input to df analytics creation form

* rename explain api endpoint to general explainDataFrameAnalytics

* wip: use explain api for exclude fields

* show error message if classification depVar has cardinality of > 2

* update types

* updates after conflict resolution

* prevent creation if more than 2 distinct classes for class job. create form field validation file
2020-01-07 10:46:32 -05:00
nnamdifrankie 6a2fb61ae5
EMT-issue-65: add endpoint list api (#53861)
add endpoint list api
2020-01-07 09:59:11 -05:00
patrykkopycinski f46e8e2f0b
[SIEM] Fix doubled drag handles in Timeline (#52679) 2020-01-07 15:56:13 +01:00
Dmitry Lemeshko a1176b0e4a
Functional tests: refactor visualize_page (#53845)
* add new POs and services

* split visualize_page

* refactor PO and tests

* lost changes

* more fixes

* fix tslint error

* refactor POs

* add vega_chart_page, refactor

* review fix

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-07 15:42:20 +01:00
Dima Arnautov 8ac233f303
[ML] Support search for partitions on Single Metric Viewer (#53879)
* [ML] agg for partition field values

* [ML] change api

* [ML] load entity values

* [ML] check for partition field names

* [ML] wip

* [ML] refactor api

* [ML] debounce input

* [ML] remove Record, improve types, fix typo

* [ML] jobId as dedicated param, jsdoc comments

* [ML] result_type term based on model plot config

* [ML] remove redundant criteria for job id

* [ML] refactor getPartitionFieldsValues to TS

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-07 06:14:32 -08:00
Dima Arnautov 54b2f148e3
[ML] persist the brush when expanded to full width (#54020) 2020-01-07 04:55:44 -08:00
Alejandro Fernández 3953c9020e
Skip failing test (#54100)
ES behaves differently in master and in 7.x, causing the test to fail in
the latter.
2020-01-07 13:29:35 +01:00
Cauê Marcondes 58cb24a7e6
[APM] Show errors on the timeline instead of under the transaction (#53756)
* creating error marker and refactoring some stuff

* styling popover

* adding agent marks and errors to waterfall items

* adding agent marks and errors to waterfall items

* adding agent marks and errors to waterfall items

* fixing tests and typescript checking

* refactoring helper

* changing transaction error badge style

* adding unit test

* fixing agent marker position

* fixing offset when error is registered before its parent

* refactoring error marker

* refactoring error marker

* refactoring error marker

* refactoring error marker

* refactoring error marker

* refactoring waterfall helper

* refactoring waterfall helper

* refactoring waterfall helper api

* refactoring waterfall helper

* removing unused code

* refactoring waterfall helper

* changing unit test

* removing comment

* refactoring marker component and waterfall helper

* removing servicecolor from waterfall item and adding it to errormark

* fixing trace order
2020-01-07 11:56:23 +00:00
MadameSheema 7607c162fe
removes logout (#54098) 2020-01-07 12:53:58 +01:00
Jean-Louis Leysens e687fc63df
[Console] Telemetry (part 1) (#52893)
* Saving anonymised data to SO

* Add new files

* Hook up usage collector

* Added app start up ui metric tracking

* Only use client side track metrics functionality

* Added comment regarding use of `patterns`, renamed trackMetric -> trackUiMetric

* Fix jest tests

* Slight refactor and fix for functional tests. More defensive tracking logic

* Fix types in test

* Minor refactor to get endpoint description - removed SenseEditor from autocomplete.
Fix bug where cursor at end of line does not get endpoint informaiton

* Send request to es: do not mutate args
Always move cursor to end of line when getting endpoint description

* Create an interface a simple interface to the metrics tracker
Use the new createUiStatsReporter function to create the tracker

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-07 11:01:21 +01:00
Cauê Marcondes 6398e22b4f
adding message to transaction and span metadata (#54017) 2020-01-07 08:33:49 +00:00
Melissa Alvarez 9aa23410d5
convert modelMemoryLimit nums to strings before validation check (#54011) 2020-01-06 19:50:55 -05:00
Tim Sullivan fef8485f36
[Reporting/Legacy] Remove reporting legacy job params compatibility shim (#52539)
* [Reporting/Tests] consolidate functional test configs

* remove console.log

* trash

* Update

* add more to the comment

* restore historic archive for wip ui functional tests

* [Reporting/Legacy] Remove reporting legacy job params compatibility shimmy shim shim

* objectType: objectType

* fix jest test and get_urls logging

* simplify change

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 16:20:45 -07:00
Justin Kambic 9481cbf36e
[Uptime] Prefer Kibana core http services (#53726)
* Prefer Kibana core http service to other fetch functions, refactor helper functions to hooks.

* Reintroduce newline deleted in previous commit.

* Clean up obsolete import.

* Clean up effect code in new hook.

* Clean up enum usage in new hook.

* Implement PR feedback on new hook.

* Fix eslint error.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 18:00:49 -05:00
Tim Sullivan fa8da7c349
[Reporting/PDF] Refactor screenshot pipeline for multi-url by default (#48588)
* Multi-url pass to screenshotsObservable

* Restore "first" operator

* max attempt = 1 for testing

* cleanup debug

* restore more concatMap

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 14:34:27 -07:00
Tim Sullivan c9c80845d0
Check license to typescript (#52955)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 13:29:13 -07:00
Aaron Caldwell 368a894bd2
[Maps] Fix regression preventing maps telemetry from populating & remove task manager logic (#52834)
* Remove task logic. Remove server refs and revise for np. Migrate a few files to ts

* Remove unused reference

* Update mappings

* Test usage collector register

* Update api integration tests to include maps now that telemetry is 'normal' (not using task mgr state)

* Update integration test to use stack stats

* Update integration test to look for 'maps-telemetry' instead of 'maps'

* Update jest test to reflect calls to register

* Follow the same pattern as other int tests and test reliable nested attribute

* Back out np-related changes for separate PR

* timeCaptured hasn't changed but for some reason stopped working. Getting iso string fixes issue

* Back out file shuffling for separate PR

* Remove mappings updates (handled in separate PR)

* Review feedback. Move telemetry type constant to constants file

* Consolidate imports

* Linting fix

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 13:05:07 -07:00
Chris Davies f08fc201c8
Add support for scripted fields and (#53948)
default index pattern

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 14:55:51 -05:00
Nathan Reese dbe0bfdf79
[Maps] Allow editing EMS basemap selection (#53631)
* [Maps] Allow editing EMS basemap selection

* resync source data when map changes

* remove old sources and layers

* update ownsMbLayerId and ownsMbSourceId so they return true for previous sources when source changes

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 14:55:12 -05:00
Chris Davies ae8925c123
Select Records when count operation is chosen (#53911) 2020-01-06 14:54:49 -05:00
Larry Gregory 194c97f4f6
Reorganizing spaces client-side plugin (#53644)
* reorganizing spaces client-side plugin

* additional testing and cleanup

* address PR feedback

* additional cleanup

* rename scss file

* one more index
2020-01-06 14:12:07 -05:00
Chris Cowan eb5460fe66
[Metrics UI] Add AWS Cloudwatch dimensions to groups filter in Metrics Explorer (#53624)
* [Metrics UI] Adding aws.cloudwatch.* fields to group by for aws.metrics in Metrics Explorer

* Ensuring the correct module is used for the field.

* Adding a unique around the fields to prevent potential extra work

* Adding missing file

* Fixing possible missing event.dataset

* clean up for review
2020-01-06 10:31:29 -07:00
Nathan Reese 1e5135ec53
[Maps] Vector style UI redesign (#53946)
* [Maps] style editor update

* update label editor

* update size editor

* update orienation editor

* i18n cleanup

* deconstruct props

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 11:42:01 -05:00
Shahzad e4ccf19f75
[Uptime] Fix/location map hide layer view control (#53568)
* hide layer control and added loc tags

* update test

* remove unused comment

* remove capitalization

* style fix

* update types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 16:54:37 +01:00
Gidi Meir Morris 785b916917
allows Alerts to recover gracefully from Executor errors (#53688)
Prevents errors in Alert Executors from forcing their underlying tasks into a zombie state.
2020-01-06 14:52:06 +00:00
Jean-Louis Leysens 6ce2818f88
[Console] Fix OSS build (#53885)
* Move fp-ts and immer to "." package.json

* Revert "Move fp-ts and immer to "." package.json"

This reverts commit b876df0d54.

* Second attempt, fp-ts and immer -> root

* fp-ts -> 2.3.1

* Revert x-pack/package.json

* Update fp-ts in x-pack/package.json

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 15:21:44 +01:00
Gidi Meir Morris 8992a43c6e
adds strict types to Alerting Client (#53821)
The AlertsClient API currently returns mixed inferred types instead of a clear strict type, making it harder to work with the client's type signatures.
The root causes for this difficulty is that we have to support the SavedObjects API which allows partial updates of types, and the implementation of code that converts the SavedObject from a RawAlert to an Alert in a non type-strict manner.

To address this we've added concrete types on the AlertsClient APIs, using Partial on update due to the SavedObjects API, and a strict Alert on the other APIs.
2020-01-06 11:11:18 +00:00
Maja Grubic 5b2a188c43
[Dashboard] Empty screen redesign (#53681)
* Edit screen redesign

* Edit screen redesign

* Redesign view screen

* Redesign view screen

* Fixing type failure, and functional test

* Updating failing functional tests

* update dashboard empty styles

* i18n fix

* Updating failing snapshot

Co-authored-by: Ryan Keairns <rkeairns@chef.io>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 10:55:15 +00:00
Aleh Zasypkin aa38fb68a7
Migrate config deprecations and ShieldUser functionality to the New Platform (#53768) 2020-01-06 11:43:15 +01:00
Mikhail Shustov d64c4cb5fe
increase delay to make sure license refetched (#53882)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 12:24:25 +03:00
Thomas Neirynck c19151d474
[Maps] show custom color ramps in legend (#53780) 2020-01-05 20:05:47 -05:00
Maja Grubic 58da936968
[Lens] Expression type on document can be null (#53883)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-05 09:16:07 +00:00
Xavier Mouligneau a73ad23a64
[SIEM] [Detection engine] Add user permission to detection engine (#53778)
* add logic to see if we can show signals or create signal index for user

* fix unit test

* fix spelling set up

* Update msg from review

* review II

* fix type

* review III

* fix bug found by Garrett

* fix snapshot
2020-01-04 20:20:41 -05:00
Marco Vettorello 9d5603a298
Update dependency @elastic/charts to v16.0.2 (#52619) 2020-01-04 13:38:11 +01:00
Zacqary Adam Xeper a03f395b52
[Logs UI] Refactor query bar state to hooks (#52656)
* [Logs UI] Refactor query bar state to hooks

* Update typedef

* Typecheck fix

* Typecheck fix

* Simplify log filter state

* Remove WithLogFilter HOC and simplify hook further

* Rename js to ts

* Fix redirect imports

* Fix link-to test accuracy

* Fix link-to test

* Simplify destructuring signature

* Stylistic fixes

* Move URL state to hook

* Fix log filter URL state infinite loop

* Revert "Fix log filter URL state infinite loop"

This reverts commit 43302b354a.

* Revert "Move URL state to hook"

This reverts commit c61f5b190b.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-03 15:45:11 -06:00
Nathan Reese ace50d8d2b
[Maps] pass getFieldFormatter to DynamicTextProperty (#53937)
* [Maps] pass getFieldFormatter to DynamicTextProperty

* remove files from another PR
2020-01-03 14:19:19 -05:00
Mike Côté 8cc778a64a
Invalidate alert API Key when generating a new one (#53732)
* Initial work to auto cleanup old API keys

* Fix ESLint error

* Rename confusing variables

* Add test to ensure thrown errors are swallowed

* Add more tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-03 13:40:20 -05:00
Alejandro Fernández 47830c75d9
[Logs UI] HTTP API for log entries (#53798)
* Scaffold `log_entries/entries` route

* Scaffold a log entry response

* Add `after` pagination

* Add `before` pagination

* Process `query` parameter

* Use pre-existing structure for the columns

* Change type of date ranges

We will move the responsibility to parse the dates to the client. The
API will only take timestamps

* Add `center` parameter

Allows consumers of the API to get log items around a certain cursor

* Change default page size

* Test the defaults of the API

* Add optional `size` parameter

This makes easier to test the pagination. By default it returns a 200
size page.

* Test the pagination

* Test centering around a point

* Handle `0` sizes

Co-Authored-By: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Add highlights endpoint

* Refactor `processCursor`

* Tweak cursor handling in the routes

* Refine `LogEntry` type

* Add tests for highlights endpoint

* Tweak the types for the LogEntry

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>
2020-01-03 18:12:47 +01:00
Spencer 7b4278dc49
[kbn/pm] add caching to bootstrap (#53622)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-03 09:35:38 -07:00
Gidi Meir Morris d4b1966d4f
adds createdAt and updatedAt fields to alerting (#53793)
When users are writing UI's they need to see when an alert was created and when it was last updated, to this end we've added these two fields on the alert type.
2020-01-03 16:34:17 +00:00
Alison Goryachev 45e227b2b5
[SR] Enable component integration tests (#53893) 2020-01-03 10:26:17 -05:00
Alexey Antonov 6942d0bbe6
Move index patterns: src/legacy/core_plugins/data 👉 src/plugins/data (#53794)
* Move index patterns: src/legacy/core_plugins/data 👉 src/plugins/data

Closes: #43444

Make sure that all index pattern related imports use NP (and delete index_pattern folder from shim)

* fix JEST tests

* fix CI

* fix PR comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-03 15:57:46 +03:00
Gidi Meir Morris b09653ac74
moved Task Manager server code under "server" directory (#53777)
Changes Task Manager folder structure to include a "server" folder as required by our linting rules as part of the migration to the Kibana Platform
2020-01-03 12:07:17 +00:00
Aleh Zasypkin 6cf7ece9df
Rename /api/security/oidc to /api/security/oidc/callback. (#53886) 2020-01-03 10:01:50 +01:00
Tim Sullivan 08e6ee2b22
[Reporting/Tests] consolidate functional test configs (#52671)
* [Reporting/Tests] consolidate functional test configs

* remove console.log

* trash

* Update

* add more to the comment

* restore historic archive for wip ui functional tests
2020-01-02 15:31:16 -07:00
Tim Sullivan 01dd08ea9a
[Reporting] Correct the docvalue_fields params in the search query Download CSV from Dashboard Panel (#52833)
* fix the bug and add a test

* fix query bug of empty array

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-02 15:30:41 -07:00
Patrick Mueller 592bc43600
cleanup server-log action (#53326)
- make the level param optional, defaults to info
- change the actions logger "tag" from "alerting" to "actions"
- remove control characters from message
2020-01-02 17:12:41 -05:00
Justin Kambic bd2be32876
[Uptime] Delete uptime eslint rule skip (#50912)
* Delete uptime eslint rules.

* Update hooks usage to adhere to new eslint rules.

* Delete code accidentally added during rebase.

* WIP trying things.

* Clean up types and hook usage to comply with kibana eslint rules.

* Clean up code.

* Update new useEffect hooks that are missing dependencies.

* Fix edits that broke a page.
2020-01-02 16:36:07 -05:00
Kevin Logan fa6a801ebd
[Endpoint] add react router to endpoint app (#53808)
* add react router to endpoint app

* linting

* linting

* linting

* correct tests

* change history from hash to browser, add new test util

* remove default values in helper functions

* fix type check, use FunctionComponent as oppsed to FC

* use BrowserRouter component

* use BrowserRouter component lin

* add comments to test framework, change function name to include browserHistory

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-02 15:58:45 -05:00
Ryland Herrick d9554ff66c
[SIEM][Detection Engine] Silence 409 errors on signal creation (#53859)
* Remove punctuation from translation

We already had a colon on both uses of this key, resulting in '::' on
the page.

* Ignore 409 errors from our signal creation

In my experience these are always due to a rule being run multiple times
on the same document, generating a duplicate signal with a (correctly)
duplicate id. Only if we encounter non-409 errors do we log a message to
the user.

* Hide 409 errors during signal creation

These are expected and potentially confusing to the user. Instead, we
only show unexpected errors.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-02 13:34:57 -06:00
Nathan Reese 47e5342c27
[Maps] get max_result_window and max_inner_result_window from index settings (#53500)
* [Maps] pull ES_SIZE_LIMIT and top hits limit from index settings

* get fetch working

* get min values from indicies response

* use indexSettings.maxResultWindow in documents request size

* use max_inner_result_window to define top hits max

* update jest test

* update docs

* more docs changes for top hits

* fix line spacing

* Update docs/maps/maps-aggregations.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/vector-layer.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* add api integration test for indexSettings route

* eslint fixes

* review feedback

* display toast on first index settings fetch failure

* clean up

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-02 12:25:28 -07:00
Melissa Alvarez 9372100516
[ML] New Platform server shim: update analytics routes to use new platform router (#53521)
* update dfAnalytics routes to use np router

* add route schemas and only show error message

* convert route file to ts and set handlers inline

* update df analytics param type

* update mlClient type and assert mlClient is not null

* handle errors correctly

* ensure error status gets passed correctly to wrapper
2020-01-02 11:38:19 -07:00
Ben Skelker 7f39fd8f34
fixes typo on engine detection page (#53877) 2020-01-02 20:36:58 +02:00
Nathan Reese b7c53502c5
[Maps] push mapbox value extraction from VectorStyle and into DynamicStyleProperty (#53806) 2020-01-02 07:53:55 -07:00
Anton Dosov dcb8cca63c
Clean up generic hooks, use react-use instead (#53822)
As we recently added react-use as a dependency, makes sense to clean up those generic hooks from Kibana repo.

Removed custom hooks from kibana_react and other places:
useObservable
useUnmount
useShallowCompareEffect

react-use should be used instead:
import useObservable from 'react-use/lib/useObservable'
2020-01-02 14:04:31 +03:00
Mike Côté 98ac7a64ad
Add tests to ensure AAD isn't broken after performing a change on an alert / action (#53333) 2019-12-31 13:36:39 -05:00
Poff Poffenberger b8046c7964
[Canvas] Refactor Canvas to no longer use componentWillReceiveProps (#52129)
* Removing componentWillReceiveProps from time filter

* Changing expression form to componentDidUpdate

* Updating expression to be key-driven updates and arg_types to use compomentDidUpdate

* temporary

* Revert "temporary"

This reverts commit 255525d65f.

* typo fix

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-30 09:19:51 -06:00
Poff Poffenberger 6765def84d
[Canvas] Migrate usage collector to NP plugin (#53303)
* Move canvas usage collector to NP plugin

* Removing old usage collector fom legacy Canvas plugin

* Adding types placeholder

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-30 09:16:36 -06:00
Eli Perelman 054ec7036d
Add server rendering service to enable standalone route rendering (#52161)
* Add server rendering service to enable standalone route rendering

* Update renovate config

* Move legacy rendering functionality to legacy service

* Use config for exposed variable in new platform

* Lint changes from rebase

* Rebase artifact

* Remove RenderingProvider, add tests for legacy vars implementation, review notes

* Add UI app functionality to legacy service

* Update rendering snapshots

* Update docs

* Fix up functional tests

* Clean up legacy types

* Revise types from reverting injected metadata changes

* Update translations and broken tests

* Mock legacy internals in legacy tests

* Add missing doc types

* Rename InternalRenderOptions to LegacyRenderOptions

* Remove extraneous legacy exports, review nits

* Functional tests fixes

* Rebase, attempt CI test fixes

* Only allow specified appIds in testbed rendering integration test

* Update snapshot names

* Review nits
2019-12-29 02:10:55 -06:00
Aaron Caldwell 6669111f86
Update maps telemetry mappings to account for recent updates (#53803) 2019-12-26 14:02:06 -07:00
Thomas Neirynck 4b00bada23
[Maps] Only show legend when layer is visible (#53781) 2019-12-26 11:15:16 -05:00
Søren Louv-Jansen 53513f6b7b
[APM] Add log statements for flaky test (#53775)
* [APM] Add log statements for flaky test

* Improve logging

* Improve logging

* Log full index on error
2019-12-24 12:39:08 +01:00
Cauê Marcondes 3b0cce0035
[APM] Transaction page throws unhandled exception if transactions doesn't have http.request (#53760)
* Making http.request optional

* changing unit test
2019-12-24 10:33:20 +01:00
Mikhail Shustov 0ded3cb094
Licensing plugin functional tests (#53580)
* NP licensing add functional tests (#53002)

* fix comment

* introduce core provider plugin for integration tests

* platform functional tests use core_provider_plugin for testing

* add 3 scenario for licensing plugins: server, client, legacy

* remove unused code

* run all licensing_plugin tests on CI

* remove duplicated config

* address comments

* declare global type for core provider

* remove potentially dangerous operation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-24 12:31:18 +03:00
Maja Grubic c433c6e497
[Lens] Disable saving visualization until there are no changes to the document (#52982)
Adding unit test for new functionality

Fixing type error

Removing unnecessary act statements

Removing unnecessary assertion

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-24 08:21:38 +00:00
igoristic 21d6202579
[Monitoring] Added safeguard for some EUI components (#53318)
* merged master

* addressed feedback

* Addressed feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-23 11:35:25 -05:00
Greg Thompson e7076927d7
Upgrade EUI to v17.3.1 (#53655)
* eui to 17.3.0

* eui to 17.3.1

* TS updates

* snapshot updates

* update data-test-subj

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-23 09:49:35 -06:00
Søren Louv-Jansen 8b0d5f54dd
[APM] Fix missing apm indicies (#53541)
* [APM] Fix missing apm indicies

* Fix infinite loop in ui indices

* Add test for empty settings
2019-12-23 16:44:57 +01:00
Matthias Wilhelm b921987f1a
Remove SavedObjectRegistryProvider from codebase (#53455) 2019-12-21 10:38:03 +01:00
Luke Elmers fc8bc82fb3
Move ui/courier into data shim plugin (#52359) 2019-12-20 21:08:05 -07:00
Ryland Herrick 24c75e545b
Fix outstanding NP issues in SIEM frontend (#53735)
* Injects all required plugins into our context provider (not just data)
* Sets defaults for two UI settings that the client doesn't know about
(and blow up when trying to retrieve).
2019-12-20 17:11:47 -06:00
Frank Hassanabad e08e28b1f5
[SIEM][Detection Engine] Added 10 more rules for prepackaging
## Summary

* Added 10 more rules for prepackaging

### 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)
2019-12-20 15:33:54 -07:00
Frank Hassanabad f89ddc6bfa
[SIEM][Detection Engine] More updates with more rules
## Summary

* Adds more rules from detection groups

### 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)
2019-12-20 13:34:42 -07:00
Ryland Herrick 8d6cfa5c0c
[SIEM] Migrating frontend services to NP (#53669)
* [SIEM] Migrating frontend services to NP (#52783)

* Remove legacy index_patterns import

We'd already brought in the new interface in a previous commit; this was
just used as an unnecessary type assertion.

* Update snapshots following new docLink mocks

* Remove unused manual mocks

These are not picked up by jest; calling
jest.mock('lib/compose/kibana_core') has the same effect whether or not
these files exist.

* WIP: Use kibana core mock everywhere we're doing it manually

The timeline tests are the last place we're explicitly mocking
useKibanaCore; removing the mocks cause tests to hang. I think  hey're
relying on the side effects of importing the mock/ui_settings file, but
I'll figure that out next.

* Replace ui/documentation_links with core NP service

In most instances, this meant using the useContext hook with our NP core
context.

This also updates our mocks to leverage the factory so graciously
provided by platform.

There are a few failing tests, mostly due to links being previously
undefined in tests.

* Use new mocks on timeline test that doesn't hang

The rest of these do, though.

* Remove remaining uses of mockUiSettings in useKibanaCore mocks

These have to be evaluated immediately so that we always return the
same core object. Otherwise we get stuck in a loop between
render/useEffect/setState due to the savedObjects client being different
on each invocation.

* Invoke platform's mock factory at mock time

Previously, we were invoking it any time someone called `useKibanaCore`,
getting a new object back each time. This both caused some bugs (looping
with useEffect) and was not representative of how the actual hook
worked.

This also moves that invokation into the mock function, along with
shaping the mocked module so that we don't have to do it in every call
to jest.mock.

* WIP: migrating to use kibana_react's provider and helpers

We're re-exporting these locally to have more control around mocking
them (until platform implements that).

This breaks everything that was using the old mocks. Will fix.

* WIP: Migrating to use kibana_react

Instead of our homegrown hooks we can use these utilities instead.

Unfortunately kibana_react doesn't yet have mocks, so we had to implement
that ourselves. Luckily, we already had local mocks for the settings
service. This migrates to a the new format. For clarity and consistency,
we also re-export new platform's mocks here and use them to populate our
kibana_react mocks.

We started by migrating the UiSettings service to new platform, and let
that drive the rest. With the mocks in place for kibana_react, removing
the usage of useKibanaCore was a natural step as well.

The next step is removing the usage of chrome.getUiSettingsClient with
our useUiSetting$ hook, and with that (and maybe some config setup; I'm
seeing errors at runtime), we should be ready to start migrating other
services.

* Bind a copy of kibana at mock creation

We were previously returning a new copy any time e.g. useKibana was
called, which is not the contract that consumers are expecting. and in
fact caused looping with components employing useEffect etc.

* Remove internal context providers and last usage

We're now using kibana_react fully.

* Fix tests failing due to wrong mocks

Remaining failures are either due to a date format issue, or something
being rendered differently. Those are up next.

Still haven't touched use of chrome.getUiSettingsClient, that's after.

* Fix test failures related to date formatting

* mocks missing UI Setting (DEFAULT_TIMEZONE_BROWSER) which is required
by our formatted_date utilities
* mock timepicker ranges in the one test that uses it (SuperDatePicker)

* Remove unnecessary and/or redundant mocks

Since our TestProvider now mocks new platform, the only tests that
should need to mock uiSettings related stuff (e.g. timezone preferences)
would be the tests that (directly or no) use kibana_react to get it.

* Refactor kibana_react mocks

* adds a mock for the non-observable useUiSetting
* removes the unmockable HOC withKibana

* Replace usage of chrome.getUiSettingsClient with useUiSetting

We're opting for the non-observable behavior here because I believe
that's more analagous.

There are a few remaining usages in non-react code.

Tests are still using the mocks, those'll be removed next.

* Remove ui_settings mocks

Now that we're not using this hook there's no need for the mocks. Tests
are green.

* Remove siem's UI settings hook

We're now using the ones provided by kibana_react.

* Use withKibana HOC on our component classes

React was kind enough to remind me that I can't put hooks in classes.
Whoops.

* Set defaults for some unknown UI settings

The service claims not to know about these settings we're retrieving.
Until I can figure out where they should come from, we're going to
initialize them with what seem to be the defaults at plugin
initialization.

* Remove old hooks

These have now been replaced with kibana_react's equivalents.

* Fix type error on usage of useKibana hook

This is one of the few places where we're using another plugin, which
are not present in the default typings due to their opt-in nature.

* Fix type error on ML call

The indexPattern we get back is actually an array. The endpoint seems to
handle this just fine (at least, it doesn't blow up), but once we
started retrieving a typed value this error surfaced.

* Export a 'bound' version of the useKibana function

Rather than having to type this on each invocation. This requires us to
define which plugins we depend on, which is a good thing.

* Instantiate our mock function

We aren't using these right now I didn't notice, but that wasn't the
right reference.

* Fix test that relies on unmocked service

Our QueryBar component relies very (very, very) indirectly on a storage
service that does not exist in New Platform, nor its corresponding
mocks. To get it passing for now, we're just gonna pretend like it's
there.

* Remove use of ui/chrome in our charts

Replaces with hooks that accomplish the same.

* Remove last use of chrome.getUiSettingsClient

This function is itself a hook, so we should be good here.

* Remove unnecessary non-null assertions

Now that we're using our typed version of the useKibana hook, typescript
knows that these services will be available (once we actually enforce
that in our kibana.json, of course).

* Fix chart tests

These rely on a kibana hook now, so we need to mock it out for these
renders lest we blow up when the context isn't there.

* Replace missing mock

I deleted this in a previous commit, thinking it unneeded.
However, getHostDetailsBreadcrumbs ultimately asks for some
default date parameters for the timerange boundaries.

* Add back tests for our theming hook

* Style: cleanup

* Remove unneeded default UI Settings values

We were previously getting errors due to these values not being known to
the client, but it looks like that was either fixed upstream, or a
temporary issue caused by some improper context setup.

* Simplify kibana_react mocks

Let's leave JSX out of it.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Update references to now-deleted hooks

These hooks were deleted on a recent branch, but new usages were merged
to master in the meantime.

* Fix remaining uses of hooks/chrome that were not merge conflicts

* Use HOC on class component

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-20 14:23:01 -06:00
Joe Reuter c75cd9de19
NP Migration: Sample data (#52753) 2019-12-20 19:06:21 +01:00
Joe Reuter 06d26f6b68
Enforce shimmed plugin boundaries (#52633) 2019-12-20 19:01:56 +01:00
Alejandro Fernández Haro 3bdbcd0d1a
[NP] Allow custom validations in HTTP Routes apart from @kbn/config-schema (#51919)
* [NP] Allow custom validations in HTTP Routes apart from @kbn/config-schema

* API docs

* Allow validate function in the route handler (run-code validation)

* Prefix RouteXXX + Params and Body Validation Aliases

* Fix test broken by lodash

* Update API docs

* Add default types for simpler manual declaration

* Add run-time validation of the RouteValidateSpec

* Expose RouteValidationError instead of SchemaTypeError

* RouteValidator as a class to match config-schema interface

* Test for not-inline handler (need to check IRouter for #47047)

* Add preValidation of the input for a safer custom validation

* Better types for RouteHandlers

* [NP] Move route validation to RouteValidator wrapper

* Use the class only internally but maintain the same API

* Fix types

* Ensure RouteValidator instance in KibanaRequest.from

* Fix validator.tests (Buffer.from instead of new Buffer)

* Default precheck should allow null values

* Also allow undefined in preChecks

* MR feedback fixes

* Provide RouteValidationResolver to the validation function

* Add functional tests

* Fix new functional tests

* Fix validator additional test

* Fix test with new resolver

* Remove unused import

* Rename ValidationResolver to ValidationResultFactory and change the interface to look more like the KibanaResponseFactory

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-20 17:53:08 +00:00
Aleh Zasypkin e5822771e3
Use savedObjects provided by the platform instead of legacy shim. (#53679) 2019-12-20 18:42:42 +01:00
Benjamin Trent ec4fca66dd
Add ml inference processor and APIs to console (#53618)
Adds new Machine Learning Inference processor to Kibana Console.

Also adds new Inference APIs generated from ES specs.
2019-12-20 12:14:46 -05:00
Gidi Meir Morris fc999e5158 [Alerting] disables a flaky test in alerting (#53696)
* disabled flaky test

* use skip instead of comment
2019-12-20 11:33:10 -05:00
Ahmad Bamieh 058a718c2c
[Telemetry] Remove extra console.log (#53203) 2019-12-20 10:38:21 -05:00
Kevin Logan 2f3ca65886
[Endpoint] Register endpoint app (#53527)
* register app, create functional test

* formatting

* update tests

* adjust test data for endpoint

* add endpoint tests for testing spaces, app enabled, disabled, etc

* linting

* add read privileges to endpoint

* rename variable since its used now

* remove deprecated context

* remove unused variable

* fix type check

* correct test suite message

Co-Authored-By: Larry Gregory <lgregorydev@gmail.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
2019-12-20 10:31:41 -05:00
Marta Bondyra 60660fcd1e
[Discover] Refactor discover index pattern selector to Lens `C… (#51973) 2019-12-20 14:55:06 +01:00
Alejandro Fernández bb33aa2d91
[Logs UI] HTTP API for log entry (#53485)
* Implement `log_entries/item` api

* Use endpoint in the `useLogFlyout` hook

* Clean up GraphQL implementation and types

* Extract type for log entries cursor

* fixup! Extract type for log entries cursor
2019-12-20 14:23:15 +01:00
MadameSheema b1d6821b82
[SIEM] Fixes cypress failing tests (#53468)
* gives time to the events to be loaded

* gives time to the element to be loaded

* fixes events viewer tests

* fixes inspect tests

* fixes url state tests

* adds fields counts

* fixes fields browser test

* fixes typecheck error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-20 13:37:02 +01:00
Joe Reuter 672eac038b
NP Migration: Remove global angular references in graph (#53293) 2019-12-20 10:13:33 +01:00
Gidi Meir Morris 95131237a6
[Alerting] run alerts whenever an alerts schedule is updated (#53143)
When an Alert is updated its interval is stored but isn't applied to the underlying scheduled task.
In this PR we make use of the new runNow api to "refresh" the task whenever the alert's schedule is updated.
2019-12-20 06:51:36 +00:00
igoristic 1cd7c66bf7
Use NP license instead to capture change events (#53548)
* Use np license instead to capture any changes

* added a test

* fixed tests
2019-12-19 23:53:33 -05:00
Xavier Mouligneau 47fb39066b
[SIEM] [DETECTION ENGINE] Details and Edit view for a rule (#53252)
* re-structure detection engine + change routing name

* add editing/details feature for a rule
add feature to not edit immutable rule

* review I

* review II

* change constant

* review III
2019-12-19 23:30:12 -05:00
Spencer aa3ad743ac
Revert "[SIEM] Migrating frontend services to NP (#52783)" (#53668)
This reverts commit 02278ede67.
2019-12-19 19:22:23 -07:00
Ryland Herrick 02278ede67
[SIEM] Migrating frontend services to NP (#52783)
* Remove legacy index_patterns import

We'd already brought in the new interface in a previous commit; this was
just used as an unnecessary type assertion.

* Update snapshots following new docLink mocks

* Remove unused manual mocks

These are not picked up by jest; calling
jest.mock('lib/compose/kibana_core') has the same effect whether or not
these files exist.

* WIP: Use kibana core mock everywhere we're doing it manually

The timeline tests are the last place we're explicitly mocking
useKibanaCore; removing the mocks cause tests to hang. I think  hey're
relying on the side effects of importing the mock/ui_settings file, but
I'll figure that out next.

* Replace ui/documentation_links with core NP service

In most instances, this meant using the useContext hook with our NP core
context.

This also updates our mocks to leverage the factory so graciously
provided by platform.

There are a few failing tests, mostly due to links being previously
undefined in tests.

* Use new mocks on timeline test that doesn't hang

The rest of these do, though.

* Remove remaining uses of mockUiSettings in useKibanaCore mocks

These have to be evaluated immediately so that we always return the
same core object. Otherwise we get stuck in a loop between
render/useEffect/setState due to the savedObjects client being different
on each invocation.

* Invoke platform's mock factory at mock time

Previously, we were invoking it any time someone called `useKibanaCore`,
getting a new object back each time. This both caused some bugs (looping
with useEffect) and was not representative of how the actual hook
worked.

This also moves that invokation into the mock function, along with
shaping the mocked module so that we don't have to do it in every call
to jest.mock.

* WIP: migrating to use kibana_react's provider and helpers

We're re-exporting these locally to have more control around mocking
them (until platform implements that).

This breaks everything that was using the old mocks. Will fix.

* WIP: Migrating to use kibana_react

Instead of our homegrown hooks we can use these utilities instead.

Unfortunately kibana_react doesn't yet have mocks, so we had to implement
that ourselves. Luckily, we already had local mocks for the settings
service. This migrates to a the new format. For clarity and consistency,
we also re-export new platform's mocks here and use them to populate our
kibana_react mocks.

We started by migrating the UiSettings service to new platform, and let
that drive the rest. With the mocks in place for kibana_react, removing
the usage of useKibanaCore was a natural step as well.

The next step is removing the usage of chrome.getUiSettingsClient with
our useUiSetting$ hook, and with that (and maybe some config setup; I'm
seeing errors at runtime), we should be ready to start migrating other
services.

* Bind a copy of kibana at mock creation

We were previously returning a new copy any time e.g. useKibana was
called, which is not the contract that consumers are expecting. and in
fact caused looping with components employing useEffect etc.

* Remove internal context providers and last usage

We're now using kibana_react fully.

* Fix tests failing due to wrong mocks

Remaining failures are either due to a date format issue, or something
being rendered differently. Those are up next.

Still haven't touched use of chrome.getUiSettingsClient, that's after.

* Fix test failures related to date formatting

* mocks missing UI Setting (DEFAULT_TIMEZONE_BROWSER) which is required
by our formatted_date utilities
* mock timepicker ranges in the one test that uses it (SuperDatePicker)

* Remove unnecessary and/or redundant mocks

Since our TestProvider now mocks new platform, the only tests that
should need to mock uiSettings related stuff (e.g. timezone preferences)
would be the tests that (directly or no) use kibana_react to get it.

* Refactor kibana_react mocks

* adds a mock for the non-observable useUiSetting
* removes the unmockable HOC withKibana

* Replace usage of chrome.getUiSettingsClient with useUiSetting

We're opting for the non-observable behavior here because I believe
that's more analagous.

There are a few remaining usages in non-react code.

Tests are still using the mocks, those'll be removed next.

* Remove ui_settings mocks

Now that we're not using this hook there's no need for the mocks. Tests
are green.

* Remove siem's UI settings hook

We're now using the ones provided by kibana_react.

* Use withKibana HOC on our component classes

React was kind enough to remind me that I can't put hooks in classes.
Whoops.

* Set defaults for some unknown UI settings

The service claims not to know about these settings we're retrieving.
Until I can figure out where they should come from, we're going to
initialize them with what seem to be the defaults at plugin
initialization.

* Remove old hooks

These have now been replaced with kibana_react's equivalents.

* Fix type error on usage of useKibana hook

This is one of the few places where we're using another plugin, which
are not present in the default typings due to their opt-in nature.

* Fix type error on ML call

The indexPattern we get back is actually an array. The endpoint seems to
handle this just fine (at least, it doesn't blow up), but once we
started retrieving a typed value this error surfaced.

* Export a 'bound' version of the useKibana function

Rather than having to type this on each invocation. This requires us to
define which plugins we depend on, which is a good thing.

* Instantiate our mock function

We aren't using these right now I didn't notice, but that wasn't the
right reference.

* Fix test that relies on unmocked service

Our QueryBar component relies very (very, very) indirectly on a storage
service that does not exist in New Platform, nor its corresponding
mocks. To get it passing for now, we're just gonna pretend like it's
there.

* Remove use of ui/chrome in our charts

Replaces with hooks that accomplish the same.

* Remove last use of chrome.getUiSettingsClient

This function is itself a hook, so we should be good here.

* Remove unnecessary non-null assertions

Now that we're using our typed version of the useKibana hook, typescript
knows that these services will be available (once we actually enforce
that in our kibana.json, of course).

* Fix chart tests

These rely on a kibana hook now, so we need to mock it out for these
renders lest we blow up when the context isn't there.

* Replace missing mock

I deleted this in a previous commit, thinking it unneeded.
However, getHostDetailsBreadcrumbs ultimately asks for some
default date parameters for the timerange boundaries.

* Add back tests for our theming hook

* Style: cleanup

* Remove unneeded default UI Settings values

We were previously getting errors due to these values not being known to
the client, but it looks like that was either fixed upstream, or a
temporary issue caused by some improper context setup.

* Simplify kibana_react mocks

Let's leave JSX out of it.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-19 18:36:47 -06:00
Yuliia Naumenko 1cce67f2cd
Add License checks for alerts and actions (#52394) (#53327)
* Added license check for actions server API

* Added license check for alerting server API

* Fixed typecheck errors and duplication tests

* Moved all license checks to New Platform

* Clean up not used shims options

* Update x-pack/legacy/plugins/alerting/server/extend_route_with_license_check.test.ts

Co-Authored-By: Gidi Meir Morris <github@gidi.io>

* Update x-pack/legacy/plugins/actions/server/lib/license_state.ts

Co-Authored-By: Gidi Meir Morris <github@gidi.io>

* Refactored due to comments

* Fixed typo

Co-authored-by: Gidi Meir Morris <github@gidi.io>
2019-12-19 16:23:48 -08:00
Pete Harverson 99fde9eaa8
[ML] Corrects URL of the create job tips docs page (#53576)
* [ML] Corrects URL of the create job tips docs page

* [ML] Update validate_job_view snapshot

* [ML] Update links for influencers to new ML book
2019-12-19 21:24:49 +00:00
Frank Hassanabad 6747dc068f
[SIEM][Detection Engine] Adds 77 more pre-packaged rules and another unit test for it
## Summary

* Adds more prepackaged rules and another unit test

### 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)
2019-12-19 13:57:59 -07:00
Frank Hassanabad 7c2a71399c
[SIEM][Detection Engine] Bulk REST API for create, update, and delete
## Summary

* Adds Bulk REST API and routes added for create, update, and delete
* Loops over data and calls `alertClient` until alerting team gives us bulk to push down
* Adds Unit tests

Testing/Usage:

Create in bulk:
```ts
POST /api/detection_engine/rules/_bulk_create
[{ ... rule_1}, { ... rule_2}]
```
see script
```ts
 ./post_rule_bulk.sh
```

Update in bulk:
```ts
PUT /api/detection_engine/rules/_bulk_update
[{ ... rule_1}, { ... rule_2}]
```

see script
```ts
 ./update_rule_bulk.sh
```

Delete in bulk:
```ts
DELETE /api/detection_engine/rules/_bulk_delete
[{"id": "rule_1"}, {"id": "rule_2"}]
```

or in case your client does not support bodies in DELETE
```ts
POST /api/detection_engine/rules/_bulk_delete
[{"id": "rule_1"}, {"id": "rule_2"}]
```

But try to use DELETE where possible

see script
```ts
./delete_bulk.sh
```

Caveats and error handling....If you do not validate correctly you will still get back a `400` return code. If you do validate correctly but one or more objects have errors involving a conflict or not found, you will get back a 200, but the body message will contain an array of errors or successes.

Examples:

If you delete in bulk for two objects but both do not have any values you get a response of `200` but then these errors in the array:

```ts
./delete_bulk.sh 
[
  {
    "id": "query-rule-id-1",
    "error": {
      "statusCode": 404,
      "message": "rule_id: \"query-rule-id-1\" not found"
    }
  },
  {
    "id": "query-rule-id-2",
    "error": {
      "statusCode": 404,
      "message": "rule_id: \"query-rule-id-2\" not found"
    }
  }
]
```

If one has a valid deleted value but the second does not you get a status of `200` and one object back as being deleted but the second as an error:

```ts
./delete_bulk.sh                        
[
  {
    "created_at": "2019-12-19T04:12:26.470Z",
    "updated_at": "2019-12-19T04:12:26.470Z",
    "created_by": "elastic_kibana",
    "description": "Query with a rule_id that acts like an external id",
    "enabled": true,
    "false_positives": [],
    "from": "now-6m",
    "id": "46d83e70-982a-4ba8-9ac1-fc386643c014",
    "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
  },
  {
    "id": "query-rule-id-2",
    "error": {
      "statusCode": 404,
      "message": "rule_id: \"query-rule-id-2\" not found"
    }
  }
]
```

Another example where an update has two errors because it tried to update two docs but both do not exist yet you get back a response of `200` but this array of errors:

```ts
./update_rule_bulk.sh                                                                                                                        <<<
[
  {
    "id": "query-rule-id-1",
    "error": {
      "statusCode": 404,
      "message": "rule_id: \"query-rule-id-1\" not found"
    }
  },
  {
    "id": "query-rule-id-2",
    "error": {
      "statusCode": 404,
      "message": "rule_id: \"query-rule-id-2\" not found"
    }
  }
]
```

If one is updatable but the other is not you get back a response of `200` and one update back but the other is an error:

```ts
./update_rule_bulk.sh
[
  {
    "created_at": "2019-12-19T04:15:43.739Z",
    "updated_at": "2019-12-19T04:16:01.633Z",
    "created_by": "elastic_kibana",
    "description": "Query with a rule_id that acts like an external id",
    "enabled": true,
    "false_positives": [],
    "from": "now-6m",
    "id": "c1fcea2c-cbc6-4f28-b7e7-32b4d7cb799d",
    "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": "Rule id Number 1 with an updated name",
    "query": "user.name: root or user.name: admin",
    "references": [],
    "severity": "high",
    "updated_by": "elastic_kibana",
    "tags": [],
    "to": "now",
    "type": "query",
    "threats": [],
    "version": 2
  },
  {
    "id": "query-rule-id-2",
    "error": {
      "statusCode": 404,
      "message": "rule_id: \"query-rule-id-2\" not found"
    }
  }
]
```

Same thing goes with posts and any other bulk actions.

### 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)
2019-12-19 13:55:27 -07:00
Nathan Reese 8969cdc105
[Maps] Label style properties (#52957)
* text styling

* label style editor UI

* wire up styles to mb

* allow string values

* remove console.log

* default getFields to provide ordinal fields for vector source

* fix vector_style jest test

* add label styles to docs

* fix prettier errors

* use index-pattern field formatter to format label

* rename LABEL to LABEL_TEXT

* review feedback

* fix problem with icons not displaying with labels

* fix functional tests

* fix canno read name of null error

* update jest expect

* fix eslint errors

* do not display label text in legend

* always show all label styling properties in editor

* review feedback
2019-12-19 13:23:55 -07:00
Xavier Mouligneau c1b3516e29
[SIEM] [TIMELINE] add user info back to request (#53534)
* Add user info on the option of the request

* fix type

* review

* fix test

* fix bug

* add an unauthenticated user concept for timeline

* add favorite flter with unauthenticated user
2019-12-19 15:00:46 -05:00
Kerry Gallagher fc33f79317
vis_type_timeseries server side new platform migration (#52501) 2019-12-19 18:51:06 +00:00
Chandler Prall 665c962c91
Remove change to Direction's definition in generated file, resolve resulting TS issues by casting (#53607) 2019-12-19 10:50:15 -07:00
Josh Dover 4980387c17
Refactor HttpService tests (#53033) 2019-12-19 11:38:14 -06:00
Kerry Gallagher fe15d6ecbf
[Logs / Metrics UI] Client side NP migration (#52867) 2019-12-19 15:34:36 +00:00
CJ Cenizal 194f2ca6ed
Remove highlighting from the review step of the Index Template wizard, for requests beyond a certain size. This will prevent the syntax highlighting from slowing down Kibana when reviewing large requests. (#53549) 2019-12-19 07:33:18 -08:00
Mikhail Shustov dd1faba7e3
provide a list of breaking changes in licensing plugin readme (#53574)
* provide a list of breaking changes in licensing plugin

* Apply suggestions from code review

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

* add ToC
2019-12-19 15:50:13 +01:00
James Gowdy e26f566eaf
[ML] Fixing index data visualizer when index is recognized (#53498) 2019-12-19 14:49:49 +00:00
Matthias Wilhelm e9ac373bec
[Discover] Remove angular field filter template code (#53513) 2019-12-19 14:34:47 +01:00
Casper Hübertz 990ecda6b9
[APM] Improve table and other panel loading states (#53459)
Updated text loading states to animated spinners.
2019-12-19 13:51:03 +01:00
Larry Gregory 3b57f0a401
Security/Spaces - cleanup react warnings (#53287)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-19 07:19:27 -05:00
Mikhail Shustov 4ea2599b8c
Revert "NP licensing add functional tests (#53002)" (#53577)
This reverts commit a4c5b13400.
2019-12-19 13:12:17 +01:00
Mikhail Shustov a4c5b13400
NP licensing add functional tests (#53002)
* fix comment

* introduce core provider plugin for integration tests

* platform functional tests use core_provider_plugin for testing

* add 3 scenario for licensing plugins: server, client, legacy

* remove unused code

* run all licensing_plugin tests on CI

* remove duplicated config

* address comments

* declare global type for core provider
2019-12-19 10:59:27 +01:00
Mikhail Shustov fd4f139be2
fix onLicenseInfoChange callback to be called on update (#53559) 2019-12-19 10:42:46 +01:00
Mikhail Shustov ba7589d603
Reduce license plugin api (#53489)
* inOneOf --> hasAtLeast. to follow to licensing hierarchical model

* adopt licensing tests

* add license mock and use it in the tests

* adopt security plugin to hasAtLeast and licensing mocks

* adopt uptime to hasAtLeast

* update readme

* add test for unknown license

* fix import in js test

* fix security plugin merge conflict

* Update x-pack/plugins/security/common/licensing/license_service.ts

Co-Authored-By: Larry Gregory <lgregorydev@gmail.com>

* Update x-pack/plugins/licensing/common/types.ts

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

* simplify tests

* remove unused import
2019-12-19 09:35:09 +01:00
Frank Hassanabad a1e92446b5
[SIEM][Detection Engine] Temporarily hard code to the default space (#53554)
Temporarily hard code the default space until the UI calls the REST API's for it.
2019-12-18 23:58:18 -07:00
Søren Louv-Jansen 93e0d4ec1f
[APM] Minor tweaks to security setup script (#53241) 2019-12-19 07:27:25 +01:00
Garrett Spong 26ddfb26c0
[SIEM] Adds actions and selection to Signals Table (#53101)
## Summary

This is `Part II` of `II` for adding the `Signals Table` to the main Detection Engine landing page ([meta issue](https://github.com/elastic/kibana/issues/50405)).

`Part II` includes:
* Adding `selection`, `selectAll` & `selectAllGlobal` (i.e. query select) functionality to the EventsViewer
* Includes ability to specify a fieldset when storing selection state so it can be used by custom actions
 * Introduces following new Timeline state:
    * `deletedEventIds: string[]`
    * `loadingEventIds: string[]`
    *  `selectedEventIds: Record<string, TimelineNonEcsData[]>`
    * `showCheckboxes: boolean`
    * `showRowRenderers: boolean`
* Adds Send to Timeline overflow/batch action (detailed [here](https://github.com/elastic/kibana/issues/50405#issuecomment-565470830))
* Adds Update Signal Status overflow/batch action

Resolves https://github.com/elastic/kibana/issues/51785

##### Selection / Update Signal Status
![update_signal_state](https://user-images.githubusercontent.com/2946766/70887496-61d59280-1f9b-11ea-8483-ab30e3936738.gif)

##### Send Signal to Timeline Action

### 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
- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
- [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~

### For maintainers

- [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
- [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
2019-12-18 20:45:21 -07:00
Mike Côté 4069c4a86e
Prepare alerts and actions for feature controls (#52956)
* Save consumer with alert

* Make consumer mandatory
2019-12-18 18:27:57 -05:00
Nick Partridge 72c5c5cb22
Shim input_control_vis for KP (#52243)
* Shim input_control_vis
* Convert input_control_vis src files to typescript
* Add Required, Optional, Required and Class types to kbn-utility-types
* Collect all ui/* imports into legacy imports file
* Pass down plugin deps from top level
* Add timeout and terminate_after options to SearchSourceFields
2019-12-18 16:25:35 -06:00
Thomas Neirynck 87a9b6b6ae
[Maps] Move legend rendering to style property (#53173) 2019-12-18 16:35:54 -05:00
Shahzad 3ee0683445
[Maps] Feature/hide view/layer control in embeddable (#53469)
* Added options to hide layer/view controls

* remove event attachments
2019-12-18 21:07:31 +01:00
Phillip Burch 1b22317617
[Metrics-UI] Add ability to filter snapshot view by account and region (#53307)
* Wireup account and region toolbars

* UI and naming cleanup

* Concat filters instead of replacing
2019-12-18 12:15:41 -06:00
Chandler Prall 068f3ffa2c
Upgrade to EUI@17.1.2 [table typescript types] (#52688)
* more types

* table types changes

* siem table conversions

* Updated rest of x-pack for EUI table typees

* updated x-pack changes against master

* Update to published eui 17.1.0

* kibana snapshots

* x-pack snapshots

* src snapshots

* autofixes

* autofixes, round 2
2019-12-18 11:15:14 -07:00
Gidi Meir Morris 44348aa998
Aligns Alerting's interval with TaskManager's generic schedule field (#52873)
Follow up from the #52727 in Task Manager, we want Alerting and Task Manager to align on their schedule api (in the near future, Alerting will actually use Task manager's schedule system to remove this duplication).
2019-12-18 17:31:31 +00:00
Chris Cowan 13c2ed4e43
[Metrics UI] Customize "node info" section per Inventory Model (#53325) 2019-12-18 09:35:04 -07:00
Dima Arnautov 3ab4b7f2fd
[ML] Keep rule editor flyout open on refresh (#53458)
* [ML] prevent AnomaliesTable re-render

* [ML] 50935 update titles to sentence case

* [ML] update snapshots
2019-12-18 07:38:59 -08:00
Angela Chuang aa1af60ea4
[SIEM] Alerts view - adding alerts table (#51959)
* add alert view to hosts page

* add defaultHeaders

* add alerts table

* fix dsl query

* add alerts histogram

* add i18n for alerts table

* fix types error

* fix type issue

* whitespace cleanup

* fix types

* fix types

* fix types

* fix types

* fix types

* rename params

* fix unit test

* fix types

* revert change on updateHostsSort

* remove unused prop

* update unit test

* pair programming with angela to get filter working

* update alerts query

* clean up

* fix queries

* align type for pageFilters

* apply page filter for network page

* simplify filter props for alerts view

* clean up

* replace hard coded tab name
2019-12-18 15:34:58 +00:00
Nathan Reese 966dd82b64
[Maps] gather field formatters in data request (#53311)
* [Maps] gather field formatters in data request so they can be used sync in vector_style

* review feedback

* hasMatchingMetricField

* review feedback

* fix typo in function name
2019-12-18 07:48:56 -07:00
Dario Gieselaar 815f721555
[APM] Add version annotations to timeseries charts (#52640)
* [APM] Add version annotations to timeseries charts

Closes #51426.

* Don't subdue 'Version' text in tooltip

* Optimize version queries

* Don't pass radius/color to indicator
2019-12-18 15:12:02 +01:00
Dario Gieselaar 55ba993fb3
[APM] Add service.version filter to transaction views (#52748)
* [APM] Add `service.version` filter to transaction views

Closes #51427.

* Add service.version filter to error/metric views
2019-12-18 13:19:00 +01:00
Larry Gregory 3b647b1641
Security nav control => NP (#52386)
* migrating nav control to NP

* move licensing service to common

* only retrieve user when necessary

* don't block rendering on user promise

* testing nav control registration

* moving logic to nav_control_service

* register account management in a hack

* update import location

* updating license_service to manage its own subscription to the raw license

* updating mock

* update editProfileUrl to not require full page reload if already within the kibana app

* alternate security license proposal

* adds popover test.

* switchMap -> map

* additional test case.

* Apply suggestions from code review

Co-Authored-By: Aleh Zasypkin <aleh.zasypkin@gmail.com>

* additional testing

* fix merge from master

* fixing es availability check

* fix merge from master

* switch from deprecated route


Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-18 07:17:00 -05:00
Thomas Watson eadf8bf3d8
Update Node.js to version 10.18.0 (#52865) 2019-12-18 13:07:14 +01:00
Alejandro Fernández 0a1ffd9921
[Logs UI] HTTP endpoint for Log Summary (#51903)
* Scaffold `/logs/summary` endpoint

* Use HTTP API for the log summary

* Handle queries in log summary

* Simplify `useLogSummary` implementation

* Scaffold `/logs/summary/highlights` API

* Use HTTP endpoint for log summary highlights

* Tweak `highlightTerms`

* Deduplicate ES queries for summary endpoints

* Clean GraphQL implementation

* Make tests pass

* Handle server errors

* Pass source to the API

* Cleanup tests

* Future-proof response types

Wrap the existing response into a `{ data: ... }` object to allow adding
metadata in the future.

* Refactor tests with `@testing-library/react-hooks`

* Adapt endpoint to NP

* Tweak types in the test

* Split API methods into separate files

* Flatten highlights API

* Restructure `common/http_api/logs` folder

We will group relevant codecs and types into `log_entries`, splitting
summary and summary_highlights as two individual concepts.

* Reorganize route files

* Resurrect changes in `server/lib/{adapter,domain}`

Replace some of the exported types from GraphQL with io-ts codecs

* Wire the route with the domain library

* Remove dead types

* Clean up test file

* Fix merge mishap


Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-18 12:30:27 +01:00
Vignesh Shanmugam 254b18c20b
Instrument Kibana with APM RUM agent (#44281)
* Instrument Kibana with APM RUM agent

* make route-change transaction work with properl url

* extract page-load transaction url from app link

* check if app is hidden and set active:false

* make distributed tracing work and merge config

* remove config/apm.js and address review

* address review comments

* add apm.js to build tassks

* move apm from dev to src

* add @types/hoist-non-react-statics which is required by react rum

* apply changes correctly from master
2019-12-18 12:16:15 +01:00
Felix Stürmer 8863fc29a4
[Logs UI] Add setup screen for the categorization tab (#51905)
This adds the setup screen for the log entry categorization.

closes #50320 
closes #50414
2019-12-18 11:20:40 +01:00
Shahzad 862265a48e
Feature/monitor list externel linking (#53098)
* update monitor list columns

* update columns

* update snaps

* fix type

* removed unused ii8n
2019-12-18 10:20:30 +01:00
Matthias Wilhelm d4c6e65448
[Maps] Migrate SavedGisMap to use createSavedObjectClass (#53121) 2019-12-18 09:08:27 +01:00
Shahzad 63379ac074
[Uptime] Uptime date picker will use commonly used ranges from advance settings (#52944)
* Uptime date picker will use common ranges from advance settings

* removed duplicate constant
2019-12-18 08:47:49 +01:00
CJ Cenizal 528e495631
Add support for xpack.license_management.ui.enabled setting. (#53209) 2019-12-17 18:31:55 -08:00
CJ Cenizal cb8436f248
Prevent sending request for rollup indices if we're on an anonymous path, e.g. /logout. (#53233) 2019-12-17 18:11:17 -08:00
Frank Hassanabad 58f3dfb97c
[SIEM][Detection Engine] Adds timeline_id string to rules (#53343)
## Summary

* Adds the timeline_id string to rules
* Updates unit tests and fixes a few issues in the unit tests to make types more strict
* Updates signal mapping to have it

### 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)
2019-12-17 17:55:37 -07:00
Aaron Caldwell ef83108c26
[Maps] Update license check & requests to use NP services (#52641)
* Add back in np licensing changes previously pulled out of a separate pr

* Watch license service and update local kibana service const obj. on change. Import new license id in meta

* Update flow for initializing indexPatternServices while in this file

* Clean up setup method. Add conditional subscribe of licensing

* Review feedback. Use license getter instead of obj

* Revert "Update flow for initializing indexPatternServices while in this file"

This reverts commit 022f7ddb87.

* Update meta test
2019-12-17 17:26:45 -07:00
Chris Cowan 609b5826ff
[Metrics UI] Fix AWS SQS toolbar types (#53051) 2019-12-17 15:57:14 -07:00
Frank Hassanabad e29a936daa
[SIEM][Detection Engine] Adds prepackaging rules capability
## Summary

* Adds pre-packaging rules capability
* Adds pre-packaged rules 
* Adds conversion script for saved searches to pre-package then edit workflow
* Adds an auto-incrementing numbered versioning
* Adds `immutability` as a filterable internal tag
 
<img width="1833" alt="Screen Shot 2019-12-14 at 12 21 07 AM" src="https://user-images.githubusercontent.com/1151048/70845308-5010b580-1e0a-11ea-833e-8d5656b49a98.png">

<img width="1762" alt="Screen Shot 2019-12-14 at 12 23 40 AM" src="https://user-images.githubusercontent.com/1151048/70845311-569f2d00-1e0a-11ea-866c-5aa578377b15.png">

Usage/Testing:


```sh
PUT /api/detection_engine/rules/prepackaged
```

script:
```sh
./scripts/add_prepackaged_rules.sh
```

When you create a new rule now (regardless of if it is immutable or not), you automatically get a version number returned back starting at the number 1. If you update the rule then it will automatically update the version number by incrementing it by 1 for convenience.

However if you create a rule _and_ add in the version number during the creation of the rule then it will take that version number. If you update a rule you can optionally send in the version which will also update it there. 

### 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)
2019-12-17 15:56:19 -07:00
Chris Cowan 69570cde7e
[Metrics UI] Display data label on inventory based on data interval (#53054) 2019-12-17 15:48:19 -07:00
patrykkopycinski 022e6c4b97
[SIEM] Fix eslint errors from jsx-no-bind #1 (#52856) 2019-12-17 22:51:32 +01:00
patrykkopycinski 4a95aefa04
[SIEM] Cleanup _g param from url (#53316) 2019-12-17 22:46:18 +01:00
Justin Kambic b7ff35db2d
[Uptime] Remove legacy es client (#51403)
* Move a REST endpoint and the GQL endpoint to NP routing.

* Delete obsolete REST endpoint.

* Update remaining REST routes to work with NP router.

* Remove obsolete code, update some unit tests.

* Simplify route creation.

* Remove tests of API decommissioned API endpoint.

* Rename domain check.

* Make return shape of index pattern endpoint correspond to required NP resp body.

* Move validate to appropriate level of route definition object for monitor details endpoint.

* Update snapshot count route.

* Fix broken lint rule.

* Move a REST endpoint and the GQL endpoint to NP routing.

* Update remaining REST routes to work with NP router.

* Update remaining REST routes to work with NP router.

* Refactor query functions to accept new es client from request contexts.

* WIP updating framework adapter.

* Refactor remaining routes/resolvers to remove usage of legacy Elasticsearch client.

* Fix broken unit tests.

* Fix incorrect user usage for a REST endpoint.

* Fix some broken imports and types.

* Port monitor details REST endpoint to NP.

* Remove some merge errors.

* Update adapters to take a single options parameter.

* Update broken test files.

* Resolve typescript warnings.

* Update resolver types.

* Change GraphQL interface name for es client.

* Delete unused code and fix incorrect type.

* Rename type for REST endpoint creators.

* Nest message values in body object for invalid response messages.

* Reorganize a file and clean up some types.

* Add wrapper function to reduce boilerplate route code.
2019-12-17 16:25:15 -05:00
Chris Roberson 75447e5ae1
[Monitoring] Add error state for unstructured logs (#53299)
* Add error state for unstructured logs

* Fix tests
2019-12-17 15:54:47 -05:00
Matthew Kime 2d36b216af
move management registry to new platform (#53020)
* move management registry to new platform
2019-12-17 13:00:54 -06:00
Kerry Gallagher 18b5cf9adb
[Logs UI / Metrics UI] New Platform migration server followups (#51615) 2019-12-17 18:52:57 +00:00
spalger 98076311b9 Revert "Update dependency getos to ^3.1.1 (#53074)"
This reverts commit cf2e0ec6e7.
2019-12-17 11:32:50 -07:00
spalger 8e39ba342e Revert "Update dependency simple-git to v1.129.0 (#53077)"
This reverts commit 9a05c75add.
2019-12-17 11:32:50 -07:00
spalger 3816a89ff0 Revert "Update memoize-one related packages (#53080)"
This reverts commit ffe24cd832.
2019-12-17 11:32:50 -07:00
spalger 1b5e385a7a Revert "Update storybook related packages to ^5.2.8 (#52687)"
This reverts commit f8fd5b5def.
2019-12-17 11:32:50 -07:00
spalger ccdd84a00d Revert "Update dependency execa to ^3.4.0 (#53072)"
This reverts commit ad6a07583b.
2019-12-17 11:32:49 -07:00
spalger a926e3419d Revert "Update babel related packages (#52754)"
This reverts commit 9a115f078f.
2019-12-17 11:32:49 -07:00
spalger 77479020e0 Revert "Update supertest related packages (#53081)"
This reverts commit 5eed8b4eb9.
2019-12-17 11:32:49 -07:00
spalger 8b7aaa4849 Revert "Update webpack related packages (#53082)"
This reverts commit 8b36eb46ea.
2019-12-17 11:32:49 -07:00
Devin W. Hurley 28e05e79ec
[SIEM] [Detection Engine] adds created_at and updated_at timestamps to rules (#53137)
* adds created_at and updated_at timestamps to rules

* fix missing update to tests

* save created_at and updated_at in rule in signals index

* requires created_at and updated_at in rule
2019-12-17 13:09:26 -05:00
Nathan L Smith d391764b76
[APM] License prompt for service map (#52668)
Display a link to platinum license upgrade on the service map.

Also add `useKibanaUrl` and `useLicense` hooks.

Make the `LicenseContext` (which is used in a couple class components and on page load) use the license observable from the NP plugin.

Add missing export of `useObservable` to kibana_react.
2019-12-17 12:01:30 -06:00
Gidi Meir Morris 2b6ef5c2bb
Moves Task manager's interval under a generic schedule field (#52727)
This moves the interval field under a generic schedule object field in preparation for the introduction of richer scheduling options (such as cron).

It includes a migration for existing tasks, and we've ensured no existing Task Type Definitions exist in Kibana that rely on Interval.

This includes support for the deprecated interval field (which gets mapped to schedule) but that support will be removed in 8.0.0, as it's a breaking change.
2019-12-17 15:16:40 +00:00
Mikhail Shustov 74e1d17cf4
Support 'enterprise' license type (#52273)
* add enterprise license type to licensing plugin

* add enterprise license to x-pack plugins

* update uptime license list

* improve naming in security plugin

* update reporting licensing
2019-12-17 15:43:19 +01:00
Patrick Mueller 4f5db1498b
adds per-actionType enablement via config xpack.actions.enabledActionTypes (#52967)
* adds per-actionType enablement via config xpack.actions.enabledTypes

resolves: https://github.com/elastic/kibana/issues/52326
2019-12-17 09:13:44 -05:00
Aleh Zasypkin 341630d5b3
Use savedObjects provided by the platform instead of legacy shim. (#53264) 2019-12-17 15:04:25 +01:00
patrykkopycinski c9ed87c696
[SIEM] Fix Edit Filter suggestions displayed behind Filter Popover (#53166) 2019-12-17 11:56:33 +01:00