You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by is...@apache.org on 2013/07/25 02:37:45 UTC
git commit: updated refs/heads/4.2 to e8f1ce3
Updated Branches:
refs/heads/4.2 4730e5593 -> e8f1ce3aa
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/e8f1ce3a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e8f1ce3a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e8f1ce3a
Branch: refs/heads/4.2
Commit: e8f1ce3aa4b5a30cc94626b16cbe1e5b002e2b37
Parents: 4730e55
Author: Isaac Chiang <is...@gmail.com>
Authored: Mon Jul 22 15:33:48 2013 +0800
Committer: Isaac Chiang <is...@gmail.com>
Committed: Thu Jul 25 08:37:14 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/e8f1ce3a/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index fd86816..569e978 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -10123,7 +10123,9 @@
jobId: jid
},
notification: {
- poll: pollAsyncJobResult
+ poll: pollAsyncJobResult,
+ interval: 4500,
+ desc: "Dedicate Pod"
},
data: item
@@ -10138,12 +10140,10 @@
});
}
- } else {
- args.response.success({
- data: item
- });
}
-
+ args.response.success({
+ data: item
+ });
},
error: function(XMLHttpResponse) {
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
@@ -11223,7 +11223,9 @@
jobId: jid
},
notification: {
- poll: pollAsyncJobResult
+ poll: pollAsyncJobResult,
+ interval: 4500,
+ desc: "Dedicate Cluster"
},
data: $.extend(item, {
@@ -11237,11 +11239,10 @@
}
});
}
- } else {
- args.response.success({
- data: item
- });
}
+ args.response.success({
+ data: item
+ });
},
error: function(XMLHttpResponse) {
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
@@ -12446,7 +12447,9 @@
jobId: jid
},
notification: {
- poll: pollAsyncJobResult
+ poll: pollAsyncJobResult,
+ interval: 4500,
+ desc: "Dedicate Host"
},
data: item
@@ -12460,12 +12463,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/e8f1ce3a/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index ddc275e..6b44d99 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);
}
}
);