Adds `serviceMap` helper to generate transaction and spans in synthtrace
by defining a set of traces from which a service map can be rendered.
This can be considered a follow-up to
https://github.com/elastic/kibana/pull/149900 where synthtrace was used
to generate service maps for api integration tests.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Add a loading state to the `DeleteDataStreamConfirmationModal` component
to inform users that the action is being performed.
When running the linter, it changed the file formatting completely. Let
me know if I should bypass the lint hook and send the PR again.
Fixes#152439
## Summary
It hides the policy details link from artifacts form flyout when user
does not have policy management privileges.
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Closes https://github.com/elastic/kibana/issues/151489
This is the server side portion of support for transient / inline Log
Views. Alerting and ML based functionality is scoped to the persisted
type only, as we won't be supporting inline Log Views in those contexts.
In terms of UI, changes have been made as close to the edge / boundary
to the server (e.g. where we actually make network requests) as
possible. This is because the bulk of the UI changes will come in
https://github.com/elastic/kibana/issues/142840.
## Testing
This is predominantly a type-driven refactoring (the best kind), so we
should be relatively safe here (especially since inline views aren't in
the UI yet). But, a quick test of each page and a high level functional
test would still be good.
Fixes https://github.com/elastic/kibana/issues/152384
The `isCompatibleVisualizationType` function will now return `false` no
layers contain data views.
Also improves the incompatible reason to be `Cannot find a date field.`
if the layer dimension does not contain a `operation` object, rather
than `Cannot read properties of undefined (reading 'dataType')`
Also removes an unused aria label which causes a browser console error.
This PR registers three file kinds for cases. One for each instance of
cases (stack, observability, and security). Each solution needs separate
http tags for the routes that are generated by the file service to
implement RBAC.
I refactored the logic to remove some duplication across the three
plugins since we're essentially registering the same http tags with
slightly different names.
This PR shouldn't affect any of the current functionality.
Notable changes:
- I split up the constants.ts file, really the only change is adding the
file kinds logic to generate the http tags the rest is copy/paste
- Refactored the logic to generate the `api` http tags for each plugin
- Registered the three file kinds
Issues: https://github.com/elastic/kibana/issues/151780https://github.com/elastic/kibana/issues/151933
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Removes the scss files which were being used to override various eui
styles or add styles to custom components.
Affect the anomaly detection jobs list and wizards.
This is not an in-depth refactor of our styles, and so some overrides
are still necessary in order to retain an identical UI, in these cases
the style overrides have been moved to inline emotion `css`.
Part of https://github.com/elastic/kibana/issues/140695
Removes client side `getTimeFieldRange()` code within the data
visualizer plugin. The code has been moved to the date picker package in
`x-pack/packages/ml/date_picker/src/services/time_field_range.ts`and the
duplicate is no longer necessary.
## Summary
When user selects to bulk duplicate, a modal pops up asking them how
they want to proceed with any rule exceptions. The rule count in this
modal is wrong when all rules are selected. Updated so that now the
count in the modal matches the actual selected count.
Resolves https://github.com/elastic/kibana/issues/151135
## Summary
Moved the logic around to check flapping after an alert is already
returned for notification. I also updated the event log test cases to
match examples in the rfc.
### Checklist
- [x] [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
### To Verify
The new test cases capture this example but if you want to test it
locally:
- Create a connector and make sure to save the connector id
```
curl -X POST -u {username}:{password} "http://localhost:5601/api/actions/connector" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'
{
"connector_type_id": ".server-log",
"name": "server log",
"config": {},
"secrets": {}
}'
```
- Create the rule and let it run
```
curl -X POST -u {username}:{password} "http://localhost:5601/api/alerting/rule/" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'
{
"rule_type_id": "example.pattern",
"name": "pattern",
"schedule": {
"interval": "5s"
},
"actions": [
{ "group": "default", "id": {connector id}, "params": { "message": "{{alert.id}} active on run {{context.runs}} step {{context.patternIndex}} flapping {{alert.flapping}}"}},
{ "group": "recovered", "id": {connector id}, "params": { "message": "{{alert.id}} recovered on run flapping {{alert.flapping}}"}}
],
"consumer": "alerts",
"tags": [],
"notify_when": "onActionGroupChange",
"params": {
"patterns": {
"instA": " a - - a - a - a - a - - - - - - - - "
}
}
}'
```
- Verify that you see the following, we want to make sure that aren't
missing any notifications

Added several tests for terms query rules, which tests that match and
term query rules are the same.
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This updates the utility to process a string of one or more indices. It
assumed when one part of the string passed contained `remote:`, all
remaining indices would also have to contain `remote`, but this isn't
necessary.
## Summary
Adds a dev docs guide for the core-approved versioning strategy. This
strategy is subject to some iteration but is based on the work we did
for the Saved Objects Management plugin in
https://github.com/elastic/kibana/pull/149495.
Closes https://github.com/elastic/kibana/issues/149929
## How to test
1. Run `./scripts/dev_docs.sh`
2. Navigate to "Versioning interfaces" in the side nav menu
---------
Co-authored-by: Luke Elmers <lukeelmers@gmail.com>
Fixes https://github.com/elastic/kibana/issues/152389
PR adds check to ensure client has access to EMS before using EMS fonts.
If the client does not have access to EMS fonts then a warning is logged
and map falls back to open sans fonts served from Kibana server.
## Summary
Closes [#152328](https://github.com/elastic/kibana/issues/152328)
This PR fixes the average calculation in the Snapshot API, filtering out
buckets with null values from it, which are more likely to appear with
queries that use small data ranges.
The results after this change are equal to what Elasticsearch would
calculate in the avg aggregation
### How to test
- Make sure you have metrics data (either through enabling the system
module in metricbeat or connecting your local kibana to an oblt-cli
cluster)
- Navigate to `Infrastructure` > `Hosts`
- Filter the results to see a single host
- Change the data range filter and compare the KPIs against the table.
- Validate other pages that use the Snapshot API (Inventory UI and
Metrics UI to see if the results there are still correct
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
In this PR we ensure that we are adhering to the goals of versioned HTTP
APIs to:
1. Not send SO attributes directly over the wire
2. Have a separate set of interfaces that can be referenced by public
and maintained by server
## Summary
Ref https://github.com/elastic/observability-docs/pull/2715
Adds relevant `tags` to all operations in order to help group them more
effectively in the generated docs.
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
- addresses feedback from https://github.com/elastic/kibana/pull/149208
- typings for `getSignalsQueryMapFromThreatIndex`
- fixes interface name for `getSignalsQueryMapFromThreatIndex`
- small code refactorings
More details in comments of the initial PR
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
**Relates to:** https://github.com/elastic/kibana/pull/151244
## Summary
Re-enable `Do not clears kql when navigating to a new page` url state e2e test.
## Details
Investigation has shown that https://github.com/elastic/kibana/pull/150787 lead to breaking this test. While it's not clear from the EUI upgrade PR itself the cause lays under the hood. It fixes retrieving the state (current KQL) from the url. As the test visits the page with the saved KQL which is properly restored the next `kqlSearch()` command types the same KQL in the query bar leading to invalid KQL and broken test eventually. For some reason the KQL wasn't able to restore on this page while it's not an issue anymore I removed `kqlSearch()` command and fixed the test this way.