[Kimchi-devel] [PATCH 3/6] UI changes for new clone target_uri

Christy Perez christy at linux.vnet.ibm.com
Tue Apr 28 19:04:12 UTC 2015


Signed-off-by: Christy Perez <christy at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.guest_main.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index b66177c..c712bb4 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -203,10 +203,10 @@ kimchi.listVmsAuto = function() {
     }
     var getCloningGuests = function(){
         var guests = [];
-        kimchi.getTasksByFilter('status=running&target_uri='+encodeURIComponent('^/vms/*'), function(tasks) {
+        kimchi.getTasksByFilter('status=running&target_uri='+encodeURIComponent('^/vms/.+/clone'), function(tasks) {
             for(var i=0;i<tasks.length;i++){
                 var guestUri = tasks[i].target_uri;
-                var guestName = guestUri.substring(guestUri.lastIndexOf('/')+1, guestUri.length);
+                var guestName = guestUri.split('/')[2]
                 guests.push($.extend({}, kimchi.sampleGuestObject, {name: guestName, isCloning: true}));
                 if(kimchi.trackingTasks.indexOf(tasks[i].id)==-1)
                     kimchi.trackTask(tasks[i].id, null, function(err){
-- 
2.1.0




More information about the Kimchi-devel mailing list