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

Add validation to the agent name #4939

Closed
wants to merge 14 commits into from
Closed

Conversation

Tostti
Copy link
Member

@Tostti Tostti commented Nov 30, 2022

Description

This PR aims to add a validation to the agent name, in order to avoid entering incorrect names that may cause errors in different places of the app.

As it is a fix of the deploy new agents section, it is a sub PR of #4933

Issues Resolved

#4927

Evidence

image
image
image

Test

Scenario: have a Wazuh environment and navigate to agents/deploy new agent
When the users enter a name with invalid characters
Then it should show an error telling that, and not show the deploy commands

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@Tostti Tostti requested a review from a team as a code owner November 30, 2022 16:56
@Tostti Tostti linked an issue Nov 30, 2022 that may be closed by this pull request
@Tostti Tostti self-assigned this Nov 30, 2022
chantal-kelm
chantal-kelm previously approved these changes Nov 30, 2022
Copy link
Member

@chantal-kelm chantal-kelm left a comment

Choose a reason for hiding this comment

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

Test: ✅
CR: ✅

@Tostti Tostti changed the base branch from 4931-fix-section-deploy-new-agent to 4.4-7.10 December 7, 2022 13:18
@Tostti Tostti dismissed chantal-kelm’s stale review December 7, 2022 13:18

The base branch was changed.

@github-actions
Copy link
Contributor

Code coverage (Jest) % values
Statements 8.69% ( 3215 / 36987 )
Branches 4.42% ( 1270 / 28709 )
Functions 7.58% ( 695 / 9174 )
Lines 8.76% ( 3102 / 35415 )

@Mayons95 Mayons95 self-requested a review December 20, 2022 14:08
Copy link
Contributor

@Mayons95 Mayons95 left a comment

Choose a reason for hiding this comment

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

LGTM
TR: ✔️

Screencast.from.20-12-22.11.08.02.webm

@Tostti Tostti closed this Dec 20, 2022
@Tostti Tostti deleted the fix/add-agent-name-validation branch December 20, 2022 15:25
@Tostti
Copy link
Member Author

Tostti commented Dec 20, 2022

Closed it because as it was previously intended to have as a base branch a different PR (#4933). When the base was changed several not related commits were referenced to the PR. For that reason, I will remake the PR with the correct base branch and the correct files changed

Replaced by #5021

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.

4 participants