* [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
* 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
* 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
* Better explanation about the Prettier recommendation (extension vs. NPM module)
* Contributing docs: Add side effect from using the Prettier extension
* 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
* 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
* 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`
* 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
## 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)
* 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.
* 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
* 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
* 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