Commit graph

28915 commits

Author SHA1 Message Date
Dmitry Lemeshko 6bc43bb9fd
[page_objects/common_page] convert to ts (#50771)
* [page_objects/common_page] convert to ts

* fix lint errors

* descrease navigation timeouts

* use template literal for log messages
2019-11-18 20:08:22 +01:00
Christiane (Tina) Heiligers 04425ff6cd
[NP Kibana Migrations ] kibana plugin home (#50444)
* [NP:Kibana:homeAPI] initializes a new plugin (WIP)

* Typing

* New plugin tutorials not needing server working

* Retains legacy tutorial registration and adds new route for new platform tutorial plugin registrations

* Adds comment on where to pre-register general non-plugin specific tutorials

* Converts TutorialsPlugin to TutorialsRegistry service in new Home plugin

* Changes call to location of registerTutorial in registerTutorials

* Adds console log for the home plugin that's returning an empty object

* Removes async from setup and start methods in the home plugin and the tutorials service

* Starts writing tests and creating mocks

* Adds basic tests for TutorialRegistry service

* Adds basic tests for TutorialRegistry service

* Adds test for route

* Adds mocks and tests for the home plugin

* Adds home plugin to security plugin and registers scoped tutorials service

* Removes incorrect addition to src core server

* Fixes type errors

* Deletes unused code

* Deletes duplicate golangMetricsSpecProvider registration

* Nests tutorials service in a tutorials key in the home plugin, changes api http routes for legacy platform and NP

* Changes url variable names
2019-11-18 11:47:27 -07:00
Kaarina Tungseth d04d5e9eef
[DOCS] Shareables naming convention (#50497)
* [DOCS] Shareables

* Updated topic titile
2019-11-18 12:36:11 -06:00
Melissa Alvarez dd06bfc6c3
[ML] DF Analytics - auto-populate model_memory_limit (#50714)
* create modelMemoryLimit estimation endpoint. add value to form

* add validation for model memory limit field

* update jest tests

* update validateModelMemoryLimitUnitsUtils to be more generic

* add placeholder and validation with helpText to modelMemoryLimit field

* update endpoint name to estimateDataFrameAnalyticsMemoryUsage for clarity

* tweak modelMemoryLimitEmpty check in reducer

* add tests for modelMemoryLimit validation
2019-11-18 13:21:35 -05:00
Mike Côté 10c158b483
Increase alerting test stability and reduce flakiness (#50246)
* Increase alerting test stability

* More changes to test methodology + bug fix in throttling

* Fix comments

* Cleanup

* Typo

* Fix broken tests

* Fix integration tests

* Fix typo
2019-11-18 12:59:21 -05:00
James Gowdy fb3d2f9324
[ML] Remaning new_job_new folder (#50917) 2019-11-18 16:51:06 +00:00
Joel Griffith 97c2bc9d7b
[Telemetry] Show opt-in changes for OSS users (#50831)
* WIP: Notice banner for OSS folks

* Add telemetryNotifyUserAboutOptInDefault to injected vars

* add userHasSeenNotice check

* More WIP on banner notice component

* Text changes on screens

* make userHasSeenNotice flag work

* Finalzed splash text + checking new flag

* Consolidating banner calls and saving status of opt-in notice

* Conditionally remove the banner and add some code docs

* Fixing prior welcome tests

* api integration test for user has seen opt in

* change post method to put in ui

* unit test for get_telemetry_notify_user_about_optin_default

* Ignore TS woes

* Adding new tests and snapshots for opt-in banner component

* Notice banner test

* Translation miss

* More opt-in tests

* increase types usage

* roll back core server api change

* update snapshot

* Prop name change + snapshot updates
2019-11-18 08:50:32 -08:00
Pete Harverson aaa3097ba8
[ML] Fix lat_long anomalies table links menu and value formatting (#50916) 2019-11-18 16:41:44 +00:00
Jean-Louis Leysens 0c2c63fabb
[Dev] Fix serialising a really big string (#50915)
* A fix

* limit size of webpack error object
2019-11-18 17:33:58 +01:00
Alejandro Fernández Haro 30269123f0
Better explanation about the Prettier recommendation (extension vs. NPM module) (#50629)
* Better explanation about the Prettier recommendation (extension vs. NPM module)

* Contributing docs: Add side effect from using the Prettier extension
2019-11-18 16:03:55 +00:00
Chris Roberson c739e2f50b
[Monitoring] Use a basic monitoring user for tests (#47865)
* Use a basic monitoring user for tests

* Rework this a little to fix the issue that the tests aren't working properly

* I think this is what we need to fix the tests

* Switch this order, since these tests cause a weird login loop in the current order
2019-11-18 11:00:40 -05:00
Chris Roberson f92573ab57
[Monitoring] Gracefully handle issue with filebeat indices (#48929)
* Gracefully handle issue with filebeat indices

* Update translation keys

* Update link

* Add in default, per PR comment
2019-11-18 10:49:33 -05:00
Chris Roberson 66038f5cfd
[Monitoring] Improve permissions required around setup mode (#50421)
* Add error messages when setup mode is not enabled, disable it for users without the necessary permissions, and change one query to relax the privilege requirements

* Fix default value

* PR feedback

* Forgot to update this part

* Fix tests
2019-11-18 10:24:53 -05:00
Joe Portner bde28957d9
Additional validation for elasticsearch username (#48247)
* Additional validation for elasticsearch username

If "elastic" user is set in config:
* In dev mode, throws an error
* In prod mode, logs a deprecation warning

* Fix user for functional tests

* Revert last two commits

Revert "Fix user for functional tests" and
"Fix user for plugin functional tests in Jenkinsfile"

* Change elasticsearch creds for test server

Now uses "kibana" user instead of "elastic" user

* Fix plugin API functional tests

* Fix PKI API integration test

* Change log messages, now conditional on `dist: false` not `dev: true`
2019-11-18 10:21:11 -05:00
patrykkopycinski 34c99cb1df
Revert changes to use_kibana_ui_setting (#50877) 2019-11-18 15:52:02 +01:00
James Gowdy eb4c47ef0c
[ML] Injectables refactor (#50512)
* [ML] Injectables refactor

* removing unrelated files

* additional typescript conversion

* more typescript conversion

* adding some return types

* fixing eui errors

* typescripting license checks

* updated based on review

* fixing merge conflict error

* converting tests to jest

* fixing types
2019-11-18 14:36:07 +00:00
Mikhail Shustov 2166044671
remove outdated comment (#50895) 2019-11-18 14:41:15 +01:00
Marta Bondyra 0fa36f8394
Fix: pagination controls should not scroll horizontally for sa… (#50764) 2019-11-18 13:42:14 +01:00
Alexey Antonov aed59d656b
[SIEM] Add SavedQuery in Timeline - cleanup (#50884) 2019-11-18 14:57:01 +03:00
Alexey Antonov 8f2e2af0e5
plugins/data - cleanup JEST: remove @kbn/expect (#50886) 2019-11-18 14:56:19 +03:00
Robert Oskamp dca8c24edd
[ML] Add tests to create transforms (#49760) 2019-11-18 12:54:51 +01:00
James Gowdy 6bdcb23c33
[ML] Enabling lat_long detector function in advanced wizard (#50787)
* [ML] Enabling lat_long agg in advanced wizard

* fixing tests
2019-11-18 10:31:39 +00:00
Mikhail Shustov 583500e526
allows plugins to define validation schema for "enabled" flag (#50286)
* validation error message gives a hint about error source

* allows plugins to define validation schema for "enabled" flag
2019-11-18 10:25:21 +01:00
Robert Oskamp 39aeaaa19f
Add retry to find.existsByDisplayedByCssSelector (#48734)
This PR fixes timeout handling in `find.existsByDisplayedByCssSelector` for elements that are found but (not yet) displayed.
2019-11-18 09:37:31 +01:00
Ahmad Bamieh d577d403e6
[i18n] integrate latest translations (#50864) 2019-11-17 17:52:23 +02:00
sainthkh d7f2ebc308 ui/resize_checker 👉 src/plugins/kibana_utils (#44750)
* Moved ResizeChecker to kibana_utils.

* Removed ResizeChecker from __LEGACY.
2019-11-17 16:22:03 +02:00
patrykkopycinski 18e587fbfe Fix @reach/router types (#50863)
Merging to fix master build

* Fix @reach/router types

* Update renovate.json5
2019-11-17 14:08:49 +02:00
James Gowdy 429c28dffb
[ML] Adding ML node warning to overview and analytics pages (#50766) 2019-11-17 11:24:46 +00:00
patrykkopycinski 4c33f2a359
Bump storybook dependencies (#50752) 2019-11-16 20:40:06 +01:00
Dario Gieselaar cae3a472c6
[APM Replace usage of idx with optional chaining (#50849)
Closes #50758
2019-11-16 18:56:37 +01:00
patrykkopycinski ee7338e82d
[SIEM] Fix eslint errors (#49713) 2019-11-16 18:24:27 +01:00
Søren Louv-Jansen 7b95f789a1
Improve "Browser client is out of date" error message (#50296)
* improve "Browser client is out of date" error message

* Improve wording of error message

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

* Fox formatting

* Fix format
2019-11-16 10:15:46 +01:00
Frank Hassanabad 6ff91e8c94
[SIEM][Detection Engine] REST API improvements and changes from UI/UX feedback (#50797)
## Summary

Updated REST API from feedback from the UI/UX
  * Changes the `id` to be `rule_id` on PUT/POST and makes it optional for a POST (create).
  * On data return sets both `id` and `rule_id` is returned. If `rule_id` is not set, a uuid.v4() will b assigned to the rule_id and the value will be returned.
  * Transforms output of all endpoints to be 1-1 to the input.
  * Fixes delete to return the deleted rule
  * Changes the URL to be `/api/detection_engine/rules`
  * Changes the POST behavior to fail with a `409 (conflict)` if the rule already exists (For creates)
  * Changes the POST behavior where sending in a `rule_id` is now optional. If none are sent in it does not create a `rule_id` and instead returns `null` for the `rule_id` and the autogenerated one.
  * Changes the PUT behavior to fail with a `404 (not found)` if the rule does not already exist (For updates)
  * Deletes the actions code and just uses an empty array since we don't have actions yet
  * Makes all error conditions consistent and does not expose the underlying error codes. Only exception to the rule is if an error condition returns non `404` or something unexpected. In which case it will show that error upstream.


Example post output:

```ts
$ ./post_signal.sh
{
  "created_by": "elastic",
  "description": "Detecting root and admin users",
  "enabled": true,
  "false_positives": [],
  "from": "now-6m",
  "id": "8277a0e8-474c-4507-9c11-5f197b5fe2d5",
  "index": [
    "auditbeat-*",
    "filebeat-*",
    "packetbeat-*",
    "winlogbeat-*"
  ],
  "interval": "5m",
  "rule_id": "rule-1",
  "language": "kuery",
  "max_signals": 100,
  "name": "Detect Root/Admin Users",
  "query": "user.name: root or user.name: admin",
  "references": [
    "http://www.example.com",
    "https://ww.example.com"
  ],
  "severity": "high",
  "updated_by": "elastic",
  "tags": [],
  "to": "now",
  "type": "query"
}
```

Example delete and get URL's now (see scripts for more details):

```ts
${KIBANA_URL}/api/detection_engine/rules?rule_id="rule-1"
${KIBANA_URL}/api/detection_engine/rules?id="04128c15-0d1b-4716-a4c5-46997ac7f3bd"
```

### 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-11-15 23:56:45 -07:00
Alexey Antonov 9769be3a28
Move @kbn/es-query into data plugin - es-query folder (#50182)
* Move @kbn/es-query into data plugin - es-query

* fix eslint issues

* Fix PR comments

* fix CI

* fix Ci

* remove extra ts-ignore

* fix imports

* fix imports

* Test importing from data/public and casting to ES Field Types.

* Test importing from data/public and casting to ES Field Types.
2019-11-15 23:35:21 +03:00
Alison Goryachev 03e2a683ba
Index Management new platform migration (#49359)
* server np migration phase i

* prep client code for np migration

* create plugin definition for client

* move to use client http service from core

* move to use chrome service from core

* move to use documentation service from core

* use notification service from core

* use i18n context from core

* move ui_metric service to shim

* fix error messages

* fix build errors

* clean up request logic

* fix tests

* fix ilm integration

* fix ilm integration, remove unused scss

* fix ts

* fix ts
2019-11-15 13:54:40 -05:00
liza-mae 32436cf579
Increase retry for cloud snapshot to finish (#50781) 2019-11-15 11:53:47 -07:00
Elizabet Oliveira 4565a44f9c
Removing EuiCode from inside EuiPanel (#50683) 2019-11-15 18:41:38 +00:00
Devin W. Hurley 040c309b79
[SIEM] Tests for search_after and bulk index (#50129)
* tests for detection engine get/put utils

* increases unit test code statement coverage to 100% for search_after / bulk index reindexer

* removes mockLogger declaration from individual test cases - clears mock counts before each test case runs so as to not accumulate method calls after each test case

* resets default paging size to 1000 - typo from when I was working through my tests

* updates tests after rebase with master

* fixes type check after fixing test from rebase with master

* removes undefined from maxSignals in type definition, updates tests with pure jest function implementations of logger and services - modifying only the return values or creating a mock implementation when necessary, removed some overlapping test cases

* fixes type issue

* replaces mock implementation with mock return value for unit test

* removes mock logger expected counts, just check if error logs are called, don't care about debug / warn etc.

* fixes more type checks after rebase with master
2019-11-15 13:16:12 -05:00
Tim Roes bbb9421678
Make babel understand TypeScript 3.7 syntax (#50772)
* Use correct babel plugins

* Make one change using new operator

* Fix i18n babel config
2019-11-15 18:29:25 +01:00
Brandon Kobel 18cb01ac2d
Fixing mocha tests and broken password change status codes (#50704)
* Fixing mocha tests and broken password change status codes

* Updating API integration test
2019-11-15 12:29:05 -05:00
Ryan Keairns 69431b55d5
[Canvas] Use compressed forms in sidebar (#49419)
* compressed sidebar design

* add back metric help, style no datasource msg

* re-style remove button

* re-style element status section

* remove unused component import

* update storyshots

* clean up unused i18n values

* address feedback

* address i81n feedback

* update storyshot

* convert string to i18n

* style grouped sidebar messages

* update storyshots
2019-11-15 12:18:49 -05:00
Brian Seeders 504604a4f2
Add labels to shell scripts in Jenkins (#49657) 2019-11-15 10:59:05 -05:00
Brian Seeders a32213f849
Retry git clone up to 8 times before failing a build (#50734) 2019-11-15 10:55:57 -05:00
Larry Gregory 1c415e0cad
Default payload validation (#48753)
* trial for default payload validation

* relaxing default validation

* some cleanup and testing

* update xsrf integration test

* adding API smoke tests

* fixing types

* removing Joi extensions

* updating tests

* documenting changes

* fixing NP validation bypass

* fix lint problems

* Update src/legacy/server/http/integration_tests/xsrf.test.js

* Update src/legacy/server/http/integration_tests/xsrf.test.js

* revert test changes

* simplifying tests


Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-11-15 10:53:33 -05:00
Tyler Smalley 1dfc70fe68 Skip flaky "<Settings /> can navigate Autoplay Settings" test
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-11-15 07:32:27 -08:00
Tyler Smalley ae413abfa0 Skip flaky "<Settings /> can navigate Autoplay Settings, closes" test
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-11-15 07:30:45 -08:00
Maja Grubic 7ad6827aa9
Adding tooltip explanation on range filters (#50186) 2019-11-15 15:15:13 +00:00
Jean-Louis Leysens 63a70c0d2a
[Grokdebugger] Theme and Mode imports (#50473)
* Added textmate theme and JSON mode imports

* Added text themes to other inputs [skip ci]
2019-11-15 15:19:02 +01:00
Dmitry Lemeshko e064205471
update chromedriver to 78 (#50737) 2019-11-15 13:56:56 +01:00
Cauê Marcondes c982b8f4dc
[APM] Update Error occurrences graph tooltip to display start and end for bucket period (#49638)
* Adding end time inside error tooltip

* changing end time precision

* refactoring

* refactoring

* pr comments refactoring

* pr comments refactoring

* pr comments refactoring

* pr comments refactoring

* renaming some functions to make it more clear

* Refactoring date difference range

* refactoring transformers file

* refactoring date time formatters

* refactoring formatters into a new folder

* refactoring getDurationUnit

* refactoring duration formatter

* fixing unit test

* refactoring unit test

* Adding timezone to tests

* fixing translation issue

* fixing translation issue

* improving code

* exporting toMicroseconds

* removing unused import

* refactoring duration

* refactoring duration

* fixing unit test

* fixing unit test
2019-11-15 13:26:57 +01:00