## Summary
Closes https://github.com/elastic/kibana/issues/163981
The Dashboard and Panel Settings Flyouts already seem to be fixed but
the Controls Settings Flyout did not specify the maxWidth.
The drilldown (manage and create) flyouts did not have a maxWidth
specified but based on main, it seems to match medium. To avoid any
unclearness, I have added the maxWidth property to the flyout.
The edit and create drilldowns that didn't have specified maxWidths can
be toggled to each other so they should be the same. I think there can
be a little bit of a debate on which makes the most sense. Although
there is some white space to the right of the buttons in the create
drilldown I think it makes the most sense for the manage drilldowns to
not be cramped and have the maxWidths be medium if possible.
<img width="900" alt="Screenshot 2024-07-24 at 1 19 51 PM"
src="https://github.com/user-attachments/assets/549c34df-5d85-40f4-bfb4-dd5d17d96ca5">
### Edit drilldown
Size s makes it look more cramped and breaks the word Discover onto two
lines:
<img width="626" alt="Screenshot 2024-07-24 at 1 15 09 PM"
src="https://github.com/user-attachments/assets/89013146-f437-4180-8de0-12d033198b88">
Size m
<img width="1044" alt="Screenshot 2024-07-24 at 1 09 35 PM"
src="https://github.com/user-attachments/assets/60dd3838-724a-42c4-b717-c2d7e75a3c10">
### Create drilldown:
I'm leaning towards size 's' for the create drilldown flyout based on
the following screenshots:
Size s
<img width="631" alt="Screenshot 2024-07-24 at 1 12 46 PM"
src="https://github.com/user-attachments/assets/7e052bbf-3d02-492e-9332-8998b01c95b7">
Size m
<img width="710" alt="Screenshot 2024-07-24 at 1 10 58 PM"
src="https://github.com/user-attachments/assets/6f35ee9c-5858-400d-9498-c90323f44303">
## Summary
Adds Amazon Bedrock support to the [Inference Endpoints management
UI](https://github.com/elastic/kibana/pull/186206)
(`relevance/inference_endpoints`) management list view.
### 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
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
PR does the following
* Adds `untilInitialized` to `ControlGroupApi`.
* Control group example updated to not mount data table react embeddable
until control group is initialized (and all control group filters are
available)
* Updates `buildControl` to be async
* Updates all controls to `await` filters before returning
`buildControl`
* Updates control group to display loading indicator until all controls
loaded
* Moves control group react logic into `ControlGroup` component
* Implements `Apply` button
<img width="600" alt="Screenshot 2024-07-24 at 7 33 25 AM"
src="https://github.com/user-attachments/assets/4840c731-2287-4a12-aa9c-3d9c83d64d14">
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This action is triggering on pushes to `main` on forks as well, this PR
skips the action on forks. The action will fail on the fork and notify
the developer.
### Testing
Failure on my fork's `main` before this PR
1010067456
Tested with this branch in my fork and it skipped properly
96e2ed6e601010151467
Flipped the flag to ensure it's working
2a586ccd731010153452
## Summary
Adding generic support for experimental features in timelines
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Fixes https://github.com/elastic/kibana/issues/185999
## Summary
This PR fixes the variable replacement when the variable contains an
object value .
**How to test:**
1. Go to Console and create the following variables:
`var1`: `{"match_all": {}}`
`var2`: `index`
`var3`: `match_all`
2. Test using an object variable inside the request data:
```
GET _search
{
"query": "${var1}"
}
```
should be sent as `query: {match_all: {}}` in the payload.
3. Test using a variable in the URL:
`PUT /test-${var2}` should be sent as `PUT /test-index` in the payload.
4. Test using a string variable in the request data:
```
GET _search
{
"query": {
"${var3}": {}
}
}
```
should be sent as `query: {match_all: {}}` in the payload.
5. Test using undefined variables:
```
GET _search
{
"query": {
"${var4}": {}
}
}
```
or `PUT /test-${var5}`
Both should be sent as they are.
<!--
### Checklist
Delete any items that are not applicable to this PR.
- [ ] 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/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### 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)
-->
Similar to how APM is shown as an integration as well, show the new
OTel-based flow on the integrations page so people find it from there as
well:
<img width="991" alt="Screenshot 2024-07-25 at 11 32 46"
src="https://github.com/user-attachments/assets/4d806ed1-4b01-4ac8-985c-0e59708fa4c6">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Related to #183220
## Summary
This PR saves ECS groups in the Alert As Data (AAD) document for the log
threshold and SLO burn rate rules.
|Rule|AAD document|
|---|---|
|SLO burn
rate||
|Log
threshold||
### 🧪 How to test
- Create a log threshold and SLO burn rate rule with multiple groups
(both ECS and non-ECS fields)
- Check the related AAD document; you should be able to see the ECS
fields at the root level and not see non-ECS fields there
- Check the same information for the recovered alerts
- Rules without group by should work as before
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Resolves#188643Resolves#188644Resolves#188630
## Summary
Various fixes for Quickstart Onboarding flows
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Followup to https://github.com/elastic/kibana/pull/187999
## Summary
Dynamically set capacity for cloud deployments if claim strategy is
`mget`
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
**Issue**
The regular expression used to grep tests for serverless execution is
too loose. Tests marked as `@skipInServerlessMKI` are not executed in
the regular serverless PR pipeline as expected.
**Expected Behavior**
Tests tagged with `@skipInServerlessMKI` should only be skipped in the
MKI environment. For example, a test tagged `@ess @serverless
@skipInServerlessMKI` should run in the ESS and regular Serverless
pipelines (PR, `main`) but should be skipped in the MKI environment.
**Current Behavior**
Tests with the tag `@ess @serverless @skipInServerlessMKI` are not being
executed in the regular serverless pipelines, nor in the MKI environment
where they are expected to be skipped.
**Reason**
The regular expression`'/^(?!.*@skipInServerless).*@serverless.*/'` is
too broad. It incorrectly excludes tests tagged with
`@skipInServerlessMKI` because it matches the common `@skipInServerless`
part.
**Solution**
Refine the grep pattern to match the whole word `@skipInServerless` at
the beginning or end of a string, or surrounded by whitespace
`'/^(?!.*(^|\\s)@skipInServerless(\\s|$)).*@serverless.*/'`
**Example**
Tests not executed in PR pipelines due to the `@skipInServerlessMKI`
tag:
1.
`detections_response/detection_engine/actions/trial_license_complete_tier/update_actions.ts`
* Total test cases: 7
* Expected to execute in serverless: 7
* Tests with @skipInServerlessMKI tag: 4
* [Actually executed in serverless environment:
3](https://buildkite.com/elastic/kibana-pull-request/builds/221346#0190b59a-76c0-4c8d-976c-a5de1070fb2d/1988-2280)
* [Executed with change in regexp:
7](https://buildkite.com/elastic/kibana-pull-request/builds/221386#0190b5fe-fd96-487a-a902-bd21db2bec3a/1981-2269)
2.
`detections_response/detection_engine/alerts/trial_license_complete_tier/assignments/assignments_serverless.ts`
* Total test cases: 7
* Expected to execute in serverless: 7
* Tests with @skipInServerlessMKI tag: 7
* [Actually executed in serverless environment:
0](https://buildkite.com/elastic/kibana-pull-request/builds/221346#0190b59a-764c-426f-a8b0-384eebf4c438/2621-2890)
* [Executed with change in regexp:
7](https://buildkite.com/elastic/kibana-pull-request/builds/221386#0190b5fe-fd56-445e-93cf-58c980c34228/3807-4146)
3.
`entity_analytics/risk_engine/trial_license_complete_tier/risk_scoring_task/task_execution.ts`
* Total test cases: 7
* Expected to execute in serverless: 6
* Tests with @skipInServerlessMKI tag: 6
* [Actually executed in serverless environment:
1](https://buildkite.com/elastic/kibana-pull-request/builds/221346#0190b59a-7670-4721-8984-778486b85c35/1625-2045)
* [Executed with change in regexp:
6](https://buildkite.com/elastic/kibana-pull-request/builds/221386#0190b5fe-fd56-445e-93cf-58c980c34228/3807-4146)
This PR aims to improve `context.page_name` within stack telemetry.
After the changes we will start seeing information about dataset quality
in `application:management:data_quality` rather than just a generic
pageName such as `application:management`.
<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/d172353a-824d-46f7-8d5e-7c564375827a">
**Addresses**: https://github.com/elastic/kibana/issues/184428
## Summary
This PR adds scripts for automatic bundling of Endpoint Management API OpenAPI specs as a part of PR pipeline. Corresponding result bundles are automatically committed to the Security Solution plugin `x-pack/plugins/security_solution` in the `docs/openapi/ess/` and `docs/openapi/serverless` folders (similar to https://github.com/elastic/kibana/pull/186384).
## Summary
This adds an error callout to the index pages in Search if the mappings
contain a semantic text field that references a non-existent inference
ID, or an inference ID without a model that has started.
## Summary
Enable minute level scheduling in UI for all connector sync jobs. This
fixes the bug with minute level scheduling not present for incremental
sync jobs.
It seems that during [this
migration](bb5ca2e187 (diff-328630e75e33bdb823bad243330681942ab5a391c5b83cad7f3186c4ca651e9dL219))
the minute level scheduling for incremental syncs was lost somehow.
As of now the `ConnectorCronEditor` is only used for connector sync
jobs, all connector sync jobs support minute-level scheduling so I
deleted the `MINUTE` from default `frequencyBlockList` in the component.
<img width="680" alt="Screenshot 2024-07-26 at 10 32 16"
src="https://github.com/user-attachments/assets/7070227e-b332-4217-beea-a169c8b3d4fc">
## Summary
Closes https://github.com/elastic/kibana/issues/187587
This PR changes how the dashboard panel selection items get computed, it
had previously been computed eagerly, in this implementation panel
selection items would only be computed when the user actually clicks the
`add panel` button, with it's results cached so that subsequent
interactions with the `add panel` button leverages the already computed
data.
**Notable Mention:**
The options presented as the dashboard panel list now only comprise of
uiActions specifically registered with the uiAction trigger
`ADD_PANEL_TRIGGER` and specific dashboard visualisation types. See
https://github.com/elastic/kibana/pull/187797#discussion_r1681320456 to
follow the reasoning behind this.
That been said adding new panels to the dashboard, would be something
along the following lines;
```ts
import { ADD_PANEL_TRIGGER } from '@kbn/ui-actions-plugin/public';
uiActions.attachAction(ADD_PANEL_TRIGGER, <registredActionId>);
// alternatively
// uiActions.addTriggerAction(ADD_PANEL_TRIGGER, ...someActionDefintion);
````
### Visuals
7c029a64-2cd8-4e3e-af5a-44b6788faa45
### How to test
- Navigate to a dashboard of choice
- Slow down your network speed using your browser dev tools, refresh
your dashboard, and click on the “Add panel” button as soon as it is
available (before the panels have a chance to load).
- You should be presented with a loading indicator, that eventually is
swapped out for the list of panels available for selection.
### Checklist
Delete any items that are not applicable to this PR.
<!--
- [ ] 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/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials -->
- [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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
<!--
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### 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)
-->
Resolves https://github.com/elastic/kibana/issues/189112
## Summary
Adds a mapping to the alerting rule type registry to manage rule types
with a custom task cost and register appropriately. Adds an integration
test to task manager so we can be alerted to task types that register
with non-normal task costs.
Resolves https://github.com/elastic/kibana/issues/187275
When looking at the flaky test logs, I could see some ES errors for the
`test.cancellableRule` rule type we're using in this test. This rule
type uses a shard delay aggregation to increase the execution duration
of a rule to force a timeout. Switching instead to just delaying using
an `await new Promise((resolve) => setTimeout(resolve, 10000));`.
## Summary
In order to begin work for encryption key rotation in serverless, we
will need to expose the endpoint use to bulk re-encrypt saved objects.
This endpoint was previously unregistered in serverless. This PR
registers the API and marks it as internal when a serverless build
flavor is detected.
### Tests
-
x-pack/test_serverless/api_integration/test_suites/common/platform_security/encrypted_saved_objects.ts
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
In https://github.com/elastic/kibana/pull/188410 we moved history and
latest index templates from global scope to definition scope. The
definition-scoped templates have a wide pattern that would grep any
other definition template already installed and throw the following
error because of conflicting priority. This change narrows down the
index patterns defined in the templates to only grep the ones from the
installed definition
```
{
"statusCode": 500,
"error": "Internal Server Error",
"message": """[illegal_argument_exception
Root causes:
illegal_argument_exception: index template [entities_v1_history_admin-console-services_index_template] has index patterns [.entities.v1.history.*] matching patterns from existing templates [entities_v1_history_builtin_services_from_ecs_data_index_template] with patterns (entities_v1_history_builtin_services_from_ecs_data_index_template => [.entities.v1.history.*]) that have the same priority [200], multiple index templates may not match during index creation, please use a different priority]: index template [entities_v1_history_admin-console-services_index_template] has index patterns [.entities.v1.history.*] matching patterns from existing templates [entities_v1_history_builtin_services_from_ecs_data_index_template] with patterns (entities_v1_history_builtin_services_from_ecs_data_index_template => [.entities.v1.history.*]) that have the same priority [200], multiple index templates may not match during index creation, please use a different priority"""
}
```
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Done while looking for https://github.com/elastic/kibana/issues/107773
- use `import type` modifier when possible
- fix imports to use the `@kbn/plugin` format
- remove references to CLI options that are no longer present