You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/07/09 22:45:49 UTC

[07/50] [abbrv] git commit: updated refs/heads/ui-ucs to 9334dab

CLOUDSTACK-3230: UI add cluster remains in processing state


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

Branch: refs/heads/ui-ucs
Commit: 0d7d345339a9b3c034de9b979c3a33a3301cb8e5
Parents: f96b89f
Author: Isaac Chiang <is...@gmail.com>
Authored: Fri Jul 5 18:21:34 2013 +0800
Committer: Isaac Chiang <is...@gmail.com>
Committed: Fri Jul 5 18:21:34 2013 +0800

----------------------------------------------------------------------
 ui/scripts/system.js | 48 +++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d7d3453/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 70b4f8d..dd971ed 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -10373,36 +10373,36 @@
                   
                     //EXPLICIT DEDICATION
                     var array2 = [];
-                    if(args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked')== true){
+                    if(args.$form.find('.form-item[rel=isDedicated]').find('input[type=checkbox]').is(':Checked')== true) {
                       if(args.data.accountId != "")
                         array2.push("&account=" +todb(args.data.accountId));
                     
+                      if(clusterId != null){
+                        $.ajax({
+                          url:createURL("dedicateCluster&clusterId=" +clusterId +"&domainId=" +args.data.domainId + array2.join("")),
+                          dataType:"json",
+                          success:function(json){
+                            var jid = json.dedicateclusterresponse.jobid;
+                            args.response.success({
+                              _custom:
+                              {      jobId: jid
+                              },
+                              notification: {
+                                poll: pollAsyncJobResult
+                              },
 
-                    if(clusterId != null){
-                      $.ajax({
-                        url:createURL("dedicateCluster&clusterId=" +clusterId +"&domainId=" +args.data.domainId + array2.join("")),
-                        dataType:"json",
-                        success:function(json){
-                          var jid = json.dedicateclusterresponse.jobid;
-                          args.response.success({
-                            _custom:
-                            {      jobId: jid
-                            },
-                            notification: {
-                              poll: pollAsyncJobResult
-                            },
-
-                            data:$.extend(item, {state:'Enabled'})
-										      });
-
-                        },
+                              data:$.extend(item, {state:'Enabled'})
+										        });
 
-                        error:function(json){
-                          args.response.error(parseXMLHttpResponse(XMLHttpResponse));
-                        }
-                      });
+                          },
+                          error:function(json){
+                            args.response.error(parseXMLHttpResponse(XMLHttpResponse));
+                          }
+                        });
+                      }
+                    } else {
+                      args.response.success({data: item});
                     }
-                   }
                   },
                   error: function(XMLHttpResponse) {
                     var errorMsg = parseXMLHttpResponse(XMLHttpResponse);