From 5adc778d88dd00c00f777de9fcf1506890934137 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 10 Jan 2014 16:26:44 -0800 Subject: [PATCH] CLOUDSTACK-5831: UI > Volumes > take snapshot > get "quiescevm" property from listVolumes API instead of listStoragePools API since regular-user/domain-admin don't have access to listStoragePools API. --- ui/scripts/storage.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 603a82f9d87..1cd8d2e594e 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -579,20 +579,10 @@ label: 'label.quiesce.vm', isBoolean: true, isHidden: function(args) { - var hidden = true; - $.ajax({ - url: createURL('listStoragePools&id='+args.context.volumes[0].storageid), - dataType: "json", - async: false, - success: function(json) { - if (json.liststoragepoolsresponse.storagepool[0].storagecapabilities.VOLUME_SNAPSHOT_QUIESCEVM == 'true') - hidden = false; + if (args.context.volumes[0].quiescevm == true) + return false; else - hidden = true; - } - }); - - return hidden; + return true; } } } @@ -1752,7 +1742,6 @@ title: 'label.action.create.volume', desc: '', preFilter: function(args) { - debugger; if (g_regionsecondaryenabled == true) { args.$form.find('.form-item[rel=zoneid]').css('display', 'inline-block'); } else {