Commit graph

922 commits

Author SHA1 Message Date
Spencer
1880e8b348
move code shared with alerting api-integration plugins into a package (#148846)
We're working on converting all plugins into packages, which turns
almost all code in the repository into a package except for things like
the `test` and `x-pack/test` directories. The problem we ran into is
that the alerting api-integration test plugins are being migrated to
packages but they are currently consuming a handful of helpers from the
parent `../lib` directory. This doesn't work, as packages can only
import other packages and the `../lib` directory isn't in a package,
it's just free-floating `x-pack/test` code. To fix this I've moved the
necessary components out of `common/lib` and into `packages/helpers`
which is importable via `@kbn/alerting-api-integration-helpers` and
updated all the uses to access this new package.
2023-01-12 14:32:28 -07:00
Spencer
c8f83ed2eb
Move real plugins out of 'fixtures' dirs (#148756)
The location of plugins was previously somewhat irrelevant, but as we
move into packages it's more important that we can find all plugins in
the repository, and we would like to be able to do that without needing
to maintain a manifest somewhere to accomplish this. In order to make
this possible we plan to find any plugin/package by spotting all
kibana.json files which are not "fixtures". This allows plugin-like code
(but not actual plugin code) to exist for testing purposes, but it must
be within some form of "fixtures" directory, and any plugin that isn't
in a fixtures directory will be automatically pulled into the system
(though test plugins, examples, etc. will still only be loaded when the
plugin's path is passed via `--plugin-path`, the system will know about
them and use that knowledge for other things).

Since this is just a rename Operations will review and merge by EOD Jan
12th unless someone has a blocking concern.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-12 12:38:49 -07:00
Walter Rafelsberger
ae5594849c
[ML] Move DatePickerWrapper and related code to package (#148063)
- Moves duplicates of `DatePickerWrapper` and related code to package
`@kbn/ml-date-picker`. The duplicated components across the code base
have been consolidated and diverging features combined. Each duplicate
has been checked with a diff against the package before deletion.
- Moves duplicates of `query_utils.ts` to a package
`@kbn/ml-query_utils`.
- Some jest test were migrated from enzyme to react-testing-lib.
- `i18n` strings and data-test-subjects have been updated to be prefixes
in line with package names.
- Replaces custom code related to the `compact` flag with EUI's
breakpoints.
2023-01-12 11:04:49 +01:00
Angela Chuang
a275262b8a
[Security Solution] Resolve JS warnings triggered by incorrect state changed (#148552)
## Summary

Found these js warning after replacing charts with Lens in
https://github.com/elastic/kibana/pull/148519:
<img width="1671" alt="Screenshot 2023-01-09 at 15 31 17"
src="https://user-images.githubusercontent.com/6295984/211345750-8c4e67ee-bf96-49d2-8bb2-0f71e5f9bcd2.png">

Wrap `search.session.start()` with useEffect to avoid incorrect state
changed.



### Checklist

Delete any items that are not applicable to this PR.


- [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: Steph Milovic <stephanie.milovic@elastic.co>
2023-01-12 09:59:39 +00:00
Maja Grubic
4522e04287
[SharedUX] Custom branding service (#148273)
## Summary

This PR adds a new `CustomBranding` service and exposes it from core,
both on the server and client side. The purpose of the service is to
retrieve custom branding properties and propagate them to the
appropriate core service (`chrome` on the client-side and `rendering` on
the server-side). The client side receives server-side properties
through `injectedMetadata`.
Note that the service itself is not responsible for reading the
properties from `uiSettings`; this task is offloaded to `customBranding`
plugin.

I deployed one of the previous commits
[here]([ttps://majagrubic-pr-148273-custom-branding-service-server.kbndev.co/aiy/app/home#/](https://majagrubic-pr-148273-custom-branding-service-server.kbndev.co/aiy/app/home#/)),
so you can see a custom logo set (client-side) and page title set
(server-side).


### 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
~- [] 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)~


### 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>
2023-01-11 15:28:10 +01:00
Spencer
15a4a00693
[chart-expressions] convert common code dir into a package (#148663)
Moves the `src/plugins/chart_expressions/common` directory to a package.
This was done by:

```sh
# move the existing code out of the way
mv src/plugins/chart_expressions/common src/plugins/chart_expressions/_common

# generate the new package in the previous location
node scripts/generate package @kbn/chart-expressions-common --dir src/plugins/chart_expressions/common

# move the old files into the new package
mv src/plugins/chart_expressions/_common/* src/plugins/chart_expressions/common/
rmdir src/plugins/chart_expressions/_common
```

After that I just needed to fix the eslint violations 👍
2023-01-11 07:14:24 -06:00
Christos Nasikas
5c9f824747
[ResponesOps] Move connectors to the same folder level (#148088)
## Summary

To remove boundaries between the ResponesOps teams about connectors this
PR removes the distinguishment between connectors by moving all
connectors to the same folder and changing the `CODEOWNERS` of the
`stack_folder` to be the ResponseOps team. I did not change any logic in
the connectors. I fixed path imports when appropriate and added some
`waitFor` for tests that for some reason were failing.

### Checklist

Delete any items that are not applicable to this PR.

- [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

### For maintainers

- [x] 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>
2023-01-10 09:54:00 +02:00
Spencer
d6be4a4b06
Implement package linter (#148496)
This PR implements a linter like the TS Project linter, except for
packages in the repo. It does this by extracting the reusable bits from
the TS Project linter and reusing them for the project linter. The only
rule that exists for packages right now is that the "name" in the
package.json file matches the "id" in Kibana.jsonc. The goal is to use a
rule to migrate kibana.json files on the future.

Additionally, a new rule for validating the indentation of tsconfig.json
files was added.

Validating and fixing violations is what has triggered review by so many
teams, but we plan to treat those review requests as notifications of
the changes and not as blockers for merging.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-09 16:49:29 -07:00
Kevin Logan
fd85ed194c
[Security Solution] Update codeowners with new team Defend Workflows (#148421)
## Summary

Update the codeowners file to point to the new team, `Defend Workflows`.

The new label and team has been created.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-01-09 13:58:41 -05:00
Julia Rechkunova
001ffad8e3
[Discover] Unskip and fix "Search source alert" tests (#148436)
Closes https://github.com/elastic/kibana/issues/148390
Closes https://github.com/elastic/kibana/issues/148391
Closes https://github.com/elastic/kibana/issues/148389
Closes https://github.com/elastic/kibana/issues/148388
Closes https://github.com/elastic/kibana/issues/148387
Closes https://github.com/elastic/kibana/issues/148386
Closes https://github.com/elastic/kibana/issues/148385
Closes https://github.com/elastic/kibana/issues/148370
Closes https://github.com/elastic/kibana/issues/148369
Closes https://github.com/elastic/kibana/issues/148368
Closes https://github.com/elastic/kibana/issues/148367
Closes https://github.com/elastic/kibana/issues/147958

100x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1709
(1 failed but in a different test file, so it's all green for Search
source alert)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-01-09 06:19:01 -07:00
Walter Rafelsberger
dc1ae9e06c
[ML] Move local storage utilities to package. (#148049)
Moves multiple copies of `useStorage()` and related code to a package as
a single source. The different copies with hard coded types have been
adapted so `useStorage()` is now based on generics. Also moves
duplicates of `isDefined()` to its own package.
2023-01-05 11:05:07 +01:00
Dario Gieselaar
c3d5b0279d
[APM] Refactor synthtrace (#147036)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-04 13:47:37 +01:00
Walter Rafelsberger
8a44ba3158
[ML] Move nested property utilities and url state to packages (#147912)
Effort to deduplicate code. Move nested property utilities and url state
to packages.

Boilerplate for the packages was created likes this:

```
node scripts/generate package @kbn/ml-url-state --web --dir ./x-pack/packages/ml/url_state
node scripts/generate package @kbn/ml-nested-property --web --dir ./x-pack/packages/ml/nested_property
```

I consolidated the different `url_state.ts` files. One thing to note:
Each one had its own definition for `pageKey: AppStateKey`. I changed
that and made it just `pageKey: string`, I suspect it's good enough.
Otherwise we'd have a reverse dependency on all consuming code.
Alternative: We could refactor to require overriding a generic to pass
in allowed values.
2022-12-27 15:59:14 +01:00
Kevin Delemme
4ec4acaaaf
chore(slo): Extract slo schema (#148034) 2022-12-27 09:52:32 -05:00
Spencer
afb09ccf8a
Transpile packages on demand, validate all TS projects (#146212)
## Dearest Reviewers 👋 

I've been working on this branch with @mistic and @tylersmalley and
we're really confident in these changes. Additionally, this changes code
in nearly every package in the repo so we don't plan to wait for reviews
to get in before merging this. If you'd like to have a concern
addressed, please feel free to leave a review, but assuming that nobody
raises a blocker in the next 24 hours we plan to merge this EOD pacific
tomorrow, 12/22.

We'll be paying close attention to any issues this causes after merging
and work on getting those fixed ASAP. 🚀

---

The operations team is not confident that we'll have the time to achieve
what we originally set out to accomplish by moving to Bazel with the
time and resources we have available. We have also bought ourselves some
headroom with improvements to babel-register, optimizer caching, and
typescript project structure.

In order to make sure we deliver packages as quickly as possible (many
teams really want them), with a usable and familiar developer
experience, this PR removes Bazel for building packages in favor of
using the same JIT transpilation we use for plugins.

Additionally, packages now use `kbn_references` (again, just copying the
dx from plugins to packages).

Because of the complex relationships between packages/plugins and in
order to prepare ourselves for automatic dependency detection tools we
plan to use in the future, this PR also introduces a "TS Project Linter"
which will validate that every tsconfig.json file meets a few
requirements:

1. the chain of base config files extended by each config includes
`tsconfig.base.json` and not `tsconfig.json`
1. the `include` config is used, and not `files`
2. the `exclude` config includes `target/**/*`
3. the `outDir` compiler option is specified as `target/types`
1. none of these compiler options are specified: `declaration`,
`declarationMap`, `emitDeclarationOnly`, `skipLibCheck`, `target`,
`paths`

4. all references to other packages/plugins use their pkg id, ie:
	
	```js
    // valid
    {
      "kbn_references": ["@kbn/core"]
    }
    // not valid
    {
      "kbn_references": [{ "path": "../../../src/core/tsconfig.json" }]
    }
    ```

5. only packages/plugins which are imported somewhere in the ts code are
listed in `kbn_references`

This linter is not only validating all of the tsconfig.json files, but
it also will fix these config files to deal with just about any
violation that can be produced. Just run `node scripts/ts_project_linter
--fix` locally to apply these fixes, or let CI take care of
automatically fixing things and pushing the changes to your PR.

> **Example:** [`64e93e5`
(#146212)](64e93e5806)
When I merged main into my PR it included a change which removed the
`@kbn/core-injected-metadata-browser` package. After resolving the
conflicts I missed a few tsconfig files which included references to the
now removed package. The TS Project Linter identified that these
references were removed from the code and pushed a change to the PR to
remove them from the tsconfig.json files.

## No bazel? Does that mean no packages??
Nope! We're still doing packages but we're pretty sure now that we won't
be using Bazel to accomplish the 'distributed caching' and 'change-based
tasks' portions of the packages project.

This PR actually makes packages much easier to work with and will be
followed up with the bundling benefits described by the original
packages RFC. Then we'll work on documentation and advocacy for using
packages for any and all new code.

We're pretty confident that implementing distributed caching and
change-based tasks will be necessary in the future, but because of
recent improvements in the repo we think we can live without them for
**at least** a year.

## Wait, there are still BUILD.bazel files in the repo
Yes, there are still three webpack bundles which are built by Bazel: the
`@kbn/ui-shared-deps-npm` DLL, `@kbn/ui-shared-deps-src` externals, and
the `@kbn/monaco` workers. These three webpack bundles are still created
during bootstrap and remotely cached using bazel. The next phase of this
project is to figure out how to get the package bundling features
described in the RFC with the current optimizer, and we expect these
bundles to go away then. Until then any package that is used in those
three bundles still needs to have a BUILD.bazel file so that they can be
referenced by the remaining webpack builds.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-22 19:00:29 -06:00
Alison Goryachev
2b6183e11d
[Onboarding] ECMA MVP cleanup (#147702) 2022-12-21 11:02:01 -05:00
Pierre Gayvallet
69272653b3
Remove InjectedMetadata browser-side public contract (#147840)
## Summary

Fix https://github.com/elastic/kibana/issues/147721

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-12-21 01:03:57 -07:00
Spencer
2763af3a4e
[ftr] remove @types/mocha, define custom ambient-ftr-types (#147284)
After moving away from composite projects in the IDE we now have an
issue where projects like security solutions are getting `@types/jest`
and `@types/mocha` loaded up, even though the "types" compiler option in
security solutions focuses on jest. To fix this I've removed the
`@types/mocha` package, implemented/copied a portion of the mocha types
into a new `@kbn/ambient-ftr-types` package which can be used in ftr
packages to define the describe/it/etc. globals.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-19 10:42:12 -07:00
Anton Dosov
74ab0759f1
Image Embeddable (#146421)
close https://github.com/elastic/kibana/issues/81345

Adds an image embeddable - a new embeddable type that allows to
insert images into dashboard using the new file service
2022-12-19 14:50:29 +01:00
Sébastien Loix
b052917e31
[ContentEditor] Replace "Inspector" with "ContentEditor" (#147606) 2022-12-16 12:20:08 +00:00
Steph Milovic
d31f2f982e
Introduces new @kbn/ecs package (#147408) 2022-12-15 07:53:00 -07:00
Steph Milovic
ec8be1f88c
[Security Solution] Explore Sub Plugin Part 1- Consolidate into Explore Directory (#147298) 2022-12-13 11:21:57 -07:00
Dmitrii Shevchenko
3e499922ff
[Security Solution] Remove detection rules distributed via the file system (#143839) 2022-12-06 16:12:52 +01:00
Alexey Antonov
4735ad81cf
Update code owner for kbn-monaco package (#146967)
## Summary

Replace @elastic/kibana-app-services ->
@elastic/kibana-global-experience for `kbn-monaco` package

While working on #146379 I just saw that the plugin has the wrong
code-owner. Let's fix it

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-12-05 16:06:54 +03:00
Spencer
2e314db2ce
Wrap rison-node to improve types (#146649)
@maximpn brought up the issues caused by the types required by the
rison-node package, which attempted to communicate that "encoded values
must be primitive values, or recursive arrays/object of primitive
values". This isn't actually expressible in TypeScript, which lead to
many instances of `rison.encode(value as unknown as RisonValue)` which
is useless. Additionally, the rison-node library actually supports any
value and will either produce valid rison or `undefined` for that value.

To address this I'm adding a wrapper function which accepts `any` and
returns a `string`. If rison-node is totally unable to produce any rison
for the value (because the value is `undefined` or some other type like
Symbol or BigInt) the `encode()` function will throw. If you're
accepting arbitrary input you can use the `encodeUnknown()` function,
which will return a string or undefined, if the value you provided has
zero rison representation.

Like JSON.stringify() any non-circular primitive, object, or array can
be encoded with either function. If the values within those objects are
not encodable (functions, RegExps, etc) then they will be skipped. Any
object/array with the `toJSON()` method will be converted to JSON first,
and if the prototype of the object has the `encode_rison()` method it
will be used to convert he value into rison.

The changes in this PR are mostly updating usage of rison-node to use
`@kbn/rison` (which is also enforced by eslint). There are also several
changes which remove unnecessary casting.
2022-12-01 08:33:56 -07:00
Alejandro Fernández Gómez
df41bfa9fe
[Shared UX] Add <NotFound /> prompt (#145598)
## Summary

Creates a shared `<NotFound />` prompt to be used when any given
consumer needs to show a 404 error.

<img width="1278" alt="Screenshot 2022-11-17 at 18 06 12"
src="https://user-images.githubusercontent.com/57448/202511151-a35f489b-d988-46cc-9810-5fc725e29b18.png">

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-01 09:44:56 -05:00
Julia Rechkunova
66718fc2c1
[Discover][UnifiedFieldList] Integrate unified field list sections into Discover (#144412)
Closes https://github.com/elastic/kibana/issues/135678

## Summary

This PR continues the work started in
https://github.com/elastic/kibana/pull/142758 to bring field list
grouping from Lens into Discover.

- [x] Integrate new components and hooks into Discover page
- [x] Refactor fields grouping logic
- [x] Render Popular fields under a new separate section
- [x] Remove "Hide empty fields" switch
- [x] Adjust filtering logic
- [x] Refactor fields existence logic in Discover
- [x] Add "Unmapped fields" section
- [x] Highlight the matching term when searching for a field 
- [x] Show field icons when in SQL mode
- [x] Add tooltips to field list section headings
- [x] Add tests, clean up

<img width="340" alt="Screenshot 2022-11-15 at 15 39 27"
src="https://user-images.githubusercontent.com/1415710/201947349-726ffc3a-a17f-411b-be92-81d97879765a.png">

For testing on Discover page:
Please check different use cases and toggling Advanced Settings:
- regular vs ad-hoc data views
- data views with and without a time field
- data views with unmapped and empty fields
- data views with a lot of fields
- data views with some fields being filtered out via data view
configuration
- updating query, filters, and time range
- regular and SQL mode
- searching by a field name in the sidebar
- applying a field filter in the sidebar
- adding, editing, and removing a field
- Field Statistics table when some columns are selected or no columns
are selected
- multifields in the field popover should work as before (icon should
change from "+" to "x" when subfield is selected as a column)
- `discover:searchOnPageLoad` should not show fields if turned off
- `discover:searchFieldsFromSource` should show multifields right in the
fields list if enabled
- `discover:enableSql` should show Selected and Available fields only
when enabled
- `discover:showLegacyFieldTopValues` should show old (green) field
stats in its popover
- `doc_table:legacy`

On Lens page:
- scroll position should reset when data view is switched or when
searching by a field name
- regular and SQL mode

### Checklist

- [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] [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] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

Co-authored-by: Michael Marcialis <michael@marcial.is>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-12-01 15:02:04 +01:00
Vadim Kibana
2c774f536e
Moves app-services CODEOWNERS paths under other teams (#146503)
## Summary

Reshuffles all remaining App Services CODEOWNERS paths to various teams.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-30 12:19:19 +01:00
Mario Rodriguez Molins
998c5b21a1
Retrieve endpoint package from package storage v2 (#146513)
## Summary

Endpoint package is just published into package storage v2, so it
requires to add an exception as it was done for the APM package.
2022-11-29 18:33:44 +01:00
Jean-Louis Leysens
5a86b583df
[Files] Move <FileUpload /> and <FilePicker /> 👉🏻 packages/shared-ux/file (#146284)
## Summary

This is a refactor:

* Move `FilesContext`, `FilePicker` and `UploadFile` components to
`packages/shared-ux/file` as packages
* Renamed `UploadFile` to `FileUpload` for more consistency
* Also created `packages/shared-ux/file/types` and added
`useBehaviourSubject` to `packages/shared-ux/file/util` (we can consider
moving this elsewhere since that function is not necessarily tied to the
files domain).
* Removed the storybook config from `files` public plugin since there
are no more components there

## How to test

👉🏻 `yarn storybook shared_ux` to see the components in a lab environment

OR

👉🏻 `yarn start --run-examples` then "Developer examples" > "Files
example" to see the components being used in Kibana

Look out for any regressions: for example, in the `FileImage` component
importing `import bh from 'blurhash'` caused a regression because
blurhash does not expose a default export. This was fixed by doing:
`import * as bh from 'blurhash`.

## Notes

* With this change, we needed to move `FilesClient` interface to
packages since it is used by the components. However, we also wanted to
keep `FilesClient` interface as it is currently exported from `files`
plugin because it exposes methods that only the server of `files` plugin
should know about (e.g., the metrics endpoint). I created the
`BaseFilesClient` in the packages directory that is extended in the
`files` plugin as needed. This is a snapshot of the types as they are
provided from the server implementation and will need to be
updated/maintained by hand from here on out.
* With `BaseFilesClient` in `packages`, we lost the type check between
`files` server endpoints and the client methods. To re-establish this
link the `CreateRouteDefinition` type helper got a parameter where the
client method can be passed in to do checks that the server inputs
(query, param and body) as well as outputs (the responses) match what
the client expects using the `X extends Y ? X : unknown` capability of
TS. See this in action in, for example
`src/plugins/files/server/routes/find.ts`. DX will be: if these ever get
out of sync, the server values for `query`, `param` or `body` will map
to `unknown` causing a type issue when trying to use these values. This
can only be fixed by bringing the `FilesClient` types in sync with the
server types.
* Server endpoints that should match expected `FilesClient`
inputs/outputs should use the `CreateRouteDefinition` type helper, but
if the endpoint does not need to map to a client method we can always
skip using `CreateRouteDefinition`.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-29 08:48:23 +01:00
Coen Warmer
2a1c72ca73
Add Actionable Observability as an owner for Observability Overview page (#146279)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-28 04:33:41 -07:00
Or Ouziel
b9ffc29cd3
[Cloud Posture] test latest findings table sort (#144668) 2022-11-28 11:46:37 +02:00
Jean-Louis Leysens
95c4d73a13
[Files] Move <Image /> component to @kbn/shared-ux package (#145995)
## Summary

* Creates new packages `@kbn/shared-ux-file-image`,
`@kbn/shared-ux-file-image-types`, `@kbn/shared-ux-file-image-mocks`
* Replace all instance of usage to import from package (for now, just
files example plugin)
* Created a `@kbn/shared-ux-file-util` package for the helpers shared
across components


## How to test

See `yarn storbook shared_ux`'s new section "Files"

## Additional notes

First step just focussed on moving `Image` component, we still need to
move `FilePicker` and `UploadFile`

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-24 16:56:32 +01:00
Tyler Smalley
56916574ef
IDM: Migrates kbn_server to a dev-only package (#146248)
redo of: https://github.com/elastic/kibana/pull/145785 due to failures
when it hit main resulting in a revert.

fix https://github.com/elastic/kibana/issues/145193

Migrates `core/server/test-helpers/kbn_server` to a package
Updates imports across repo

### Checklist

Delete any items that are not applicable to this PR.

- [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: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
2022-11-23 16:48:24 -08:00
Tyler Smalley
8e55ec5e6e Revert "IDM: Migrates kbn_server to a dev-only package (#145785)"
This reverts commit 25c65358a0.
2022-11-23 14:38:50 -08:00
Christiane (Tina) Heiligers
25c65358a0
IDM: Migrates kbn_server to a dev-only package (#145785)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
fix https://github.com/elastic/kibana/issues/145193
2022-11-23 14:15:37 -07:00
Alexey Antonov
88d0188291
[CODEOWNERS] Replace @elastic/shared-ux -> @elastic/kibana-global-exp… (#146146)
## Summary

Replace @elastic/shared-ux -> @elastic/kibana-global-experience in
`.github/CODEOWNERS`
2022-11-23 08:06:15 -07:00
Spencer
cfdb8553ba
[pkgs/peggy] automatically transform peggy files with babel-register and webpack (#145615)
In order to get us closer to the developer experience we want for
packages, we are trying to move package builds out of bazel and instead
we want to build files on demand. In the case of .peggy files this means
importing them directly and teaching babel/jest/webpack how to handle
these imports by automatically transpiling and caching the results.

This change does just that, adding a `@kbn/peggy` package which wraps
peggy for types, and also adds support for defining peggy config
adjacent to a peggy grammar file in a `${basename}.config.json` file.
This file will be parsed and used to configure things like
`allowedStartRules` as described in [the peggy
docs](https://peggyjs.org/documentation.html#generating-a-parser-javascript-api).

This PR also implements `@kbn/peggy-loader` which uses `@kbn/peggy` to
transpile peggy files in webpack, and a peggy transform for both Jest
and our custom babel register hook.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-22 11:25:50 -07:00
Lisa Cawley
11f9505e3c
Update CODEOWNERS (#145606) 2022-11-21 13:16:42 -08:00
Marta Bondyra
327ca6b57a
[Event Annotation plugin] add codeowners (#145741)
## Summary

Adding codeowners for event annotation plugin

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-21 11:35:34 +01:00
Matthias Wilhelm
ab2eb9db28
Move data_views related codeownership to kibana-data-discovery (#145706)
This PR moves `data_views' related codeownership to the data discovery team. Welcome!
2022-11-18 16:25:49 +01:00
Yulia Čech
40bcdfe7f1
[Guided onboarding] Update codeowners for guided onboarding in the security solution (#145555)
## Summary

Updates the codeowners file for the Security onboarding tour, that is
now owned by the team @elastic/security-threat-hunting-explore
2022-11-18 16:23:13 +01:00
Pierre Gayvallet
a16c2ac56a
Migrate server-side Root and Server to packages (#144990)
## Summary

Fix https://github.com/elastic/kibana/issues/144255

Create the `@kbn/core-root-server-internal` package, and move `Root`,
`Server` and `bootstrap` to it.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-15 03:11:37 -07:00
Sébastien Loix
a67776b365
[TableListView] Enhance tag filtering (#142108) 2022-11-14 14:25:19 -07:00
Matthias Wilhelm
9e28b7cedc
[Graph] Move codeownership to kibana-visualizations (#145119)
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
2022-11-14 17:20:57 +01:00
Stratoula Kalafateli
4a4bc55127
Move appservices plugins to visualizations team (#144991)
## Summary

Moves the ownership for some of the appservices code to the
visualizations team:

- expressions plugin
- unified search
- data plugin, we decided for now to co-own it with the
@elastic/kibana-data-discovery team
2022-11-14 11:53:42 +02:00
Steph Milovic
b721fdcf42
[Security solution] Guided onboarding, alerts & cases design updates (#144249) 2022-11-09 14:13:10 -07:00
Sébastien Loix
2590173096
[ContentManagement] Inspector flyout (#144240) 2022-11-09 06:01:53 -07:00
Georgii Gorbachev
c9ef85f1d8
[Security Solution] Update ownership of rule_registry in CODEOWNERS (#144789)
## Summary

In order to reduce the number of irrelevant PR review requests, this PR
updates the CODEOWNERS file and removes the
@elastic/security-detections-response team from code owners of the
`rule_registry` plugin. This affects the following sub-teams:

- @elastic/security-detections-response-alerts. Although this team owns
the alerts generation and indexing of the Detection Engine rule types
(and this code depends on the `RuleDataClient`), they prefer not to be a
code owner, because they keep getting pinged for PRs that don't need
their review.
- @elastic/security-detections-response-rules area team. This team
doesn't depend on the rule registry and doesn't do any work related to
alerts-as-data.
- @elastic/security-solution-platform. This team won't be doing anything
in the rule registry for the foreseeable future.
2022-11-08 18:15:52 -05:00
Spencer
7058e1fb55
rename codeowners from shared-ux to global-experience (#144746)
https://github.com/elastic/kibana/pull/144326 attempted to change the
owners for packages, but because of a misconfiguration in CI the correct
codeowners file wasn't determined until after the PR was merged. This
fixed the issue by modifying the kibana.jsonc files of the packages to
use the correct owner, which then ends up in the codeowners file.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-08 09:13:16 -07:00