Commit graph

29549 commits

Author SHA1 Message Date
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
Mike Côté cf8cb62bf5
Update codeowners to include functional tests (#53045) 2019-12-17 15:51:40 -05:00
gchaps 099ec54c72
[DOCS] Updates Discover documentation (#51837)
* [DOCS] Updates View in Context doc in Discover

* [DOCS] Updates Discover docs on viewing document data

* [DOCS] Adds workflow to Discover docs

* [DOCS] Updates Discover docs intro page

* [DOCS] More updates to Discover docs

* [DOCS] More updates to Discover docs

* [DOCS] Incorporates review comments in Discover docs

* [DOCS] Edits to discover intro

* [DOCS] Edits to Discover docs

* [DOCS] Incorporates edits in Discover docs
2019-12-17 11:48:55 -08:00
Spencer e5c562b5c1
associate metadata with runnables (#53245) 2019-12-17 12:26:50 -07: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 fb1670c54b Revert "Update dependency jimp to v0.9.3 (#53075)"
This reverts commit 19c0626aa5.

# Conflicts:
#	yarn.lock
2019-12-17 11:32:50 -07:00
spalger 64a7b51a41 Revert "Update dependency geckodriver to ^1.19.1 (#53073)"
This reverts commit f8c98f6e71.
2019-12-17 11:32:50 -07: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 ce3b4748d7 Revert "Update eslint related packages (#53078)"
This reverts commit 9e50a1089c.
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
Liza Katz 2b1cb0666b
register per app top nav items (#53136) 2019-12-17 13:01:56 +00:00
Matthias Wilhelm 2ef2bcaee6
[Dashboard] Deangularize saved object handling (SavedObjectDashboard) (#52850)
* Initial typescript version

* Use extracted functions

* Fix types

* Extract save & initialize functions

* Add even more typescript

* Improve types

* Improving types, extracting another function

* Code refactoring, deangularisation, migrate to Promise

* Migrate Visualize AngularPromise to native promise

* Fix Discover Edit URL link

* Migrate to use of NP services (savedObjects + indexPatterns)

* Migrate confirmModalPromise to a NP backed version - add code :)

* cleanup confirmModalPromise, fix creation of visualize data table

* Fix JSON import test

* Remove init from types

* Split between createSavedObjectClass and SavedObjectProvider

* Adapt Discover to use deangularized SavedObject version

* Fix type errors

* Remove redundant file

* Fix functional test failure importing JSON

* Migrate chrome.untrackNavLinksForDeletedSavedObjects

* Improve types

* Code improvements

* Require NP chrome for SavedObjectLoader

* Fix type error

* Fix IndexPatterns type error

* maja review improvements

* Fix broken functional test

* Add missing static properties of SavedSearch class

* Migrate indexPatterns to data plugin

* Deangularize saved_workspaces.js and saved_workspaces.js

* Fix types

* Migrate to TypeScript

* use encodeURIComponent in saved_visualizations.js, remove kbnUrl

* Remove unnecessary type cast

* Further deangularize gis_map_saved_object_loader.js

* Remove npStart imports from helper functions

* Fix types

* Review changes

* Improve types

* Fix mocha tests that broke due to refactoring

* Add more types

* Add missing savedObjects property in dashboard_app_controller.tsx

* Type improvements

* Convert saved_dashboard.js to saved_dashboard.ts

* Convert saved_dashboard.js to saved_dashboard.ts

* remove console.error

* fix jest tests

* Address review comments

* Solve type conflict

* Fix types

* Adapt types

* Restore statics values at SavedSearch

* Revert "Address review comments"

This reverts commit 87b0ba7e2f.

* Revert "Restore statics values at SavedSearch"

This reverts commit 5b7b989ac5.

* Restore statics values at SavedSearch

* Complete TypeScript conversion

* Fix types

* Set seachSource to true

* Fix tests

* Minor adaptions

* Migrate import from 'kibana/server' to 'kibana/public'

* Remove redundant ! from savedDashboard.searchSource
2019-12-17 12:02:49 +01:00
Andrew Wilkins fc1911931d
update apm index pattern (#53250) 2019-12-17 19:01:55 +08:00
patrykkopycinski c9ed87c696
[SIEM] Fix Edit Filter suggestions displayed behind Filter Popover (#53166) 2019-12-17 11:56:33 +01:00
Pierre Gayvallet 2426811bca
Migrate instance uuid logic to new platform (#52060)
* move and migrate uuid code to new platform

* create and wire uuid service

* handle legacy compatibility

* update generated docs

* add `set` to LegacyConfig interface

* Fix types

* fix config access

* respect naming conventions for uuid

* remove hardcoded config paths

* rename manageInstanceUuid to resolveInstanceUuid

* moves legacy config uuid set from uuid to legacy service

* log specific message depending on how uuid was resolved

* resolve merge conflicts

* use fs.promises

* add forgotten @public in uuid contract

* add explicit errors and tests

* ensure uuid is valid in configuration

* fix read/write tests
2019-12-17 09:25:21 +01:00
Daniil Suleiman 1321892b1c
Update hjson version to 3.2.1 (#53105) 2019-12-17 11:03:27 +03:00