* remove allow_no_indices param, adds a check if response has empty indices property then write error status with index patterns provided to rule
* fix tests
* fix tests and update with comments
* update integration tests
* adds integration test for when an index pattern doesn't exist the rule should fail and when one index pattern does exist but another does not, the rule should succeed
* Add API integration tests for data streams list, including one that is expected to fail due to reliance on number of backing indices
* Use ES data streams API as source of truth for list of data streams, and only query against backing indices afterwards
* Get package name from data stream meta info
* Increate retry timeout
* Move initial info requests inside Promise.all
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add encodePathParam helper + update components that need it
- Primarily document URLs & analytics queries (which uses generateEnginePath)
* Add useDecodedParams helper + update components that need it
- Documents titles & Analytics queries
* [Misc] Change popout icon to eye
- Feedback from Davey - the pages don't open in a new window, so shouldn't use the popout icon
- Not strictly related but since we're touching these links anyway, I'm shoving it in (sorry)
* Remove document detail decode test
- now handled/tested by useDecodedParams helper
* Add new generateEncodedPath helper
- Should be used in place of generatePath
* Update all instances of generatePath to generateEncodedPath
for consistency across the App Search codebase
* Fix failing tests due to extra encodeURI() done by generatePath
* Add missing branch test for analytics query titles
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* migrate file_upload plugin to maps_file_upload
* update plugins list
* migrate ml import endpoint
* migrate ml telemetry to file_upload plugin
* add fileUpload plugin to ml
* add TS project
* update ML to use file_upload endpoint
* move types to file_upload plugin
* ignore error
* clean up
* i18n clean-up
* remove schemas from ml
* remove usageCollection from ml
* node scripts/build_plugin_list_docs
* update telemety collector
* revert changes to ingestPipeline schema
* change name of TELEMETRY_DOC_ID to unique value
* remove ImportFile from ml/server/routes/apidoc.json
* fix typo in x=pack/tsconfig.json
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
When getting the start and end times, use the d3 time scale `ticks` function to round the start and end times.
Example from a query:
Before:
```json
{
"range": {
"@timestamp": {
"gte": 1611262874814,
"lte": 1611263774814,
"format": "epoch_millis"
}
}
},
```
After:
```json
{
"range": {
"@timestamp": {
"gte": 1611263040000,
"lte": 1611263880000,
"format": "epoch_millis"
}
}
},
```
The `ticks` function makes it so the amount of rounding is proportional to the size of the time range, so shorter time ranges will be rounded less.
Also fix a bug where invalid ranges in the query string were not handled correctly.
Fixes#84530.
* Adding dropdown for selecting different connector of same type
* Updating design
* Cleanup and i18n
* Adding functiional test
* Fixing unit test
* Fixing functional test
* Updating design
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* chore(NA): allow yarn dependencies to be installed when using bazel to manage yarn deps
* chore(NA): remove unused flag
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fixes error toaster on signals upgrades as well as creation of new signals if you have a user without a cluster manage privilege.
Simplest way to manually test both situations of a user on creating a new signal as well as upgrade is to first create a new role like so in dev tools:
```ts
PUT _security/role/reduced_permissions
{
"indices":[
{
"names":[
".siem-signals-*",
".lists-*",
".items-*"
],
"privileges":[
"all"
],
"field_security":{
"grant":[
"*"
]
},
"allow_restricted_indices":false
}
],
"applications":[
{
"application":"kibana-.kibana",
"privileges":[
"space_all"
],
"resources":[
"space:default"
]
}
]
}
```
You might have to change this line above to match what your `kibana.index` is set to if it is set:
```ts
"application" : "kibana-.kibana-hassanabad8",
```
Double check things in Stack Management to ensure you have access to at least default space:
<img width="1304" alt="Screen Shot 2021-02-01 at 5 45 54 PM" src="https://user-images.githubusercontent.com/1151048/106536383-906f3f00-64b5-11eb-97d3-060fa6f6206e.png">
Next add a user which has this role of `reduced_permissions` to login as that user. Next for testing that this causes an error toaster when there is no signals index is to either manually delete your signals index or change your `kibana.dev.yml` so that it thinks you have a new index:
```ts
xpack.securitySolution.signalsIndex: .siem-signals-some-new-index-name
```
Start up Kibana, login with the new user and visit any page and notice you get an error toaster like below:
<img width="808" alt="Screen Shot 2021-02-01 at 5 04 17 PM" src="https://user-images.githubusercontent.com/1151048/106535815-4afe4200-64b4-11eb-89b3-947b0e4ff7d5.png">
And also notice that you are blocked from viewing signals at this point:
<img width="1195" alt="Screen Shot 2021-02-01 at 5 04 43 PM" src="https://user-images.githubusercontent.com/1151048/106535835-56516d80-64b4-11eb-883c-2745b68843cf.png">
For upgrading signals manually, you can change the version number from dev tools or increment the number directly within this file and restart Kibana:
https://github.com/elastic/kibana/blob/master/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/get_signals_template.ts#L10
When you visit the detection page you will see the same error toaster and also be blocked. With this PR you will no longer be blocked.
### Checklist
Delete any items that are not applicable to this PR.
- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
* Add desired hover functionality and a test.
* Switch render from img to EuiImage for step view.
* Create new module for ping_timestamp. Extract a function. Add a test.
* Extract nav buttons, translations. Add tests.
* Fix a typo.
* Extract caption to own file. Add tests.
* Extract no image display to dedicated file. Add aria label. Add tests.
* Make import path more explicit.
* Move step image popover to dedicated file. Add tests.
* Clean up inline code in timestamp component.
* Explicit var names.
* Simplicity.
* Fix refactoring issues in test files.
* Move translations to central file.
* Rename test for better accuracy.
* [maps] Top hits per entity--change to title to use recent, minor edits
* Updated TopHitsPerEntity title and description to use the term relevant
* Change create multi-layer map tutorial title to be use-case driven
* reverting change to TopHits topic
* Updated title of getting started with maps tutorial
* Updated title of getting started with maps tutorial
Co-authored-by: Kent Marten <kmartastic@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Move `getTraceUrl` in the APM plugin to `getApmTraceUrl` in the observability plugin and use that instead in infra.
* Remove unused APM plugin depenency in infra.
* Use `pathname` instead of `hash` in infra to apm link to avoid unnecessary redirect.