Revision e98ccd52

View differences:

src/sunstone/public/app/tabs/vms-tab/panels/storage.js
596 596
      context.on('click', '.disk_resize', function() {
597 597
        var disk_id = $(this).parents('tr').attr('disk_id');
598 598
        var disk_size = "";
599
        $.each(that.element.TEMPLATE.DISK, function(){
600
          if(this.DISK_ID == disk_id){
601
            disk_size = this.SIZE * 1024;
602
          }
603
        });
599
        if(Array.isArray(that.element.TEMPLATE.DISK)){
600
          $.each(that.element.TEMPLATE.DISK, function(){
601
            if (this.DISK_ID == disk_id){
602
              disk_size = this.SIZE * 1024;
603
            }
604
          });
605
        } else {
606
            disk_size = that.element.TEMPLATE.DISK.SIZE * 1024;
607
        }
604 608
        var dialog = Sunstone.getDialog(DISK_RESIZE_DIALOG_ID);
605 609
        dialog.setParams(
606 610
          { element: that.element,

Also available in: Unified diff