1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

B: Solved bug for 1 disk in disk_resize (#378)

This commit is contained in:
Abel Coronado 2017-07-07 11:18:10 +02:00 committed by Ruben S. Montero
parent d993e5244d
commit e98ccd52b9

View File

@ -596,11 +596,15 @@ define(function(require) {
context.on('click', '.disk_resize', function() {
var disk_id = $(this).parents('tr').attr('disk_id');
var disk_size = "";
$.each(that.element.TEMPLATE.DISK, function(){
if(this.DISK_ID == disk_id){
disk_size = this.SIZE * 1024;
}
});
if(Array.isArray(that.element.TEMPLATE.DISK)){
$.each(that.element.TEMPLATE.DISK, function(){
if (this.DISK_ID == disk_id){
disk_size = this.SIZE * 1024;
}
});
} else {
disk_size = that.element.TEMPLATE.DISK.SIZE * 1024;
}
var dialog = Sunstone.getDialog(DISK_RESIZE_DIALOG_ID);
dialog.setParams(
{ element: that.element,