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

[Security Solutions] Embedded Integrations Dashboards breaks dashboard navigation #159325

Open
P1llus opened this issue Jun 8, 2023 · 6 comments
Labels
bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team

Comments

@P1llus
Copy link
Member

P1llus commented Jun 8, 2023

Most new security integrations (including older ones that has received dashboard rewrites/updates) usually include some sort of navigation panel, example:

image

These use hash based links like so: [Agent Info](/app/dashboards#/view/elastic_agent-0600ffa0-6b5e-11ed-98de-67bdecd21824)
image

Since the amount of integrations that uses this is only growing, and they will soon be embedded into the Security Solutions dashboard section, it would be good if these links can keep on working, while still being inside the embedded solution.

@botelastic botelastic bot added the needs-team Issues missing a team label label Jun 8, 2023
@semd
Copy link
Contributor

semd commented Jun 8, 2023

Hey! The hardcoded markdown does not give us many options, but a solution to create links that work on both pages (Dashboards App and the Security Dashboards page) would be to use hash # relative links like:

[Agent Info](#/view/elastic_agent-0600ffa0-6b5e-11ed-98de-67bdecd21824)

This URL would still work in Dashboards App.

To make it work inside Security - Dashboards page we would have to redirect to the new ID if the hash is present
Basically, redirecting from:
/app/security/dashboard/[CURRENT_ID]#/view/[NEW_ID]
into this:
/app/security/dashboard/[NEW_ID]

I am not sure if it is possible to create a new Route to match this hash path and redirect, or if it is better to check the location.hash in a useEffect(), but I think this should not be a big deal from our side.

It would provide us with a generic way to navigate inside dashboards.

Just have one question @P1llus. Is this considered a bug for the Integrations team?

@semd semd added Team:Threat Hunting Security Solution Threat Hunting Team Team:Threat Hunting:Explore labels Jun 8, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jun 8, 2023
@stephmilovic stephmilovic added bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Jun 8, 2023
@semd
Copy link
Contributor

semd commented Jun 8, 2023

Probably we could also intercept all navigations from inside the dashboards rendered in Security to /app/dashboards#view/:id using this:
https://developer.mozilla.org/en-US/docs/Web/API/Navigation/navigate_event#handling_a_navigation_using_intercept
And redirect them to ourselves.

You won't need to update all dashboards.
But that's a very hacky solution 😄🏴‍☠️

@ThomThomson
Copy link
Contributor

@semd we're also going to build a new system soon for Dashboard navigation which uses the Dashboard locator to navigate to links. Likely we can provide some sort of custom locator implementation that can be set at the Dashboard Container level to have full control over the URL when the Dashboard navigates.

@semd
Copy link
Contributor

semd commented Jun 23, 2023

@ThomThomson That sounds like a much better solution.
@P1llus Do you think we can close this issue then? We can open a new one to implement the location customization when it is ready.

@teresaalvarezsoler
Copy link

We released a links panel that should be used in these cases a year ago https://www.elastic.co/guide/en/kibana/current/dashboard-links.html, can we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team
Projects
None yet
Development

No branches or pull requests

6 participants