-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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 download option to 'Console output', move 'View as plain text' and 'Copy' buttons to app bar #9169
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.
Is the copy option really the best thing as being the one that is directly accessible?
So far I never had really the need to copy the logs. But looking at the log in plain text I do from time to time
<l:copyButton ref="out" label="${%Copy}" /> | ||
<l:overflowButton> | ||
<dd:custom> | ||
<a class="jenkins-dropdown__item" href="consoleText" download="${it.displayName}.txt"> |
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.
Is it really useful to use the displayname here? If I choose a displayname that contains a /
this wouldn't be saveable.
something like
${it.parent.name}-{it.number}.txt
would guarantee a valid filename
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.
If I choose a displayname that contains a
/
this wouldn't be saveable.
Per https://html.spec.whatwg.org/multipage/links.html#attr-hyperlink-download
The attribute may have a value; the value, if any, specifies the default filename that the author recommends for use in labeling the resource in a local file system. There are no restrictions on allowed values, but authors are cautioned that most file systems have limitations with regard to what punctuation is supported in filenames, and user agents are likely to adjust filenames accordingly.
Trying this PR and DOM editing in Firefox, I get the file foo_bar_#1.txt
from the attribute value foo/bar/#1.txt
.
(parent.fullName
might still be better though. Unsure whether we should go for display names, there's arguments for and against IMO)
probably OK to have it like proposed. |
It took me a while to understand that the result is visible in freestyle jobs only. Isn't the PR that unifies the console in pipelines and freestyle jobs already merged? I think it is a good idea to move the actions to the app bar. I'm not sure why the copy action is a button (I never use this action, does it copy the whole log or the visible section?), but I very often use the "raw console" link. Maybe we can show the latter as button as well (or only this one). The app bar has a lot of space that is not used yet. Do we have anonymous user statistics about such preferences? |
same for me |
My guess is because it's a recently added action (#8960) that has been previously implemented like this? Copying seems like the least needed use case, and between view raw, and download raw, even seems redundant. (And it only copies the visible section, via JS.) |
Essentially that - I didn't want to undo the existing work, happy to prioritise the order of download/complete log however as I agree. |
ATH passing - jenkinsci/acceptance-test-harness#1563 |
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.
Needs a matching PR to Pipeline (probably workflow-job) as well.
Apart from that LGTM
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.
looks good. One minor thing but not blocking
Done - thanks! jenkinsci/workflow-job-plugin#439 |
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.
/label ready-for-merge
This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.
Thanks!
Hello, as I told in JENKINS-73657, This is a real regression because it is requires to open the "console output" view that may crash the browser if the log is heavy enough. this use case may have been forgotten. Could you submit the comeback of the "view as plain text" option in the lateral menu ? Thanks in advance, |
Hi there, same here.
Yes, that doesn't seem to have been taken into account. On our Jenkins we have huge logs, which leads to a broken "Console Output" view at approx. 80% of our jobs. We have to wait to get to the now hidden "View as plain text" button, because it is not clickable until the browser is able to breath again. That makes me very sad. I totally understand why this change come up, but unfortunately the "Console Output" view is not stable enough to handle huge logs.
Please bring it back or come up with a configurable Job "Navigation menu" or improve the "Console Output" view. No matter what you do, please make the community happy again :) |
Could be easily done with a plugin. |
Since 2.462.1, we can see the bug https://issues.jenkins.io/browse/JENKINS-73683. |
It seems unlikely to me, but you can experiment with it by building a Jenkins core yourself with this pull request reverted. See the CONTRIBUTING file for the instructions to build Jenkins core yourself. |
Before
After
Small MR to add a 'Download' link to the console output, as well as to move the controls to the app bar so that they're grouped. Let me know your thoughts on the updated placement - happy to discuss alternatives.
Testing done
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@jenkinsci/sig-ux
Before the changes are marked as
ready-for-merge
:Maintainer checklist