File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 15751575 if ( newDiskOffering != null && newDiskOffering . length > 0 ) {
15761576 array1 . push ( "&diskofferingid=" + encodeURIComponent ( newDiskOffering ) ) ;
15771577 }
1578- if ( selectedDiskOfferingObj . iscustomized == true ) {
1578+ if ( args . context . volumes [ 0 ] . type == "ROOT" || selectedDiskOfferingObj . iscustomized == true ) {
15791579 cloudStack . addNewSizeToCommandUrlParameterArrayIfItIsNotNullAndHigherThanZero ( array1 , args . data . newsize ) ;
15801580 }
15811581
15821582 var minIops ;
15831583 var maxIops
1584- if ( selectedDiskOfferingObj . iscustomizediops == true ) {
1584+ if ( selectedDiskOfferingObj != null && selectedDiskOfferingObj . iscustomizediops == true ) {
15851585 minIops = args . data . minIops ;
15861586 maxIops = args . data . maxIops ;
15871587 }
15931593 if ( maxIops != null && maxIops . length > 0 ) {
15941594 array1 . push ( "&maxiops=" + encodeURIComponent ( maxIops ) ) ;
15951595 }
1596- //if original disk size > new disk size
1597- if ( ( args . context . volumes [ 0 ] . type == "ROOT" )
1598- && ( args . context . volumes [ 0 ] . size > ( newSize * ( 1024 * 1024 * 1024 ) ) ) ) {
1596+ //if original disk size > new disk size
1597+ if ( args . context . volumes [ 0 ] . type == "ROOT" &&
1598+ args . context . volumes [ 0 ] . size > ( args . data . newsize * ( 1024 * 1024 * 1024 ) ) ) {
15991599 return args . response . error ( 'message.volume.root.shrink.disk.size' ) ;
16001600 }
16011601
1602-
16031602 $ . ajax ( {
16041603 url : createURL ( "resizeVolume&id=" + args . context . volumes [ 0 ] . id + array1 . join ( "" ) ) ,
16051604 dataType : "json" ,
You can’t perform that action at this time.
0 commit comments