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/master to e30ce5c
Date Tue, 09 Jul 2013 22:00:15 GMT
Updated Branches:
  refs/heads/master bc8f32363 -> e30ce5c9e


CLOUDSTACK-3427: UI > UCS manager > implement listUcsProfile API.


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

Branch: refs/heads/master
Commit: e30ce5c9e8eb853c8897675c46f46a67858a0229
Parents: bc8f323
Author: Jessica Wang <jessicawang@apache.org>
Authored: Tue Jul 9 14:59:29 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Tue Jul 9 14:59:29 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e30ce5c9/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 8393c2a..6d1f6b8 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -12989,8 +12989,8 @@
             
             args.response.success({
               data: [
-                { id: '73695389-13ba-48e4-b661-a5e56966f577', name: 'UCS Manager 1', url:
'10.196.72.1' },
-                { id: '32588a3e-9d70-4a23-9117-42da48fa8c10', name: 'UCS Manager 2', url:
'10.196.72.2' }
+                { id: '11', name: 'UCS Manager 1', url: '10.196.72.1' },
+                { id: '11', name: 'UCS Manager 2', url: '10.196.72.2' }
               ]
             });
           },
@@ -13118,27 +13118,35 @@
                             label: 'Select Profile',
                             select: function(args) {
                               var items = [];     
-                              
-                              /*
+                                                            
                               $.ajax({
                                 url: createURL('listUcsProfile'),
                                 data: {
                                   ucsmanagerid: args.context.ucsManagers[0].id
                                 },
-                                success: function(json) {
+                                success: function(json) { //e.g. json == { "listucsprofileresponse"
: { "count":1 ,"ucsprofile" : [  {"ucsdn":"org-root/ls-testProfile"} ] } }
+                                  var ucsprofiles = json.listucsprofileresponse.ucsprofile;
+                                  if(ucsprofiles != null) {
+                                    for(var i = 0; i < ucsprofiles.length; i++) {
+                                      items.push({ id: ucsprofiles[i].ucsdn, description:
ucsprofiles[i].ucsdn });                                      
+                                    }
+                                  }
                                   
+                                  //for testing only (begin)
+                                  /*
+                                  items.push({id: 'Service_Profile_Demo1', description: 'Service_Profile_Demo1'});
+                                  items.push({id: 'Service_Profile_Demo2', description: 'Service_Profile_Demo2'});
+                                  items.push({id: 'Service_Profile_Demo3', description: 'Service_Profile_Demo3'});
+                                  items.push({id: 'Service_Profile_Demo4', description: 'Service_Profile_Demo4'});
+                                  items.push({id: 'Service_Profile_Demo5', description: 'Service_Profile_Demo5'});
+                                  items.push({id: 'Service_Profile_Demo6', description: 'Service_Profile_Demo6'});
+                                  items.push({id: 'Service_Profile_Demo7', description: 'Service_Profile_Demo7'});
+                                  */
+                                  //for testing only (end)
+                                  
+                                  args.response.success({ data: items });
                                 }
                               });
-                              */
-                              
-                              items.push({id: 'Service_Profile_Demo1', description: 'Service_Profile_Demo1'});
-                              items.push({id: 'Service_Profile_Demo2', description: 'Service_Profile_Demo2'});
-                              items.push({id: 'Service_Profile_Demo3', description: 'Service_Profile_Demo3'});
-                              items.push({id: 'Service_Profile_Demo4', description: 'Service_Profile_Demo4'});
-                              items.push({id: 'Service_Profile_Demo5', description: 'Service_Profile_Demo5'});
-                              items.push({id: 'Service_Profile_Demo6', description: 'Service_Profile_Demo6'});
-                              items.push({id: 'Service_Profile_Demo7', description: 'Service_Profile_Demo7'});
-                              args.response.success({data: items});
                             },
                             validation: { required: true }
                           }


Mime
View raw message