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

Quick change between dashboard tabs error #6744

Closed
asteriscos opened this issue Jun 4, 2024 · 5 comments · Fixed by #6752 or #6756
Closed

Quick change between dashboard tabs error #6744

asteriscos opened this issue Jun 4, 2024 · 5 comments · Fixed by #6752 or #6756
Assignees
Labels
level/task Task issue type/bug Bug issue

Comments

@asteriscos
Copy link
Member

asteriscos commented Jun 4, 2024

Wazuh Rev Browser
4.9.0 00 Chrome, Firefox, Safari, etc

Description
Switching quickly between Dashboard and Events tabs throws an error and doesn't load the visualizations.

Screenshots

image

Peek 2024-06-04 17-23

@yenienserrano
Copy link
Member

I left a query on the opensearch dashboard slack to see if they knew about the error.
https://opensearch.slack.com/archives/C01QENNTGUD/p1717526144724889

@yenienserrano
Copy link
Member

I was doing some tests and it seems that the problem is due to the conditional rendering of the dashboards, when changing tabs quickly they are not rendered but it tries to destroy them afterwards and that's why the error occurs.

@yenienserrano
Copy link
Member

The problem seems to be coming from opensearch dashboards with embedded visualisations. Because of the conditionals that the dashboards have to render them, the problem can be seen. Since it takes time for the conditions for embedded dashboards to be rendered.
And in the time it takes from when they can be rendered to when they are rendered, if you change view the embedded visualisations try to destroy themselves but as they are never rendered they enter the throw new Error('Embeddable has been destroyed') of the embeddable.tsx. file and as soon as they enter this error no embedded visualisation works. The only solution to be able to see the visualisations again after this error has occurred is to refresh the browser.

Possible solutions

As the behaviour comes from opensearch, these solutions do not solve the problem 100% but they do make it less likely to happen.

  1. The most similar behaviour to opensearch would be to remove the conditionals for rendering and remove the warning that hides the dashboards when there is no data and leave the native behaviour which is that each visualisation shows the data it has either data, messages or errors.

Currently there are visualisations that have no data and others that do, and they already have the behaviour expected by opensearch.

image
  1. To leave the behaviour as it is currently, you can put the conditional instead of rendering it or not, add a class with display none if the condition is not met. This could solve the problem we currently have but it would always make the visualisation requests even if there is no data (in proposal 1 it would be the same) but when there is no data it would be hidden.

@yenienserrano
Copy link
Member

I have been working on the proposals and I leave the patch of proposal 1 and the patch of proposal 2 in one dashboard.
patch-render.txt
patch-style.txt

@yenienserrano
Copy link
Member

It was decided to go ahead with the proposal that changed less the visual behaviour, which is to always render the dashboards but if there is no data to keep them hidden and show the corresponding warning.

Screen.Recording.2024-06-07.at.8.36.18.PM.mov

@yenienserrano yenienserrano linked a pull request Jun 7, 2024 that will close this issue
6 tasks
@lucianogorza lucianogorza linked a pull request Jun 11, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/bug Bug issue
Projects
No open projects
Status: Done
2 participants