mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-12 21:57:23 +03:00
Check if the image exists to show the resize slider
This commit is contained in:
parent
6a1c6e836d
commit
0294ed455f
@ -110,19 +110,22 @@ define(function(require){
|
||||
|
||||
var attr;
|
||||
|
||||
if (disabled){
|
||||
attr = UserInputs.parse("SIZE","O|fixed|"+label+"||"+disk.SIZE);
|
||||
} else {
|
||||
// Range from original size to size + 500GB
|
||||
var min = parseInt(disk.SIZE);
|
||||
var max = min + 512000;
|
||||
|
||||
attr = UserInputs.parse(
|
||||
"SIZE",
|
||||
"O|range|"+label+"|"+min+".."+max+"|"+min);
|
||||
if (disk.SIZE) {
|
||||
if (disabled){
|
||||
attr = UserInputs.parse("SIZE","O|fixed|"+label+"||"+disk.SIZE);
|
||||
} else {
|
||||
// Range from original size to size + 500GB
|
||||
var min = parseInt(disk.SIZE);
|
||||
var max = min + 512000;
|
||||
|
||||
attr = UserInputs.parse(
|
||||
"SIZE",
|
||||
"O|range|"+label+"|"+min+".."+max+"|"+min);
|
||||
}
|
||||
|
||||
UserInputs.insertAttributeInputMB(attr, $(".diskSlider", diskContext));
|
||||
}
|
||||
|
||||
UserInputs.insertAttributeInputMB(attr, $(".diskSlider", diskContext));
|
||||
})
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user