* Move reused log retention components to own folder
- e.g., logic file, helpers used by other views & not just settings
* Update settings-specific views to reference top-level folder
- I'm leaving the panel and the confirmation modal within settings as that isn't used anywhere outside the settings page, but we can revisit this if needed or if people think it makes more sense to keep everything log related together
* [bug] Fix nested <p> error in log retention confirmation modal
* update PingTimestamp caption and add spinner for loading images
* use FETCH_STATUS to determine render state for PingTimestamp
* add tests for ping timestamp
* adjust ping timestamp caption
* update screenshot to use EuiImage
* remove deprecated translations
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* remove canUserCRUD from signal actions and remove refresh param from open_close_signals route. 'refresh' requires maintenance / manage / all privileges for signals index
* adds 'maintenance' to privileges route
* fix unit teset typing
* update tests, updated lists e2e tests since it relies on the readPrivileges function of SIEM so any changes to the expected response from there must also be changed in the lists privileges route
* update scripts roles to include maintenance for roles that do not have privileges higher than 'maintenance'
* fix open-close signals integration test
* Added alerting API to get all active instances
* modofied event log findEventsBySavedObject to support bulk ids, renamed to findEventsBySavedObjectIds
* fixed faling typechecks
* fixed crash on zpd/api/event_log/alert/84c00970-5130-11eb-9fa7/_find for non existing id
* fixed faling typechecks
* fixed faling typechecks
* fixed due to comments
* fixed due to comments
* fixed failing test
* fixed due to comments
This PR Introduces a `pollingDelay` which is applied to the polling interval whenever the average percentage of tasks experiencing a version conflict is higher than a preconfigured threshold (default to 80%).
* Remove prototype overwrite in unit test.
* Wrap calls to prototype functions with jest.spyOn.
* add additional component test helpers
* add test examples
* uptime testing utils remove custom prefix from props and parameter options
* skip executed step tests
* adjust MlJobLink test
* add testing util interfaces
* Move updated test files to correct locations.
* Move other test file to correct location.
* Revert unintended changes from merge.
* Revert unintended changes from merge.
* update mock core
* combine wrappers into one custom render function
* Move mock helpers to helper file. Update snapshots.
* Refactor tests to use RTL over enzyme.
* Refactor \`PingHistogram\` component tests to prefer RTL to Enzyme.
* Drop obsolete snapshot file.
* Remove obsolete file leftover from merge error.
* Fix outdated import path.
* Prefer custom render to vanilla.
* Fix formatting issue uncovered by unit test, and update test assertion.
* Add test for single location.
Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Set up Kibana charts plugin dependency
- required for using shared colors/themes/etc.
- see https://github.com/elastic/kibana/tree/master/src/plugins/charts
* Add reusable AnalyticsChart component
+ util for converting data from our server API to data that Elastic Charts can use
* Update EngineOverview to use AnalyticsChart
+ remove now-unnecessary endDate value (we don't really need it just IMO)
* [PR feedback] Return type
* [Self feedback] naming - remove pluralization
Previously, the http and https proxy agents used by actions were created based
on the protocol of the proxy URL itself - if the proxy was an http URL, both
the generated http and https agents supplied to axios were actually both
http proxy agents; if the proxy was an https URL, both the generated http and
https agents supplied to axios were both https proxy agents.
This PR changes so that both an http and https proxy agent are created and
assigned as the appropriate agents for axios. Similar changes were made to
the slack action, which does not directly use axios.
* First draft
* Update to use actual API
* Remove this file
* Update translation key
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [TSVB] Allow custom label for fields via index pattern field management
Closes: #84336
* replace saveObject, elasticsearch client to new one
* fix CI
* update schema
* fix Top Hit
* some changes
* partially move getting fields into client side
* fix PR comments
* fix issue with getting fields
* move SanitizedFieldType to common types
* fix issue on changing index pattern
* fix issue
* fix regression
* some work
* remove extractFieldName, createCustomLabelSelectHandler
* request/response processors should be async
* some work
* remove tests for createCustomLabelSelectHandler
* fix table
* fix placeholder
* some work
* fix jest
* fix CI
* fix label for table view
* test: visualize app visual builder switch index patterns should be able to switch between index patterns
* fix functional tests
* fix sorting
* fix labels for entire timerange mode
* add createFieldsFetcher method
* table view - fix pivot label
* fix PR comments
* fix issue with selecting buckets scripts
* fix types
* Update create_select_handler.test.ts
* fix PR comments
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## [Security Solution] Accessibility (a11y) fixes
This PR fixes the following accessibility (a11y) issues:
- Fixes an issue that prevented tabbing through all elements on pages with embedded Timelines
- Fixes an issue where the Timeline data providers popover menu was not displayed when Enter is pressed
- Fixes an issue where duplicate draggable IDs caused errors when re-arranging Timeline columns
- Fixes an issue where Timeline columns could not be removed or sorted via keyboard
- Fixes an issue where focus is not restored to the `Customize Columns` button when the `Reset` button is pressed
- Fixes an issue where filtering the `Customize Event Renderers` view via the input cleared selected entries
- Fixes an issue where the active timeline button wasn't focused when Timeline is closed
- Fixes an issue where the `(+)` Create / Open Timeline button's hover panel didn't own focus
* add additional component test helpers
* add test examples
* uptime testing utils remove custom prefix from props and parameter options
* skip executed step tests
* adjust MlJobLink test
* add testing util interfaces
* update mock core
* combine wrappers into one custom render function
* split enzyme helpers and rtl helpers into different files and adjust types
* adjust types
* spread core on render function
* remove unnecessary items from MLJobLink test
* update use_monitor_breadcrumbs test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Security Solution] Fix sorting on unmapped fields in Timeline Events table
* set unmapped_type to the column type
* add missing types
* Update saved_object_mappings.ts
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
* DRY out repeated DOCUMENTS_TITLE
* Move temporary title const's in engine folder to their own respective folders
- might as well get it set up early + prevents us from forgetting to clean this up later
* Update engine nav & engine router files
* uptime waterfall enable timings for static files by leveraging total time
* update cases for when their is no waterfall timing available
* add showTooltip propertier to WaterfallDataSeriesConfigProperties
* remove content downloading from the legend
* add mime type to content downloading label
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [maps] abort sync data if any data request fails
* review feedback
* fix broken rename of e to error
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Adds additional polling stats to Task Manager monitoring:
- **duration**: Running average of polling duration measuring the time from the scheduled polling cycle start until all claimed tasks are marked as running
- **claim_conflicts**: Running average of number of version clashes caused by the markAvailableTasksAsClaimed stage of the polling cycle
- **claim_mismatches**: Running average of mismatch between the number of tasks updated by the markAvailableTasksAsClaimed stage of the polling cycle and the number of docs found by the sweepForClaimedTasks stage
- **load** - Running average of the percentage of workers in use at the end of each polling cycle.
* getPackageFromSource to use package storage
* fix type
* use bulkGet
* add data streams and policy templates to package info from storage
* fix merge conflict
* comment out policy_templates for now
* add policy_templates to package info, remove required inputs from parseAndVerifyPolicyTemplates
* add storage assets to cache
* tidy up
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Monitor ids
* import fix
* solve circular dep
* eslint
* mock circular dep
* max retries test
* mock circular dep
* test
* jest <(-:C
* jestttttt
* [data.search] Move search method inside session service and add tests
* merge
* Move background session service to data_enhanced plugin
* Better logs
Save IDs only in monitoring loop
* Fix types
* Space aware session service
* ts
* initial
* initial
* Fix session service saving
* merge fix
* stable stringify
* INMEM_MAX_SESSIONS
* INMEM_MAX_SESSIONS
* use the status API
* Move task scheduling behind a feature flag
* Update x-pack/plugins/data_enhanced/server/search/session/session_service.ts
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
* Add unit tests
* Update x-pack/plugins/data_enhanced/server/search/session/session_service.ts
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
* Use setTimeout to schedule monitoring steps
* Update request_utils.ts
* settimeout
* tiny cleanup
* Core review + use client.asyncSearch.status
* update ts
* fix unit test
* code review fixes
* Save individual search errors on SO
* Don't re-fetch completed or errored searches
* Rename Background Sessions to Search Sessions (with a send to background action)
* doc
* doc
* jest fun
* rename rfc
* translations
* merge fix
* merge fix
* code review
* update so name in features
* Move deleteTaskIfItExists to task manager
* task_manager to ts project
* Move deleteTaskIfItExists to public contract
* mock
* use task store
* ts
* code review
* code review + jest
* Alerting code review
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Co-authored-by: restrry <restrry@gmail.com>
* Remove tabs from details page
* update
* fix monitord id
* var name
* add Uptime PageHeader tests to test for the presences of tabs or header
* add Uptime MonitorPageTitle test
* Uptime adjust auto generated monitor id regex
* Uptime add tests for MonitorPageTitle to test behavior for missing monitor names and auto generated monitor ids
* remove history from MonitorPageTitle test
* adjust uptime tabs tests
* adjust MonitorPageTitle tests to mock useSelector
* adjust uptime PageHeader tests
* adjust import order in page_header.test
* add props to Uptime PageHeader to determine render, rather than route context
* alphabetize props in Uptime PageHeader
* remove header from individual pages
* add indepdent page header route that matches all paths
* adjust monitor tests to use mockReduxHooks helper, and add mockReactRouterDomHooks
* update tests
* adjust header spacing
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Addresses issue 87112 .
With the addition of the exceptions table, users were able to now delete exception lists from the UI. However, the "endpoint_list" is particular in some ways and should not be so easily deleted from the UI. Moved to disable the delete button for "endpoint_list exception list.
* [Lens] Transition between functions involving references
* Organize transition cases and cover all the basic transitions
* Add functional test
* Change logic for displaying valid transitions
* Show valid transitions more accurately
* Fix transition to only consider valid outputs
* Update test names and style
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Maps] labels for polygons and lines
* remove x-pack yarn.lock
* add labels to choropleth map wizard
* clean up comment
* add mvt tile support
* only add centroids if there may be lines or polygons
* tslint
* tslint
* do not add centroid to too many features polygon
* update get_tile expect statements
* move turf dependencies from devDependencies to dependencies
* update jest snapshot and functional test expects
* fix functional test expect
* another functional test expect update
* functional test updates
* expect
* pew pew source expect updates
* update joins expect
* update mapbox style expects
* update join visibility expects for geocentroids
* update join visibility expects for geocentroids
* another functional test expect update
* review feedback
* update yarn.lock
* tslint
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Maps] fix multi-select query from Controls visualization not always getting applied to map in dashboard
* fix underlying problem in blended layer
* clean-up
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* chore(NA): move server and common from monitoring out of the __tests__ folder
* chore(NA): move monitoring public out of __tests__ folder
* chore(NA): add missing skip on test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Rename Background Sessions to Search Sessions (with a send to background action)
* doc
* doc
* jest fun
* rename rfc
* translations
* update so name in features
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Replaced single invalidateApiKey request with the bulk
* fixed failing test
* Extended invalidate method to support multiple invalidation. Updated fleets plugin usage of this API.
* fixed due to comments
* [Transform] retrieve mappings from the source index
* [Transform] fix preview for nested props
* [Transform] exclude meta fields
* [Transform] use agg config to only suggest term agg supported fields
* [Transform] refactor
* [Transform] remove incorrect data mock
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Reporting] set viewport to include clip area
* remove getViewport
* fix tests
* simpler
* fix 1
* revert
* hacks
* scope the logging variables
* polish
* hacky fix
* quieter logging
* make less hacky
* fix functional test
* revert lowering log level of browser console messages
* revise comments
* setViewport only to happen once
* fix snapshot of layout type tests
* fix comment text
* Revert "setViewport only to happen once"
This reverts commit 15977f9db4.
* fix disgusting bug
* use x/y ordering for width/height
* fix fn test snapshots
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Showing all broken connectors and updating all matching broken connectors on new connector create
* Adding unit test
* Adding functional test
* Fixing functional test
* Simplifying logic
* Fixing functional test
* Fixing functional test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Added the following values to the Polling stats:
- **NoAvailableWorkers**: This tells us when a polling cycle resulted in no tasks being claimed due to there being no available workers
- **RunningAtCapacity**: This tells us when a polling cycle resulted in tasks being claimed at 100% capacity of the available workers
- **Failed**: This tells us when the poller failed to claim
* [Maps] term join limit
* update region map migration to set size
* display size in join expression
* tslint
* update jest snapshots
* remove default size and just default to max buckets
* add size to sourceMeta so join data is re-requested on size change
* tslint
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Replace favicons
* update build process to swap favion version
* Replace favicons with built, branded version at build time
* update snapshot
* Addressing feedback
## Summary
This PR introduces the following changes. If the user has insufficient write privileges on the signals index:
- we disable the status-changing actions on detection alerts ("Open alert", "Close Alert", "Mark in progress") in the context menu of an alert in alerts table
- we make sure to show the corresponding callout that tells about read-only access to detection alerts
- in the callout we provide links to docs for understanding why/how to fix
* Re-enable test skipped due to temporary failure
This failure may still be present/intermittent, but it passes reliably
locally; trying again on CI to check status.
* Triggering build
This should fail on the latest snapshot
* Update EQL integration tests to reflect new default pipe
We were previously using what is effectively `results | head` to
retrieve the desired amount of results. The default behavior was changed
in elastic/elasticsearch#66387, which caused these tests to fail as
different results were returned over such a large dataset.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Alert and Connector flyouts Save and Save&Test buttons should be active by default.
* fixed typechecks
* fixed typechecks
* refactored repeted code
* fixed typechecks
* fixed typechecks
* fixed typechecks
* fixed due to comments
* fixed failing tests
* fixed due to comments
* fixed due to comments
* fixed due to comments
* fixed typescript checks
This PR tightens the typing on the Alerting framework's `AlertType` and its deeper typing around `AlertServices ` and `AlertExecutorOptions`.
This ensures the following:
1. It's now impossible<sup>✴</sup> to schedule actions on any ActionGroup other than the groups specified on the AlertType (including the Recovery group)
2. It's now impossible<sup>✴</sup> to schedule actions with incorrect `InstanceState` or `InstanceContext`
✴ Unless they bypass the Typescript typing, which is an explicit choice to bypass type safety
* Removed skip test for delete all alerts integration test
* fixed typechecks
* reduced nuber of selected alert to delete to a single one
* fixed due to comments
* removed long timing retry
* fixed typechecks
* fixed failing tests
### Summary
This PR concentrates on fixing the deletion on the exceptions list table view. This fix is intermediary and a more thorough, backend solution is needed. Currently, if you delete an exception list, it deletes the exception list SO, but does not remove references to it from rules. This PR allows for a quick fix conducting this logic client side.
* uptime only render ping status code badge when status code is available
* uptime update ResponseCodeColumn error state
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Var rename
- so it doesn't sound negative or like a bug, but is instead an anticipated load/use case
- remove unncessary function
- move declaration down to right before it's used
* [Proposal] Other misc cleanup
- Rename engineNameParam to engineNameFromUrl to make reading flow a little bit more nicely + hopefully make the var source a bit clearer
- Change other references back to engineName for simplicity (they should really only be running after engineName has already been set, so there shouldn't be any race conditions there - moving engineBreadcrumb to after Loading should also solve that)
* Remove comment
We aren’t going to use icons like we have in ent-search
* Add new constant
* Use constant instead of inline i18n
* Add link to top bar
The external href to sources will be changed once that component is built
* Remove link from sidebar
* Update i18n translation key names
CI was failing and this should fix it
* Alphabetize items
* making transaction type required on some apis
* addressing PR comments
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* uptime add title to waterfall sidebar truncated text
* Uptime add tooltip and screen reader only text to MiddleTruncatedText
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Initial EMS integration test
* Convert to TS
* extra cleanup and comments
* Removed common page objects
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fixed responsive state when opening the menu
* Update x-pack/plugins/apm/public/components/app/Settings/index.tsx
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
* Update/refactor some cypress documentation
* Fixes some whitespace/grammar/typos
* Condenses the explanation/instructions for the different modes of
execution
* Condense Artifacts section
This is a big sprawling file; trying to cut down on the noise.
* Move test-running section to top of README
This is going to be what 90% of readers are looking for, methinks.
* Adds Security Solution's cypress suite to x-pack testing README
* Fix broken link
This file was moved as part of #64368.
* Remove broken link
This file was deleted in #67138.
* Apply suggestions from code review
Co-authored-by: Devin W. Hurley <snowmiser111@gmail.com>
* Fix typo
Co-authored-by: Devin W. Hurley <snowmiser111@gmail.com>
Make it so clicking the icon menu or action menu while the popover is open closes the popover. This also fixes the issue where the action menu would not close at all.
Rename the `onOpen` prop to `onClick` to match what it does.
Fixes#87161. Fixes#87131.
* [data.search.session] Store search strategy in saved object
* Update unit test to check strategy
* Fix test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fully control the basic table pagination/sorting properties
* Not necessary
* Support index listing page
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Setup] Server API route
* [Cleanup] Remove unnecessary DocumentCreationSteps
- errors can/should be shown in the EuiFlyoutBody banner (better UX since the JSON/file is right there for reference) vs its own page
- No need to distinguish between ShowErrorSummary and ShowSuccessSummary
+ placeholder Summary view for now
* Add DocumentCreationLogic file upload logic
* Update creation form components to show error/warning feedback
* Add final post-upload summary view
- split up into subcomponents for easier reading/testing
* [lint] oops, double licenses
* [PR feedback] map -> forEach
* [PR feedback] Reset form state on flyout close
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Use filter to bulk find
* Update x-pack/plugins/data_enhanced/server/search/session/session_service.ts
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
* Dashboard in space test
* Add warning on update failure
* fix merge
* Added functional test for sessions in space
* snapshot
* test cleanup
* sub perms
* test snapshots
* Update tests
* test
* code review
* snap
* Added discover test
* Update x-pack/plugins/data_enhanced/public/search/ui/connected_background_session_indicator/connected_background_session_indicator.tsx
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
* Remove unnecessary || {} branch
schema is always required / should never be undefined
* Cover if (addFieldFormErrors) branch
* Increase coverage of determineTooltipContent by simplifying branching
- most of these checks aren't necessary due to early returns
* Cover branch in WS source_icon
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Removing old backend routes and cleaning up types
* updating the docs
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This PR makes the `actionParamsFields` field required, as it is in use by all plugins anyway and only tests were omitting it.
To make this change more streamlined I've added a `createMockActionTypeModel` helper which generates a basic mock `ActionTypeModel`.
* wip
* Using object remover for alerts list
* wip - using supertest instead of axios
* wip - using supertest instead of axios
* Removing custom services in favor of supertest
* Fixing test
* Fixing test
* Fixing types check
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* disabling buttons when user does not permission
* fixing test
* disabling create/edit button when user does not have write permission
* addressing PR comments
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add developer example for Reporting
Refactor Reporting plugin to have shareable services
* Update plugin.ts
* use constant
* add more description to using reporting as a service
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* query timestamp override and default @timestamp field, adds functional test for this
* fix logic for when to filter out timestamp override documents
* update the total hits field of the search result if we find hits within the secondary search. Without updating the total hits field, we could be finding events but not indexing them based on the bulk create logic
* update integration test, updates logic for performing second search and excluding documents with timestamp override field
* cleanup comments, remove commented out console logs, fix logic to break out of loop during secondary search after
* default param to 'succeeded'
* remove commented out code
* always perform a secondary search when timestamp override field is present
* perf improvement and fix bug where sortIds were being mixed between search after calls
* set sortIds to undefined when not present on search result
* exit loop and prevent extraneous searches from occurring if we exhaust sort ids
## Summary
Currently working on issues related to exceptions and it was noted on a separate PR that the request payload validation being done in the client side API calls was unnecessary. It was helpful in development, but not of any added value in production. Not only that, but the extra validations also add to the performance hit.
Removed the payload validation and formatted the code to follow the same pattern as that in the value lists api file.
Tested that exceptions flows not affected by testing out exceptions CRUD flows.
* add hasVitals prop to CoreVitalItem
* pass hasVitals prop to CoreVitalsItem based on coreVitalPages
* adjust criteria for displaying no core vital item data
* add stories for CoreVitalItem edge cases
* remove comment from core web vitals index page
* update test comment in CoreVitalItem
* adjust APM get_web_core_vitals endpoint to return a number for cls value, and adjust corresponding observability components
* remove hasVitals from CoreVitalItem props and adjust storybook stories
* add comment to EuiStat aria-label in CoreVitalItem
* adjust CoreVitalItem tests
* adjust APM KeyUXMetrics test
* adjust APM get_web_core_vitals endpoint to return null for cls when cls is undefined
* adjust unit and integration tests that rely on apm get_web_core_vitals
* add comment in get_web_core_vitals
* update CLS value in Observability core_web_vitals index
* add withKibanaIntl to CoreVitalItem test to wrap in Intl Provider and KibanaReact provider
* update CoreVitalItem test to use testing-library/react test_helper
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Refactor Result card layout
- Move toggle action to the bottom of the card content
- [TODO] Action button to the right will be used for new link button (separate for accessibility/screen readers)
- Use grid to get the layout we want without extra div wrappers
* Add action button link to document detail
+ remove <a> tag on article content - should have onClick only
- this allows screenreaders to granularly navigate through the card content while allowing mouse users the entire card to click
- the new actionButton details link is accessible to both keyboard & screen reader users
* [Polish] Hover effects to help guide mouse users
* [i18n] Add pluralization to fields copy
* Update tests
* [Cleanup] Remove unneeded wrapper
* [??] More specific title for result group
- since the aria-label for the new detail button link is basically that
* move LinkedAgentCount component to top-level components and adjust output
* refactor integration details Policies list to use LinkedAgentCount component
* test cases for agent counts on integrations
## Summary
This PR addresses a fix on the exceptions list table export functionality. A dedicated route for exception list export needed to be created. List is exported into an `.ndjson` format.
Exception lists consist of two elements - the list itself, and its items. The export file should now contain both these elements, the list followed by its items.
* Fix screen reader still reading out bullet bullet bullet
* Even out horizontal spacing
* Break long password text
* Make EUI table cell full width on mobile
* adds privilege check in rule execution function, need to abstract these lines into a util function to be used in create rules and use that check on the UI too
* fixes tests
* cleanup code, adds a unit test
* set rule to failure status if the rule does not have read privileges to ANY of the index patterns provided
* use badge component to keep group badge consistent. sort groups
* use all colors now that badge component is used
* set left margin on group badge wrapped in link to match badge margin
* add badge colors to edit flyout job groups
* [Lens] UI for reference-based functions
* Fix tests
* Add a few unit tests for reference editor
* Respond to review comments
* Update error handling
* Update suggestion logic to work with errors and refs
* Support ParamEditor in references to fix Last Value: refactoring as
needed
* Fix error states
* Update logic for showing references in dimension editor, add tests
* Fix tests
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Remove charts - editor cyclic dependencies
* Move translations from the charts plugin to the editor plugin
* Remove the dependency from the script as it is gone
* Fix types
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This PR encourages type safe usage of the Alerting framework by replacing the current default Params/State/InstanceState/InstanceContext types (which are `AlertTypeParams`/`AlertTypeState`/etc.) with `never`.
This means that code can continue to omit the specific types for these fields, as long as they aren't referenced.
Once an alert developer wishes to actually reference the parameters (or state/context), then they have to specify the type.
This PR also changed the typing of the `AlertTypeParams` and `AlertTypeState` from `Record<string, any>` to `Record<string, unknown>`, to ensure that where these catch-all types are used they will at least enforce `unknown` rather than `any`.
This change broke some usage in both @elastic/kibana-alerting-services plugins, but also other plugins in the Stack/Solutions. I tried to fix these where I could, but some of these require new types and refactoring in other teams' code, which I decided is best done by the team who own and maintain that code - I've added explicit `TODO` comments in all of these places, describing the required fix.
This PR also introduced a Generics based typing for the `Alert` type so that the `params` field can be typed as something other than `AlertTypeParams`.
- use ml API service from the Kibana context
- adds jest tests for the Vega Lite Spec generator
- fix chart layout overflow with too many fields selected
* [ML] Fixing endpoint schema for can_delete_job endpoint
* changing get to post in docs
* renaming canUntag
* fixing typo
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Move threshold dupe detection logic to its own function
* Minor fixup
* Refactor and remove property injection for threshold signals
* Only show aggregatable fields for threshold rule grouping
* Add threshold rule kql filter to timeline
* Remove outdated getThresholdSignalQueryFields tests
* Filter aggregatable fields on client
* Revert "Only show aggregatable fields for threshold rule grouping"
This reverts commit 539fa49cc9.
* Fix bug with incorrect calculation of threshold signal dupes when no threshold field present
* Revert "Add threshold rule kql filter to timeline"
This reverts commit 64823744a3.
* Add test skeleton
* Finish tests
* Address comment
* Removed a possibility to define two different names for Alert types on API and UI level
* fixed typechecks
* fixed typechecks
* fixed due to comments
* fixed typechecks
* fixed jest tests
* fixed typechecks
* Move applyFilter, selectRange, valueClick triggers to data/embeddables.
* Update imports.
* Remove embeddable references to non-existent data plugin dependency.
* remove data mocks from embeddable
* Remove query, filters, timeRange from EmbeddableInput and move to apps.
* Remove data plugin imports from embeddable test samples.
* Remove circular dependencies caused by expressions renderer handlers.
* Update circular deps allowList.
* Remove data dependency on embeddable.
* Revert accidental data plugin change.
* Fix new circular deps issues.
* Update generated docs.
* Fix type errors in vis_type_xy
* Fix inspector data table.
* Remove logic preventing Crawler from being used on sample engines
* Remove check around crawler button in DocumentCreationButtons
- primarily a UI thing - ideally we always want to show 4 buttons
* Creating shared loading spinner component
* Using section loading component where it makes sense
* Fixing tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Rename variables
This will make reviewing later commits easier
* Use internal routing instead of history.push
Also updates path to Loading
* Move state from component to logic
* Add tests
* Add ApiCodeExample modal component
- Previously lived in EngineOverview / Onboarding
* Add basic PasteJsonText component
* Add basic UploadJsonFile component
* [Refactor] Have all modal components manage their own ModalHeader & ModalFooters
- Per feedback from Casey
+ Update DocumentCreationModal to use switch
* Set basic empty/disabled validation on ModalFooter continue buttons
* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/document_creation/creation_mode_components/api_code_example.tsx
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
* [PR feedback] Typescript improvements
* [PR feedback] Remove need for hasFile reducer
- by storing either 1 file or null
- which gets around the stored FileList reference not triggering a rerender/change
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Remove missed action calls
These were missed in the PR that split apart add_source_logic from source_logic. These 2 mthods aren’t even in this file. My mistake
* Change order of method calls
For some reason the test would not pass with the order of the methods the way they were. Changing the order to where the error callback is called first somehow made the test pass
* Fix bug where query params never set
Uncovered a bug while writing this test. After moving from ent-search to Kibana, it was discovered that the Kibana server did not work well with an empty question mark in the URL. The fix attempted to use lodash’s isEmpty metthod. The problem is that the URLSearchParams class instance created is not an object but has getter/setter functionality so isEmpty always returned true. This fixes it to actually work.
* Remove throw blocks
In ent-search we had to account for edge cases where the error state wasn’t bubbling up. One of these has been covered with global flash messages. The other will be tested at later date. A tech-debt item has been created.
Reference PRs:
https://github.com/elastic/ent-search/pull/394https://github.com/elastic/ent-search/pull/701
* Export interfaces for use in tests
* Add tests for add_source_logic
* Remove weird import
I guess the IDE autocompleted that. Should not have been there
* Remove redundant test
This test was added before this comit when trying to get coverage for the throw blocks
7ca9c2b244
* Lint fixes
This replaces the usage of a custom auto-completion component with the shared `<QueryStringInput>` component provided by the `data` plugin. Aside from fixing the focus loss issue that caused #84543 this also introduces the inclusion of historic, local-storage-persisted queries in the suggestions.
* Ensure transactionType is used in overview
Fix the places where it was not being used:
- Transactions table
- Error rate chart
- Errors table
Also fix broken column sorting on transaction table.
* fix a sort
* test fix
* Snapshot update
* adds missing required param transactionType to API test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Oliver Gupte <olivergupte@gmail.com>
For cardinality checks, an empty index of the fields checks not returning any results would block the user from moving to the next step in the Anomaly Detection job wizard.
This PR fixes it by adding more fine grained checks and only returning warning-level messages for the above cases. A warning-level message will allow the user to continue to the next step in the wizard.
* Update Jest config to automatically report coverage
- No more super intricate yarn commands! Hooray
* Add handy shell script for running tests & coverage on specific folders/subdirectories
* Fixes for service overview layout
* Use 3/7 instead of 4/6 for `grow` between charts/tables
* Decrease chart height
* Use "s" gutterSize on tables
* Decrease table height
* Use `TruncateWithToolTip` on errors and transactions tables to remove tooltip inline-block style
* Use `responsive={false}` on dependency titles so icon/name pairs don't wrap
* Use `responsive={false}` on spark plots so plot/value pairs don't wrap
* Use `responsive={false}` on latency chart and table titles so controls and links don't wrap
* Make the fixed sizing overrides for the tables only be applied when we're using a wide, non-mobile (> 992) viewport
* Switch to "mobile" viewport (with one item per row) at 992 instead of 768
Since you cannot control the breakpoints at which EUI switches to "responsive" mode, we trigger these manually to change the number of columns. and whether or not the tables use a fixed height.
The overview now has three "modes":
* Two columns for chart/table rows
* Tables in non-responsive mode
* One column for charts/tables
* Tables in non-responsive mode
* One column for charts/tables
* Tables in non-responsive mode
Fixes#85781.
* remove unused imports
* [ML] Fix sort order of data recognizer module cards
* [ML] Add sort by ID to server side recognize endpoint
* [ML] Enhance docs for recognize endpoint success response.
* Only allow one panel to be open at a time
* Move EuiOutsideClickDetector inside the portal
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [ML] Fix synching jobs from other spaces
* updating text in delete modal
* updating translations
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>