From 7f0e6561a535f409c78a3325c8ad03365b8b0395 Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Sat, 25 May 2013 02:15:44 +0530 Subject: [PATCH] Pod explicit dedication Detail View --- ui/scripts/system.js | 58 +++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 2f667a28318..f7ef0487daf 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -8331,23 +8331,53 @@ }, label: 'label.allocation.state' } - } + }, + + { + + isdedicated:{label:'Dedicated'}, + domainid:{label:'Domain ID'} + + } + ], dataProvider: function(args) { - $.ajax({ - url: createURL("listPods&id=" + args.context.pods[0].id), - dataType: "json", - async: true, - success: function(json) { - var item = json.listpodsresponse.pod[0]; - args.response.success({ - actionFilter: podActionfilter, - data:item - }); - } - }); - } + + $.ajax({ + url: createURL("listPods&id=" + args.context.pods[0].id), + dataType: "json", + async: false, + success: function(json) { + var item = json.listpodsresponse.pod[0]; + + + $.ajax({ + url:createURL("listDedicatedPods&podid=" +args.context.pods[0].id), + dataType:"json", + async:false, + success:function(json){ + var podItem = json.listdedicatedpodsresponse ? json.listdedicatedpodsresponse.dedicatedpod[0]:[]; + if (podItem.domainid != null) { + $.extend(item, podItem , { isdedicated: 'Yes' }); + } + }, + error:function(json){ + $.extend(item ,{ isdedicated: 'No' }) + + + } + }); + args.response.success({ + actionFilter: podActionfilter, + data: item + }); + + } + }); + + + } }, ipAllocations: {