cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seb...@apache.org
Subject [46/50] git commit: updated refs/heads/sdnextensions to bcfb4e6
Date Fri, 12 Jul 2013 07:51:41 GMT
CLOUDSTACK-3427: UI > UCS manager > implement associatesUcsProfileToBlade API.


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

Branch: refs/heads/sdnextensions
Commit: e93ef73e9f9b880e8311eef365940151a1e56a2b
Parents: 0331b8f
Author: Jessica Wang <jessicawang@apache.org>
Authored: Thu Jul 11 17:18:44 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Thu Jul 11 17:19:21 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js | 101 +++++++++++++++++++++++-----------------------
 1 file changed, 51 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e93ef73e/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 4080b6b..18c3df4 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -13104,6 +13104,7 @@
               blades: {
                 title: 'Blades',
                 listView: {
+                  id: 'blades',
                   fields: {
                     //dn: { label: 'Distinguished Name' },
                     chassis: { label: 'Chassis' }, 
@@ -13125,37 +13126,35 @@
                           data[i].bladeid = array1[2];
                         }
 
+                        
+                        //for testing only (begin)   
+                        /*
+                        var data = [
+                          {
+                            "id": "58c84a1d-6e46-44e3-b7ec-abaa876d1be3",
+                            "ucsmanagerid": "0c96f848-4306-47e5-a9ac-b76aad3557fb",
+                            "bladedn": "sys/chassis-1/blade-1"
+                          },
+                          {
+                            "id": "de5abadf-f294-4014-9fed-7ee37a9b8724",
+                            "ucsmanagerid": "0c96f848-4306-47e5-a9ac-b76aad3557fb",
+                            "bladedn": "sys/chassis-1/blade-2"
+                          }
+                        ];         
+                        for(var i = 0; i < data.length; i++) {
+                          var array1 = data[i].bladedn.split('/');                      
+                          data[i].chassis = array1[1];
+                          data[i].bladeid = array1[2];
+                        }  
+                        */
+                        //for testing only (end)
+                        
+                        
                         args.response.success({
                           data: data
                         });      
                       }                      
-                    });                           
-
-                    /*
-                    var data = [
-                      {
-                        "id": "58c84a1d-6e46-44e3-b7ec-abaa876d1be3",
-                        "ucsmanagerid": "0c96f848-4306-47e5-a9ac-b76aad3557fb",
-                        "bladedn": "sys/chassis-1/blade-1"
-                      },
-                      {
-                        "id": "de5abadf-f294-4014-9fed-7ee37a9b8724",
-                        "ucsmanagerid": "0c96f848-4306-47e5-a9ac-b76aad3557fb",
-                        "bladedn": "sys/chassis-1/blade-2"
-                      }
-                    ];                    
-                               
-                    for(var i = 0; i < data.length; i++) {
-                      var array1 = data[i].bladedn.split('/');                      
-                      data[i].chassis = array1[1];
-                      data[i].bladeid = array1[2];
-                    }
-
-                    args.response.success({
-                      data: data
-                    });      
-                    */
-                    
+                    });  
                   },                  
                   actions: {                      
                     associateProfileToBlade: {
@@ -13179,49 +13178,51 @@
                                 data: {
                                   ucsmanagerid: args.context.ucsManagers[0].id
                                 },
+                                async: false,
                                 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 });
+                                  }                                  
                                 }
-                              });
+                              });                              
+
+                              //for testing only (begin)     
+                              /*
+                              items.push({id: 'org-root/ls-testProfile1', description: 'org-root/ls-testProfile1'});
+                              items.push({id: 'org-root/ls-testProfile2', description: 'org-root/ls-testProfile2'});
+                              items.push({id: 'org-root/ls-testProfile3', description: 'org-root/ls-testProfile3'});
+                              items.push({id: 'org-root/ls-testProfile4', description: 'org-root/ls-testProfile4'});
+                              items.push({id: 'org-root/ls-testProfile5', description: 'org-root/ls-testProfile5'});
+                              items.push({id: 'org-root/ls-testProfile6', description: 'org-root/ls-testProfile6'});
+                              items.push({id: 'org-root/ls-testProfile7', description: 'org-root/ls-testProfile7'});
   
+                              */                             
+                              //for testing only (end)                              
+                              
+                              args.response.success({ data: items });
+                              
                             },
                             validation: { required: true }
                           }
                         }
                       },
-                      action: function(args) {
-                        /*
+                      action: function(args) {                        
                         $.ajax({
-                          url: createURL('associatesUscProfileToBlade'),
+                          url: createURL('associatesUcsProfileToBlade'),
                           data: {
                             ucsmanagerid: args.context.ucsManagers[0].id,
                             profiledn: args.data.profiledn, 
-                            bladeid: '1234567890' //to change later
+                            bladeid: args.context.blades[0].id
                           },
                           success: function(json) {
-                            
+                            //json.associateucsprofiletobladeresponse.ucsblade
+                            args.response.success({data: { associatedProfileDn: args.data.profiledn
}});
                           }
                         });
-                        */
-                        args.response.success({data: { associatedProfileDn: args.data.profiledn
}});
+                        
+                        //args.response.success({data: { associatedProfileDn: args.data.profiledn
}}); //for testing only
                       },
                       notification: {
                         poll: function(args) {


Mime
View raw message