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

Added vulnerabilities inventory that affect to an agent #3069

Merged

Conversation

asteriscos
Copy link
Member

Hi team!

This adds the new vulnerabilities per agent view and it's details flyout.
image
Screenshot from 2021-03-11 12-15-42

Closes #3011

@asteriscos asteriscos requested a review from a team March 11, 2021 16:17
@asteriscos asteriscos self-assigned this Mar 11, 2021
@frankeros frankeros added the 4.2 label Mar 22, 2021
const filters = filtersToObject(this.state.filters);
const filter = {
...filters,
limit: '15'
Copy link
Member

Choose a reason for hiding this comment

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

Why the limit is fixed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because is just the default value. The page size value can be selected within the table component.

Copy link
Member

Choose a reason for hiding this comment

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

But if the page size changes, the limit variable continues on 15, no?

this.showToast('success', 'Your download should begin automatically...', 3000);
await exportCsv(
'/vulnerability/' + this.props.agent.id,
[{},
Copy link
Member

Choose a reason for hiding this comment

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

Why this empty object?

Copy link
Member Author

Choose a reason for hiding this comment

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

My bad, I forgot to deleted. I'll fix it right away

return (
<Fragment>
<EuiAccordion
id={id === undefined ? Math.random().toString() : `${id}_details`}
Copy link
Member

@Desvelao Desvelao Apr 5, 2021

Choose a reason for hiding this comment

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

I am not sure about this. When the id variable will be undefined? The EuiAccordion needs an id prop?

initialColumns={[
'icon',
'timestamp',
// 'rule.mitre.id',
Copy link
Member

Choose a reason for hiding this comment

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

If this field is not necessary, you could remove it.

Copy link
Member Author

Choose a reason for hiding this comment

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

removed!

Comment on lines 70 to 71
componentWillUnmount() {
}
Copy link
Member

Choose a reason for hiding this comment

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

Remove if not used.

Copy link
Member Author

Choose a reason for hiding this comment

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

removed!

@Desvelao
Copy link
Member

Desvelao commented Apr 5, 2021

Testing:

  • The Export formatted button allows us to use it when there are not vulnerabilities. Should the button be disabled?
    image

@asteriscos
Copy link
Member Author

Testing:

  • The Export formatted button allows us to use it when there are not vulnerabilities. Should the button be disabled?
    image

Is there a chance someone wants a report showing there are no vulnerabilities? Should we deny that possibility?

@Desvelao
Copy link
Member

Desvelao commented Apr 5, 2021

Testing:

  • The Export formatted button allows us to use it when there are not vulnerabilities. Should the button be disabled?
    image

Is there a chance someone wants a report showing there are no vulnerabilities? Should we deny that possibility?

The Export formatted doesn't donwload any file when the table is empty:
image

@asteriscos
Copy link
Member Author

Testing:

  • The Export formatted button allows us to use it when there are not vulnerabilities. Should the button be disabled?
    image

Is there a chance someone wants a report showing there are no vulnerabilities? Should we deny that possibility?

The Export formatted doesn't donwload any file when the table is empty:
image

Fair enough, disabling the button when there are no vulnerabilities is the quickest solution to that issue.

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.

tested ✔️
LGTM! Great job 🎉

@frankeros frankeros merged commit 75f52f2 into 4.2-7.10 Apr 7, 2021
@frankeros frankeros deleted the feature/vulnerabilities-view-that-affect-each-agent branch April 7, 2021 17:49
@frankeros frankeros changed the title Feature/vulnerabilities view that affect each agent Added vulnerabilities inventory that affect to an agent Apr 15, 2021
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 information related to the CVEs that affect each agent in the Wazuh UI
3 participants