[Kimchi-devel] [PATCH v2] [Kimchi] Issue #948: Kimchi not throwing errors when migration is performed and gives impression of migration doesn't work

Daniel Henrique Barboza dhbarboza82 at gmail.com
Tue Jun 28 13:52:54 UTC 2016


Reviewed-by: Daniel Barboza <dhbarbza82 at gmail.com>
Tested-by: Daniel Barboza <dhbarbza82 at gmail.com>

On 06/23/2016 03:37 PM, sguimaraes943 at gmail.com wrote:
> From: Samuel Guimarães <sguimaraes943 at gmail.com>
>
> Signed-off-by: Samuel Guimarães <sguimaraes943 at gmail.com>
> ---
>   ui/js/src/kimchi.guest_livemigration.js | 9 +++++----
>   ui/js/src/kimchi.guest_main.js          | 5 ++---
>   2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/ui/js/src/kimchi.guest_livemigration.js b/ui/js/src/kimchi.guest_livemigration.js
> index 5bec039..613fd9e 100644
> --- a/ui/js/src/kimchi.guest_livemigration.js
> +++ b/ui/js/src/kimchi.guest_livemigration.js
> @@ -24,7 +24,7 @@ kimchi.guest_livemigration_main = function() {
>   
>   kimchi.getOngoingMigration = function(guestName, toDelete) {
>       var guests = [];
> -    kimchi.getTasksByFilter('status=running&target_uri=' + encodeURIComponent('^/plugins/kimchi/vms/' + guestName + '/migrate'), function(tasks) {
> +    kimchi.getTasksByFilter('status=running&target_uri='+ encodeURIComponent('^/plugins/kimchi/vms/' + guestName + '/migrate'), function(tasks) {
>           for (var i = 0; i < tasks.length; i++) {
>               var guestUri = tasks[i].target_uri;
>               var guestName = guestUri.split('/')[4];
> @@ -42,6 +42,7 @@ kimchi.getOngoingMigration = function(guestName, toDelete) {
>                   }
>                   kimchi.listVmsAuto();
>               }, function(guests) {
> +                wok.message.error('<strong>'+guestName+'</strong>: '+guests.message,'#alert-container', true, 'failed-migration-'+guests.id);
>                   return;
>               }, function(guests) {
>                   return;
> @@ -96,7 +97,7 @@ kimchi.getLiveMigrationInputValues = function() {
>   
>   kimchi.setupLiveMigrationFormEvent = function() {
>       $("#migrateFormOk").prop("disabled", true);
> -    $("#remote_host").on("change keyup", function(event) {
> +    $("#remote_host").on("keyup", function(event) {
>           if (!this.value) {
>               $(this).parent().addClass('has-error');
>           } else {
> @@ -104,7 +105,7 @@ kimchi.setupLiveMigrationFormEvent = function() {
>           }
>           kimchi.updateLiveMigrationButton();
>       });
> -    $("#user").on("change keyup", function(event) {
> +    $("#user").on("keyup", function(event) {
>           if (this.value && !$("#password").val()) {
>               $("#user").parent().removeClass('has-warning');
>               $("#password").parent().addClass('has-warning');
> @@ -114,7 +115,7 @@ kimchi.setupLiveMigrationFormEvent = function() {
>           }
>           kimchi.updateLiveMigrationButton();
>       });
> -    $("#password").on("change keyup", function(event) {
> +    $("#password").on("keyup", function(event) {
>           if (this.value && !$("#user").val()) {
>               $("#user").parent().addClass('has-warning');
>           } else {
> diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
> index c11ba5c..8e12fb2 100644
> --- a/ui/js/src/kimchi.guest_main.js
> +++ b/ui/js/src/kimchi.guest_main.js
> @@ -418,7 +418,8 @@ kimchi.listVmsAuto = function() {
>                                   });
>                               });
>                           }
> -                        $('.wok-mask').fadeOut(300, function() {});
> +                        $('.wok-mask').fadeOut(300, function() {
> +                        });
>                       } else {
>                           $('.grid-control').addClass('hidden');
>                           $('#guestListField').hide();
> @@ -444,7 +445,6 @@ kimchi.listVmsAuto = function() {
>       }
>   };
>   
> -
>   kimchi.createGuestLi = function(vmObject, prevScreenImage, openMenu) {
>       var result = kimchi.guestElem.clone();
>       //Setup the VM list entry
> @@ -882,7 +882,6 @@ kimchi.guest_main = function() {
>       kimchi.listVmsAuto();
>   };
>   
> -
>   kimchi.guest_clonevm_main = function() {
>      kimchi.initCloneDialog();
>   };




More information about the Kimchi-devel mailing list