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

Feature/2702/wui rules #2708

Merged
merged 8 commits into from
Dec 29, 2020
Merged

Feature/2702/wui rules #2708

merged 8 commits into from
Dec 29, 2020

Conversation

CPAlejandro
Copy link
Contributor

@CPAlejandro CPAlejandro commented Dec 24, 2020

Hi team, we're resolving issue #2702 with that following steps:

return WzAPIUtils.isReservedID(item) && <EuiBadge color="primary">Reserved</EuiBadge>;
render (item, obj){
if(WzAPIUtils.isReservedID(item)){
if( (obj.name == "wui_elastic_admin" || obj.name == "wui_opendistro_admin")){
Copy link
Contributor

Choose a reason for hiding this comment

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

always when it is possible, try to compare with numbers instead of strings, the id should be the field to compare
and use constants, to avoid avoid keeping values in different places in code

Copy link
Contributor Author

@CPAlejandro CPAlejandro Dec 28, 2020

Choose a reason for hiding this comment

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

Okay, so I proceed to change it and i will keep in mind for future occasions. Thank you!

@Desvelao Desvelao added the type/enhancement Enhancement issue label Dec 24, 2020
@CPAlejandro
Copy link
Contributor Author

image
Here I show you the result.

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! Good Job!

return WzAPIUtils.isReservedID(item) && <EuiBadge color="primary">Reserved</EuiBadge>;
render (item, obj){
if(WzAPIUtils.isReservedID(item)){
if( (obj.id == 1 || obj.id == 2)){
Copy link
Contributor

Choose a reason for hiding this comment

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

it is recommended to use ===

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, it is changed and I will keep it in mind for future occasions. Thank you.

Copy link
Contributor

@gabiwassan gabiwassan left a comment

Choose a reason for hiding this comment

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

Great job!! 🚀

@Desvelao Desvelao linked an issue Dec 28, 2020 that may be closed by this pull request
1 task
@frankeros frankeros merged commit 7a9b760 into 4.0-7.9 Dec 29, 2020
@frankeros frankeros deleted the feature/2702/wui_rules branch December 29, 2020 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show the wui_ rules belong to wazuh-wui API user
4 participants