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

Bugfix/cluster delay error #2651

Merged
merged 8 commits into from
Nov 30, 2020
Merged

Bugfix/cluster delay error #2651

merged 8 commits into from
Nov 30, 2020

Conversation

pablomarga
Copy link
Contributor

Hi team! This PR solves the delay problem restarting the cluster when you edit a rule.

Closes #2640

@pablomarga pablomarga requested review from Desvelao and jsanchez91 and removed request for Desvelao November 23, 2020 15:59
@jsanchez91 jsanchez91 marked this pull request as draft November 25, 2020 16:54
Copy link
Contributor

@jsanchez91 jsanchez91 left a comment

Choose a reason for hiding this comment

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

Please check the requested changes and update the CHANGELOG file with the Issue.

Remember to update your branch with the last changes in the branch 4.0-7.9

this.props.onRestarted();
this.showToast('success', `${data.restarted === 'cluster' ? 'Restarting cluster, it will take up to 30 seconds.': 'Manager was restarted'}`)
this.showToast('success', `${data.restarted === 'cluster' ? 'Cluster was restarted': 'Manager was restarted'}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

If the possible values of data.restarted are cluster or manager change the string template to:

`${data.restarted} was restarted`

const del = data.delay;
delete data.delay;
setTimeout(() => {
this.makeRequest(method, path, data, id, reply, token).then(console.log).catch(console.log);
Copy link
Member

Choose a reason for hiding this comment

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

I think we should log here, maybe.

@jsanchez91 jsanchez91 marked this pull request as ready for review November 30, 2020 14:36
Copy link
Contributor

@jsanchez91 jsanchez91 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

Manager restart in rule editor does not work with Wazuh cluster enabled
3 participants