Commit d919a3ec authored by Estefany's avatar Estefany Committed by Francesc Guasch
Browse files

Fix/1154 improve new machine page (#1222)

fix(frontend): Improve users management in admin

   Modifies the regex to allow float values on the disk size

fixes #1150 & #1154
parent 464584c6
......@@ -680,7 +680,7 @@ sub create_volume {
confess "ERROR: Unknown args ".Dumper(\%args) if keys %args;
confess "Invalid size" if defined $size && ( $size == 0 || $size !~ /^\d+$/);
confess "Invalid size" if defined $size && ( $size == 0 || $size !~ /^\d+(\.\d+)?$/);
confess "Invalid capacity"
if defined $capacity && ( $capacity == 0 || $capacity !~ /^\d+$/);
......
......@@ -1522,7 +1522,7 @@ sub req_new_domain {
my $name = $c->param('name');
my $swap = ($c->param('swap') or 0);
my $vm = ( $c->param('backend') or 'KVM');
$swap *= 1024*1024*1024;
$swap = int($swap * 1024*1024*1024);
my %args = (
name => $name
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment