Commit graph

29634 commits

Author SHA1 Message Date
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
Dmitry Lemeshko
745188b378
Fix code coverage for functional tests (#53297)
* update build scripts to not set inline source-maps for code coverage run

* [ftr] browser console log processing cleanup

* get last coverage piece directly via webdriver

* more cleanup

* review feedback
2019-12-19 08:23:30 +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
Wylie Conlon
1fbb00d230
[Lens] Add Lens issues and PRs to our project (#53145)
* [Lens] Add Lens issues and PRs to our project

* Fix syntax issues
2019-12-18 18:03:06 -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
Matthias Wilhelm
e03b15eb2c
[Visualize] Deangularize and typescriptify saved_object usage (#52984) 2019-12-18 19:42:18 +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
Alex Holmansky
942fdeeb2d
Fix a typo in PR project assigner workflow configuration (#53511)
* Workflow configurations to assign issues and PRs with Team:AppArch label to kibana-app-arch project

* Fix a typo in the label name

* Remove merge conflicts
2019-12-18 12:40:58 -05: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
Christiane (Tina) Heiligers
b34852a5bc
Telemetry usage collection welcome screen (#53084)
* Changes text dynamically based on the value of optIn in kibana.yml
2019-12-18 10:21:10 -07: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
Tim Roes
27b6e1c479
Upgrade typescript-eslint to 2.12 (#53477) 2019-12-18 16:04:12 +01: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
Rudolf Meijering
42d868db7f
[RFC][skip-ci] Prevent plugins from blocking Kibana startup (#45796)
* Draft RFC for unblocking plugin lifecycle methods

* Draft RFC for unblocking kibana startup

* Rename rfc from 0006 to 0007

* Add references to TC39 top-level await

* Update with review suggestion

Co-Authored-By: Court Ewing <court@epixa.com>

* Update RFC#0007

* Apply suggestions from code review

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

* Address review comments from @joshdover and @azasypkin

1. Fleshed out motivation, this RFC doesn't prevent errors, but isolates the
   impact on the rest of Kibana.
2. Added a footnote explaining that sync lifecycles can still block on sync
   for loops, so it's not a perfect guarantee (from @azasypkin).
3. Updated IContextProvider type signature in (2) to match latest master
4. Dynamically reloading configuration changes should be limited to a
   whitelist, risky changes like the Elasticsearch host should still require a
   complete restart. Added to (3) based on
   https://github.com/elastic/kibana/pull/45796#discussion_r331277153
5. Added Section 5, "Core should expose a status signal for Core services &
   plugins" (from @joshdover)
6. Added the drawback that incorrect, but valid config would not block Kibana,
   and might only be surfaced when the associted API/UI gets used (from
   @azasypkin)

* Formatting: number ordered list instead of letter for github rendering

* Apply suggestions from code review

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

* Update rfcs/text/0007_lifecycle_unblocked.md

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

* Example of plugin exposing API dependent on internal async operation

* Clarify that context providers won't block kibana, just their handlers

* Update adoption strategy as per latest discussion

* Fix formatting
2019-12-18 14:52:18 +01:00
Pierre Gayvallet
a806bac32d
Fix ClusterManager call parameters (#53263)
* Fix ClusterManager call parameters

* remove static ClusterManager.create

* migrate ClusterManager to ts

* remove default import for ClusterManager and Worker
2019-12-18 14:32:20 +01:00
Nik Everett
0c0fc60872
Docs: Add --direct_html (#53294)
Adds the new `--direct_html` argument while building the docs to line up
with the change in the global docs build made by elastic/docs#1645. This
cuts the time to build the docs in half.
2019-12-18 08:12:29 -05: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
Alexey Antonov
b1273e25b7
value suggestions server route -> data plugin (#53191)
* value suggestions server route -> data plugin

Closes #52842

* fix PR comments

* fix PR comments
2019-12-18 10:46:07 +03:00
Matthias Wilhelm
73a80d649b
[Timelion] deangularize and typescriptify saved_object usage (#53125) 2019-12-18 06:27:16 +01:00
Tiago Costa
fd97982b63
docs(NA): fix broken link for dockerfiles repo (#53448) 2019-12-18 04:00:11 +00:00
CJ Cenizal
528e495631
Add support for xpack.license_management.ui.enabled setting. (#53209) 2019-12-17 18:31:55 -08:00
Tiago Costa
621643dfff
[build] Add UBI7 docker target (#52735)
* feat(NA): add ubi based docker build images step

* chore(NA): remove ubiImageFlavor from appending to oss dir
2019-12-18 02:27:38 +00: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
Spencer
df3cfcb600
[yarn] upgrade caniuse-lite database (#53321) 2019-12-17 17:05:04 -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