Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FIXED JENKINS-20772] Properly render response in case Apply results …
…in an error page.
- Loading branch information
Showing
1 changed file
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0e8195c
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.
Would probably suffice to show just
doc.getElementById("main-panel")
for regular error dialogs. To make sure it's a regular error dialog, could wrap the error incore/src/main/resources/jenkins/model/Jenkins/oops.jelly
in anotherdiv
withid="error-description"
attribute, and show just that usinggetElementById
, but keepgetElementsByTagName('body')[0]
as fallback if no such element is found?0e8195c
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.
Could make refinements such as these. My priority was to make sure something descriptive was displayed.
0e8195c
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.
Suggestion implemented in #1076
I don't know how to make the dialog scrollable though (issue already present with just this change as well, Firefox 26 on OS X 10.8.6). Any ideas? The problem is that for the test case you provided (invalid expression in freestyle job's cron trigger), you don't even get to see the wrapped AntlrExceptions that actually explain what's wrong.
0e8195c
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.
Nor I. Beyond my knowledge of YUI.
0e8195c
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.
Scrolling fixed in #1077. The container div had automatic size, so it was way larger than the dialog box and cut off by some YUI container element with
overflow:hidden
. This PR fixes that by defining a size slightly smaller than the dialog and anoverflow:scroll
style attribute.