Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-10-30 13:25:32 -0400
committerChristopher Frost2012-10-30 13:25:32 -0400
commitb2ebee1b3e80a5efd39388306e7eb16ff2647c79 (patch)
tree5c6a072a8714c71271ac414795313a378310536a
parentef9aa9bbacd622b8844cc8a95d7a7912e0400329 (diff)
downloadorg.eclipse.virgo.kernel-b2ebee1b3e80a5efd39388306e7eb16ff2647c79.tar.gz
org.eclipse.virgo.kernel-b2ebee1b3e80a5efd39388306e7eb16ff2647c79.tar.xz
org.eclipse.virgo.kernel-b2ebee1b3e80a5efd39388306e7eb16ff2647c79.zip
392821 The alert displayed when deploying artifacts handles bad input badly
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/artifacts.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/artifacts.js b/org.eclipse.virgo.management.console/src/main/webapp/js/artifacts.js
index 45e69254..b74e4f7b 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/artifacts.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/artifacts.js
@@ -447,6 +447,7 @@ var UploadManager = function() {
this.resetForm = function() {
$('#upload-list').empty();
+ $('#upload-target-id').empty();
$('#upload-list').append(self.getUploadFormElement('1'));
};
@@ -454,12 +455,15 @@ var UploadManager = function() {
if(self.uploading){
var iframe = $('#upload-target-id');
var results = $('#uploadResults', iframe[0].contentDocument).children();
-
- var resultString = '';
- $.each(results, function(i, result){
- resultString = resultString + '\n' + $(result).text();
- });
- alert('Deployment result\n\n' + resultString);
+ if(results.length == 0){
+ alert('Nothing Deployed');
+ }else{
+ var resultString = '';
+ $.each(results, function(i, result){
+ resultString = resultString + '\n' + $(result).text();
+ });
+ alert('Deployment result\n\n' + resultString);
+ }
self.resetForm();
self.uploading = false;
}

Back to the top