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.

This commit is contained in:
Jessica Wang 2014-01-10 16:26:44 -08:00
parent 8ee61f3a57
commit 5adc778d88
1 changed files with 3 additions and 14 deletions

View File

@ -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 {