You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/07/26 01:43:25 UTC

git commit: updated refs/heads/4.2 to a63d191

Updated Branches:
  refs/heads/4.2 a337cae7c -> a63d19185


CLOUDSTACK-3820: UI > Infrastructure menu > zone detail > UCS > associatesUcsProfileToBlade API has been changed from sync to async. Here is related UI change.


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

Branch: refs/heads/4.2
Commit: a63d191857475e0b20d3f3d56b74d6c92be33816
Parents: a337cae
Author: Jessica Wang <je...@apache.org>
Authored: Thu Jul 25 16:28:02 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Thu Jul 25 16:43:14 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js | 75 +++++++++++++++++++++++++++++++----------------
 1 file changed, 49 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a63d1918/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 569e978..0cca9b7 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -14229,15 +14229,14 @@
                                 title: 'Blades',
                                 listView: {
                                     id: 'blades',
-                                    fields: {
-                                        //dn: { label: 'Distinguished Name' },
+                                    fields: {                                        
                                         chassis: {
                                             label: 'Chassis'
                                         },
                                         bladeid: {
                                             label: 'Blade ID'
                                         },
-                                        associatedProfileDn: {
+                                        profiledn: {
                                             label: 'Associated Profile'
                                         }
                                     },
@@ -14324,14 +14323,14 @@
 
                                                             //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'});
-                              */
+								                            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({
@@ -14347,33 +14346,57 @@
                                             },
                                             action: function(args) {
                                                 $.ajax({
-                                                    url: createURL('associatesUcsProfileToBlade'),
+                                                    url: createURL('associatesUcsProfileToBlade'), //This API has been changed from sync to async at 7/25/2013
                                                     data: {
                                                         ucsmanagerid: args.context.ucsManagers[0].id,
                                                         profiledn: args.data.profiledn,
                                                         bladeid: args.context.blades[0].id
                                                     },
                                                     success: function(json) {
-                                                        /*
-                                                    	{
+                                                        //for testing only, comment it out before check in (begin)
+                                                    	json =                                         
+                                                        {
 														    "associateucsprofiletobladeresponse": {
-														        "ucsblade": {
-														            "id": "8f63030a-033c-458e-890f-b2c8863d9542",
-														            "ucsmanagerid": "9d8566c0-f870-4e89-9864-7a3e0b332558",
-														            "bladedn": "sys/chassis-1/blade-2"
-														        }
+														        "jobid": "dff5fa7f-e4a7-457b-92f1-2fede357e3d5"
 														    }
-														}   
-														*/                                                     	
+														};
+                                                    	//for testing only, comment it out before check in (end)
+                                                    	
+                                                    	var jid = json.associateucsprofiletobladeresponse.jobid;
                                                         args.response.success({
-                                                            data: {
-                                                                associatedProfileDn: args.data.profiledn
+                                                            _custom: {
+                                                                jobId: jid,
+                                                                getUpdatedItem: function(json) {                                                               	    
+                                                                	//for testing only, comment it out before check in (begin)
+                                                                	json = 
+                                                                	{
+                                                                	    "queryasyncjobresultresponse": {
+                                                                	        "accountid": "b24f6866-f0ca-11e2-8c16-d637902e3581",
+                                                                	        "userid": "b24f76df-f0ca-11e2-8c16-d637902e3581",
+                                                                	        "cmd": "org.apache.cloudstack.api.AssociateUcsProfileToBladeCmd",
+                                                                	        "jobstatus": 1,
+                                                                	        "jobprocstatus": 0,
+                                                                	        "jobresultcode": 0,
+                                                                	        "jobresulttype": "object",
+                                                                	        "jobresult": {
+                                                                	            "ucsblade": {
+                                                                	                "id": "84edb958-cf8a-4e71-99c6-190ccc3fe2bd",
+                                                                	                "ucsmanagerid": "07b5b813-83ed-4859-952c-c95cafb63ac4",
+                                                                	                "bladedn": "sys/chassis-1/blade-1"
+                                                                	            }
+                                                                	        },
+                                                                	        "created": "2013-07-25T15:10:13-0700",
+                                                                	        "jobid": "dff5fa7f-e4a7-457b-92f1-2fede357e3d5"
+                                                                	    }
+                                                                	}
+	                                                               	//for testing only, comment it out before check in (end)
+                                                                	                                                               	    
+                                                                    return json.queryasyncjobresultresponse.jobresult.ucsblade;
+                                                                }
                                                             }
-                                                        });
+                                                        });                                                    	
                                                     }
                                                 });
-
-                                                //args.response.success({data: { associatedProfileDn: args.data.profiledn }}); //for testing only
                                             },
                                             notification: {
                                                 poll: function(args) {