* [Maps] clean up uses of any in redux actions and kibana services
* API doc changes and updated IndexPatternSelect type
* tslint errors in OSS code
* API updates
* remove IndexPatternSelectPublicProps and create IndexPatternSelectInternalProps instead
* include changes to index_pattern_select
* API updates
* remove savedObjectClient from IndexPatternSelectProps
* update types for lazy load component
* remove unused import
* export type
* another API clean-up
* revert changes to import in data/public/types
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Renames "Built-In Alerts" feature to "Stack Alerts" and "Actions" feature to "Actions and Connectors" as we've decided these names make more appropriate and better communicate what these features are.
* Create lens action and unregister the visualize one
* remove console
* Implement Discover to Lens, wip, missing tests
* Add unit tests
* fix embed lens to empty dashboard functional tests
* fix suggestions on save
* Fix bug on save button, query and filters should be transferred from discover
* Add functional test for the navigation from Discover to Lens
* PR update after code review
* unregister visualize action only if the action exists
* Change the test to not be flaky
* Move suggestions to editor frame and hide the emptyWorkspace for visualize field
* Update ui actions docs
* Add a retry to remove test flakiness
* Fix bug of infinite loader when removing the y axis dimension
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* WIP: Adding new route for EQL Validation
This is mostly boilerplate with some rough parameter definitions; the
actual implementation of the validation is going to live in our
validateEql function.
A few tests are failing as the mocks haven't yet been implemented, I
need to see the shape of the responses first.
* Cherry-pick Marshall's EQL types
* Implements actual EQL validation
* Performs an EQL search
* filters out non-parsing errors, and returns what remains in the
response
* Adds mocks for empty EQL responses (we don't yet have a need for
mocked data, but we will when we unit-test validateEql)
* Adds validation calls to the EQL form input
* Adds EQL Validation response schema,mocks,tests
* Adds frontend function to call our validation endpoint
* Adds hook, useEqlValidation, to call the above function and return
state
* Adds labels/help text for EQL Query bar
* EqlQueryBar consumes useEqlValidation and marks the field as invalid,
but does not yet report errors.
* Do not call the validation API if query is not present
This causes a broader error that results in a 400 response; we can (and
do) handle the case of a blank query in the form itself.
* Remove EQL Help Text
It doesn't add any information for the user, and it currently looks bad
when combined with validation errors.
* Flesh out and use our popover for displaying validation errors
* Fixes issue where old errors were persisted after the user had made
modifications
* Include verification_exception errors as validation errors
These include errors related to index fields and mappings.
* Generalize our validation helpers
We're concerned with validation errors; the source of those errors is an
implementation detail of these functions.
* Move error popover and EQL reference link to footer
This more closely resembles the new Eui Markdown editor, which places
errors and doc links in a footer.
* Fix jest tests following additional prop
* Add icon for EQL Rule card
* Fixes existing EqlQueryBar tests
These were broken by our use of useAppToasts and the EUI theme.
* Add unit tests around error rendering on EQL Query Bar
* Add tests for ErrorPopover
* Remove unused schema type
Decode doesn't do any additional processing, so we can use t.TypeOf here
(the default for buildRouteValidation).
* Remove duplicated header
* Use ignore parameter to prevent EQL validations from logging errors
Without `ignore: [400]` the ES client will log errors and then throw
them. We can catch the error, but the log is undesirable.
This updates the query to use the ignore parameter, along with updating
the validation logic to work with the updated response.
Adds some mocks and tests around these responses and helpers, since
these will exist independent of the validation implementation.
* Include mapping_exceptions during EQL query validation
These include errors for inaccessible indexes, which should be useful to
the rule writer in writing their EQL query.
* Display toast messages for non-validation messages
* fix type errors
This type was renamed.
* Do not request data in our validation request
By not having the cluster retrieve/send any data, this should saves us
a few CPU cycles.
* Move EQL validation to an async form validator
Rather than invoking a custom validation hook (useEqlValidation) at custom times (onBlur) in our EqlQueryBar
component, we can instead move this functionality to a form validation
function and have it be invoked automatically by our form when values
change. However, because we still need to handle the validation messages
slightly differently (place them in a popover as opposed to an
EuiFormRow), we also need custom error retrieval in the form of
getValidationResults.
After much pain, it was determined that the default behavior of
_.debounce does not work with async validator functions, as a debounced
call will not "wait" for the eventual invocation but will instead return
the most recently resolved value. This leads to stale validation
results and terrible UX, so I wrote a custom function (debounceAsync)
that behaves like we want/need; see tests for details.
* Invalidate our query field when index patterns change
Since EQL rules actually validate against the relevant indexes, changing
said indexes should invalidate/revalidate the query.
With the form lib, this is beautifully simple :)
* Set a min-height on our EQL textarea
* Remove unused prop from EqlQueryBar
Index corresponds to the value from the index field; now that our EQL
validation is performed by the form we have no need for it here.
* Update EQL overview link to point to elasticsearch docs
Adds an entry in our doclinks service, and uses that.
* Remove unused prop from stale tests
* Update docLinks documentation with new EQL link
* Fix bug where saved query rules had no type selected on Edit
* Wait for kibana requests to complete before moving between rule tabs
With our new async validation, a user can quickly navigate away from the
Definition tab before the validation has completed, resulting in the
form being invalidated. Any subsequent user actions cause the form to
correct itself, but until I can find a better solution here this really
just gives the validation time to complete and sidesteps the issue.
* [Vega] Fix unexpected change in autosizing behavior post upgrade
* Add docs
* Fix type issues
* Fix i18n and snapshot
* Fix snapshot?
* Fix time in snapshot
* Update style of sizing function
* split application utilities and associated tests to distinct files
* do not match app if path does not start with the basePath
* add relative paths support to `navigateToUrl`
* add null-check error
* update generated doc
* nits on doc
* Update styles
* Implement toExpressionAst fn
* Implement renderer
* Update unit tests
* Add unit tests
* Update types
* Remove unused vars
* Fix types
* Update types
* Show error message when no data
* Update ExpressionRenderDefinition api
* Update renderer when there is no data
* Make options component lazy
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Update tutorial-discovering.asciidoc
Adds alt text to images in doc.
* Update docs/getting-started/tutorial-discovering.asciidoc
* Update docs/getting-started/tutorial-discovering.asciidoc
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
* Update tutorial-define-index.asciidoc
Forgot to update alt text in previous pr. Additionally, it is unclear in the image where the "time field" dropdown is located.
* Update docs/getting-started/tutorial-define-index.asciidoc
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
* First stab at developer-focussed saved objects docs
* Don't introduce spelling mistakes
* Add docs for SO migrations
* Link to HTTP API documentation
* Grammar fixes
* Rendering fixes
* Migrations should be tested, remove nested migration docs for now
* Drop subtitle field in migration, add notes about migration version, behaviour for corrupt documents and emphasize testing
Co-authored-by: Josh Dover <me@joshdover.com>
* init commit
* lots of cleanup
* starting on tests... problems
* Ready for review
* remove sample data
* remove comment and fix type
* pr changes
* fix type
* scratchy
* sourcerer in timeline
* sourcerer in timeline
* wip
* moving to redux
* working on types
* fixed
* more adjustments, tests fixed
* FF off
* pr ready
* renaming
* url state working, hoc not working
* url state working for timeline and default scope
* script to build fields for beat doc
* refactor sourcerer
* refactor host to useSourcerer
* refactor network to useSourcerer
* refactor overview to useSourcerer
* refactor detections to useSourcerer
* wip for timelines to remove all useSource
* wip indexes timeline
* do component tests
* start container tests
* start container tests
* update selection widget of index patterns + remove last useWithSource
* add indexeNames in network kpi
* fix type errors
* fix type
* missing merge master
* get existing index from config file
* fixing broken tests
* add saving button to avoid to many queries to be aborted
* reducer timeline tests broke
* need to rewind
* much better
* timeline saving index names + clean up url state to only manage default
* more test fixing
* more test changes
* remove all the useWithSource + deprecated the graphql until we delete it in a new PR + delete all the beat doc
* default timeline to all index when creation + filter index patterns to make sure you do not add one who we do not know
* fix types
* test for stateful timeline render
* we should not have change that
* no chnages + snapshot
* fix test + bugs from review
* fix uncommon processes indexNames
* review III
* change design for main page of the sourcerer from design
* bug fixes when opening old timeline + implementation of new design
* fix circular deps
* remove unused attributes for event details
* design cleanup
* fix api integration test with the new search strategy
* add reset + manage accordion state
* fix bugs + types issues
* cleanup
* update docs
* review -> remove tooltip when popover is open
* cypress fixing
* fix for ml_condition_links and url_state cypress tests
* add cy wait for race condition in pagination tests
* missing plumbing kpi host
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
This pr makes sure there is way to disable URL drilldown feature.
I decided to extract Url drilldown definition into a separate plugin to benefit from regular disabling a plugin feature.
Having it as a separate plugin also makes sense because we will start adding registries specific to URL drilldown implementation
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Fields dropdowns are not populated if one of the indices is missing
* Fix tests and accept api changes
* Add indexPatternsService to get default index pattern
* Replace simple error message string with i18n translation
* Remove unnecessary displaying error code
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Adding KibanaRequest#uuid
* Adding tests
* Fixing test which was mocking uuid.v4() to get expected IDs
* Fixing another mock
* Updating docs
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Grouped features for space management
* Apply suggestions from code review
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Address PR Feedback
* docs changes
* updating types/docs
* update APM feature name
* Reintroduce extraAction following EUI update
* change ordering of infra features, and render callout for management category
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Team agreed that we'd like to release URL drilldown MVP as Beta.
Reasons for it:
1. Caveats in current URL drilldown UX (dummy values in preview, too vague triggers, {{event.points}} hack). It might that improving those would require a breaking change in an API. We will do our best to handle changes with migrations, but there could be edge cases we won't be able to cover.
2. We decided not to rush with extending url templating capabilities with more helpers. We could find out from early feedback that essential helpers are required. Even though this won't be breaking, worth mentioning here.
3. Since URL drilldown is a new feature and relies on user's input, we might get early feedback that would required us for a significant changes in the feature. Make it Beta gives us more room for a pivot in this case.
4. API Action concept might change how we reason about URL drilldown
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Reporting/Config] use better schema methods
* add createMockConfig
* update documentation
* fix observable.test
* add docs links to common options page
* make the schema match the docs
* wording edits per feedback
* self edits
* todo comment
* fix tests
* feedback change 1
* schema utils
* fix goof
* use objects for the defaults when available
* fix pollInterval
* fix snapshots
* Update report_listing.tsx
* call new ByteSizeValue on server side only
* revert xpack.reporting.poll
* fix ts
* fix snapshot
* use correct input for duration
* revert reorganize imports
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* move deprecations and raw loader to package
* move config service to package
* start to adapt the usages
* adapt yet more usages
* update generated doc
* move logging types to `@kbn/logging`
* update generated doc
* add yarn.lock symlink
* merge @kbn-logging PR
* adapt Env.createDefault
* update generated doc
* remove mock exports from the main entrypoint to avoid importing it in production code
* use dynamic require to import `REPO_ROOT` from bootstrap file
* move logger mock to kbn-logging package
* address review comments
* import PublicMethodOf from kbn/utility-types
* fix import conflict
* update generated doc
* use the @kbn/std package
* update generated doc
* adapt plugin service mock
Moves common utility functions to obtain the repository root,
paths (config/data), and Kibana package.json to a @kbn/utils package.
Moving these existing functions allows them to be used in production, in
other packages because of Kibana.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [Search] Remove long-running query pop-up
* Don't timeout if requestTimeout isn't configured
* Remove unused kibanaUtils
* Remove unused kibanaReact
* Re-add reference to kibanaUtils
* Remove unused translations and update documentation
* Add new x-pack advanced setting searchTimeout and use it in the EnhancedSearchInterceptor
* docs
* Re-add toast when queries time out
* Fix types
* Update error message with capabilities
* Update docs
* Update docs
* Move search server routes into a directory.
* Add internal/_msearch route.
* Remove legacy search API, rewrite default search strategy to use internal route.
* Remove legacy es_client code.
* Handle msearch options on server.
* Remove elasticsearch-browser dependency.
* Update generated docs.
* Rely on server timeout in OSS (?)
Use UI setting in xpack.
* Rename function
* Add features to dependencies
* Undefined check
* doc
* Code review fixes
* code review
* doc
* loading count
* simplify code review and fix jest tets
* type check
* Remove esShard from client
* cleanup request parameters from FE
* doc
* doc
* Align request parameters on server,
Remove leftover parameters from client
Shim responses for search and msearch routes
* docs
Stop using toSnakeCase
Updates jest tests
* add management docs
* docs
* Remove import
* Break circular dep + fix msearch test
* Remove deleted type
* Fix jest
* Bring toSnakeCase back
* docs
* fix jest
* Add new x-pack advanced setting searchTimeout and use it in the EnhancedSearchInterceptor
* docs
* Rely on server timeout in OSS (?)
Use UI setting in xpack.
* Rename function
* doc
* Remove esShard from client
* cleanup request parameters from FE
* doc
* doc
* Align request parameters on server,
Remove leftover parameters from client
Shim responses for search and msearch routes
* docs
Stop using toSnakeCase
Updates jest tests
* add management docs
* docs
* Remove import
* Break circular dep + fix msearch test
* Remove deleted type
* Fix jest
* Bring toSnakeCase back
* docs
* fix jest
* Fix merge
* Fix types
* Allow timeout to be undefined
* Fix jest test
* Upldate docs
* Fix msearch jest
* Merge correction
* docs
* Fix rollup search merge
* Fix merge
* Use i18n
Co-authored-by: Liza K <liza.katz@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* WIP: Adding in new reporting diag tool
* WIP: chrome-binary test + log capturing/error handling
* More wip on diagnostic tool
* More work adding in diagnose routes
* Alter link in description + minor rename of chrome => browser
* Wiring UI to API + some polish on UI flow
* WIP: Add in screenshot diag route
* Adding in screenshot diag route, hooking up client to it
* Add missing lib check + memory check
* Working screenshot test + config check for RAM
* Small test helper consolidation + screenshot diag test
* Delete old i18n translations
* PR feedback, browser tests, rename, re-organize import statements and lite fixes
* Lite rename for consistency
* Remove old validate check i18n
* Add config check
* i18n all the things!
* Docs on diagnostics tool
* Fixes, better readability, spelling and more for diagnostic tool
* Translate a few error messages
* Rename of test => start_logs for clarity. Move to observables
* Gathering logs even during process exit or crash
* Adds a test case for the browser exiting during the diag check
* Tap into browser logs for checking output
* Rename asciidoc diag id
* Remove duplicate shared object message
* Add better comment as to why we merge events + wait for a period of time
* Cloning logger for mirroring browser stderr to kibana output
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add new x-pack advanced setting searchTimeout and use it in the EnhancedSearchInterceptor
* docs
* Rely on server timeout in OSS (?)
Use UI setting in xpack.
* Rename function
* doc
* Remove esShard from client
* cleanup request parameters from FE
* doc
* doc
* Align request parameters on server,
Remove leftover parameters from client
Shim responses for search and msearch routes
* docs
Stop using toSnakeCase
Updates jest tests
* add management docs
* docs
* Remove import
* Break circular dep + fix msearch test
* Remove deleted type
* Fix jest
* Bring toSnakeCase back
* docs
* fix jest
* Fix merge
* Fix types
* Allow timeout to be undefined
* Fix jest test
* Upldate docs
* Fix msearch jest
* docs
* Fix rollup search merge
* docs
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Converted maps_router and store operations files
* Converted files in map routes to typescript
* Removed an unwanted ts-expect-error
* Fixed the lint errors from jenkins
* Naming changes, type for mapStateJSON etc.
* More type fixes in map routes
* More type fixes in map routes
* Added back some removed props
* Added types to app state manager
* Autogenerated api documentation
* Type fixes
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* New Search API for timelion
* Using timeout from config
* Use only es strategy)
* Fixed remarks
* Fixed tests
* Fixed fixtures
* Fixed ci
* Fixed typecheck
* Fixed eslint
* Fixed remarks
* Fix changes
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [DOCS] Add default time range filter to advanced settings
* [DOCS] More edits
* [DOCS] Adds behaviour when disabled
* [DOCS] Synchs setting name changes
* [DOCS] More edits
* [Lens] Drag to replace
* Add jest tests for drag and drop
* Fix bug in dragging to empty
* Hide dragged dimension when drag starts
* Make table metrics required
* Update class names
* Implement styles on non-droppable items
* Replace drag and drop image in docs
* Remove extra specificity
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Simple benchmark tests for kuery
* Building manually is "better" still not free
* Building the KueryNode manually
* Removing benchmark tests
* Another query is building the KueryNode manually
* Empty strings are inherently falsy
* No longer reaching into the data plugin, import from the "root" indexes
* Using AGENT_ACTION_SAVED_OBJECT_TYPE everywhere
* Adding SavedObjectsRepository#find unit test for KueryNode
* Adding KQL KueryNode test for validateConvertFilterToKueryNode
* /s/KQL string/KQL expression
* Updating API docs
* Adding micro benchmark
* Revert "Adding micro benchmark"
This reverts commit 97e19c0bf3.
* Adding an empty string filters test
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* KQL autocomplete cut off in visualize editor
Closes#70964
* Refactor some code
* Accept api changes, refactor query_string_input and suggestions_component
* Add a comment to suggestions_component
* Fix dropdown position, add close event on scroll and hide description if it doesn't fit
* Update tests to pass type check
* Fix displaying bugs
* Remove closeList
* Replace dropdownHeight with className
* Update suggestions_component.test and public.api.md
* KQL autocomplete cut off in visualize editor with styled-components
* Update suggestions_component.test values
* Add logic to open the list up
* Remove unnecessary semicolon
* Remove a gap between the list and input by inlining offset -2px from _suggestion.scss
* Rename the constants and add docs to them
* Wrap div inside SuggestionsComponent by styled component instead of wrapping the whole component
* Update public.api.md
* Refactor .kbnTypeahead__popover--top style
* Remove unnecessary condition
* Fix eslint problems
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* rename uuid service to environment service
* adapt resolve_uuid to directly use the configurations
* move data folder creation to core
* update generated doc
* fix types
* fix monitoring tests
* move instanceUuid to plugin initializer context
* update generated doc
* add asciidoc support for generated plugin list
Try level offset "=+2" instead of "=+1" to stop the inlining of the includes.
remove +2 back to +1
* Remove asciidoc, switch to regex. Rearrange dev guide to avoid nesting limit.
* Add tests for regex
* add a description to not throw off the table. Remove the heading from the paragraph snippet.
* Fix more READMEs so table renders correctly
* Update plugin list
* Remove code-exploration file, moved to plugin-list
* fix typo
* Add link to developer examples
* Update plugin list
* fix typo
* Add support for decorating 429 errors in the saved objects client
* Update the docs
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* improve test stability
* Replace SearchRequest = any with Record<string, any>
* Remove SearchResponse = any from data plugin
* docs
* logs
* Revert "Replace SearchRequest = any with Record<string, any>"
This reverts commit 9914ab5a01.
* code review
* list control
* null check
* null null null
* Jest fix
* add security solution search strategy on server side
* get security solution search strategy in the public app for all host
* fix types
* fix Check core API changes
* thank you cypress test
* Remove any by the right type IESearchRequest
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
* add translation and filter error when we abort the query
* pr review
* fix translation
* review II
* fix merge issue
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
* Add Index Management README and quick testing steps for data streams.
* Surface data stream health in Data Streams tab (table and detail panel).
- Extract out DataHealth component for use in both Data Streams and Indices tabs.
- Refactor detail panel to use data structure & algo to build component.
- Refactor detail panel to use i18n.translate instead of FormattedMessage.
* Render index template name and index lifecycle policy name in the detail panel.
* Render storage size and max timestamp information in table and detail panel.
- Add 'Include stats' switch.
- Add humanizeTimeStamp service, localized to data streams.
* Bringing Vega out of experimental
Closes: #21721
* fix CI group 12
* remove experimental flag from doc
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Adds support for `version` one the SavedObjectsClient's create api.
This sallows us to retain Optimistic concurrency control when using create to overwrite an existing document.
* Route options timeout -> timeout.payload
* timeout.idleSocket can now be specified per route
* Removing nested ternary
* Fixing integration tests
* Trying to actually fix the integration tests. Existing tests are hitting
idle socket timeout, not the payload timeout
* Fixing payload post timeout integration test
* Fixing PUT and DELETE payload sending too long tests
* Fixing type-script errors
* GET routes can't specify the payload timeout, they can't accept payloads
* Removing some redundancy in the tests
* Adding 'Transfer-Encoding: chunked' to the POST test
* Fixing POST/GET/PUT quick tests
* Adding idleSocket timeout test
* Removing unnecessary `isSafeMethod` call
* Updating documentation
* Removing PUT/DELETE integration tests
* Working around the HapiJS bug
* Deleting unused type import
* The socket can be undefined...
This occurs when using @hapi/shot directly or indirectly via
Server.inject. In these scenarios, there isn't a socket. This can also
occur when a "fake request" is used by the hacky background jobs:
Reporting and Alerting...
* Update src/core/server/http/http_server.ts
Co-authored-by: Josh Dover <me@joshdover.com>
* Adding payload timeout functional tests
* Adding idle socket timeout functional tests
* Adding better comments, using ?? instead of ||
* Fixing the plugin fixture TS
* Fixing some typescript errors
* Fixing plugin fixture tsconfig.json
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Josh Dover <me@joshdover.com>
* wip deprecation notice on timelion app
* Add a deprecation notice on timelion app
* Minor, add visualize and timelion on the docLinks
* Chage the layout a bit
* Change the deprecation notice message
* Change the deprecation notice message
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* timelion deprecation doc wip
* Create Timelion Deprecation section to Visualize
* Code review changes
* minor changes
* Make some changes in order to give priotization on how to replace an existing timelion worksheet to a dashboard
* Syntax related improvements
* Final touch
* Remove extra lines and some minor changes