Pod explicit dedication Detail View
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a52b3139 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a52b3139 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a52b3139 Branch: refs/heads/master Commit: a52b3139c525afd5d8c13cef4129e5dea03d2747 Parents: 1553ec6 Author: Pranav Saxena <pranav.sax...@citrix.com> Authored: Sat May 25 02:15:44 2013 +0530 Committer: Pranav Saxena <pranav.sax...@citrix.com> Committed: Thu May 30 21:57:12 2013 +0530 ---------------------------------------------------------------------- ui/scripts/system.js | 58 ++++++++++++++++++++++++++++++++++----------- 1 files changed, 44 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a52b3139/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index f85e20f..70fb0e7 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -8866,23 +8866,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: {