diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index 0f82ef7a09c..f9e03256e65 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -63,7 +63,11 @@ var pollAsyncJobResult = function(args) { setTimeout(function() { $(window).trigger('cloudStack.fullRefresh'); }, 500); - } + } + + if (args._custom.onComplete) { + args._custom.onComplete(json); + } } else if (result.jobstatus == 2) { // Failed var msg = (result.jobresult.errortext == null)? "": result.jobresult.errortext;