cloudstack 3.0 UI - VPC - IP Addresses - Port Forwarding - Add VM - populate only VMs under selected tier.

This commit is contained in:
Jessica Wang 2012-07-10 18:40:58 -07:00
parent 3bb48742b8
commit f0fb52e346
1 changed files with 24 additions and 10 deletions

View File

@ -783,15 +783,23 @@
context: context,
listView: $.extend(true, {}, cloudStack.sections.instances, {
listView: {
dataProvider: function(args) {
$.ajax({
dataProvider: function(args) {
var networkid;
if('vpc' in args.context)
networkid = args.context.multiData.tier;
else
networkid = args.context.ipAddresses[0].associatednetworkid;
var data = {
page: args.page,
pageSize: pageSize,
networkid: networkid,
listAll: true
};
$.ajax({
url: createURL('listVirtualMachines'),
data: {
page: args.page,
pageSize: pageSize,
networkid: args.context.networks[0].id,
listAll: true
},
data: data,
dataType: 'json',
async: true,
success: function(data) {
@ -2465,11 +2473,17 @@
listView: $.extend(true, {}, cloudStack.sections.instances, {
listView: {
dataProvider: function(args) {
var data = {
var networkid;
if('vpc' in args.context)
networkid = args.context.multiData.tier;
else
networkid = args.context.ipAddresses[0].associatednetworkid;
var data = {
page: args.page,
pageSize: pageSize,
listAll: true,
networkid: args.context.ipAddresses[0].associatednetworkid
networkid: networkid
};
if (!args.context.projects) {