At times we find the driver controlling the ComboBox in our UI tests can select the wrong item, this ensures we always select the correct index in the Connector tests.
* adding comparision select option
* adding time comparison field on some pages
* removing unused files
* fixing unit test
* adding unit tests
* enabling comparison for more than 8 days
* removing tooltip
* refactoring search bar
* moving useBreakPoint to common hooks folder, removing useShouldUSeMobileLayout hook
* addressing PR comments
* addressing PR comments
* addressing PR comments
* addressing PR comments
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Fixes the transform preview header to display the heading text in any case and the copy-to-clipboard button for latest configurations (the copy-to-clipboard option for pivot is displayed within the form).
- Fix to avoid listing all fields for the sort option for latest configuration and only show date fields
- Fixes ambiguous form field labels
* Add tests for Schema components
* Convert components to use clearFlashMessages helper
* Remove unused action types
These aren’t actually used anymore
* Fix type
This is actually a string from the server
* Move mock to shared mocks
* Add tests for logic file
* Fix App Search tests
Server actually sends back a string for `activeReindexJobId`
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add encodePathParams helper to EnterpriseSearchRequestHandler
This helper accomplishes two things:
- Fixes 404s from the Enterprise Search server for user-generated IDs with special characters (e.g. ? char)
- Allows us to simplify some of our createRequest calls - no longer will we have to grab request.params to create paths, this helper will do so for us
* Update AS document route to use new helper
- This was the primary view/API I was testing to fix this bug
* Update remaining AS routes to use new helper
- shorter, saves us a few lines
+ remove unnecessary payload: params that doesn't actually validate params
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* A good chunk of server-side ES changes
* CCR files
* More areas where we just pass down the source to the client
* Some more
* Fix tests
* Fix tests and types
* initial commit
* adapt client-side signatures
* more type fixes
* adapt api IT asserts
* fix some unit tests
* fix more test usages
* fix integration tests
* fix FT test assertions
* fix FT test assertions
* add FTR API integ test suite
* create the plugin_api_integration test suite
* adapt and fix flyout tests
* update documentation
* update generated doc
* add unit tests for `executeImportHooks`
* wire resolve_import_errors and add unit tests
* move hooks registration to SO type API
* update generated doc
* design integration
* update generated doc
* Add FTR tests for import warnings
* deletes plugins api integ tests
* self review
* move onImport to management definition
* update license header
* rename actionUrl to actionPath
This PR adds the following:
1. We now validate the interval passed to `timeout` when a task type definition is registered.
2. replaces usage of `Joi` with `schema-type`
When a task expires it continues to reside in the queue until `TaskPool.cancelExpiredTasks()` is called. We call this in `TaskPool.run()`, but `run` won't get called if there is no capacity, as we gate the poller on `TaskPool.availableWorkers()` and that means that if you have as many expired tasks as you have workers - your poller will continually restart but the queue will remain full and that Task Manager is then in capable of taking on any more work. This is what caused `[Task Poller Monitor]: Observable Monitor: Hung Observable...`
* Instances latency distribution chart
Create an instances row component that does the data fetching for the
instances table and the distribution chart. Use the same data for both the chart and the table.
Tooltips and selection are disabled on the chart.
* import fix
* rename ServiceOverviewInstancesRow to ServiceOverviewInstancesChartAndTable
* Updates based on feedback
* remove stuff
* hasdata
* chore(NA): create new x-pack cigroups and rebalancing them all
* chore(NA): better cigroups balancing
* chore(NA): push rollup tests back into ciGroup1
* chore(NA): move some functional ml tests from cigroup3 into cigroup13
* chore(NA): move some more tests into ciGroup13
* chore(NA): use a single top level describe at x-pack/test/functional/apps/ml
* chore(NA): move settings into ciGroup13
* temporary test for es snapshots env
* Revert "temporary test for es snapshots env"
This reverts commit 789ebe7b9c.
* docs(NA): add missing documentation on the function tests describe split
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* add custom runner and config for load testing
* add full maven command
* add jenkins script
* run tests against build
* run kibana with no-base-path flag
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* usgin esarchive to load e2e
* using esarchive to load e2e
* using esarchive to load e2e
* using esarchive to load e2e
* using esarchive to load e2e
* chaning archiver script to copy file to both e2e and api tests
* chaning archiver script to copy file to both e2e and api tests
* removing task folder
* running e2e through script
* using cy.clock to set now
* adding basic test
* adding cypress run script
* adding cypress run script
* fixing some stuff
* excluding new e2e dir
* adding new project for new e2e dir
* adding new project for new e2e dir
* unformatting file
* adding unit tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Temporarily addresses https://github.com/elastic/kibana/issues/88450
A follow PR will address full fix.
### Issue
Exceptions table search not functioning as expected.
### Diagnostic
The exception list SO properties are mapped as keywords, meaning ES does not tokenize them. Need to add a `text` mapping for fields we want to search on in order for search to work as expected. Expectations for exceptions table search being:
- I can search `Endpoint Security` and get results that match `Endpoint` or `Security`
- I can search `"Endpoint Security"` and it will conduct an exact match search
It's too late in the release cycle for mappings updates - a follow up PR will properly fix search.
### Without Search
<img width="1766" alt="Screen Shot 2021-01-19 at 7 52 01 PM" src="https://user-images.githubusercontent.com/10927944/105112279-aed64300-5a90-11eb-95fc-1922eb2055e9.png">
### Checklist
- [ ] [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
* Add AnalyticsUnavailable component
* Add AnalyticsHeader component
+ update AnalyticsLogic to store allTags prop passed by API
+ convertTagsToSelectOptions util helper
* Add AnalyticsLayout that all subroutes will utilize
- Handles shared concerns of:
- Loading state & unavailable state
- Flash messages & log retention callout
- Reusing the header component
- Fetching data
- Reloading data based on filter updates
* Add very basic subroute views that utilize AnalyticsLayout
* Update QueryDetail pages to set breadcrumbs
* Fix QueryDetail breadcrumbs to not 404 on the 'Query' crumb
Redirect to the /analytics overview since we don't actually have a /query_details overview
* [PR feedback] Enforce date range defaults on the client side
- instead of using coincidence to sync our client side default range & server default range
- tags remain ''/undefined as default
* [PR feedback] Add explicit query vs analytics view prop
- to help devs more quickly distinguish at a glance whether a view will fetch analytics data or query data
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Making kibanaFeatures an optional parameter and catching error on plugin start
* Gracefully handle 404 errors when no access to features endpoint
* Adding functional test
* Only render location status badge when there are actually locations to display.
* Add aria-label to describe location section.
* Update test data to reflect real-world data better. Refactor enzyme tests.
* Refactor component test.
* Fix test names.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Addresses issue issue 87110
**Issue**
When prepackaged rules were created during the Endpoint Security enrollment flow, the endpoint exceptions list was failing to be created. As a result, when a user navigated to the `Endpoint Security` rule to add an exception it would display errors and not allow a user to add exceptions.
* Await promises to ensure promise rejection does not crash kibana
* Fix test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* partial failure if unmapped timestamp override field or unmapped @timestamp field
* fixes unit tests
* fix threat match rules integration tests
* unskip integration test for partial failure when not all indices have timestamp override field
* replace ts-expect-error in test with a partial type
* use destructured param and != null for ternary
* fix typo in utils.test.ts
* remove unnecessary optional chaining
* replace logger.debug with logger.error and update test case for threat match integration test to search auditbeat-* instead of empty index causing it to search wrong indicies like .kibana, etc..
* adds unit test to write a success when all shard failure messages are no mapping found for a timestamp field, moves privilege check and timestamp field cap check into utility functions and updates code to be more functional
* need to write an error, not a partial failure, if the rule cannot read ANY of the indices provided
* use isEmpty for checking timestamp override field param and remove let from hasReadIndexPrivileges util function
* replace references to helpers/toPromise | toError to use common/fp_utils, remove unnecessary flow wrappers, no need for checking if timestampField is null since it is typed as string and we do the checking beforehand, add a const bool to clean up logic for getting timestampFieldOverride
* replace usage of flow with pipe to make arguments explicit
* set width
* cleanup
* add show scale toggle in map settings
* tslint
* remove unmapped css comment
* move scale for full screen mode so they do not collide
* change default and add unit test for scale_control
* simplify scale
* add tilda to label
* update jest expects
* eslint
* eslint
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Update older tests mocking useValues to setMockValues
* Update older logic tests to use newer LogicMounter helper
- NOTE: shared logic files are still using resetContext however, in order to not accidentally override/mock kea + since they should be testing their own mount helpers
* Merge/DRY kea.mock helpers into a single import
* Remove unnecessary kea.mock file imports
- the automock already happens when you import something from the kea.mock file
- in some cases in WS the mock just wasn't needed
* Newline linting
- Do I need a hobby? yes
- Is this my hobby? ...maybe
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
A user received a `407` response when using a `registryProxyUrl` format like `http://user:pass@host:port`
I believe the issue is we're not including the [`auth` property as described in this issue](https://github.com/TooTallNate/node-https-proxy-agent/issues/12#issuecomment-216098644).
Add tests to ensure it only adds `auth` if username & password are given.
### Checklist
Delete any items that are not applicable to this PR.
- [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
```
getProxyAgentOptions
auth property
present & correct if given username and password
✓ proxy url is http (1 ms)
✓ proxy url is https
missing if not given username and password
✓ proxy url is http
✓ proxy url is https
```
* Initial copy/paste of component tree
Only does linting changes and lodash import
* Replace withRouter HOC with hooks
Use useLocation and no longer pass around history, using the KibanaLogic navigateToUrl method instead
* Migrate LicenseCallout component
* Update paths
Also change name of component to OauthApplication as the default import was named that before
* Remove conditional and passed in flash messages
This is no longer needed with the Kibana syntax. Flash messages are set globally and only render when present.
* Replace removed ConfirmModal
In Kibana, we use the Eui components directly
* Use internal tools for determining license
* Fix a bunch of type issues
* Remove telemetry settings section
We no longer control telemetry in Workplace Search. It is handled by Kibana itself
* Add SettingsSubNav component
* Add route and update nav
* Remove legacy AppView and sidenav
* Clear flash messages globally
* Remove global name change method call
The global org name is not used anywhere outside of this section so we no longer need to update the global organization object as it is re-fetched when this section is entered.
Previously, we displayed the org name in the sidebar but that has been removed in Kibana
* Refactor saveUpdatedConfig
We recently split out the logic from SourceLogic to the new AddSourceLogic and in settings, we were calling the saveSourceConfig method from the SourceLogic (now in AddSourceLogic) file and passing a callback that set the flash messages from that component’s state.
Now, we set the flash messages globally and no longer need to have a saveUpdatedConfig method in the logic file, but can call it directly in the component and the flash messages will be set globally.
* Update logic file to use global flash messages
* Update server routes
* Replace Rails http with kibana http
* Fix subnav
* Update routes to use consistent syntax
We use this method across both Enterprise Search products in Kibana
* Shorten nav item copy
This would be the only place in the sidebar with a nav item breaking to a second line.
* Fix some random typos
* Replace React Router Link with helper
* Add i18n
* Remove redundant clearing of flash messages
This happens automatically now in the global flash messages logic; route changes trigger clearing of messages
* Add unit tests for components
* Add tests for router
* Store oauthApplication in mock for reuse
* Add tests for SettingsLogic
* Fix typo
* Remove unncessary imports
Copied from this PR:
https://github.com/elastic/kibana/pull/88525
* Refactor to use new helpers when mocking
See https://github.com/elastic/kibana/pull/88494
* Update logic test to use error helper
See https://github.com/elastic/kibana/pull/88422
* Fix type issue
* Fix whitespace lint issue
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add type
Our code allows for an array but the type did not.
* Add exampleResult mock
* Add test-subj attrs
* Remove FIXMEs for linter errors
The linter was complaining when these were initially migrated, stating that a11y required all mouse events to have focus and blur events. This commit uses the hover events for those. EuiColorPicker was added in error and removing them does not disrupt the linter.
* Add tests for components
* Add test for router
Also updates routes to use consistent syntax and remove the render prop
* Use helper instead of history.push
* Remove redundant resetDisplaySettingsState method
Since all this does is wrap the clearFlashMessages function, we can just call it directly. Also use the new clearFlashMessages helper instead of using FlashMessageLogic directly insideof toggleFieldEditorModal
* Add tests for DisplaySettings container
* Fix a typo and associated tests
Also adds ‘subtitleField’ that is needed in a future test
* Add constants from PR to test
https://github.com/elastic/kibana/pull/88477
* Add tests for DisplaySettingsLogic
* Remove unused imports and use new mocks
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* 🐛 Make sure to check incomplete columns before saved ones
* ⚗️ Try a different approach
* 🐛 Isolate the fullRef to field transition and trigger the removal + tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This removes some duplicate API calls to reduce pressure on the backend and speed up querying times within the application for the front end. This fixes some of the issues of https://github.com/elastic/kibana/issues/82327, but there are several performance improvements that are going to be needed to help reduce the slowness when you have a system under a lot of pressure.
So far this removes duplication for these API calls when you are on the manage detection rules page:
```ts
api/detection_engine/rules/_find
api/detection_engine/rules/_find_statuses
api/detection_engine/tags
```
<img width="2465" alt="Screen Shot 2021-01-14 at 3 53 21 PM" src="https://user-images.githubusercontent.com/1151048/104662295-c031e080-5687-11eb-92d7-18b9ad355646.png">
* This hides the tags and searches while the page is loading to avoid duplicate calls when the pre-packaged rules counts come back
* This untangles the refetchRules from the refetchPrePackagedRulesStatus as two separate calls to avoid issues we have with re-rendering and re-calling the backend.
### 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
* [Maps] fix zooming while drawing shape filter logs errors in console
* add unit test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Remove Manage button from Source overview page
* Replace empty select option with "Leave unassigned"
* Replace content source key with id
* Update Google icons
* Replace anchor with EuiLink
* Add Folders as one of the synced items for Box
* Add DLP feature UI to Jira and Confluence cloud pages
* Fix the "Fix" link path
Also updated TS types to match ent-search
* Fix copy and button color on "Content source is disabled" callout
* Remove incorrect copy from Private sources empty state
* Move constants from logic file to a separate file, rename a constant
* Fix i18n path to not include file name
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [APM] Only display relevent sections for rum agent in service overview (#85546)
* call `isRumAgentName` once
* User experience callout links to the selected service
* Update shared logic mocks to automatically mock their exports
* Update FlashMessages to also mock its helper fns
* Fix tests that were relying on component exports from shared logic files
* Fix broken flash_messages tests
- Caused by leaking auto mocks - work around this by importing from files directly and not from index.ts
- Also clean up / use new auto mocks (e.g. for kibana)
- Convert old instances of useValues mock to setMockValues
* [AS] Update AnalyticsLogic test to use new auto mockers
+ move LogicMounter and destructured mock values to top of describe block
* [AS] Update CredentialsLogic
+ udpate to use new clearFlashMessages helper
* [AS] Update documents logic tests
* [AS] Update engines logic tests
* [AS] Update log retention logic test
* [Shared] Update IndexingStatus tests
+ update to use LogicMounter
* [Shared] Update telemetry logic test
* [WS] Update AddSourceLogic
+ update to use new clearFlashMessages helper
* [WS] Update groups logic files
+ update to use new flash message helpers
* [WS] Update OverviewLogic test
* [WS] Update AddSource component test
+ consolidate mocks imports
* [Shared] Clean up KibanaLogic imports
- all jest.mocks come along from the ride when the __mocks__ folder is imported, so HttpLogic is now automatically already mocked
* [AS] Update EngineRouter test
## Summary
Changes `DELETE` to `POST` for _bulk_delete on the client only for a variety of reasons.
According to the RFC, not all servers and proxies need to honor DELETE having a body. From: https://tools.ietf.org/html/rfc7231
```
A payload within a DELETE request message has no defined semantics;
sending a payload body on a DELETE request might cause some existing
implementations to reject the request.
```
Within at least one proxy, h2o2, we have found that it does indeed change request headers which will cause NodeJS to not attach the body of a `DELETE`:
https://github.com/hapijs/h2o2/issues/124
Also from other communities such as OpenAPI where they debated this, they allow it but discourage it for reasons outlined there that I will not repeat here:
https://github.com/OAI/OpenAPI-Specification/pull/1937
Elastic Search API's and other Kibana API's use `POST` rather than `DELETE` for their bodies that are attached to `DELETE`:
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
We still support bodies in `DELETE` and `POST` but are just changing the web client to utilize `POST` moving forward.
### Checklist
Reviewed and we already have unit tests and end to end tests for these use cases so we are good with just updating them.
- [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
* clear ping state when PingList component in unmounted
* update ping list content
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add small helper to reduce boilerplate on async tests expected to throw
- Also hopefully a bit more descriptive on what's happening
* Update all test files using the previous try/catch do nothing blocks to use new helper
* Unskip "Observer location" test block.
* Commit temp "describe.only" to make flaky test runner go faster.
* Add optional chain for some potentially-null props.
* Make overview filters type partial.
* Repair broken types.
* Remove \`only\` call from test.
* Add search source to example plugin.
* Add uiSetting for fields API.
* Update SearchSource to support fields API.
* [PoC] reading from the fields API in Discover
* Add N fields as a default column
* Make fields column non-removeable
* Do not add 'fields' to state
* Remove fields from app state and read from source when needed
* Remove fields column if a new column is added
* Add search source to example plugin.
* Add uiSetting for fields API.
* Update SearchSource to support fields API.
* Improve error handling in search examples plugin.
* Add unit tests for legacy behavior.
* Remove uiSettings feature flag; add fieldsFromSource config.
* Rewrite flatten() based on final API design.
* Update example app based on final API design.
* Update maps app to use legacy fieldsFromSource.
* Update Discover to use legacy fieldsFromSource.
* Rename source filters to field filters.
* Address feedback.
* Update generated docs.
* Update maps functional test.
* Formatting fields column similar to _source
* Moving logic for using search API to updating search source
* Fix small merge error
* Move useSource switch to Discover section of advanced settings
* Do not use fields and source at the same time
* Remove unmapped fields switch
* Add basic support for grouping multifields
* Remove output.txt
* Fix some merge leftovers
* Fix some merge leftovers
* Fix merge errors
* Fix typescript errors and update nested fields logic
* Add a unit test
* Fixing field formats
* Fix multifield selection logic
* Request all fields from source
* Fix eslint
* Fix default columns when switching between _source and fields
* More unit tests
* Update API changes
* Add unit test for discover field details footer
* Remove unused file
* Remove fields formatting from index pattern
* Remove unnecessary check
* Addressing design comments
* Fixing fields column display and renaming it to Document
* Adding more unit tests
* Adding a missing check for useNewFieldsAPI; minor fixes
* Fixing typescript error
* Remove unnecessary console statement
* Add missing prop
* Fixing import order
* Adding functional test to test fields API
* [Functional test] Clean up in after
* Fixing context app
* Addressing PR comments
* Updating failed snapshot
* Addressing PR comments
* Fixing i18n translations, updating type
* Addressing PR comments
* Updating a functional test
* Add a separate functional test for fields API
* Read fields from source in a functional test
* Skip buggy test
* Use default behavior in functional tests
* Fixing remaining failing tests
* Fixing date-nanos test
* Updating FLS test
* Fixing yet another functional test
* Skipping non-relevant tests
* Fixing more tests
* Update stub import in test
* Fix import
* Fix invalid import
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
The alerts plugin was importing `JsonObject` from the infra plugin. The infra plugin imported `JsonObject`, `JsonValue`, and `JsonArray` from kibanaUtils and then re-exported them.
Remove the re-export from the infra plugin and instead always import these types from kibanaUtils.
* [ML] Improving existing job check in anomaly detection wizard
* fixing job id validation
* allow group ids to be reused
* updating module exists endpoint
* fixing issuse with job without group list
* fixing test and translation ids
* fixing validator when model plot is disabled
* changes based on review
* adding group id check to edit job flyout
* small refactor and fixing edit job issue
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* cleaning up unused types and legacy logic
* added new relative age logic with unit tests
* export the calculate relative timing function that returns millisecond values
* added exports to index.ts file
* copy update and test update
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* waits for the timeline modal before doing validations
* unskips search bar test
* unskips URL compatibility tests
* unksips attach timeline to a case tests
* unksips sourcerer test
* unskips pagination
* unskips inspect tests
* unskips fields browsers tests
* unskips toogle column in timeline tests
* unskips persistent timeline test
* removes comment
* fixes drag and drop test
* fixes adds a field to the timeline when the user drags and drops a field test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [APM] Optimize anomaly data loading strategy
Closes#86423.
* Fix tests/types
* Review feedback
* Optimize ML calls for latency chart
* Optimize ML loading for latency chart
* Remove unused optimization
* Update snapshots for E2E tests
* Make sure area is stacked in correct order
* Review feedback + log warning if more than one ML job was found
* Review feedback
* [Workplace Search] Remove user icon from source details
Removes user icons from source details group list, since the users don't exist in Kibana.
* Refactor to remove entire GroupAvatars component
* Remove unused interface
* Remove flex group
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add remaining log retention components
- Will shortly be used by Analytics view
* [i18n] Change log retention date from moment to react-intl FormattedDate
- this correctly localizes the dates when Kibana is in different languages, e.g. zh-CN, ja-JP
* Refactor log_retention/messaging
- Convert to all JSX/React vs plain strings (makes it easier to deal with FormattedDate/FormattedMessages)
- Consolidate to single component that takes various log types (e.g. analytics, api)
- This is important for adding future switches & toggles - there is *significantly* less complex strings to localize this way (2 short strings vs 5+ long sentences)
* Update existing instances to use new LogRetentionMessage
* Update translation strings
- to account for new i18n logs type values & IDs
* Attempt to fix test timezone shenanigans
* [PR feedback] Types
* [PR feedback] i18n pluralization
* Update LogRetentionTooltip and LogRetentionCallout to manage fetching log retention
+ change ILM to LogRetention per PR feedback
* Update LogRetentionLogic to prevent duplicate fetches
- e.g. if both LogRetentionTooltip and LogRetentionCallout are on the same page (which they will be)
We had fixed the link in the header menu a while back, but there were a couple other places where the link had not beed updated.
Replace `KibanaLink` component with a function to get the href for the upgrade assistant and use that everywhere.
Fixes#87647.
* Closes#87726. Uses ms as the unit for latencies in service overview.
* removes optional chaining in those cases where it is not needed
* updates test snapshot with correct value
* Revert "updates test snapshot with correct value"
This reverts commit 9a1bdd7b44.
* update param name from time -> value
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Set up server API routes
* Set up very basic AnalyticsLogic file
- mostly just contains API call & basic loading/error state for now - actual usable vars will be defined in a future PR
* [PR feedback] Unnecessary exports
* [PR feedback] Clean up analyticsAvailable reducer
* [PR feedback] Types order
* [PR feedback] Unnecessary API validation
* Closes#88268. Divides the throughput count of the selected range by deltaAsMinutes
* update old test snapshot
* update values in test snapshot
* update values in test snapshot
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add cancel functionality to pollSearch
Makes sure that DELETE requests are properly sent even if consumer unsubscribes.
* Update poll_search.test.ts
* cancel on abort
* fix jest
* ADded jest test
* Cancel to be called once
* Only cancel internally on abort
* ts + addd defer
* ts
* make cancel code prettier
* Cancel even after unsubscribe
* Throw abort error if already aborted
* Only delete once
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
* Ensure that services that depend on fleet are only initialized if fleet dependency is available
* rename "Ingest manager" to "Fleet" in UI strings/code comments
Update the index pattern uysed for populating
the list of data streams to include traces-*-*.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Closes#87483. Updates several labels to be consistent accross views.
* Updates integration tests/snapshots with new term
* Changes "traffic" => "throughput" in the labels
* addresses feedback from PR
* includes tpm unit in Observability overview page and updates test
* [Setup] Analytics routes & page title consts
* Add AnalyticsRouter
- with TODO views
* Update EngineRouter to use AnalyticsRouter
+ minor rearranging of import order
+ update EngineNav to show active flag for subroutes
* [Polish] Add 404 fallback to Analytics subroutes
+ add custom breadcrumb trail prop to NotFound component
* [PR feedback] DRY out typing
Previously we had `getStart` and `getEnd` methods used in `useUrlParams` that would give a new value if the respective `rangeFrom`/`rangeTo` had change.
This had the effect of sometimes making the end time sooner than the start time, causing errors on the page.
`getStart` and `getEnd` have been replaced with a `getDateRange` method that checks if *either* value has changed and recaluates the start/end, but leaves them the same if both values have not changed.
Fixes#85238.
* [Misc cleanup] DRY out type def
EnginesTableData was made before we started importing more types over from ent-search; we should reuse the more complete EngineDetails instead of re-declaring our own
* Add EnginesLogic file + tests
- based on current state inside EnginesOverview
- Not a 1:1 translation from ent-search's EnginesLogic b/c the table component/view is different
- also missing engine creation which will be a separate PR
* Update EnginesOverview to use EnginesLogic
- should be significantly simpler
- tests no longer need mountAsync
* [Extra] Make up for lost icon.tsx coverage
- because we no longer use mount() in the engines overview tests, I'm adding an extra set of quick shallow render tests to cover the icon .tsx lines
* [Misc] Rename fetchX to loadY (copying Kea)
* 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