Commit graph

564 commits

Author SHA1 Message Date
Garrett Spong
83a1904491
[Security Solution] Adds support for testing of prerelease detection rules (#148426)
## Summary

Resolves https://github.com/elastic/kibana/issues/147466
Resolves https://github.com/elastic/kibana/issues/112910

* Updates `useUpgradeSecurityPackages` hook to install the `prerelease` version of the `endpoint` and `security_detection_engine` packages if the current branch is `main` or build is `-SNAPSHOT` (to ensure PR's are testing against the latest to-be-released packages)
* Adds new `kibana.yml` configuration `xpack.securitySolution.prebuiltRulesPackageVersion` for specifying the version of the `security_detection_engine` package to install within the client-side logic of the `useUpgradeSecurityPackages` hook
* Adds FTR helpers for consuming the `xpack.securitySolution.prebuiltRulesPackageVersion` configuration from the `kbnServerArgs` and for installing a specific detection rules package version [c467762](c467762386).
* Regenerated docs
* Unskips `useUpgradeSecurityPackages` tests from [#112910](https://github.com/elastic/kibana/issues/112910)

Note: I added jest tests for the `useUpgradeSecurityPackages` changes, however didn't find a reasonable way to test the `prebuiltRulesPackageVersion` configuration addition via FTR's, so ended up testing that manually by running a local `package-registry` and serving up two different versions of the `security_detection_engine` package (`8.3.1`/`8.4.1`) and specifying 

> xpack.securitySolution.prebuiltRulesPackageVersion: '8.3.1'

in my `kibana.dev.yml` to try and install the previous version. This initially failed as fleet would say the package is `out-of-date`

<p align="center">
  <img width="700" src="https://user-images.githubusercontent.com/2946766/211948816-69860629-6db0-4007-8786-3b08f7312baf.png" />
</p>

Since there was a higher version with the same `kibana.version` requirement: `kibana.version: ^8.4.0`. Modifying this for the higher version to `^8.9.0` then allowed for the installation of the `8.3.1` as specified in the `prebuiltRulesPackageVersion` setting:

<p align="center">
  <img width="700" src="https://user-images.githubusercontent.com/2946766/211946889-030c2fdd-6c7d-4124-a1dc-003b54982311.png" />
</p>

<p align="center">
  <img width="700" src="https://user-images.githubusercontent.com/2946766/211948135-03163b0f-b1c2-435a-b91f-c3cbbe028053.png" />
</p>

As [mentioned](https://github.com/elastic/kibana/pull/148426#issuecomment-1380249233) by @xcrzx, I ended up adding `force:true` to the individual install request to get around this limitation and to have a better testing experience within Cypress.

Note II: When using the `prebuiltRulesPackageVersion` setting, since this is used for updates initiated from the client and not on kibana start like the `fleet_package.json` (added in https://github.com/elastic/kibana/pull/143839), you will have to uninstall the package that was installed on start-up for this to be successful. 

Note III: When wanting to run the Cypress tests against a specific package version, be sure to update the cypress FTR configuration [cf3a83f](cf3a83f773).

### Checklist

Delete any items that are not applicable to this PR.

- [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
2023-01-17 15:02:57 -07: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
Nodir Latipov
3c4ab973be
[Unified Search] Supports complex filters with AND/OR relationships (#143928)
## Describe the feature:
Closes https://github.com/elastic/kibana/issues/144775

This PR allows users to create more than one filter at a time. It
enhances the query builder by enabling users to create multiple filters
simultaneously. It adds the capability to nest queries and use the
logical OR operator in filter pills.

<img width="981" alt="image"
src="https://user-images.githubusercontent.com/4016496/207942022-3256590d-00f6-45c8-b566-c184d5d18953.png">

## Tasks:

- [x] Add the ability to add/edit multiple filters in one form:
- [x] Replace the current implementation of adding and editing a filter
with a filtersBuilder - `Vis-Editor`;
- [x] Add combined filter support to Data plugin (mapAndFlattenFilters)
- `App-Services`;
- [x] Add the ability to update data in the Data plugin when updating
values ​​in the filters builder - `App-Services`;
- [x] Add hide `Edit as Query DSL` in popover case the filter inside
FiltersBuilder is combinedFilter - `App-Services`;
- [x] Update filter badge to display nested filters:
- [x] Replace the current badge filter implementation with a new one -
`Vis-Editor`;
- [x] Clean up `FilterLabel` component after replace `FIlterBadge`
component - `Vis-Editor`;
- [x] When editing filters, those filters that belong to the same filter
group should be edited - `Vis-Editor`;
- [x] Update jest and functional tests with new functionality -
`Vis-Editor`;
- [x] Fix drag and drop behavior - `Vis-Editor`;

Co-authored-by: Lukas Olson <lukas@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Yaroslav Kuznietsov <kuznetsov.yaroslav.yk@gmail.com>
Co-authored-by: Andrea Del Rio <andrea.delrio@elastic.co>
2022-12-19 15:18:30 +02:00
Christiane (Tina) Heiligers
f7706252fd
Removes module core/server/types (#147223)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
fix https://github.com/elastic/kibana/issues/145065
2022-12-13 09:20:04 -07:00
Ahmad Bamieh
62425648c7
[Upgade Assistant] Enable UA for minor upgrades (#143544)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-08 18:57:42 -07:00
Joe Reuter
15c12bdd39
Rename all vis-editors and datavis to visualizations (#144589)
* rename all the vis-editors

* rename datavis to visualizations
2022-11-05 19:16:20 -04:00
spalger
52f2b33a07
[auto] migrate existing plugin/package configs 2022-10-28 14:06:46 -05:00
Yulia Čech
ebc8bfe50b
[Guided onboarding] Removed plugin config (#143354)
* [Guided onboarding] Removed the config that hide the guided onboarding by default in 8.5

* [Guided onboarding] Fixed types errors

* [Guided onboarding] For now deleted the guide button when there is no active guide to pass CI

* [Guided onboarding] Skipping the disabled button tests for now

* [Guided onboarding] Deleted the configPath from kibana.json

* [Guided onboarding] Deleted the config from the tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-10-20 12:55:04 -04:00
Anton Dosov
1ec2edf4f4
[Search] Expose data.search.asyncSearch.pollInterval (#143508) 2022-10-20 12:18:36 +02:00
Cecilia Bollini
cea0d57cd9
[POC] Add Gainsight shipper for cloud (#141132)
* Add gainsight

* Fix gainsight build

* lint and prettier

* tests

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

* fix tests

* test

* fix tests

* move the configuration out of the cloud plugin 2

* tests

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* pass deploymentId as user key

* Add css and widget

* lint

* tests

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* tests

* add render Css

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix gainSightApi

* replace cluster id with cluster name

* fix types and tests

* Fix license

* rename gainsight

* remove formatpayload

- remove formatPayload
- remove typeDeps from shipper/g/kibana.jsonc
- replace type shared-common with shared-browser

* Add and fix tests

- Add test for renderCss
- update tests checking identify with different userId
- remove optionalplugin security

* add tests to gainsight shipper

- test globalcontext request (set and remove)
- hash only in dist ==false

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* move check on gainsight init

* Remove translation update docs

- update docs
- always update userId

* licence

* fix tests

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-10-19 13:54:10 +01:00
Alejandro Fernández Haro
46ccdc9ee0
[LaunchDarkly] Add Deployment Metadata (#143002)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-10-17 08:41:42 -07:00
Faisal Kanout
608ac5adff
[Actionable Observability] - Add alert details page feature flag by App (#142839)
* Update the feature flags

* Fix tests and AlertFlyout footer

* Add unit test for the helper

* Update the order of the checks to fix tests

* Add test for edge cases

* Fix test direct access to the page

* Fix test
2022-10-17 03:21:12 -07:00
Alejandro Fernández Haro
accefcbab9
[Flaky tests] Unskip Telemetry Snapshot mode tests (#143353) 2022-10-17 02:03:38 -07:00
Anton Dosov
782e5de644
[Search] Expose data.search.asyncSearch.* in kibana.yml (#142976) 2022-10-11 04:17:46 -07:00
Anton Dosov
5f3d439b50
Search Sessions Stabilization Stage I (#134983)
Changes search service/search session infrastructure to improve performance, stability, and resiliency by ensuring that search sessions don’t add additional load on a cluster when the feature is not used
2022-10-05 11:52:52 +02:00
Alejandro Fernández Haro
74f30dcf8e
Move Cloud Integrations out of the cloud plugin (#141103)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-10-04 12:25:25 +02:00
Tiago Costa
2d44c35978
skip flaky suite (#107034) 2022-09-28 20:09:50 +01:00
Tomasz Ciecierski
fe6060d22a
[Osquery] Add Detection action (#133279)
Adds Rule response action with osquery
2022-09-19 23:24:01 -07:00
Yulia Čech
95086f4365
[Onboarding] Create guided_onboarding plugin (#138611)
* [Guided onboarding] Smashed commit of all POC work for guided onboarding and guided onboarding example plugins

* [Guided onboarding] Fixed type errors

* [Guided onboarding] Removed guidedOnboardingExample limit

* [Guided onboarding] Fixed a functonal test for exposed configs

* [Guided onboarding] Fixed plugin limit

* [Guided onboarding] Added more information to the example plugin

* [Guided onboarding] Fixed no-console error

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* [Guided onboarding] Fixed snake case errors

* move guided_onboarding out of x-pack

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
2022-09-15 11:35:35 +02:00
Yngrid Coello
87ed2a12a5
Removing service profiling code (#140578)
* Removing service profiling code

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-14 10:30:54 +02:00
Rudolf Meijering
191bfbc97e
Saved objects: improve typesafety (#140099)
* Remove SavedObjectAttributes from examples

* Remove SavedObjectAttributes from dev_docs

* Deprecate SavedObjectAttributes type

* Remove SavedObjectAttributes from kibana_usage_collection plugin

* Remove low hanging SavedObjectAttributes in security_solution

* Remove low hanging SavedObjectAttributes in upgrade_assistant

* Remove low hanging SavedObjectAttributes in lens

* Stricter types for SavedObjectsServiceSetup.registerType

* Review feedback

* Some more low hanging fruit

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-09-13 09:56:29 +02:00
Constance
98f73d674a
Upgrade EUI to v63.0.6 - updates to new EuiPageTemplate and deprecates old page components (#139524)
* Update all usages of EuiPageTemplate to EuiPageTemplate_Deprecated

* EuiPageContent_Deprecated as EuiPageContent

* EuiPageContentBody_Deprecated as EuiPageContentBody

* EuiPageContentHeader_Deprecated as EuiPageContentHeader

* EuiPageContentHeaderSection_Deprecated as EuiPageContentHeaderSection

* EuiPageSideBar_Deprecated as EuiPageSideBar

* EuiPageContent__Deprecated to EuiPageContent_Deprecated

* Fix rogue semi-colons

* WIP: NoDataConfigPage & NoDataPage converted to new template

- `withSolutionNav` not yet handled

* WIP: KibanaPageTemplateInner converted to use new template

- Pushes existing `pageHeader` prompts onto created EuiPageTemplate.PageHeader
- Uses `isEmptyState` to push `pageHeader` props to EuiPageTemplate.EmptyPrompt instead (if `children` are not supplied)

* WIP: `withSolutionNav` now renders the sidebar content properly

- Collapsing isn’t working (minWidth isn’t updating)

* Fixing stickiness of sidebar

* [Security] Fixed SecuritySolutionTemplateWrapper’s usage

- Moved `bottomBar` to EuiPageTemplate.BottomBar (now contained in just the page contents)
- Change EuiPanel children wrapper with EuiPageTemplate.Section

* [O11y] Wrap `children` with EuiPageTemplate.Section

* Fix getting_started usage

* WIP: Fixing types

* Removing `template` pass through

* Set EUI to 63.0.0

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* More import fixes

* Sidebar component update

* Expand `KibanaPageTemplate` to all namespaced EUI counterparts

- Updated `docs/tutorials` mdx page
- Fixed SolutionNav prop types

* Updated the tutorial mdx page

* [Stack Management] Updated app layout to new template

- Some temporary props applied for BWC until all other pages can be converted
- Converted `API Keys` page’s layout (and especially prompt usags) to new paradigm

* Fix circular dep

* Fix new circular dependency

- copying and pasting types from KibanaPageTemplateProps, but ah well

* [Security Solution] Remove `template` prop - no longer a prop on Kibana/EuiPageTemplate

* [O11y] Allow customizing EuiPageTemplate.Section wrapper

- converts pageBodyProps
- fixes non-centered loading template

* [Enterprise Search] Update page templates

- fix layouts by auto-wrapping an EuiPageSection for padding, while adding a `customPageSections` prop for more custom sections/layouts

- re-center 404 errors

- update tests

* Update KibanaPageTemplate tests

* Update snapshots

* Fix FTR test with removed EUI classNames

* Fix FTR tests with changed kbn classNames

* Update failing dashboard snapshots

- drop shadow changed slightly in EUI

* Fix failing Security Cypress test

* [O11y] Fix Inventory page using deprecated CSS hooks

* [O11y][Uptime] Fix missing bottom bars

- Modifies ObservabilityPageTemplate to accept a `bottomBar` prop (a la the old EuiPageTemplate behavior)

NOTE: This opinionated page layout structure is starting to feel like it could be potentially limiting / have all the same pitfalls the previous EuiPageTemplate did. If so, consider something closer to the Enterprise Search page template conversion (`customPageSections`).

- Misc cleanup: Use `KibanaPageTemplate` over `EuiPageTemplate`

* [O11y] Fix route template typing

- Since theObservabilityPageTemplate is using the new Eui/KibanaPageTemplate, its child templates and types need to be updated accordingly

* Fix broken minWidth behavior

- was an EUI issue that required a patch release
+ update snapshots

* [Security Solution] Type fixes, restore empty state

- Fix empty state logic removed in a previous commit
- bogarts KibanaPageTemplate's `isEmptyState` prop instead of using `template="noData"`

- extend template wrappers to past ...rest to underlying Kibana/EuiPageTemplate

+ replace EuiPageTemplate with KibanaPageTemplate for consistency

* Fix failing synthetics selector

* Grab EUI v63.0.6

- for deprecation tags and section tag support

* Fix Kibana Overview plugin layout

- needs to use KibanaPageTemplate.Section to get padding back

- use `bottomBorder` prop over horizontal rules

- restore previous page color via panelled=false

* Convert Home plugin to new KibanaPageTemplate

- use KibanaPageTemplate.Section instead to preserve page width/paddings

- use `bottomBorder` instead of `EuiHorizontalRule`

- NOTE: This causes margins to decrease slightly from xxl to xl (largest padding available for EuiPageSection) - this can be restored by CSS overrides if desired

- update CSS to preserve previous looks, + convert to logical properties

* [O11y] Fix non-centered empty/loading states

* [O11y] Restore subdued background on various empty state prompts

* [O11y] Fix all instances of views that require a scrollable full-height child

+ restore comment for inventory view

* [O11y][ux] Fix broken sidebar

- The entire app was missing a wrapping EuiProvider, and as such breakpoint utils were not working, and the sidebar was missing

+ misc cleanup
  - remove unnecessary fragment
  - remove role="main" attr - now that EuiPageTemplate sets a `main` tag, they'll conflict
  - add isEmptyState to center loading component

* [APM Cypress tests] harden flaky test

* [APM Cypress tests] Fix failing Cypress test, again

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-07 15:35:23 -05:00
Faisal Kanout
d11ee880b1
[Actionable Observability] - Hide the alert details page behind a feature flag (#139806)
* WIP - feature flag alert details page

* Add tests

* Add comment for upcoming tests

* Fix tests

* fix test and add mocks for usePluginContext

* Fix failing test

* Fix wording

* Fix test

* Update readme and kibana-docker

* Fix tests permissions

* Restore tests

* Fix flaky test

* Fix flaky

* Fix flaky

* wait to display the button

* Fix flaky

* Fix flaky

* Add 404 page and skip the flaky test

* re-enable tests

* Put message for the flaky test

* Update comment
2022-09-06 17:36:46 +02:00
Baturalp Gurdin
07aa6d9586
ingest ciBuildName flag to telemetry along with labels (#139098)
* send isBareMetal flag to telemetry along with labels

* add isBareMetal field to tests

* add ciBuildName

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-08-31 22:48:41 -07:00
Pierre Gayvallet
383d8fab58
Move client-side application service to packages (#139502)
* deletes unused utils file

* just some fix while I see it

* creating empty packages

* moving all the things

* package build success

* start fixing usages

* fix the scoped history type issue

* export internal utils

* add default for mock

* fix test import

* fix external import

* start fixing external usages

* more usages

* more usages

* more usages

* More usages

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* fix integration test imports

* fix more test types

* remove public/utils from the core bundle

* trying to import from the package

* updating README's

* remove unused test types from mock package

* cleanup test types

* use import type

* add author to packages

* more import type

* remove dead path from some config

* remove src/core/utils/index.ts (and pray)

* update tsdoc

* fix new file usage

* fix paths

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-30 10:08:44 -07:00
Baturalp Gurdin
ba6ff3bdb0
add EBT Labels through CI (#137530)
* add EBT Labels through CI

* remove prId from labels when it's not running on PR's

Co-authored-by: Spencer <email@spalger.com>

* adds parsing validation

Co-authored-by: Spencer <email@spalger.com>
2022-08-02 17:13:50 +03:00
Tiago Costa
371f091a14
Revert "add EBT Labels through configs (#136843)"
This reverts commit c476b453db.
2022-07-28 14:10:44 +01:00
Baturalp Gurdin
c476b453db
add EBT Labels through configs (#136843) 2022-07-28 14:04:11 +02:00
Stratoula Kalafateli
a296e4cc97
[Discover] Supports SQL query language (#134429) (#136702)
* [Discover] Supports SQL query language (#134429)

* Move the add dataview action above the dataview selection panel

* Implements a new selectable on the dataview picker for the text based languages

* Implementation of the transition modal when on SQL mode and select a dataview

* Fix es lint

* Change switch modal button modal icon

* Lazy load components

* Small changes on the styling of the switch without saving button

* Initialization of mocaco editor

* Change to the type

* Fixes types checks

* New submit button for query mode

* Implememtation of the expanded mode of the editor

* Implement documentation

* Implementation of the oneliner mode with ellipsis

* Some  fixes on the resizer

* Implementation of the errors layout, WIP

* Fetch SQL data in Discover

* Fix expression test

* Fix editor zIndex

* Fix types error

* Fix type check in Discover

* Fix more types

* some CI fixes

* Fixes

* Cleanup after merge

* Remove from state

* Connect search errors with the unified search editor

* Add error mrkers in unified search editor

* Save and open saved searches

* Filter out saved searches from text based languages

* Some fixes

* Fix unit tests

* Fix checks

* On save and exit modal implementation

* Add shortcut on the editor for submit query

* Fix wrong condition

* Initial types change

* Use regex to find the index pattern string

* Fix some types and cleanup

* Fix types

* Fix some types

* Further fixes

* More fixes

* More fixes

* Fix visualize types

* more

* More fixes

* Fixes more types

* Fix dashboard types

* Fix dashboard types

* Controls plugin types

* Fix Lens types

* Fix data plugin types

* Fix types in Lens 2

* buildEsConfig type fixes

* Fix observability types

* Fix maps types

* data visualizer types

* Fix ml types

* xpack rest types

* Fix jest test

* Fix

* Move helper functions to es config

* fix bug on breadcrumb click

* Fix time field bug

* Add enableSql advanced setting to discover for enabling the sql mode

* Make the documentation component more dynamic

* Add some comments, improvements

* Enhance storybook with the textbased languages

* Update storybook with the error state of the editor

* Adds a readme for the editor and fixes the modal mobile version

* [Discover] improve test and storybook for new data type

* [Discover] add functional tests

* Add aggregate functions to the documentation

* [Discover] fix tests

* Add some unit tests

* [Discover] fix linting

* [Discover] update linting

* More unti tests

* Dataview picker unit tests

* Fix a bug on the dataview picker

* Add unit tests for the editor

* Fix jest test

* [Discover] apply suggestions

* [Discover] adjust styles

* Fix some bugs and select columns in the sql mode

* [Discover] fix eslint and tests

* [Discover] update unit tests

* Fix bug on transitioning from sql mode to dataview mode

* [Discover] fix tests

* Design fixes on the errors messages

* [Discover] fix ci

* Update the columns only if the query changes

* [Discover] change isPlainRecord retrieval method

* Fix bug on cleanup

* Fix bug on opening a saved search

* [Discover] fix comments

* [Discover] fix bug with browser refresh

* [Discover] fix functional

* [Discover] fix another functional

* Fix ordering lost when the user refreshes the browser

* [Discover] revert use_discover_state

* [Discover] revert functional impl

* Fix security solution types

* Casting dashboard plugin

* Revert change

* type param

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Revert types changes

* More reverts

* Types fixes

* Fix Discover jest test

* Fix context app jest test

* Final types changes

* Fixes unit test

Co-authored-by: Dzmitry Tamashevich <diaamnj@mail.ru>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>

* Fix types

* Fix jest test

* More design fixes

* Update advanced setting description

* Further design changes

* [Discover] Remove document explorer header column edit data view field functionality (#136743)

* remove Edit data view field for SQL

* Fix the fix

* [Discover] Implement SQL data fetching for embeddable (#136793)

* remove Edit data view field for SQL

* Fix the fix

* Implement SQL for embeddable

* Fix non-saved-search embeddables

* Fix reporting bundle size

* Allow filters on dashboard level for sql searches

* Fix the radius on the editor

* Add vertical padding on the editor

* Change the theme

* Address PR comments

* Fix types

* Address some of the comments

* Fix bug on transitioning from SQL to dataview mode with the modal dismissed

* More types fixes

* Design review comments

* Discovery team review comments

* Fix jest tests

* Fix bug on navigating from the SQL mode to the dataview mode and back in sql mode by clicking the breadcrumb

* Update src/plugins/discover/public/application/main/hooks/use_discover_state.ts

Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>

* Add padding to the top of the editor without creating any bug

* Add some padding to the bottom without creating any bug

* Fixes undo bug

* Fix confusing naming of variable

* Fix nested selects

* Update texts for transition modal and warning

* Make it work with dashboard Query

* Address some of the comments

Co-authored-by: Dzmitry Tamashevich <diaamnj@mail.ru>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
2022-07-26 10:51:31 +03:00
Spencer
36260fb358
[expressions] remove root-level redirect, import from common (#136997)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-07-25 08:07:43 -07:00
Alexey Antonov
d4bb959bea
[Step 3] VisEditors Telemetry enhancements (add new agg-based and lens telemetries) (#135615)
* initial comit

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* push chart_expressions logic

* update tests

* fix JEST

* push some telemetries

* fix some cases

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* update tests

* add some lens part

* add handlers.logRenderTelemetry method

* visGroup -> originatingApp

* remove visTpe, extra, onlyExtra

* remove handlers.logRenderTelemetry from handlers

* remove context from snapshots

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* add lens operations telemetry

* fix heaatmap, vislib

* push some telemetries

* cleanup

* push some logic

* fix merge conflicts

* push some logic

* add lens map telemetry

* add render_lens_vis_cases

* add render_lens_vis_observability_exploratory_view

* cleanup

* cleanup

* make getRenderEventCounters optional

* add summary_row and color_by_value telemetries

* try to fix double rendering

* update xy telemetries

* fix TSVB

* fix lens

* fix Timelion

* add mixed_xy telemetry

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Update x-pack/plugins/observability/public/components/shared/exploratory_view/lens_embeddable.tsx

Co-authored-by: Shahzad <shahzad31comp@gmail.com>

* Update x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.tsx

Co-authored-by: Shahzad <shahzad31comp@gmail.com>

* Update expression_renderer.tsx

* update originatingApp

* Update expression_renderer.tsx

* add JEST for core changes

* Update plugin.ts

* Update src/plugins/expressions/common/expression_renderers/types.ts

Co-authored-by: Michael Dokolin <dokmic@gmail.com>

* fix PR comments

* add renderComplete param to VisualizationContainer

* fix mixed_xy issue

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
Co-authored-by: Michael Dokolin <dokmic@gmail.com>
2022-07-25 15:33:10 +03:00
Alejandro Fernández Haro
9888244e2c
[EBT] Add Telemetry Labels (#135682)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-14 15:58:57 +02:00
Alejandro Fernández Haro
2410b879a3
[Telemetry] Make telemetry plugin non-disableable (#133205)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-27 16:21:37 +02:00
Matthias Wilhelm
961b47a08b
[Discover] Remove _type of uiSettings metaFields (#134453)
Remove the deprecated _type of metaFields to prevent from showing up in Discover's sidebar
2022-06-17 20:09:25 +02:00
mgiota
165a604e1a
[Actionable Observability] Remove alerts, rules and cases experimental feature flags (#134157)
* remove rules feature flag

* remove alertingExperience feature flag

* remove cases feature flag

* remove experimental badge from alerts page, alerts flyout, rules page, rule details page, overview page

* rempve disclaimer files

* fix tests

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-15 16:54:41 +02:00
Milton Hultgren
ee7d9b0f33
[Stack Monitoring] Add stale status reporting for Kibana (#132613)
* [Stack Monitoring] Add stale status reporting for Kibana (#126386)

* Fix stale message grammar and update stale indicator to use EuiBadge

* Fix i18n ids

* Remove unused i18n key

* Fix Jest tests

* Update exposeToBrowser test

* Update API integration tests

* Fix functional tests

* Fix API integration tests

* Update snapshots

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-08 11:31:17 +02:00
Matthew Kime
d3e5764102
[data views] More dev docs (#132817)
* more data view code comments
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
2022-06-01 21:00:35 -07:00
Mark Hopkin
d7017141e2
[Fleet] Refactoring + splash screen for new multi page add integration flow (#132182)
* pass isCloud to getInstallPkgRouteOptions

* allow enableExperimental config to be seen by UI

* WIP: spash screen navigation

* WIP

* fix tests

* do not include unenrolled agents in FTU check

* add isFirstTimeUSer query param

* Splash screen layout mostly done

* finish spash screen layout

* remove query param + handle special packages

* do not hide docs link in small windows

* restructure folder structure

* change useStepsLayout to useMultiPageLayout

* split multi and single page firther

* clean code

* further refactoring

* fix index.test.tsx

* fix epm\/screens\/detail\/index.test.tsx

* fix storybook

* add experimental features to config test

* add doc link

* tidy for PR

* add alts for arrows

* responsive layout

* remove hardcoded padding

* split ResponsiveStepGroup to its own component
2022-05-24 14:55:57 +01:00
Pierre Gayvallet
e4c11e3f39
Newsfeed: always use feeds.elastic.co (#131786)
* Newsfeed: always use `feeds.elastic.co`

* fix FTR test
2022-05-10 09:16:15 +02:00
Spencer
542b381fa5
[ftr] automatically determine config run order (#130983)
* [ftr] automatically determine config run order

* split lens config into two groups

* support ftr configs always running against CI

* Split detection_engine_api_integration rule exception list tests

* Add configs from previous commit

* [ftr] remove testMetadata and maintain a unique lifecycle instance per run

* Revert "[ftr] remove testMetadata and maintain a unique lifecycle instance per run"

This reverts commit d2b4fdb824.

* Split alerting_api_integration/security_and_spaces tests

* Add groups to yaml

* Revert "Revert "[ftr] remove testMetadata and maintain a unique lifecycle instance per run""

This reverts commit 56232eea68.

* stop ES more forcefully and fix timeout

* only cleanup lifecycle phases when the cleanup is totally complete

* only use kill when cleaning up an esTestInstance

* fix broken import

* fix runOptions.alwaysUseSource implementation

* fix config access

* fix x-pack/ccs config

* fix ml import file paths

* update kibana build id

* revert array.concat() change

* fix baseConfig usage

* fix pie chart data

* split up maps tests

* pull in all of group5 so that es archives are loaded correctly

* add to ftr configs.yml

* fix pie chart data without breaking legacy version

* fix more pie_chart stuff in new vis lib

* restore normal PR tasks

* bump kibana-buildkite-library

* remove ciGroup validation

* remove the script which is no longer called from checks.sh

* [CI] Auto-commit changed files from 'yarn kbn run build -i @kbn/pm'

* adapt flaky test runner scripts to handle ftrConfig paths

* fix types in alerting_api_integration

* improve flaky config parsing and use non-local var name for passing explicit configs to ftr_configs.sh

* Split xpack dashboard tests

* Add configs

* [flaky] remove key from ftr-config steps

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* restore cypress builds

* remove ciGroups from FTR config files

* fixup some docs

* add temporary script to hunt for FTR config files

* use config.base.js naming for clarity

* use script to power ftr_configs.yml

* remove usage of removed x-pack/scripts/functional_tests

* fix test names in dashboard snapshots

* bump kibana-buildkite-library

* Try retrying only failed configs

* be a little quieter about trying to get testStats from configs with testRunners defined

* Remove test code

* bump kibana-buildkite-library

* update es_snapshot and on_merge jobs too

* track duration and exit code for each config and print it at the end of the script

* store results in order, rather than by key, in case there are duplicates in $config

* bash is hard

* fix env source and use +e rather than disabling e for whole file

* bash sucks

* print config summary in jest jobs too

* define results in jest_parallel.sh

* simplify config summary print, format times a little better

* fix reference to unbound time variable, use better variable name

* skip the newline between each result

* finish with the nitpicking

* sync changes with ftr_configs.sh

* refuse to execute config files which aren't listed in the .buildkite/ftr_configs.yml

* fix config.edge.js base config import paths

* fix some readmes

* resolve paths from ftr_configs manifest

* fix readConfigFile tests

* just allow __fixtures__ configs

* list a few more cypress config files

* install the main branch of kibana-buildkite-library

* split up lens group1

* move ml data_visualizer tests to their own config

* fix import paths

* fix more imports

* install specific commit of buildkite-pipeline-library

* sort configs in ftr_configs.yml

* bump kibana-buildkite-library

* remove temporary script

* fix env var for limiting config types

* Update docs/developer/contributing/development-functional-tests.asciidoc

Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>

* produce a JUnit report for saved objects field count

* apply standard concurrency limits from flaky test runner

* support customizing FTR concurrency via the env

Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
2022-05-04 17:05:58 -05:00
Alejandro Fernández Haro
5f06375fe6
[FullStory] Document browser exposed config in the test (#131527) 2022-05-04 08:15:33 -07:00
Alejandro Fernández Haro
13c928d4f3
[FullStory] Filter custom events by an allowlist (#131148) 2022-05-04 13:08:25 +02:00
Anton Dosov
e603d92552
Remove data_enhanced plugin (#122075)
Code moved into `data` plugin
2022-04-29 16:43:59 +02:00
Ester Martí Vilaseca
b0fff69b2a
[Unified Observability] Clean overview page feature toggle (#130650)
* Move old overview page to index

* remove overview page feature toggle

* Remove code for old alerts section

* Fix translations

* remove feature toggle from tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-29 09:02:46 +02:00
Patrick Mueller
6ad418b275
[ResponseOps][actions] add config for allow-listing email address domains (#129001)
resolves https://github.com/elastic/kibana/issues/126944

Adds a new configuration setting for the actions plugin,
xpack.actions.email.domain_allowlist, which is an array of domain name
strings which are allowed to be sent emails by the email connector.
2022-04-26 10:05:16 -04:00
Pierre Gayvallet
a02c00b8a3
Change ContextContainer to lazily initialize providers (#129896)
* Change ContextContainer to lazily initialize providers

* Introduce CustomRequestHandlerContext, start adapting usages

* adapt IContextProvider's return type

* start fixing violations

* fixing violations - 2

* adapt home routes

* fix remaining core violation

* fix violations on core tests

* fixing more violations

* fixing more violations

* update generated doc...

* fix more violations

* adapt remaining RequestHandlerContext

* fix more violations

* fix non-async method

* more fixes

* fix another await in non async method

* add yet another missing async

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* add yet yet another missing async

* update fleet's endpoints

* fix telemetry endpoints

* fix event_log endpoints

* fix some security unit tests

* adapt canvas routes

* adapt alerting routes

* adapt more so_tagging routes

* fix data_enhanced routes

* fix license_management routes

* fix file_upload routes

* fix index_management routes

* fix lists routes

* fix snapshot_restore routes

* fix rule_registry routes

* fix ingest_pipelines routes

* fix remote_clusters routes

* fix index_lifecycle_management routes

* improve and fix the lazy implementation

* fix triggers_actions_ui endpoints

* start fixing unit tests

* fix cases routes

* fix transform routes

* fix upgrade_assistant routes

* fix uptime route wrapper

* fix uptime route wrapper bis

* update osquery routes

* update cross_cluster_replication routes

* fix some ML routes / wrappers

* adapt maps routes

* adapt rollup routes

* fix some canvas unit tests

* fix more canvas unit tests

* fix observability wrapper

* fix (?) infra type hell

* start fixing monitoring

* fix a few test plugins

* woups

* fix yet more violations

* fixing UA  tests

* fix logstash handlers

* fix fleet unit tests

* lint?

* one more batch

* update security_solution endpoints

* start fixing security_solution mocks

* start fixing security_solution tests

* fix more security_solution tests

* fix more security_solution tests

* just one more

* fix last (?) security_solution tests

* fix timelion javascript file

* fix more test plugins

* fix transforms context type

* fix ml context type

* fix context tests

* fix securitySolution withEndpointAuthz tests

* fix features unit tests

* fix actions unit tests

* fix imports

* fix duplicate import

* fix some merge problems

* fix new usage

* fix new test

* introduces context.resolve

* down the rabbit hole again

* start fixing test type failures

* more test type failures fixes

* move import comment back to correct place

* more test type failures fixes, bis

* use context.resolve for security solution rules routes

* fix new violations due to master merge

* remove comment

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-04-22 13:15:58 +02:00
Nodir Latipov
7c01257055
[Unified Search] Move autocomplete logic to unified search plugin (#129977)
* feat: move autocomplete logic from data plugin to unified search

* minor fix after comments

* updated Documentation: data.autocomplete -> unifiedSearch.autocomplete

* changed renameFromRoot order for autocomplete

* removed extra renameFromRoot in config deprecations, updated test

* added configPath for unified search plugin

* Update kibana.json

* updated path to autocomplete

* fix conflict

* fix conflict

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix Linting

* fix functional_with_es_ssl test
2022-04-22 11:02:56 +05:00
spalger
3730dd0779 fix all violations 2022-04-16 01:37:30 -05:00
Gerard Soldevila
7849d9ebb3
Hide welcome page privacy statement on cloud instances (#129198)
* Add new hidePrivacyStatement flag to Telemetry

* Remove hidePrivacyStatement from asciidocs
2022-04-12 03:39:45 -07:00
Joe Portner
27ff7d3424
Test config settings that are exposed to the browser (#129438) 2022-04-09 07:04:14 -07:00