GithubHelp home page GithubHelp logo

Comments (5)

yenienserrano avatar yenienserrano commented on August 23, 2024

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

from wazuh-dashboard-plugins.

yenienserrano avatar yenienserrano commented on August 23, 2024

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.

from wazuh-dashboard-plugins.

yenienserrano avatar yenienserrano commented on August 23, 2024

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.

from wazuh-dashboard-plugins.

yenienserrano avatar yenienserrano commented on August 23, 2024

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

from wazuh-dashboard-plugins.

yenienserrano avatar yenienserrano commented on August 23, 2024

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

from wazuh-dashboard-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.