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

[Refactor] Table in Vulnerabilities/Inventory #3196

Merged

Conversation

eze9252
Copy link
Contributor

@eze9252 eze9252 commented Apr 26, 2021

Hi team, this resolve:

  • Add fields STATUS and TYPE in vulnerabilities/inventory table
  • Refactor in table component (adapting for use in other components)

How to test:

  • Changes not ready yet in branch "master" in wazuh api. For test PR, install wazuh from "dev-cves-alerts-inventory" branch.

Captura de pantalla de 2021-04-30 11-21-23

Captura de pantalla de 2021-04-30 11-21-39

Closes #3093

@eze9252 eze9252 self-assigned this Apr 26, 2021
isExpandable={true}
rowProps={getRowProps}
error={error}
sorting={sorting}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why pass the sorting props to the component. The component should control by itself the sorting state.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot delete this prop.

title='Vulnerabilities'
tableColumns={columns}
tableInitialSortingField='name'
searchTable={true}
Copy link
Member

@Desvelao Desvelao Apr 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prop adds a search bar to the table but the component is called TableWithSearchBardWzAPI. We should rename the component if it can have a search bar or not, or create differents components (with the search bar or not).

Copy link
Contributor Author

@eze9252 eze9252 Apr 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm renaming the component to TableWzAPI

searchTable={true}
searchBarSuggestions={this.suggestions}
endpoint={`/vulnerability/${this.props.agent.id}`}
reload={isLoading}
Copy link
Member

@Desvelao Desvelao Apr 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reload prop in the original table, redo the request with the current table status, when reload prop change.

@Desvelao
Copy link
Member

I was testing the PR with another Wazuh manager branch and I found when exporting to CSV, there columns are missing and the CSV columns are not in the same order that the table in the app.
image

Copy link
Contributor

@frankeros frankeros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue requirements indicate:

But no information will be provided on the status of the vulnerabilities displayed.

Remove Status and Type from columns and detail

@frankeros frankeros changed the base branch from 4.2-7.10 to 4.3-7.10 May 27, 2021 16:04
@frankeros frankeros merged commit 2f4588c into 4.3-7.10 Jun 15, 2021
@frankeros frankeros deleted the feature/add-status-and-type-in-vulnerabilities-table branch June 15, 2021 12:51
@Desvelao Desvelao changed the title Feature/add status and type in vulnerabilities table [Refactor] Table in Vulnerabilities/Inventory Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the STATUS and TYPE of the vulnerabilities to the vulnerabilities view that affect each agent
3 participants