[Kimchi-devel] [PATCH] [Kimchi] Issue #948: Kimchi not throwing errors when migration is performed and gives impression of migration doesn't work
sguimaraes943 at gmail.com
sguimaraes943 at gmail.com
Wed Jun 22 15:53:52 UTC 2016
From: Samuel Guimarães <sguimaraes943 at gmail.com>
Signed-off-by: Samuel Guimarães <sguimaraes943 at gmail.com>
---
ui/js/src/kimchi.guest_main.js | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index c11ba5c..251882c 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -379,6 +379,17 @@ kimchi.listVmsAuto = function() {
return guests;
};
+ var listFailedTasks = function(){
+ kimchi.getTasksByFilter('status=failed&target_uri=' + encodeURIComponent('^/plugins/kimchi/vms/.+/migrate'), function(tasks) {
+ for (var i = 0; i < tasks.length; i++) {
+ var guestUri = tasks[i].target_uri;
+ var guestName = guestUri.split('/')[4];
+ var message = tasks[i].message;
+ wok.message('<strong>'+guestName+'</strong>: '+message,'alert-danger', null, true, null, 'failed-migration-'+tasks[i].id);
+ }
+ }, null, true);
+ };
+
kimchi.listVMs(function(result, textStatus, jqXHR) {
if (result && textStatus == "success") {
@@ -418,7 +429,9 @@ kimchi.listVmsAuto = function() {
});
});
}
- $('.wok-mask').fadeOut(300, function() {});
+ $('.wok-mask').fadeOut(300, function() {
+ listFailedTasks();
+ });
} else {
$('.grid-control').addClass('hidden');
$('#guestListField').hide();
@@ -444,7 +457,6 @@ kimchi.listVmsAuto = function() {
}
};
-
kimchi.createGuestLi = function(vmObject, prevScreenImage, openMenu) {
var result = kimchi.guestElem.clone();
//Setup the VM list entry
@@ -882,7 +894,6 @@ kimchi.guest_main = function() {
kimchi.listVmsAuto();
};
-
kimchi.guest_clonevm_main = function() {
kimchi.initCloneDialog();
};
--
1.8.3.1
More information about the Kimchi-devel
mailing list