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 Infrastructure params and Policy params rows in NS description #792

Open
wants to merge 3 commits into
base: NSDescriptionUpdate
Choose a base branch
from

Conversation

AlexFalessi
Copy link
Member

No description provided.

@activeeon-bot
Copy link

Can one of the admins verify this patch?

@@ -451,4 +471,11 @@ public void hostSelected(Host h) {
this.selNS = null;
this.selNode = null;
}

private String[] splitAndExtractNameAndParamsFromDescription(String input) {
String[] elements = input.split(",");
Copy link
Member

Choose a reason for hiding this comment

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

not ideal, this suppose you have a comma after the infrastructure or policy name.
you should extract the first word of the input instead.
String[] elements = input.split("[,\s]+");

@@ -451,4 +471,21 @@ public void hostSelected(Host h) {
this.selNS = null;
this.selNode = null;
}

private String[] splitAndExtractNameAndParamsFromDescription(String input) {
String[] elements = input.split("[,\\s]+");
Copy link
Member

@fviale fviale Aug 22, 2023

Choose a reason for hiding this comment

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

you can make this code much simpler

return input.trim().split("[,\\s]+", 2);

Copy link
Member Author

Choose a reason for hiding this comment

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

Very nice !

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