Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JENKINS-48080] Shows errors
- Loading branch information
Showing
with
4 additions
and
3 deletions.
-
+4
−3
war/src/main/js/pluginSetupWizardGui.js
|
@@ -889,16 +889,17 @@ var createPluginSetupWizard = function(appendTarget) { |
|
|
// ignore JSON parsing issues, this may be HTML |
|
|
} |
|
|
// we get 200 OK |
|
|
var $page = $(data); |
|
|
var responseText = data.responseText; |
|
|
var $page = $(responseText); |
|
|
var $errors = $page.find('.error'); |
|
|
if($errors.length > 0) { |
|
|
var $main = $page.find('#main-panel').detach(); |
|
|
if($main.length > 0) { |
|
|
data = data.replace(/body([^>]*)[>](.|[\r\n])+[<][/]body/,'body$1>'+$main.html()+'</body'); |
|
|
responseText = responseText.replace(/body([^>]*)[>](.|[\r\n])+[<][/]body/,'body$1>'+$main.html()+'</body'); |
|
|
} |
|
|
var doc = $('iframe[src]').contents()[0]; |
|
|
doc.open(); |
|
|
doc.write(data); |
|
|
doc.write(responseText); |
|
|
doc.close(); |
|
|
} |
|
|
else { |
|
|