Skip to content
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

[8.15] [Fleet] Display view in logs button when logs app is available (#187871) #188000

Merged
merged 1 commit into from
Jul 10, 2024

Commits on Jul 10, 2024

  1. [Fleet] Display view in logs button when logs app is available (elast…

    …ic#187871)
    
    Closes elastic#185711
    
    ## Summary
    This change fixes elastic#185711, but
    while working on that I also realised that we should move away from
    using hardcoded urls. So this PR does two things:
    - Displays the button only when the user has `authz.fleet.readAgents`
    privilege
    - Refactors the button functionality to use the new locators that take
    care of linking to the observability logs/discover app
    
    ### Why the refactor
    While testing this button, I noticed that the functionality was broken
    in some cases, that's because we were manually routing the urls to Logs
    UI/Discover apps based if we are in serverless or not.
    
    I found a PR that already implements this functionality:
    elastic#155156
    I also found elastic#154145 that takes
    care of the redirect to the correct app.
    So I'm replacing the current manual functionality with these utilities
    so that `getLogsLocatorsFromUrlService` takes care of where the open in
    logs button should link.
    
    ### ESS
    
    https://github.com/elastic/kibana/assets/16084106/3f0760c9-3afb-4793-a3af-317f625b36d7
    
    https://github.com/elastic/kibana/assets/16084106/3436cf5a-36c9-425d-a114-e116ddaa1a03
    
    ### Serverless
    
    https://github.com/elastic/kibana/assets/16084106/84176f09-96a4-4932-9508-5f7682d03aae
    
    ---------
    
    Co-authored-by: kibanamachine <[email protected]>
    Co-authored-by: Elastic Machine <[email protected]>
    (cherry picked from commit 696bb88)
    criamico committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    c85fd47 View commit details
    Browse the repository at this point in the history