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

[Remove discover] Refactor modules dashboards with new embeddable component #6477

Open
14 of 20 tasks
Tracked by #6120
asteriscos opened this issue Mar 5, 2024 · 3 comments
Open
14 of 20 tasks
Tracked by #6120
Assignees
Labels
level/task Task issue type/enhancement Enhancement issue

Comments

@asteriscos
Copy link
Member

asteriscos commented Mar 5, 2024

Description

We need to refactor all the module's dashboards that use the legacy discover methods to render visualization. To refactor these dashboards we have to implement the new dashboard embeddable component in each of the modules. This will allow us to progressively deprecate the legacy discover dependencies and give one step forward to standardize the filtering mechanisms and also deprecate AngularJS in the plugins.

Tasks

@asteriscos asteriscos added type/enhancement Enhancement issue level/task Task issue labels Mar 5, 2024
@asteriscos asteriscos changed the title Refactor modules dashboards to implement new embeddable component [Remove discover] Refactor modules dashboards with new embeddable component Mar 5, 2024
@jbiset
Copy link
Member

jbiset commented Mar 5, 2024

Research

Office and Github use plugins/main/public/components/common/modules/panel/main-panel.tsx, these modules should be analyzed particularly.

Depending on whether it is overview or pinned agents, main-panel uses the static methods of plugins/main/public/react-services/vis-factory-handler.js to create the visualizations.

The component attribute that is defined in modules-default for each module specifies the dashboard to render, based on whether it is overview or agent, it is rendered in plugins/main/public/components/common/modules/main-overview.tsx or plugins /main/public/components/common/modules/main-agent.tsx accordingly. It is plugins/main/public/components/common/modules/main.tsx that is responsible for finally calling main-overview or main-agent depending on whether an agent is pinned or not.

Several dashboards in modules-default are rendered through a Dashboard component (plugins/main/public/components/common/modules/dashboard.tsx) that, despite returning null in the rendering, sends the corresponding visualizations to be rendered (It is being analyzed ). Surely ModulesHelper is the one who is called to finally render according to the section to be rendered that the Dashboard receives as a prop

The KivanaVis acts as the panel for the new DashboardByRenderer rendering method.

Based on the above, so far the best strategy is to work creating dashboard components according to each module and use it in modules-defaults.js (plugins/main/public/components/common/modules/modules-defaults.js) in a way similar to what was proposed with Vulnerabilities and FIM.

@JuanGarriuz
Copy link
Member

Research

To consider for dashboards:

  • Each visualization, if applicable, must have interaction in such a way that it adds the corresponding filter(s) when clicked.
  • Visualizations must update according to the filters applied in the searchbar.
  • Visualizations must update when a search is performed in the searchbar.
  • If there are no results, the corresponding message that there are no results should appear, and the visualizations should not be rendered.
  • If there is SampleData, the corresponding SampleData message should appear.
  • If an agent is pinned, the visualizations must update and change to the agent one, if applicable.

@jbiset
Copy link
Member

jbiset commented Mar 15, 2024

Updated considerations for dashboards

  • Each visualization, if applicable, must have interaction so that it adds the corresponding filter(s) upon clicking.
  • The visualizations have to be updated according to the filters applied in the searchbar.
  • The visualizations have to be updated when a search is performed in the searchbar.
  • If there are no results, the corresponding message must appear that there are no results and the visualizations should not be rendered.
  • If there is SampleData, the corresponding SampleData message must appear.
  • If an agent is pinned, the views must be updated and changed to the agent view, if applicable.
  • Check filter behavior with respect to hide alerts, allow agents and filter order (Implicit filters first, then pinned agent, if applicable, and then normal filters).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/enhancement Enhancement issue
Projects
Status: In progress
Development

No branches or pull requests

5 participants