From da1791fc3e553744eb70cb4bea21a1372441fc3e Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Tue, 14 May 2013 16:37:54 +0530 Subject: [PATCH] Dedicate POD -UI and API integration code --- ui/scripts/system.js | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index a3e313177a7..b67fdc7412d 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -8043,7 +8043,7 @@ dataType: "json", success: function(json) { var item = json.createpodresponse.pod; - args.response.success({ + /* args.response.success({ data:item }); }, @@ -8051,7 +8051,41 @@ 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){ + var array2 = []; + if(args.data.accountId != "") + array2.push("&accountId=" +todb(args.data.accountId)); + + if(podId != null){ + $.ajax({ + url:createURL("dedicatePod&podId=" +podId +"&domainId=" +args.data.domainId + array2.join("")), + dataType:"json", + success:function(json){ + var dedicatedObj = json.dedicatepodresponse.host; + args.response.success({data:item}); + + }, + + error:function(json){ + + args.response.error(parseXMLHttpResponse(XMLHttpResponse)); + } + }); + + } + } + }, + error: function(XMLHttpResponse) { + var errorMsg = parseXMLHttpResponse(XMLHttpResponse); + args.response.error(errorMsg); + } + + }); + + }, notification: {