Add same launch instance error handling as image to instance
Previously, when launching an instance with an instance snapshot rather than with an image, the error handling was not as pleasant. I.e. the volume size was not automatically set to the minimum size and the error message would only appear after attempting to launch an instance. This is a small patch that addresses this and makes the user experience more friendly. Change-Id: Ib694f66c74e90ee2e15201673de953c08cf10122 Closes-bug: #1752360
This commit is contained in:
parent
6d4405951d
commit
3233de8f0d
|
@ -516,7 +516,8 @@
|
|||
function checkVolumeForImage() {
|
||||
var source = selection[0];
|
||||
|
||||
if (source && ctrl.currentBootSource === bootSourceTypes.IMAGE) {
|
||||
if (source && ctrl.currentBootSource === bootSourceTypes.IMAGE ||
|
||||
source && ctrl.currentBootSource === bootSourceTypes.INSTANCE_SNAPSHOT ) {
|
||||
var imageGb = source.size * 1e-9;
|
||||
var imageDisk = source.min_disk;
|
||||
ctrl.minVolumeSize = Math.ceil(Math.max(imageGb, imageDisk));
|
||||
|
|
Loading…
Reference in New Issue