diff --git a/ui/modules/vnmcAsa1000v/vnmcAsa1000v.js b/ui/modules/vnmcAsa1000v/vnmcAsa1000v.js index 6a29c707551..621c52a3ddc 100644 --- a/ui/modules/vnmcAsa1000v/vnmcAsa1000v.js +++ b/ui/modules/vnmcAsa1000v/vnmcAsa1000v.js @@ -32,8 +32,7 @@ physicalnetworkid: args.context.physicalNetworks[0].id }, success: function(json){ - var items = json.listCiscoAsa1000vResources["null"]; //waiting for Koushik to fix object name to be "CiscoAsa1000vResource" instead of "null" - //var items = json.listCiscoAsa1000vResources.CiscoAsa1000vResource; + var items = json.listCiscoAsa1000vResources.CiscoAsa1000vResource; args.response.success({ data: items }); } }); @@ -124,8 +123,7 @@ return 'delete CiscoASA1000v'; } }, - action: function(args) { - debugger; + action: function(args) { $.ajax({ url: createURL('deleteCiscoAsa1000vResource'), data: { @@ -164,16 +162,14 @@ } ], - dataProvider: function(args) { - debugger; + dataProvider: function(args) { $.ajax({ url: createURL('listCiscoAsa1000vResources'), data: { resourceid: args.context.asa1000vDevices[0].resourceid }, success: function(json) { - var item = json.listCiscoAsa1000vResources["null"][0]; //waiting for Koushik to fix object name to be "CiscoAsa1000vResource" instead of "null" - //var item = json.listCiscoAsa1000vResources.CiscoAsa1000vResource[0]; + var item = json.listCiscoAsa1000vResources.CiscoAsa1000vResource[0]; args.response.success({ data: item }); } }); diff --git a/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js b/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js index c4c371cbc4f..82a5a3e454b 100644 --- a/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js +++ b/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js @@ -28,8 +28,21 @@ fields: { resourcename: { label: 'Resource Name' }, provider: { label: 'Provider' } - }, - + }, + dataProvider: function(args) { + $.ajax({ + url: createURL('listCiscoVnmcResources'), + data: { + physicalnetworkid: args.context.physicalNetworks[0].id + }, + success: function(json){ + var items = json.listCiscoVnmcResources.CiscoVnmcResource; + args.response.success({ + data: items + }); + } + }); + }, actions: { add: { label: 'Add VNMC device', @@ -182,21 +195,6 @@ } } } - }, - - dataProvider: function(args) { - $.ajax({ - url: createURL('listCiscoVnmcResources'), - data: { - physicalnetworkid: args.context.physicalNetworks[0].id - }, - success: function(json){ - var items = json.listCiscoVnmcResources["null"]; //change it after API is fixed. - args.response.success({ - data: items - }); - } - }); } }; @@ -233,14 +231,29 @@ title: 'label.details', fields: [ { - name: { label: 'label.name' } + resourcename: { label: 'Resource Name' } }, - { - ipaddress: { label: 'label.ip.address' }, - state: { label: 'label.state' } + { + resourceid: { label: 'Resource ID'}, + provider: { label: 'Provider' }, + RESOURCE_NAME: { label: 'Resource Name'} } ], - dataProvider: function(args) { + dataProvider: function(args) { + $.ajax({ + url: createURL('listCiscoVnmcResources'), + data: { + resourceid: args.context.vnmcDevices[0].id + }, + success: function(json){ + var item = json.listCiscoVnmcResources.CiscoVnmcResource[0]; + args.response.success({ + data: item + }); + } + }); + + args.response.success({ data: args.context.vnmcDevices[0] });