-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Add links to Discover in serverless when Logs UI not available #168349
Comments
Pinging @elastic/fleet (Team:Fleet) |
@weltenwort @tonyghiani The future on this is to open these links in Logs Explorer. The different solutions that embedded Logs ideally should not have to worry about where these link takes them. Can we add some logic to the button to make this seamless instead of changing links in many different places? It must also work in Security projects. |
In #167976 was introduced this check that show the Logs UI if available, otherwise the Discover one. Do we want to replicate the same check on the other places or should they all go to Discover? |
I also saw that one of the existing links is only visible in some integrations (I could find This link brings to |
Soon Logs Explorer becomes a tab in Discover: #171386 This hopefully solves the problem and we can always link to Logs Explorer. @weltenwort Do I miss something here? |
…astic#171525) Fixes elastic#168349 ## Summary Fix links to Logs view to point to Discover in Serverless. As the Logs view UI is not available in serverless, the "Open in logs" buttons should point to Discover instead. Rather than hardcode the url in each of the places where is needed, I extracted a small component that builds the two urls and allows switching in an easier way. If in the future on of the two links will go away, it will be easier to find those occurrences. ### Testing Test for serverless following [these instructions](elastic#167976) **Error logs in agent activity flyout** - Enroll an agent and try to cause some error - for instance upgrading an agent that is not upgradeable - Click on "Agent Activity" and find the error and a button besides it - On stateful the button says "Open in Logs" ![Screenshot 2023-11-20 at 13 07 08](https://github.com/elastic/kibana/assets/16084106/704cf0e2-c7ee-4751-9e7f-7dcd263a5aa4) - On serverless is "Open in discover" ![Screenshot 2023-11-20 at 13 08 02](https://github.com/elastic/kibana/assets/16084106/3902f09e-93dc-48d3-867e-1f80d977f437) - Check that both show the same logs: ![Screenshot 2023-11-16 at 11 49 24](https://github.com/elastic/kibana/assets/16084106/d863d99f-0c70-45e5-9316-a37645464c34) ![Screenshot 2023-11-16 at 11 48 54](https://github.com/elastic/kibana/assets/16084106/7cbd0a5f-3b31-4c4d-a4b7-4eb7390983c8) **Agent logs** (Same test as above) - Enroll an agent - Click on the agent and go to the "Logs" tab - On stateful the button says "Open in Logs" ![Screenshot 2023-11-20 at 13 04 41](https://github.com/elastic/kibana/assets/16084106/6a43a062-37db-47ea-819f-acd170439395) - On serverless is "Open in discover" ![Screenshot 2023-11-20 at 13 04 11](https://github.com/elastic/kibana/assets/16084106/e15fdc8b-8780-4ac6-afc6-bff3d3a96be5) - Check that both show the same logs **Custom Logs UI** There is also a link to logs on custom logs UI but I just linked to discover for that one: https://github.com/elastic/kibana/pull/171525/files#diff-e337aa916d60d0d1033e3298c8c9c33c6a6fcd87a8ded971a4a87f5ccfc0981fR20-R22 --------- Co-authored-by: Kibana Machine <[email protected]>
The cause rather seems to be that the link to the old Logs UI was hard-coded. Instead the clean solution would be to check for and use the Log Explorer locators. (cc @mohamedhamed-ahmed) |
@weltenwort Is this something we can contribute and then use as a reference for others to use? |
@mohamedhamed-ahmed I remember a related conversation about other places that link to the Log Stream or Logs UI. Did we already implement the locator that abstracts this away is is that still open? |
@weltenwort At the moment we have locators dedicated for logs explorer and stream UI separately |
Hi @criamico We have revalidated these changes on latest 8.12 Serverless environment and found it working fine. Observations:
Build details: Screen Recording: Agents.-.Fleet.-.Elastic.-.Google.Chrome.2023-11-30.11-52-35.mp4Hence we are marking this ticket as QA:Validated. cc: @kpollich |
Follow up of #167304
It seem we are using Logs UI in a few more places in Fleet:
https://github.com/elastic/kibana/pull/168238/files?file-filters%5B%5D=.ts&file-filters%5B%5D=.tsx&owned-by%5B%5D=juliaElastic&show-viewed-files=true#diff-e337aa916d60d0d1033e3298c8c9c33c6a6fcd87a8ded971a4a87f5ccfc0981f
These should be replaced with links to Discover, similarly to how the link in Agent Details / Logs has been replaced.
The text was updated successfully, but these errors were encountered: