Explicit Dedication - Host UI-API Integration code

This commit is contained in:
Pranav Saxena 2013-05-27 16:05:03 +05:30
parent d67c5a84cb
commit 80df36c182
1 changed files with 26 additions and 12 deletions

View File

@ -8985,7 +8985,12 @@
}
});
}
}
},
error: function(XMLHttpResponse) {
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
args.response.error(errorMsg);
}
});
},
@ -9906,14 +9911,6 @@
var item = json.addhostresponse.host[0];
hostId = json.addhostresponse.host[0].id;
/* args.response.success({
data: item
});
},
error: function(XMLHttpResponse) {
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
args.response.error(errorMsg);
}*/
//EXPLICIT DEDICATION
if(args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked')== true){
@ -9927,8 +9924,19 @@
url:createURL("dedicateHost&hostId=" +hostId +"&domainId=" +args.data.domainId + array2.join("")),
dataType:"json",
success:function(json){
var dedicatedObj = json.dedicatehostresponse.host;
args.response.success({ data: $.extend(item, dedicatedObj) });
var jid = json.dedicatehostresponse.host.jobid;
//args.response.success({ data: $.extend(item, dedicatedObj) });
args.response.success({
_custom:
{ jobId: jid
},
notification: {
poll: pollAsyncJobResult
},
data:item
});
},
@ -9937,7 +9945,13 @@
}
});
}
}
},
error: function(XMLHttpResponse) {
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
args.response.error(errorMsg);
}
});
},