Update the clone tasks GET call.
Signed-off-by: Christy Perez <christy(a)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 21caf1b..e21b51f 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