Commit graph

171 commits

Author SHA1 Message Date
Dmitry Tomashevich
32cf768f05
[Discover] Handle no data views state for esQuery alert (#145052)
## Summary

Fixes #145020

This PR adjusts typing for search source alert to handle no data views
state in flyout.

### Checklist

- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-15 13:09:06 +03:00
Dmitry Tomashevich
a9162f7481
[Discover] Enable esQuery alert for adhoc data views (#140885)
## Summary

Closes #142514 #142389

This PR does the following: 
- Enables to create `esQuery` (in KQL or Lucene mode) using adhoc data
views from discover and management pages
- Adds `explore matching indices` button to data view picker in alert
flyout
- Adding adhoc data views from alert flyout should propage them to a
main discover picker


### 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] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] 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))
- [x] 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)
- [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))

Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
2022-11-09 18:55:34 +03:00
Bree Hall
4e9f1c0d04
Bumping EUI to version 67.1.8 (#141279)
* Updated EUI to version 67.1.2. Updated instaces of ButtonColor from EUI to EuiButtonColor.

* Updated to EuiCard instances that utilize the betaBadgeProps object to return an empty string instead of undefined when the label is unavailable

* Removed two instances of the deprecated internetExplorerOnly() mixin

* Updated two instances of the ButtonColor import to EuiButtonColor as is was renamed in PR #6150

* Updated snapshots in Jest Test Suite #1 to account for EuiButton and EuiCard Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiToolTipAnchor component that replaced the tooltip anchor styles

* Updated snapshots in Jest Test Suite #2 to account forEuiButton, EuiDescriptionList, EuiButtonIcon, and EuiBadge Emotion conversions.

* Updated snapshots in Jest Test Suite #3 to account for EuiDescriptionList, EuiButton, and EuiBadge Emotion conversions. Updated snapshots for EuiTooltip as if now contains the new EuiTooltipAnchor component that replaced the tooltop anchor styles

* Updated snapshots in Jest Test Suite #4 to account for EuiButton Emotion conversion.

* Updated snapshots in Jest Test Suite #5 to account for EuiButton Emotion conversion.

* Updated snapshots in Jest Test Suite #8 to account for EuiButtonIcon and EuiButton Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.

* Updated snapshots in Jest Test Suite #9 to account for EuiFlyout and EuiButton Emotion conversions.

* Updated snapshots in Jest Test Suite #10 to account for EuiButton, EuiBadge, EuiButtonIcon, and EuiCard Emotion conversions. Updated snapshots for EuiToolTtip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles

* Updated instances of EuiButtonIconColor to use EuiButtonIconProps['color'] as it was removed in PR #6150

* Updated tests that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors

* Updated snapshots in Jest Test Suite #1 to account for EuiButton and EuiCard Emotion conversions

* Added the EuiFlyout mixins and variables to Lens Sass file as EuiFlyout has been converted to Emotion and the Sass styles are no longer available in EUI

* Added the EuiCallOutTypes variable to Step Progress Sass file as EuiCallOut has been converted to Emotion and the Sass styles are no longer available in EUI

* Updated snapshots in Jest Test Suite #2 to account for recent Emotion conversions.
Updated snapshots in server_status.test.tsx to render EuiBadge before checking the snapshots to reduce the snapshot churn caused by Emotion.
Updated tests that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors

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

* Added imports for the added flyout mixin. Removed references to EuiCallOut mixin as the component has been converted to Emotion and is no longer available for use.

* Updated unit tests and snapshots in Jest Test Suite #10.
Updated snaphshots to account for EuiBadge, EuiDescriptionList, EuiFlyout, and EuiCard Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.
Updated tests that target EuiButton to simulate click events to target a generic button element to prevent undefined click event errors

* Updated unit tests in Jest Test Suite #11 that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors

* Updated unit tests in Jest Test Suite #12 by updating tests that target EuiButton to simulate click events. Instead, these tests now target a generic button element to prevent undefined click event errors

* Updated unit tests in Jest Test Suite #1 by updating tests that target EuiButton to simulate click events. Instead, these tests now target a generic button element to prevent undefined click event errors

* Updated unit tests in Jest Test Suite #2 by updating tests that use EuiButton to simulate click events. Instead, these test have been updated to target a button element to prevent undefined click event errors.

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

* Updated reference to mixins Sass file.
Updated snapshots for Jest Test Suite #5 to account for EuiButton Emotion conversion. Updated unit tests that target EuiButton to simulate click events. These tests have been updated to target a button element to prevent undefined click event errors

* Updated unit tests in Jest Test Suites 3, 7, 8, 13, and 14.
Updated snapshot to account for EuiButton Emotion conversion.
Updated tests that target EuiButton to simulate click events. These tests now target a generic button element to prevent undefined click event errors.
Updated a few snapshots by adding .render() before checking the snapshot. This will prevent large snapshots coming from recent Emotion conversions

* Updated snapshots in Jest Test Suite #10 to account for the recent EuiButton Emotion conversion

* Updated unit tests in Jest Test Suite #2 by editing tests that target EuiButton to simulate click events. These tests now target a button element in order to prevent undefinde click event errors

* Updated snapshots in Jest Test Suite #10 to account for EuiButton and EuiDescriptionList Emotion conversions

* Updated test cases in Jest Test Suites 3, 7, and 8. Updated snapshots to account for EuiButton and EuiPagination Emotion conversions.
Updated tests that target EuiButton to simulate click events. These tests now target a button element to prevent undefined click errors

* Updated test cases in Jest Test Suite 14. Updated snapshots to account for EuiButton Emotion conversion. Opted to use .render() when updating a few snapshots to reduce the large length of snapshots caused by Emotion

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

* Revised a change to betaBadgeProps to ensure that the label is available. If not, the value for the badge with be set to undefined.

* Resolved two linting errors

* Resolved two linting errors

* Updated Jest unit tests in various suites.
Updated snapshots to account for EuiButton Emotion conversion. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.

* Updated EuiFlyout in query_flyout.tsx to remove the onClick function from maskProps as it is no longer available. Updated this flyout to use ownFocus and not to close when the overlay mask is clicked.

* Removed the use of EuiButtonIconColor in favor of EuiButtonIconProps['color']

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

* Updated Cypress test looking for strict equality on EuiPaginationButton class names to match a substring of the Emotion generated class name

* Removed unneeded debugging code. Updated snapshots for various test suites to account for the recent EuiButton Emotion conversion

* Updated a few EuiButton, EuiButtonEmpty, and EuiText components that set the color as ghost. The ghost color mode has been deprecated as of PR #6150. These components now are wrapped in EuiThemeProvider with a dark colorMode to create the previous ghost color.

* Resolved  TS error with EuiCard betaBadgeProps

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

* Remove references to now-removed EuiFlyout CSS classes/vars

* Remove now-removed euiBadge className references

- Convert directly to EuiBadge instead of using CSS

- Remove confusing and now-possibly-irrelevant CSS badge overrides - left/right icons are now set via JSX and not via flex-direction

* Pre-emptively fix various euiOverlayMask CSS overrides

- this data attr isn't technically in yet but will be once https://github.com/elastic/eui/pull/6289 merges

- at the very least this isn't breaking any more than it currently already is!

* Update to v67.1.3

* v67.1.4

* Resolved test failing test case in Security/Manage/Blocklist. The test did not remove focus from the last combo box in the form, which didn't allow the disbaled attribute to be removed from the flyout submit button. I've updated the mock file for Blocklist to return focus to the first form element in the flyout to allow the disabled attribute to be removed.

* Updated snapshots to account for the recent EuiText Emotion conversion

* Fix Log's custom tooltips relying on EuiTooltip classNames that no longer exist

* Fix Vega vis custom tooltips relying on EuiTooltip classNames that no longer exist

- this one is trickier than Log's as it's not using React, so we need to use Emotion's Global to set a static className

* Convert remaining vega_vis.scss to Emotion

- as an example of how other global + non global styles could be handled in the future

* Fix references to removed `euiPaginationButton-isActive` className

- use aria-current attribute instead

* Added missing EuiFlyoutAnimation keyframes for EuiFlyout. This resolved test that failed because they used onAnimationEnd because the FlyoutAnimation could not be found.

* Reolved Jest Tests in suites 1 and 5. Updated snapshots to account for the recent EuiButton Emotion conversion. Updated snapshots for EuiToolTip as it now contains the new EuiToolTipAnchor component that replaced the tooltip anchor styles.

* iterate on rules_list.test.tsx

* bump eui to v67.1.5

* Updatde snapshots for jest test suites to account for the recent EuiButton, EuiOverlayMask, EuiTooltip, and EuiBadge Emotion conversions

* Resolved failing security test by updating the target element for CONNECTOR_TITLE. EuiCard has recently been converted to Emotion and the card title is no longer wrapper in a span.

* Resolved failing test case in Runtime Fields. The modify runtime field test was failing because the combobox responsbible for adding and updating scripts was not appearing. The textbox did not appear because the shared setFieldScript function targets and toggles the script textbox when opening the flyout. When a runtime field is being modified, the toggle is already active and using the shared function will trigger the toggle again (losing access to the script textbox).
Also resolved an issue that prevented the warning EuiCallout to appear when changing the type of a runtime field from its original type. Resolved this by adding an enter keypress at the end of setFieldType function to confirm the type selection, thus triggering the EuiCallout

* Resolved two tests that were failing in Lens. These test were failing because they were checking for equality in class names that no longer exist within EuiButtonGroup as it was recently converted to Emotion. These tests were updated to check for a substring of the new and longer class name

* Quick fix in test case failing because of misspelling in data-test-sub

* Updated snapshot for Jest test case as EuiButton as recently been converted to Emotion

* Removed console.log statement. Oops!

* Resolved a failing test case in Lens. They were failing because they were checking for equality in class names that no longer exist within EuiButtonGroup as it was recently converted to Emotion. These tests were updated to check for a substring of the new and longer class name.
Updated a Security test case by giving a target button the data-test-subj attribute for easier querying

* Removed reference to EuiFlyout mixin as it has been converted to Emotion. Updated the reference to an interal copy of EuiFlyout styles

* Corrected spelling error in EuiFlyout animation in Lens app

* Update EUI with latest backport

* Update button snapshots

* fix another button snapshot

* More snapshot fixes

* [EuiButton][Security] Fix button relying on now-removed `euiButton__text` CSS

- replace removed CSS with `eui-textTruncate` util instead

- combine/DRY out unnecessary span - was affecting min-width of truncation util

+ increase screenshot diff limit - this was smaller than updating the actual baseline screenshots for whatever reason (likely render diff between local and CI)

* Fix remaining Jest tests affected by Emotion conversions

- because Emotion creates its own wrapper, `.first()` can no longer be used - prefer `.last()` instead

* Fix Jest test affected by EuiButton Emotion conversion + removed modifier class

- targeting the native DOM node + filtering by disabled true/false gets us back to the 'correct' lengths

* Fix + improve flyout test

- `.last()` changes to account for EuiButton Emotion conversion is needed, but the last onClose assertion still fails due to us having modified inputs, and the confirm modal being displayed

- split test into two separate tests - one testing the onClose call, and the other testing the confirm modal

* derpin

* Skip rules_list Jest suite

* Update new EuiButton snapshot

* Upgraded EUI version to 67.1.7

* [EuiCard] Update snapshots

* [EuiPopover] Update snapshots

* [QA] Fix missing Vega warn/error message colors

;_;

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

* Fix Lens kbnToolbarButton regressions

- Caused by flattening of EUI button CSS specificity

- background-color was previously relying on isDisabled CSS specificity to override its #fff color

- `text` color modifier & `!important` is no longer needed and overrides Emotion CSS flatly

- isDisabled class is no longer needed - euiButton no longer sets `pointer-events: none` on disabled buttons (fixes tooltip bug in webkit as well)

* Backport EUI 67.1.8 fixes

* Update EuiCard snapshots

* Fix EuiModal form wrapper causing overflow issues

- see https://elastic.github.io/eui/#/layout/modal#forms-in-a-modal

* Workaround for `.kbnOverlayMountWrapper` mount point causing overflow issues

- not sure what all is using this modal service to be honest, but the wrapper is causing issues with the modal layout, this fixes overflow issues but will not fix any mask-image issues as a result

* more snapshot updates

* EuiButton - added textProps to EuiButton to prevent very long button names from spilling over outside of the container

* EuiButton - Update EuiButton related snapshots. Updated tests that target EuiButton directly to use a data-telementary-id for more specific element querying required by Emotion

* QA - Removed unnecessary comment in code

* Temporary fix for EuiCard[selectable][layout=horizontal] instances on security solutions' rule page

* Temporary fix for EuiCard[selectable][layout=horizontal] instances on osquery live query and canvas's datasource selector

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

* Fix CSS specificity, where canvas's solutionToolbarButton's background-color now takes precedence over EuiButton's primary styles

* Removed update to search_marker_tooltip that removed the euiTooltip styles and replaced then with Emotion styling. Added EuiTooltip Sass styles for the component to rely on to test for a styling bug that is causing the tooltip and the tooltip arrow to be out of sync with each other.

* Lint Sass file

* Lint Sass file

* Removed overflow:hidden style from .vgaVis_view as it was causing euiScrollStyles not to present the scroll bars in Vega Vis

* Remove typo from EuiButton textProps object. 'className' should not have been included in the actual class name

* Revert tooltip Sass

This reverts commit 20e6ead571, a5cd2de901, and c605cbd7b9

* Fix Emotion tooltip arrows

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen@elastic.co>
Co-authored-by: Chandler Prall <chandler.prall@elastic.co>
2022-11-07 21:45:50 +00:00
Ying Mao
a62635146e
[Response Ops][Alerting] alert -> rule for stack alerts (#144613)
* Renaming folder

* Renaming alertType to ruleType. Adding parameters to support group by

* Renaming

* Updating codeowners
2022-11-04 14:44:41 -04:00
Ying Mao
3b59a90671
[Response Ops][Alerting] Removing top level rule fields passed into executors (#144270)
* Removing top level fields passed into executors

* Updating stack rules

* Updating other rules

* Fixing types

* Fixing functional test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-04 09:20:54 -04:00
spalger
52f2b33a07
[auto] migrate existing plugin/package configs 2022-10-28 14:06:46 -05:00
Jonathan Budzenski
be432c0d89
Upgrade to Jest 27 (#139335)
* Upgrade to Jest 27

* fix test
2022-10-25 14:38:38 -05:00
Matthew Kime
631c24abf4
[unified search] Query string input uses data views plugin directly instead of via deprecated data plugin reference (#143611)
* use data views plugin

* remove unneeded dependency

* use data views plugin

* fix type

* type fix

* supply dataViews as depedency

* supply dataViews as depeden
2022-10-20 07:15:33 -07:00
Stratoula Kalafateli
411a306216
[Unified search] Cleanups the showQueryBar flag (#143270)
* [Unified search] Cleanups the showQueryBar flag that is not used anymore

* Fix add filter story error
2022-10-18 11:24:17 +03:00
doakalexi
b00f3b0ab9
[ResponseOps][Alerting] create new logger with tag for rule/connector type, for logger given to executors (#142121)
* Updating connector logger

* Updating rule logger

* Fixing type failure

* Fixing failing tests

* Fixing other type failure

* Fixing types

* Fixing more types

* Making logger optional

* Removing change

* Fixing errors

* Fixing preview routes

* Fixing tests and types

* Updating substrings

* Use logger in runRule function

* Fixing task runner tests

* Updating logger in constructor

* Linting fix

* Fixing action logger
2022-10-17 15:33:06 -04:00
Ersin Erdal
660a24e94f
Add filter field to index threshold rule type (#142255)
* Add filter field to index threshold rule type
2022-10-14 00:17:30 +02:00
Ersin Erdal
e552f3be5c
clear query field value before setting value (#142943)
* clear query field value before setting value
2022-10-11 14:53:58 +02:00
doakalexi
b542f7b520
[ResponseOps][Alerting] Elasticsearch query rule type allows SIZE: 0, but flags as error on re-edit (#142225)
* Fixing es query bug

* Updating threshold

* Adding isNil to another check
2022-10-10 07:34:09 -07:00
Ying Mao
a231f9c4fd
[Response Ops][Alerting] Update stack rules to respect max alert limit (#141000)
* wip

* wip

* Adding bucket selector clauses

* Adding comparator script generator

* Generating all the right queries

* Skip condition check if group agg

* Fixing functional test

* Fixing comparator script

* Fixing tests

* Fixing tests

* Renaming

* Using limit services in es query rule executor

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-10-06 10:21:09 -04:00
Ying Mao
4f649c09c5
[Response Ops] Allow _source field for ES DSL query rules (#142223)
* Allowing _source in ES query DSL

* Adding functional test

* Adding to doc

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-10-05 19:18:59 -04:00
Ying Mao
81e973bc35
Changing triggers actions ui routes to internal (#141149)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-09-22 09:01:18 -04:00
Nodir Latipov
10211c6df7
[Unified Search] Fix regress autocomplete (#140880)
* fix: refress with autocomplete

* fix: autocomplite

* feat: added usageCollection to unified search plugin

* fix: check type

* fix: jest test

* refact: move usageCollection to optionalPlugins

* cleanup

* fix: avtocomplete in lens

* fix default editro

* some cleanup

* feat: rename app name in Lens

* feat: rename app in apm

* fix: descover autocomplete
2022-09-21 16:29:46 +05:00
Pierre Gayvallet
9579ea7235
Move src/core/types/elasticsearch to @kbn/es-types (#140522)
* create empty package

* move types to packages

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

* start fixing imports

* fix more imports

* fix inline import

* add apm-ui as owners

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

* fix new usages

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-20 10:32:13 +02:00
Hannah Mudge
138f2cda0d
[Dashboard] Services abstraction (#139145)
* Service abstraction for data service

* Remove unnecessary files

* Fix jest tests for new data service

* Service abstraction for HTTP service + fix Jest tests

* Services abstraction for visualizations service

* Services abstraction for data views editor service

* Services abstraction for spaces service

* Services abstraction for settings service

* Remove more unnecessary files + clean up imports

* Add theme to new settings service + fix imports

* Services abstraction for overlays service

* Services abstraction for navigation service

* Services abstraction for chrome service

* Services abstraction for embeddable service  + fix Jest tests

* Services abstraction for notifications service

* Services abstraction for dashboard capabilities service

* Remove unecessary context provider

* Services abstraction for screenshot mode service

* Services abstraction for url forwarding service

* Services abstraction for share service

* Services abstraction for usage collection service

* Another round of code cleanup

* Services abstraction for initializer context service

* Clean up more unecessary files

* Services abstraction for application service

* Remove duplicated saved object client service

* Services abstraction for saved objects service

* Services abstraction for saved objects tagging service

* Services abstraction for dashboard session storage service

* Services abstraction for core context service

* Clean up initializer context code

* Refactor to create singular no data page context service

* Create and use dashboard mount context provider

* Clean up + abstraction for docs link service

* Remove dashboard container services

* Temporarily revert back to deprecated fullscreen button

* Remove PlaceholderEmbeddableServices + more code clean up

* More code clean up

* Clean up plugin code

* Investigated possibly flaky test - doesn't actually seem to be flaky

* Update snapshot for new services

* Clean up actions code

* Clean up dashboard container code

* Add to documentation links service to remove type casting

* Address feedback

* Undo move of services in dashboard container factory
2022-09-14 08:09:45 -06:00
Lisa Cawley
2115309d0a
Edit UI text for "exclude previous hits" check box in Elasticsearch query rule (#140146) 2022-09-07 08:34:35 -07:00
Ying Mao
27315aceba
[Response Ops] Add framework services for rule types to respect alert circuit breaker (#139501)
* Adding service functions to alert factory

* Fixing types

* Fixing types

* Small refactor

* Adding functional test

* Cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-09-06 10:21:28 -04:00
Ersin Erdal
7d3f762186
Add "exclude previous hits" check box to ESQuery rule form (#138781)
* Add "Exclude the hits from previous rule run" check box to ESQuery rule form
2022-09-05 13:09:09 +02:00
Gidi Meir Morris
502dc0a4d0
[E&C][ES Query] adds runtime mappings and fields support to the ES Query ruletype (#138427)
This PR adds Runtime Fields support to the ES Query Rule Type when using the DSL Query mode.
2022-08-22 13:17:46 +01:00
Ying Mao
db72db9e7c
[Response Ops] [Alerting] Adds circuit breaker that limits the max number of alerts that can be reported each rule run. (#138446)
* Adding config for max alerts. Throw error in alert factory when max alerts are reported. Process alerts differently when alert limit is reached

* Fixing types. Adding new config to docker and docs

* Setting flag to indicate limit reached. Update rule status to warning if limit reached

* Fixing task runner test

* Cleanup

* Fixing task runner test

* Actually using result of hasReachedAlertLimit

* Fixing types

* Copying over scheduled actions for active alerts. Only execute actions if they exist

* Setting lower limit in functional test config

* Adding functional test

* Update x-pack/plugins/alerting/server/constants/translations.ts

Co-authored-by: Lisa Cawley <lcawley@elastic.co>

* PR feedback

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-08-16 07:36:38 -07:00
doakalexi
3479974976
[ResponseOps][Alerting] Elasticsearch Query Rule doesn't have 'dark mode' view for query (#138631)
* Changing code editor component

* Fixing test failures

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-08-15 15:26:33 -04:00
Constance
7b11420ee9
Upgrade EUI to v62.0.3 (#138351)
* Upgrade to v62.0.3

* Update EUI i18n tokens

* Update html string snapshots

- Emotion CSS hash changed

* [EuiIcon] Update instances of `keyboardShortcut` icons to `keyboard`

* [EuiErrorBoundary] Update snapshots from Emotion conversion

* [EuiImage] Update snapshots, tests, and CSS to account for Emotion conversion

* [EuiImage][RTL] Fix test failures caused by EuiImage changes

* [EuiCommentList] Deprecate EuiCommentProps.type

* [EuiCommentList] Rename `timelineIcon` prop to `timelineAvatar`

- see https://github.com/elastic/eui/pull/6071

* [EuiCommentList] Fix selectors deprecated by Emotion conversion

* [EuiPopover][EuiCommentEvent][Enzyme] Fix mounted test failures caused by Emotion conversions

- Mounting displays the Emotion wrapper with the data-test-subj on them - we need to specify the output div renders in order for text assertions to be correct

* [EuiPopover] Deprecate `initialFocus={false}` as an option

see https://github.com/elastic/eui/pull/6044

* [EuiPopover] Rename `display=inlineBlock` to `inline-block`

- see https://github.com/elastic/eui/pull/5977

* [EuiPopover] Update snapshots from Emotion conversion

* [EuiPopover] Replace deprecated `.euiPopover__panel-isOpen` class with new `[data-popover-open]` attribute

* [EuiPopover][RTL] Fix test failures caused by not waiting for EuiPopover animation/transition

* Skip failing a11y tests

- test w/ similar error already skipped in another test above
- requires closing the popover for next test to pass
- not sure why delete action is no longer available

* Fix failing Security Cypress tests

* Attempt to squash flaky FTR tests around Add Filter popover

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jonathan Budzenski <jon@elastic.co>
2022-08-12 16:40:58 -07: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
Nathan Reese
91f15ff355
[maps] add context for 'No longer contained' geo-containment alert (#136451)
* [maps] add context for 'No longer contained' geo-containement alert

* populate recovered alert context

* do not include context.containingBoundaryId and context.containingBoundaryName for recovered alert context

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

* do not set containement in recovered context

* add comments

* clean up

* comment typo

* review feedback rename containtments => containments

* update context variable descriptions

* get_context unit tests

* update jest snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-21 14:59:09 -06:00
Pierre Gayvallet
3508350446
Migrate server-side ES domain to packages (#136297)
* create es types package

* start moving client types to @kbn/core-elasticsearch-server

* move ElasticsearchClientConfig to package

* start adapting usages

* start fixing imports

* fix more imports

* just a bit more

* move service types

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

* fix more internal types

* move retry call cluster helpers outside of client package

* move client code and mocks to packages

* fix imports

* adapt external usages

* adapt more external usages

* adapt more external usages 2

* fix mocked module

* create empty domain packages

* more external usages fix

* move ALL the things (again)

* mock external import fix

* fix tests, add test dependencies

* fix some internal usages

* fix more internal usages

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

* fix cli_setup usage

* desperate times force desperate decisions

* fix misc stuff

* update snapshots (?!)

* fix mocked package

* self review

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-07-20 10:07:48 +02:00
Lisa Cawley
2679970cd1
[Alerting] Add popover for Elasticsearch query rule type (#135968) 2022-07-14 17:04:11 -07:00
Julia Rechkunova
b46763fc2a
[Alerting] Improve creation and editing of "Elasticsearch query" rule in Management (#134763)
* [Alerting][Discover] Add query form type selection for ES query

* [Alerting] Add labels

* [Alerting] Unify common rule expressiosn

* [Alerting] Fix code style

* [Alerting] More refactoring

* [Alerting] Show different UI based on user choice

* [Alerting] Improve validation and reset rule params when view changes

* Resolve conflicts

* [Alerting] Fix button color

* [Alerting] Revert tmp changes

* [Alerting] Fix query input

* [Alerting] Fix thresholdComparator and timeWindowUnit changes

* [Alerting] Unify UI for different query form types

* [Alerting] Clean up translations

* [Alerting] Fix for tests

* [Alerting] Update help tooltips

* [Alerting] Preselect a default data view

* [Alerting] Add validation tests

* [Alerting] Add more tests

* [Alerting] Add the smaller title

* [Alerting] Fix localization bug

* [Alerting] Fix rules editing view

* [Alerting] Fix layout for mobile

* [Alerting] Address PR comments

* [Discover] unify searchType and formType

* [Alerting] Allow to create new data views from Data View Expression

* [Alerting] Fix lint issue

* [Discover] fix management and discover views

* [Discover] remove redundant prop

* [Alerting] Add validation message when query type is not selected yet

* [Alerting] Update validations

* [Alerting] Update tests

* [Alerting] Update tests

* [Alerting] Update tests

* [Alerting] Prioritize index errors

* [Alerting] Fix size validation

* [Alerting] Fix timeWindowSize validation

* [Alerting] Address CI issues

* Address plugins concurrency effect on sample data server API

* [Alerting] Remove deprecated strings

* [Alerting] Update copy and spacing

* [Alerting] Cleanup translations

* [Alerting] Unify labels key

* [Alerting] Update copy

* [Alerting] Update copy key

* [Alerting] Bring back the original label

* [Alerting] Update after the merge

* [Alerting] Update validation message

* [Alerting] Update styles for Create a data view button

* [Alerting] Add message about missing privilieges

* [Alerting] Reduce padding in data view selector

* [Alerting] Update copy

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Tamashevich <diaamnj@mail.ru>
2022-07-07 11:19:06 +02:00
Davis McPhee
850b8f015b
[Discover] Add support for copying the query from the add rule flyout (#135098) 2022-06-30 17:44:50 -03:00
Constance
de20876b30
Upgrade EUI to v60.0.0 (#134919)
* Upgrade EUI to v60.0.0

* reorganize style tag injection using EuiProvider.cache options

* Convert Jest snapshots for EUI Emotion classNames to a static `emotion-` prefix instead of a dynamic hash

- The goal of this is to reduce thrashing on downstream Kibana snapshots whenever EUI CSS changes

+ Add serializer to Canvas' storyshots tests as well

+ Switch several .html() snapshots to .render() - render uses the new serializer logic, but .html() does not and will still output CSS hashes, plus is more difficult to read

* Update downstream tests for EuiStat Emotion/className changes

* Fix WithEuiTheme(EuiAccordionClass) references

* Rename mounted snapshots of EuiButtonContent to EuiButtonContentDeprecated

* add emotion/cache to kbn-ui-shared-deps

* Fix non-rendering server-side Emotion CSS

* Fix failing Security Cypress test

- the Cypress query/command being used wasn't working correctly

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-28 11:23:59 -07:00
Greg Thompson
2336f33632
Upgrade EUI to v59.0.1 (#133927)
* eui to v59.0.0

* i18n tokens

* update theme var tokens

* mock mouseevent for euiselectable

* mock mouseevent for euiselectable

* update theme var tokens

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

* mock mouseevent for euiselectable

* update theme var tokens

* update theme var tokens mocks

* WIP: forwardRef type

* update snapshots

* euiTextColor

* snapshot updates

* jest test updates

* euiTextColor updates

* jest test updates

* update getVisualizeError selector

* euiPaddingSizes

* snapshot update

* WIP: accordion cy.react

* DetailPanelMetadataTab test updates

* eui to v59.0.1

* snapshot updates

* WIP: osquery cypress

* WIP: osquery cypress

* use data-test-subj

* log standard console errors

* snapshot

* paddingSizes update

* euiaccordion class type comment

* snapshots

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-21 17:08:15 -05:00
Anton Dosov
a8095ce11a
Remove deprecated es-query re-imports from data plugin (#134600) 2022-06-21 04:09:44 -07:00
Matthias Wilhelm
69cd603a90
[Discover] Replace RxJS firstValueFrom with RxJS lastValueFrom to prevent problem with partial results (#134682) 2022-06-20 17:15:15 +02:00
Davis McPhee
f0f2a05297
[Discover] [Alerting] Make 'Test query' button pretty (#134605)
* [Discover] [Alerting] Made 'Test query' button in 'Create rule' flyout pretty

* [Discover] [Alerting] Fixed broken 'Test query' button tests
2022-06-17 10:41:20 -03:00
Julia Rechkunova
7b17093c14
[Discover] Include current filters into "Test query" request (#134184)
* [Discover] Include current filters into "Test query" request

* [Discover] Reset query results when criteria is changed

* [Discover] Add a comment

* [Discover] Reset "Test query" when any rule configuration changes
2022-06-14 12:39:44 +02:00
Ying Mao
a5a287b383
[Response Ops] Adds recovery context for ES query rule type (#132839)
* Renaming alert to rule for es query rule type

* adding recovery context

* Updating unit tests

* Fixing i18n

* Adding functional test

* Adding functional test

* Fixing functional test

* Adding space id to link

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-04 06:57:47 -07:00
Matthias Wilhelm
96c988abce
[Discover][Alerting] Add test button to rule flyout (#132540) 2022-05-23 16:12:09 +02:00
Dmitry Tomashevich
bc31053dc9
[Discover][Alerting] Implement editing of dataView, query & filters (#131688)
* [Discover] introduce params editing using unified search

* [Discover] fix unit tests

* [Discover] fix functional tests

* [Discover] fix unit tests

* [Discover] return test subject name

* [Discover] fix alert functional test

* Update x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx

Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>

* Update x-pack/plugins/stack_alerts/public/alert_types/es_query/expression/search_source_expression_form.tsx

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>

* [Discover] hide filter panel options

* [Discover] improve functional test

* [Discover] apply suggestions

* [Discover] change data view selector

* [Discover] fix tests

* [Discover] apply suggestions, fix lang mode toggler

* [Discover] mote interface to types file, clean up diff

* [Discover] fix saved query issue

* Update x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>

* [Discover] remove zIndex

* [Discover] omit null searchType from esQuery completely, add isEsQueryAlert check for useSavedObjectReferences hook

* [Discover] set searchType to esQuery when needed

* [Discover] fix unit tests

* Update x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type_params.ts

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>

* Update x-pack/plugins/stack_alerts/server/alert_types/es_query/alert_type.ts

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>

Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>
2022-05-20 17:09:20 +03:00
Dmitry Tomashevich
fdf2086eb0
[Discover] Cancel long running requests in Discover alert (#130077)
* [Discover] improve long running requests for search source within alert rule

* [Discover] add tests

* [Discover] fix linting

* [Discover] fix unit test

* [Discover] add getMetrics test

* [Discover] fix unit test

* [Discover] merge search clients metrics

* [Discover] wrap searchSourceClient

* [Discover] add unit tests

* [Discover] replace searchSourceUtils with searchSourceClient in tests

* [Discover] apply suggestions
2022-05-19 10:24:55 +03:00
Stratoula Kalafateli
0d4cc4dc32
[Unified search] Improves the current filter/search experience (#128401)
* [Unified search] Moves dataview picker to the search bar (#126560)

* [Unified search] Moves dataview picker to the search bar

* alter texts

* Remove unused file

* [ChangeDataView] Design cleanup

* Fix services mock failure

* Show newly created datavuew on the list

* Keep dataview picker in discover in mobile view

* Cleanup

* Cleanup translations

* Fix some discover FTs

* Fix management FTs

* More test fixes

* Added a dismissible tour

* Pulled the selectabl list into a new component

… for reuse

Called `DataViewsList`. I then changed Lens’ config panel’s own EuiSelectableList to use this new component instead.

*Didn’t do any test updates*

* Fix broken jest test

* Use the same picker component on Discover mobile view

* Apply some CI fixes

* Fix more functional tests

* More FTs fixes

* Close the tour popover for lens tests

* More FTs fixes

* Fix lens FTs

* Using new `styles.ts` pattern for custom styles and allowing for `fullWidth` buttons

* Better tour text and i18n

* Update copy

* No exclamation point

* Cleanup

* Fixes on discover tests

* Fixes on Lens Fts - create runtime fields

* Fixes on edit permission of add field in discover and some FTs fixes

* Further Fts fixes

* More FTs fixes

* Made tour opt-in with `showNewMenuTour`

* Refactor the OSS FTs to change less files

* Further cleanup on the FTs

* Remove unecessary action

* Fix dataview creation bug

* Add a unit test to the new component

* More fixes

* Fix OSS a11y tests

* Adds another unit test for Lens permissions

* Make a change to stabilize the tests

* Clear flyout prop as it is not used anymore

* Deisgn fixes for mobile view

* Address PR comments WIP

* Update the layrpanl dataview list when a new dataview is created

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* fix test

* Fix CI

* Fix i18n checks

* [Unified search] Redesign search bar (#126566)

* [Unified search] Redesign search bar

* Changes to the saved queries design

* Remove `globalQueryBar` from nested under `.kbnTopNavMenu__wrapper`

* [Security Solution] Removing overrides of `.globaQueryBar`

* Cleanup of `.globalQueryBar` styles and variants

* General layout fixes/adjustments

* More general layout fixes and better defaults

* Enable Clear all button if saved query is applied

* Clear should be enabled if searched query is applied but not the save as new

* fix some bugs on enabling and disabling the menu options

* [design] Working on Load Filter set menu

* Indicate selection even before the user clicks apply

* prettify the time text

* Add delete saved qquery confirmation modal

* Some cleaning up

* Fix the manage saved queries link

* Enable load filter set if saved query is created for the first time

* Some fixes on linting and on translations

* Clanup scss

* Make some fixes

* Fix navigatation unit test

* Fix translations check

* Fix rest jest tests

* Fix some functional tests

* Fix checks

* Fixes the appearance of the searchbar components depending on the flags

* Fix OSS tests

* Fixes on tests and query bar logic

* Fix the OSS ally tests

* Fix graph and lens KQL bar display problems, apply saveQuery flag correctly

* Fix more tests

* Fix security solution test

* Undo tweaks for graph

* Better fix for Graph

- Emulate new look, not old
- Uses same context menu panel as the new one
- Provides the same button type (filter button)

* Fix checks and jest test

* Further fixes

* Fix language switcher test

* Hopefully fixes the rest of the solution tests

* Cleanup

* Fixes on maps filtering

* Fix Discover padding

* [Discover] Added New Field button to bottom of fields list

* Simple responsive behavior

* Quick filter updates

* CI fixes

* area-label fix

* 18n translate the add filed btn in discover

* Fix lens functional test

* fix functional tests

* Refactor and add unit test for the add filter button

* Add unit test to the saved management list component

* Stabilize lens test

* Second try to solve the flakiness

* Fix panels depending on the flags

* Fix jest tests

* Fix double menu when only the queryInput is on

* Add storybook for the different layouts of the unified search bar

* Fix ci checks

* Removee hooks comment

* Fix flakiness

* Fix problem with lens dataview change

* Fix checks

* Ensure that the query is submitted

* Fixes oon CI

* Fixes flakiness

* Fix checks CI

* Update texts

* Cleanup

* Fix unskipped funtional test

* Fix FT

* Update src/plugins/unified_search/public/saved_query_form/save_query_form.tsx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Fix eslint

* Fix checks

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Fix jest

* Fix jest tests

* Stabilize discover security tests

* [Unified search] Further enhancements (#129877)

* [Unified search] Redesign search bar

* Changes to the saved queries design

* Remove `globalQueryBar` from nested under `.kbnTopNavMenu__wrapper`

* [Security Solution] Removing overrides of `.globaQueryBar`

* Cleanup of `.globalQueryBar` styles and variants

* General layout fixes/adjustments

* More general layout fixes and better defaults

* Enable Clear all button if saved query is applied

* Clear should be enabled if searched query is applied but not the save as new

* fix some bugs on enabling and disabling the menu options

* [design] Working on Load Filter set menu

* Indicate selection even before the user clicks apply

* prettify the time text

* Add delete saved qquery confirmation modal

* Some cleaning up

* Fix the manage saved queries link

* Enable load filter set if saved query is created for the first time

* Some fixes on linting and on translations

* Clanup scss

* Make some fixes

* Fix navigatation unit test

* Fix translations check

* Fix rest jest tests

* Fix some functional tests

* Fix checks

* Fixes the appearance of the searchbar components depending on the flags

* Fix OSS tests

* Fixes on tests and query bar logic

* Fix the OSS ally tests

* Fix graph and lens KQL bar display problems, apply saveQuery flag correctly

* Fix more tests

* Fix security solution test

* Undo tweaks for graph

* Better fix for Graph

- Emulate new look, not old
- Uses same context menu panel as the new one
- Provides the same button type (filter button)

* Fix checks and jest test

* Further fixes

* Fix language switcher test

* Hopefully fixes the rest of the solution tests

* Cleanup

* Fixes on maps filtering

* Fix Discover padding

* [Discover] Added New Field button to bottom of fields list

* Simple responsive behavior

* Quick filter updates

* CI fixes

* area-label fix

* 18n translate the add filed btn in discover

* Fix lens functional test

* fix functional tests

* Refactor and add unit test for the add filter button

* Add unit test to the saved management list component

* Stabilize lens test

* Second try to solve the flakiness

* Fix panels depending on the flags

* Fix jest tests

* Fix double menu when only the queryInput is on

* Add storybook for the different layouts of the unified search bar

* Fix ci checks

* Removee hooks comment

* Fix flakiness

* Fix problem with lens dataview change

* Fix checks

* Ensure that the query is submitted

* Fixes oon CI

* Fixes flakiness

* Fix checks CI

* Update texts

* Cleanup

* Fix unskipped funtional test

* Fix FT

* Fixes filter bar responsiveness

* Add filter button option to the main menu

* Filter form design pass

- Added tooltip around “Add filter” icon button
- Fixed padding
- Stubbed in “Add” vs “Edit” labels

* Query menu icon button tooltip

* ‘Update’ not ‘Edit’ button label

* Apply different strings for adding filter mode vs edit

* Hide Manage SO link if the user donesnt have the permissions

* Fix the wrapping of the badges and datepicker badge

* Minor props naming fix

* Fix checks

* Fix mobile

* Cleanup

* Fix checks

* Faux button group

* Changes on the search input placeholder

* Fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Fix translations

* Fix security solution add filter bug

* Filter bar / items: Reduce to only necessary wrappers and styles

- Switch to Emotion for styling
- Rename `FilterBadgesWrapper` to `FilterItems`
- Move `FilterItems` and `FilterItem` so own folder `filter_item/`

# Conflicts:
#	src/plugins/unified_search/public/filter_bar/filter_bar.tsx
#	src/plugins/unified_search/public/filter_bar/filter_editor/lib/filter_label.tsx
#	src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx
#	src/plugins/unified_search/public/filter_bar/filter_item/filter_items.tsx
#	src/plugins/unified_search/public/filter_bar/filter_view/index.tsx
#	src/plugins/unified_search/public/query_string_input/filter_editor_wrapper.tsx
#	src/plugins/unified_search/public/search_bar/search_bar.tsx

* Fix styles by removing styled-components

Also added prop `afterQueryBar` to signify that it needs the top margin

# Conflicts:
#	packages/kbn-babel-preset/styled_components_files.js

* Refactor `SearchBar` and `QueryBarTopRow` a bit

- Added `showSubmitButton` to explicitely hide the submit button (defaults to true)
- SearchBar always renders the `QueryBarTopRow` which now fully controls visibility of the pieces
- Renamed class with new `uni` prefix
- Tried and failed to use Emotion

* Update usages

# Conflicts:
#	x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx

* Fix a test

* Fix jest test

* Attaches filter menu when no add button and better dropdown styles

* Fix lint errors

* Clearing the query and filters of a saved query should unload the saved query

* Do not allow to update the loaded saved query if no filters or no query

* Fix Graph by creating reusable `KibanaFilterButtonGroup`

* Use EuiTheme for SearchBar styles

Updated `displayStyle` for Lens & Discover

* Fix displayStyle prop problem

* Correct alignment of data visualizer

* Super nit comment

* Data visualizer improvements

* Apply useMemo in editPermission cont in Discover

* Fix translations checks

* Fix translations checks

* Fix filter badge popover bug

* [Submit button] Changed to EuiSuperUpdateButton

- Quickly adds tooltip content and filled state for more prominence when dirty
- Fixed 18n

* Fix tests

* Align the position with the other tolltips and check that functional tests succeed

* Give some time to the tooltip to disappear

* Fix tests

* Fix CI checks

* Address PR comments

* Move constants outside render

* Apply PR comments

* Fix dataview picker glich

* lovercase emotion function

* Fix a11y problem on dataview picker

* Lowercase rest of emotion style functions

* Clean up

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2022-05-06 10:10:01 +03:00
spalger
3730dd0779 fix all violations 2022-04-16 01:37:30 -05:00
Matthew Kime
0a800c4b8a
[data views] Type cleanup, monitoring uses data views service instead of faking data view (#128853)
* remove deprecated types

* remove more IIndexPattern

* Update x-pack/plugins/monitoring/kibana.json

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>

* switch conditional to guard statement

* add data view to triggers_actions_ui

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2022-04-14 09:13:07 -05:00
Alejandro Fernández Haro
9d5aca591b
Upgrade RxJS to 7 (#129087)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-04-12 12:40:55 -07:00
Matthew Kime
eeee6b9db2
unified search - iindex_pattern => data view type improvement (#129506)
* iindex_pattern => data view

Co-authored-by: Nicolas Chaulet <n.chaulet@gmail.com>

Co-authored-by: Nicolas Chaulet <n.chaulet@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-11 17:49:24 -05:00
Dmitry Tomashevich
3522a7fdc7
[Alerting] Improve comparator types of es_query && index_threshold rules (#129190)
* [Alerting] improve comparator types

* [Discover] fix unit tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-07 14:59:31 +05:00
Nodir Latipov
3e2761d981
[Unified search] Create unified search plugin (#127651)
* [Unified search] Create unified search plugin

* add unified_search into USES_STYLED_COMPONENTS

* fix JEST group 4

* update limits for data plugin

* fix: remove unifiedSearch plugin from x-pack/plugins/file_upload

* feat: updated .github/CODEOWNERS and set @elastic/kibana-app-services as a code owner

* apply PR comments

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

* feat: moved filter bar, apply filters folders and apply filter action from Data plugin to unified search plugin

* fix Checks

* fix Checks

* fix Linting and Default CI Group #16

* fix Checks

* fix Checks

* fix Linting (with types)

* fix show FILTER_BAR

* fix Jest Tests

* feat replece indexPatternsContranct in setIndexPatterns to DataViewsContract

* feat: removed unnecessary interface in unified search

* fix Checks

* fix Checks

* fix Jest Tests, Checks

* fix Checks

* resolve comments

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-05 12:23:31 +05:00
Ying Mao
25d9f5d97e
[Response Ops] Renaming Alert to Rule (#129136)
* Rename all the things

* Fixing checks

* Removing unnecessary change

* Fixing checks
2022-04-04 07:32:32 -04:00