cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isaacchi...@apache.org
Subject [2/2] git commit: updated refs/heads/master to 39a730c
Date Mon, 22 Jul 2013 07:34:58 GMT
CLOUDSTACK-3388:No error message shows when a dedicate operation failed during the creation
of a pod/cluster


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

Branch: refs/heads/master
Commit: 39a730ccd1977d13221a0897beb5047828aa24ae
Parents: a75a62a
Author: Isaac Chiang <isaacchiang@gmail.com>
Authored: Mon Jul 22 15:33:48 2013 +0800
Committer: Isaac Chiang <isaacchiang@gmail.com>
Committed: Mon Jul 22 15:33:48 2013 +0800

----------------------------------------------------------------------
 ui/scripts/system.js              | 35 +++++++++++++++++-----------------
 ui/scripts/ui/widgets/listView.js | 22 ++++++++++++---------
 2 files changed, 31 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/39a730cc/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 4da3511..eb15362 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -10126,7 +10126,9 @@
                                                                 jobId: jid
                                                             },
                                                             notification: {
-                                                                poll: pollAsyncJobResult
+                                                                poll: pollAsyncJobResult,
+                                                                interval: 4500,
+                                                                desc: "Dedicate Pod"    
                                                             },
 
                                                             data: item
@@ -10141,12 +10143,10 @@
                                                 });
 
                                             }
-                                        } else {
-                                            args.response.success({
-                                                data: item
-                                            });
                                         }
-
+                                        args.response.success({
+                                            data: item
+                                        });
                                     },
                                     error: function(XMLHttpResponse) {
                                         var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
@@ -11226,7 +11226,9 @@
                                                                 jobId: jid
                                                             },
                                                             notification: {
-                                                                poll: pollAsyncJobResult
+                                                                poll: pollAsyncJobResult,
+                                                                interval: 4500,
+                                                                desc: "Dedicate Cluster"
                                                             },
 
                                                             data: $.extend(item, {
@@ -11240,11 +11242,10 @@
                                                     }
                                                 });
                                             }
-                                        } else {
-                                            args.response.success({
-                                                data: item
-                                            });
                                         }
+                                        args.response.success({
+                                            data: item
+                                        });
                                     },
                                     error: function(XMLHttpResponse) {
                                         var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
@@ -12458,7 +12459,9 @@
                                                                 jobId: jid
                                                             },
                                                             notification: {
-                                                                poll: pollAsyncJobResult
+                                                                poll: pollAsyncJobResult,
+                                                                interval: 4500,
+                                                                desc: "Dedicate Host"
                                                             },
 
                                                             data: item
@@ -12472,12 +12475,10 @@
                                                     }
                                                 });
                                             }
-                                        } else {
-                                            args.response.success({
-                                                data: item
-                                            });
                                         }
-
+                                        args.response.success({
+                                            data: item
+                                        });
                                     },
 
                                     error: function(XMLHttpResponse) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/39a730cc/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index 4fd0b7f..a2d9063 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -185,6 +185,8 @@
                                     return false;
                                 });
 
+                                if(args.notification) notification = args.notification;
+
                                 notification._custom = args._custom;
 
                                 if (additional && additional.success) additional.success(args);
@@ -250,25 +252,27 @@
 
                                     // Error
 
-                                    function(args) {
+                                    function(errorArgs) {
                                         if (!isHeader) {
                                             if ($instanceRow.data('list-view-new-item'))
{
                                                 // For create forms
                                                 $instanceRow.remove();
                                             } else {
                                                 // For standard actions
-                                                replaceItem(
-                                                    $instanceRow,
-                                                    $.extend($instanceRow.data('json-obj'),
args.data),
-                                                    args.actionFilter ?
-                                                    args.actionFilter :
-                                                    $instanceRow.data('list-view-action-filter')
-                                                );
+                                                if(!args.notification) {
+                                                    replaceItem(
+                                                        $instanceRow,
+                                                        $.extend($instanceRow.data('json-obj'),
errorArgs.data),
+                                                        errorArgs.actionFilter ?
+                                                        errorArgs.actionFilter :
+                                                        $instanceRow.data('list-view-action-filter')
+                                                    );
+                                                }
                                             }
                                         }
 
                                         if (options.error) {
-                                            options.error(args);
+                                            options.error(errorArgs);
                                         }
                                     }
                                 );


Mime
View raw message