## Summary
### Part 1
- Resolves https://github.com/elastic/kibana/issues/164287
- Closes https://github.com/elastic/kibana/issues/146339
- Previously separate PR https://github.com/elastic/kibana/pull/164187
Changes:
- ~~swaps checkbox and row selection~~
- removes vertical borders
- adds rows highlight
- increases cell padding
- adds row stripes
- updates header background
- removes grey background from field name and makes it bolder (part of
https://github.com/elastic/kibana/issues/164634)
- updates Surrounding Documents side paddings
### Part 2
- Resolves https://github.com/elastic/kibana/issues/164661
- Previously separate PR https://github.com/elastic/kibana/pull/165687
Changes:
- removes background from panels, tabs and sidebar
- updates "Add a field" button style
- removes shadow from field list items
- makes field search compact
### Part 3
- Resolves https://github.com/elastic/kibana/issues/164662
Changes:
- wraps "Add a field" button in its own container with a top border
- ~~adds a drag handle to sidebar items~~
- ~~adds new Show/Hide buttons to toggle sidebar~~ moves sidebar toggle
button from discover plugin to unified field list
- reduces spaces between sidebar items from 4px to 2px
- reduces padding on Single Document page
- removes border above grid tabs
<img width="600" alt="Screenshot 2023-09-07 at 14 39 48"
src="976db247-fd70-4c9b-8634-552ece45b522">
Please note that "auto" row height is in a separate PR which is also
ready for review https://github.com/elastic/kibana/pull/164218
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
## Summary
Due to most users needing security plugin enabled by default, this
adjusts to that. Which requires transport SSL to be enabled as well. The
`--ssl` flag now will enable HTTP SSL only.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Addresses https://github.com/elastic/kibana/issues/160411
## Summary
This PR adds functionality for filtering out advanced settings that are
not relevant for serverless.
For context, we need to build an Advanced settings page in serverless
which only contains a set of the existing settings. We will reuse the
section registry (https://github.com/elastic/kibana/pull/163502) from
the original Advanced settings plugin as well as its UI components which
will also be extracted into a separate package. The app will be
registered from inside the `serverless` plugin.
In order to only display the settings that are relevant for serverless,
we need to make some changes to the uiSettings service. The
implementation in this PR leverages the existing `readonly` uiSettings
param and adds the `setAllowlist()` method which is called by the
serverless plugin to set an allowlist of setting keys.
**Testing in serverless:**
1. Set `advanced_settings.enabled: true` to enable the Advanced settings
app in serverless:
5b216c6ea9/config/serverless.yml (L53)
2. Start Es with `yarn es serverless --ssl` and Kibana with `yarn
serverless-{mode} --ssl` in any serverless mode.
3. Navigate to `app/management/kibana/settings`
4. Verify that the app only displays the settings from
`packages/serverless/settings/common/index.ts` (these are the settings,
relevant for all projects in serverless) as well as the settings from
the corresponding project package
`packages/serverless/settings/{mode}_project/index.ts`.
5. Verify that the app is functioning correctly.
**Testing in self-managed:**
1. Start Es with `yarn es snapshot` and Kibana with `yarn start`.
2. Go to Stack Management > Advanced settings
3. Verify that all settings are displayed as usual.
4. Verify that the app is functioning correctly.
If your team is a code owner of any of the serverless project plugins,
please review the corresponding package
`packages/serverless/settings/{search/observanility/security}_project/index.ts`
where you've been added as an owner and test in the serverless solution
accordingly.
<!---
### 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
- [ ] 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)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
## Summary
Reverts https://github.com/elastic/kibana/pull/165262 due infinite loop
of requests on rule creation page
43e69573-d6c5-4b34-9a0e-822f275ca764
As these requests carry large number of fields, it signiificantly
affects Kibana performance as well
```
[2023-09-11T15:14:57.572+01:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/api/ui_counters/_report exceeded threshold of 250ms (1109ms out of 1135ms) and 15% (98%)
[2023-09-11T15:15:10.780+01:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/data_views/_fields_for_wildcard exceeded threshold of 250ms (258ms out of 258ms) and 15% (100%)
[2023-09-11T15:15:10.787+01:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/data_views/_fields_for_wildcard exceeded threshold of 250ms (267ms out of 267ms) and 15% (100%)
[2023-09-11T15:15:10.789+01:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/data_views/_fields_for_wildcard exceeded threshold of 250ms (253ms out of 253ms) and 15% (100%)
[2023-09-11T15:15:11.735+01:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/data_views/_fields_for_wildcard exceeded threshold of 250ms (309ms out of 319ms) and 15% (97%)
[2023-09-11T15:15:12.484+01:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/data_views/_fields_for_wildcard exceeded threshold of 250ms (287ms out of 296ms) and 15% (97%)
[2023-09-11T15:15:12.578+01:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/data_views/_fields_for_wildcard exceeded threshold of 250ms (363ms out of 368ms) and 15% (98%)
```
This reverts commit 1accadb7ee.
Summarize your PR. If it involves visual changes include a screenshot or
gif.
This PR updates the ES|QL in-product help with the following:
* added the following functions: acos, asin, atan, atan2, ceil,
coalesce, cos, cosh, date_extract, date_parse, floor, greatest, left,
ltrim, now, right, rtrim, sin, sinh, sqrt, tan, tanh, to_degrees,
to_radians, to_unsigned_long
* removed is_null function
* updated from (metadata) and rename
* added an "Operators" section
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
~~Blocked by https://github.com/elastic/kibana/pull/162673~~
Add some initial integration test coverage for SO migrations when
running against serverless Elasticsearch:
- our migration actions test suite
- some of the zdt algo migration suites
The actions test suite was adapted to skip, when run against serverless,
the tests that are not supposed to be run (or passing) in that
environment
Fixes: #165294
## Summary
This adds a custom `onFilter` handler for charts on the Asset Details
page.
The `onFilter` handler is a bit convoluted because there seems to be no
cleaner way to extract the target X value from the event that comes from
the chart. But I'm happy to improve on this in case there is something
I've missed 🙌b1a07052-75f2-4b79-801c-1fc27a190143
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Resolves some inconsistencies between the query rules API definitions in
Elasticsearch and adds some convenience auto-fills:
- Corrects `value` to `values` to be aligned with our rest api spec and
clients
<img width="443" alt="Screenshot 2023-09-08 at 1 56 06 PM"
src="5d89115a-9f75-48a9-84a9-0670910759f4">
- Autofills "pinned" as the default rule type
862bdb1e-31d1-4a8e-8d72-6d30a0d1506e
- Provides a drop down list of available criteria types:
<img width="519" alt="Screenshot 2023-09-08 at 1 55 49 PM"
src="0c46670b-55a2-47ff-a025-19bac3e62dda">
- Supports auto-filling `rule_query` in searches
0ce980e8-0178-44e8-8cd9-3f776732df22
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This PR adds support for date math in ES|QL providing an improved
autocompleting feature for the `EVAL` command:
* ✨ auto close brackets in monaco

* ✨ support date math syntax
* ✨ improve EVAL autocomplete in various ways
* provide date duration suggestions with single unit after math
operations
* provide date duration suggestions if quantifier has been declared
already
* provide math signs based on context ( if `EVAL` is in duration mode
just `+`, `-`, otherwise all 4)
* provide math commands based on context (if `EVAL` is in duration mode
only functions who return a date, otherwise all of them)
* provide date duration suggestions only when `EVAL` is in duration mode
* provide date duration suggestions as first argument for date supported
functions
* extended grammar to support also plural versions of duration units

### Checklist
Delete any items that are not applicable to this PR.
- [x] 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)
- [x]
[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
Added snapshots to the service map e2e test and other improvements.
Due to flakiness of the visual regression tests, we leave them skipped,
and we can continue investigating, this issue
https://github.com/elastic/kibana/issues/166050 was created with this
porpoise.
---------
Co-authored-by: Søren Louv-Jansen <soren.louv@elastic.co>
**Resolves: https://github.com/elastic/kibana/issues/164441**
## Summary
Skips all Cypress tests owned by
@elastic/security-detection-rule-management and
@elastic/security-detection-engine teams in Serverless using the new
`@skipInServerless` tag.
- Adds a new `@skipInServerless` tag
- Updates `x-pack/test/security_solution_cypress/cypress/README.md` to
explain when to use what tags
- Explicitly adds missing tags to all D&R tests
- Adds `// TODO:` comments to tests with links to follow-up tickets
- Fixes the
`x-pack/plugins/security_solution/scripts/run_cypress/parallel.ts`
script (see below)
Follow-up work:
- https://github.com/elastic/kibana/issues/161540
- https://github.com/elastic/kibana/issues/161539
## Context
> Serverless test failures will soon block PR merge
> During the development of the serverless test infrastructure, we
decided that serverless tests will only soft-fail. That means you see
the test failure in your PR but you're still able to merge. We did that
mainly in order to not block delivery of stateful features and bug fixes
while serverless tests and pipelines were implemented and stabilized.
We now have the major building blocks for the serverless test
infrastructure in place and will integrate serverless tests in our
regular pipelines. As part of this process, we're skipping failing and
flaky serverless tests that came in during the soft-fail phase. Once
this is done, a PR with serverless test failures can no longer be
merged, similar to how we have it for stateful test failures.
> We plan to merge this in the next few days and we'll send out another
notification when it's done.
## Fixing `parallel.ts`
There were two problems with the
`x-pack/plugins/security_solution/scripts/run_cypress/parallel.ts`
script we use for running Cypress tests:
- The script was broken in https://github.com/elastic/kibana/pull/162673
(here on [this
line](https://github.com/elastic/kibana/pull/162673/files#diff-9f40ced6d29c4fc2709af881680400293d8ce1bc9ebb07b9138d6d99c83c09c9R67))
- I think it has never supported situations when all tests matching a
spec pattern (such as
`./cypress/e2e/!(investigations|explore)/**/*.cy.ts`) end up being
skipped via Cypress tags (such as `@skipInServerless`)
Both the issues are fixed in this PR.
Code owners are added for this script in the CODEOWNERS file to prevent
breaking this script in future PRs.
## Summary
Let's revert https://github.com/elastic/kibana/pull/165293 until we
agree on the attributes of the error object that we want to log. Should
they be based on the `EcsError` interface?