-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Endpoint] Add link to Logs UI to the Host Details view #62852
[Endpoint] Add link to Logs UI to the Host Details view #62852
Conversation
Pinging @elastic/endpoint-management (Team:Endpoint Management) |
Pinging @elastic/endpoint-app-team (Feature:Endpoint) |
@@ -170,3 +181,15 @@ export const HostDetailsFlyout = () => { | |||
</EuiFlyout> | |||
); | |||
}; | |||
|
|||
const useHostLogsUrl = (hostId: string): { url: string; appId: string; appPath: string } => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created separate hook case we would like to later use it in other areas of the UI. Would be easier to extract out.
…-link-to-logs # Conflicts: # x-pack/plugins/endpoint/public/applications/endpoint/store/hosts/mock_host_result_list.ts
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/uptime/overview·ts.Uptime app with real-world data overview page pagination is cleared when filter criteria changesStandard Out
Stack Trace
History
To update your PR or re-run it, just comment with: |
@@ -6,40 +6,26 @@ | |||
|
|||
import React from 'react'; | |||
import * as reactTestingLibrary from '@testing-library/react'; | |||
import { Provider } from 'react-redux'; | |||
import { I18nProvider } from '@kbn/i18n/react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove the i18n bits? ...cause its a test file and it isn't being tested / translated yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @EricDavisX . It's removed explicitly from here, but still used via createAppRootMockRender()
.
In my prior PR I pushed through a custom test renderer that add a wrapper
around the component being tested that includes all of the context providers that the app uses at runtime.
See:
x-pack/plugins/endpoint/public/applications/endpoint/mocks/app_context_render.tsx:44
, Andx-pack/plugins/endpoint/public/applications/endpoint/view/app_root_provider.tsx:23
}); | ||
|
||
it('should navigate to logs without full page refresh', async () => { | ||
// FIXME: this is not working :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI - I will remove this in next PR.
…chore/put-all-xjson-together * 'master' of github.com:elastic/kibana: [EPM] Update UI copy to use `integration` (elastic#63077) [NP] Inline buildPointSeriesData and buildHierarchicalData dependencies (elastic#61575) [Maps] create NOT EXISTS filter for tooltip property with no value (elastic#62849) [Endpoint] Add link to Logs UI to the Host Details view (elastic#62852) [UI COPY] Fixes typo in max_shingle_size for search_as_you_type (elastic#63071) [APM] docs: add alerting examples for APM (elastic#62864) [EPM] Change PACKAGES_SAVED_OBJECT_TYPE id (elastic#62818) docs: fix rendering of bulleted list (elastic#62855) Exposed AddMessageVariables as separate component (elastic#63007) Add Data - Adding cloud reset password link to cloud instructions (elastic#62835) [ML] DF Analytics: update memory estimate after adding exclude fields (elastic#62850) [Table Vis] Fix visualization overflow (elastic#62630) [Endpoint][EPM] Endpoint depending on ingest manager to initialize (elastic#62871) [Remote clusters] Fix flaky jest tests (elastic#58768) [Discover] Hide time picker when an indexpattern without timefield is selected (elastic#62134) Move search source parsing and serializing to data (elastic#59919) [ML] Functional tests - stabilize typing in mml input (elastic#63091) [data.search.aggs]: Clean up TimeBuckets implementation (elastic#62123) [ML] Functional transform tests - stabilize source selection (elastic#63087) add embed flag to saved object url as well (elastic#62926) # Conflicts: # x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/es_index.tsx
) * Add LinktoApp to host details for logs * initial setup for testing link on details * Export interface AppContextTestRender for reference in tests * Refactor hosts tests to use AppContextTestRender * Render full details and validate link to logs * one more test to ensure we navigate to app (not full page refresh) * Fixes post master merge
Summary
Adds a link to the Details view (flyout) of the endpoint host that sends the user to the Logs UI with a URL param that will filter content in logs by the ID of the host.
Checklist
Delete any items that are not applicable to this PR.