CLOUDSTACK-7777: UI > storage > volume > attach disk > virtual machine dropdown > remove unnecessary module check.

This commit is contained in:
Jessica Wang 2014-10-23 12:09:43 -07:00
parent 4e1284147e
commit fed5422c10

View File

@ -905,11 +905,6 @@
});
}
var volumeDrEnabled = false;
if (isModuleIncluded("dr")) {
volumeDrEnabled = cloudStack.dr.sharedFunctions.isVolumeDrEnabled(args.context.volumes[0]);
}
$(['Running', 'Stopped']).each(function() {
$.ajax({
url: createURL('listVirtualMachines'),
@ -920,20 +915,10 @@
success: function(json) {
var instanceObjs = json.listvirtualmachinesresponse.virtualmachine;
$(instanceObjs).each(function() {
if (isModuleIncluded("dr")) {
var vmDrEnabled = cloudStack.dr.sharedFunctions.isVmDrEnabled(this);
if (vmDrEnabled == volumeDrEnabled) {
items.push({
id: this.id,
description: this.displayname ? this.displayname : this.name
});
}
} else {
items.push({
id: this.id,
description: this.displayname ? this.displayname : this.name
});
}
});
}
});