Fix UI interval for add sticky policy

This commit is contained in:
bfederle 2012-01-20 15:20:23 -08:00
parent 3e365ad8c2
commit 3f07346087
1 changed files with 11 additions and 4 deletions

View File

@ -1678,9 +1678,11 @@
pollAsyncJobResult({
_custom: args._custom,
complete: function(args) {
complete: function(args) {
// Create stickiness policy
if (stickyData && stickyData.methodname != 'none') {
if (stickyData &&
stickyData.methodname &&
stickyData.methodname != 'none') {
var stickyURLData = '';
var stickyParams;
@ -1721,16 +1723,21 @@
jobId: json.createLBStickinessPolicy.jobid,
},
complete: function(args) {
clearInterval(addStickyCheck);
complete();
clearInterval(addStickyCheck);
},
error: function(args) {
complete();
cloudStack.dialog.notice({ message: args.message });
clearInterval(addStickyCheck);
}
});
}, 1000);
},
error: error
error: function(json) {
complete();
cloudStack.dialog.notice({ message: parseXMLHttpResponse(json) });
}
});
} else {
complete();