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

Erasing windows update option in wrong cases #3569

Merged

Conversation

CPAlejandro
Copy link
Contributor

Hi guys,

We disabled Windows Update part of Inventory PDF in agents with an operative system different from Windows.

To test it, go to Agents, click an agent without Windows, go to Inventory Section and generate a PDF. Then go to the end of that and see if Windows Update section appers.

If you can, try as well with a Windows agent to check that in this case, this section appears.

Closes #3566

@CPAlejandro CPAlejandro self-assigned this Aug 18, 2021
Copy link
Member

@mpRegalado mpRegalado left a comment

Choose a reason for hiding this comment

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

CR: LGTM ✔️
Testing: LGTM ✔️

@frankeros frankeros changed the base branch from 4.2-7.10 to 4.2.0-7.10-rc-11 August 18, 2021 13:31
@frankeros frankeros changed the base branch from 4.2.0-7.10-rc-11 to 4.2-7.10 August 18, 2021 13:51
@frankeros frankeros force-pushed the fix/3566-windows-update-in-linux-agent-inventory branch from e4af80d to 76ba745 Compare August 18, 2021 13:59
@frankeros frankeros changed the base branch from 4.2-7.10 to 4.2.0-7.10-rc-11 August 18, 2021 14:00
@@ -1906,7 +1906,7 @@ export class WazuhReportingCtrl {
]
}
},
{
agentOs === 'windows' && {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a bad implementation, is not a good practice using a ternary in an array definition
please use a different approach, maybe inserting after the declaration of the array with a conditional

also, check if this endpoint is used for another SO but windows

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 change it using your suggestions. Thanks you!

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.

LGTM!

@frankeros frankeros merged commit ed85068 into 4.2.0-7.10-rc-11 Aug 20, 2021
@frankeros frankeros deleted the fix/3566-windows-update-in-linux-agent-inventory branch August 20, 2021 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants