* Doing a try/catch and re-throwing doesn't gain us anything. We already catching the error in the route handler
* We have logging for the issue in the existing handler. We also don't pass a logging context to functions
* adds "Creates timeline" test
* deletes timeline events spec
* completes assertions
* comments assertion
* fixes typecheck error
* waits for all the changes in the timeline to be performed before creating a new timeline and closing the toggle
* fixes failing problem
* fixes loop script
* makes test realiable on visual mode
* fixes merge issue
* makes test more reliable
* fixes typecheck issue
* fixes typecheck
* opens timeline from timeline settings
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* wip
* Revert "wip"
This reverts commit 54b6f7ff3ec8b0f57b150ab2276d617686da9fb5.
* Revert "Revert "wip""
This reverts commit 63868b44ec60d7431c3a0189b16aeece1db2d38e.
* Refactor to using EUI button group component
- also moved node attr and node allocation component to inside
new folder that contains all allocation components.
- only focussed on updating warm phase for now
* WIP: moved form UX more in line with EUI
- The described form group now has a switch for showing
controls on the left.
- Refactored DataTierAllocation to CustomDataTierAllocation
- Removed 'node-roles' option
- Updated copy
- Moved JSX around a bit in the edit policy section to make logic
simpler
* Refactor UI to reflect custom-ness of "Custom" and "None" options
- Still only implemented for warm, cold and frozen are still
under way
* server side changes for getting node data
* double opt-in
* Refactored data tier allocation type
- Made types more explicit 'default', 'custom' and 'none'
- Fixed issue introduced by use useCallback on state setter -
need to use the function setter pattern to not have stale data
being set.
* Some refacoring, but main point is to add warning detection for
node roles.
- Refactored way we get node data to a provider component so that
phases still have flexibility in how they render. Currently
this also means that we fetch node stats data for each phase
we render
- Created a callout for when there is no node role to which data
can be allocated for the default setting
- Also updated the behaviour to render the entire form even when
we cannot fetch node data for some reason. It is not ideal to
not have node data, but we should not block the entire form.
* fix i18n
* fix type issue with deafult policies missing allocation type
* remove "undefined" as option for setting phase data
* Create referentially stable data setter for all phases - prevent infini-update
* fix type issue
* refactor data -> nodesData
* refactor cold phase for data tiers
* refactor frozen phase for data tiers
* fixed existing tests for warm section
* restored existing test coverage for cold phase and added test coverage for frozen
* fix api integration test
* remove unused translations
* slight UX update to turning on custom attribute allocation
* added scss file for data tier advanced section and other style
updates
* added tests for new warning
* fix types
* added correct copy for cold and frozen phases
* fix types and i18n
* implement copy feedback
* added spacer after the enable data tier allocation switch
* refactor to super select
* fix replicas copy
* update phase serialization for cold and frozen
* Refactor so that logic determining warnings lives together
- also factor out the warning of the node allocation component
- revisit copy for the allocation warning
* tier -> phase
* Added some much needed policy serialization test coverage
- also factored out policy allocation action serialization
* fix import paths and added required file header
* fix existing test coverage
* refine copy for data tier allocation recommended option
* fix showing warning for no node attrs
* fix inverted warning logic 🤦🏼♂️
* fix typing
* implement CJs copy feedback
* fix i18n
* remove unused or invalid translations
* provide ability to not alter original policy
* do not alter the original policy in the serilalization process
* fix jest tests
* Remove duplicate type and refactor NodeRole to NodeDataRole
Also deleted unused component "AdvancedSection" for now
* added comment to "false" typing
* revised and refactored copy based on feedback
* address copy feedback
* update kibana schema to allow migrate: { enabled: false }
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>
This PR changes the Alerts & Actions clients to ensure they require full updates (rather than partial) to SOs and overwrites the entire document when making the update.
This is to prevent the situation where nested objects get _merged_ instead of replaced when a user makes an `update`.
We also enhanced the EncryptedSavedObjectsClient to allow specified `id`s when overwriting an existing object.
* Visualize: Bad request when working with histogram aggregation
Closes: #77023
* ✏️ Add some more fix context
* ✅ Add test
Co-authored-by: dej611 <dej611@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* utlize schema.any() for validation on file in body of import rules request, adds new functional tests and unit tests to make sure we can reach and don't go past bounds. These tests would have helped uncover performance issues io-ts gave us with validating the import rules file object
* fix type check failure
* updates getSimpleRule and getSimpleRuleAsNdjson to accept an enabled param defaulted to false
* updates comments in e2e tests for import rules route
* fix tests after adding enabled boolean in test utils
* Add Kea logic paths for easier debugging/defaults
* PR feedback: prefer snake_case to match file names, use exact file name for last path key
* Document Kea + casing logic
* [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>
## Summary
Fixes: https://github.com/elastic/kibana/issues/77342
No easy way to unit test/end to end test this as it was operating correctly before and passed all of our tests, it was just running in a slow state if you had between 0 and 100 signals. The best bet is that you hand run the tests from 77342 or use a large look back time to ensure de-duplicate does not run as outlined in 77342.
Also this PR removes a TODO block, a complexity linter issue we had, a few await that were there by accident, and pushes down arrays to make things to be cleaner.
* adding cgroup fields
* calculate the memory based on the cgroup fields otherwise use the system fields
* updating script
* adding api tests
* using cgroup fields on service map
* addressing PR comment
* fixing unit test
* fixing test
* changing api tests to use snapshot
* removing inactive_files from calculation
* fixing test
* refactoring painless script
* addressing PR comment
* addressing pr comments
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add readOnlyMode prop + callout to Layout component
* Update HttpLogic to initialize readOnlyMode from config_data
+ update App Search & Workplace Search layout to pass readOnlyMode state
- update passed props test to not refer to readOnlyMode, so as not to confuse distinction between props.readOnlyMode (passed on init, can grow stale) and HttpLogic.values.readOnlyMode (will update on every http call)
- DRY out HttpLogic initializeHttp type defs
* Update enterpriseSearchRequestHandler to pass read-only mode header
+ add a custom 503 API response for read-only mode errors that come back from API endpoints (e.g. when attempting to create/edit a document) - this is so we correctly display a flash message error instead of the generic "Error Connecting" state
+ note that we still need to send back read only mode on ALL headers, not just on handleReadOnlyModeError however - this is so that the read-only mode state can updates dynamically on all API polls (e.g. on a 200 GET)
* Add HttpLogic read-only mode interceptor
- which should now dynamically listen / update state every time an Enterprise Search API call is made
+ DRY out isEnterpriseSearchApi helper and making wrapping/branching clearer
* PR feedback: Copy