cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/ui-cisco-asa1000v-support to c9bb535
Date Thu, 09 May 2013 18:38:13 GMT
Updated Branches:
  refs/heads/ui-cisco-asa1000v-support 2ac22efc5 -> c9bb5356b


CLOUDSTACK-1816: Cisco VNMC ASA1000v - UI - CiscoVNMC - populate listView.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c9bb5356
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c9bb5356
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c9bb5356

Branch: refs/heads/ui-cisco-asa1000v-support
Commit: c9bb5356bde4dcd40ebaea0e6ed0b36560f86267
Parents: 2ac22ef
Author: Jessica Wang <jessicawang@apache.org>
Authored: Thu May 9 11:37:30 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Thu May 9 11:37:50 2013 -0700

----------------------------------------------------------------------
 .../vnmcNetworkProvider/vnmcNetworkProvider.js     |   35 +++++----------
 1 files changed, 11 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c9bb5356/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
----------------------------------------------------------------------
diff --git a/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js b/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
index 135cefa..c4c371c 100644
--- a/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
+++ b/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
@@ -26,12 +26,8 @@
     var vnmcListView = {
       id: 'vnmcDevices',
       fields: {
-        name: { label: 'label.name' },
-        ipaddress: { label: 'label.ip.address' },
-        state: { label: 'label.state', indicator: {
-          'Enabled': 'on',
-          'Disabled': 'off'
-        }}
+        resourcename: { label: 'Resource Name' },
+        provider: { label: 'Provider' }
       },
           
       actions: {
@@ -63,16 +59,14 @@
             }
           },
 
-          action: function(args) {
-            //debugger;
+          action: function(args) {            
             $.ajax({
               url: createURL('listNetworkServiceProviders'),
               data: {
                 name: 'CiscoVnmc',
                 physicalnetworkid: args.context.physicalNetworks[0].id      
               },
-              success: function(json){
-                //debugger;
+              success: function(json){                
                 var items = json.listnetworkserviceprovidersresponse.networkserviceprovider;
                 if(items != null && items.length > 0) {
                   var ciscoVnmcProvider = items[0];
@@ -97,8 +91,7 @@
                           url: createURL("queryAsyncJobResult&jobId="+jobId),
                           dataType: "json",
                           success: function(json) {
-                            var result = json.queryasyncjobresultresponse;
-                            //debugger;
+                            var result = json.queryasyncjobresultresponse;              
             
                             if (result.jobstatus == 0) {
                               return; //Job has not completed
                             }
@@ -124,8 +117,7 @@
                 }
               }
             });
-            //debugger;      
-            
+                       
             var enableCiscoVnmcProviderFn = function(ciscoVnmcProvider){              
               $.ajax({
                 url: createURL('updateNetworkServiceProvider'),
@@ -162,8 +154,7 @@
               });              
             }                        
             
-            var addCiscoVnmcResourceFn = function(){
-              //debugger;
+            var addCiscoVnmcResourceFn = function(){              
               var data = {
                 physicalnetworkid: args.context.physicalNetworks[0].id,
                 hostname: args.data.hostname,
@@ -174,9 +165,8 @@
               $.ajax({
                 url: createURL('addCiscoVnmcResource'),
                 data: data,                 
-                success: function(json) {
-                  //debugger;
-                  var item = json.addciscovnmcresourceresponse.ciscovnmcresource;
+                success: function(json) {    
+                  var item = json.addCiscoVnmcResource.CiscoVnmcResource;
                   args.response.success({data: item});
                 },
                 error: function(data) {
@@ -201,12 +191,9 @@
             physicalnetworkid: args.context.physicalNetworks[0].id
           },
           success: function(json){   
+            var items = json.listCiscoVnmcResources["null"]; //change it after API is fixed.
             args.response.success({
-              data: [
-                { name: 'device1', ipaddress: '192.168.1.12', state: 'Enabled' },
-                { name: 'device2', ipaddress: '192.168.1.13', state: 'Disabled' },
-                { name: 'device3', ipaddress: '192.168.1.14', state: 'Enabled' }
-              ]
+              data: items
             });            
           }
         });  


Mime
View raw message