-
Notifications
You must be signed in to change notification settings - Fork 67
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
avoid printing too long argument in Pipeline Steps visualization #71
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
This change looks fine in isolation, but I'm not very familiar with the visualization code here and would need to look a little closer to understand how it works. Do you have before/after screenshots for the change?
@@ -39,7 +40,7 @@ | |||
@DataBoundConstructor public ArgumentsColumn() {} | |||
|
|||
public String get(FlowNode node) { | |||
return ArgumentsAction.getStepArgumentsAsString(node); | |||
return StringUtils.substring(ArgumentsAction.getStepArgumentsAsString(node), 0, 80); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to truncate to 77, and if the text was truncated, add ...
to make it clear that the content was truncated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, no problem
Please find attached screenshots. This is based on our production system but real strings were replaced. |
In some cases it is possible that node argument will be impossible to wrap properly and is displayed as single line. In this case pipeline steps view becomes hard to read because right most columns are moved beyond the screen. This requires scrolling which is not so convenient. Also status colum is outside of screen. This change cuts arguments list to 80 characters which should be fine for most of usages. Signed-off-by: Artur Harasimiuk <[email protected]>
Signed-off-by: Artur Harasimiuk <[email protected]>
In some cases it is possible that node argument will be impossible to
wrap properly and is displayed as single line. In this case pipeline
steps view becomes hard to read because right most columns are moved
beyond the screen. This requires scrolling which is not so convenient.
Also status colum is outside of screen.
This change cuts arguments list to 80 characters which should be fine
for most of usages.
Signed-off-by: Artur Harasimiuk [email protected]