Commit fc3c32a9 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

[#8] Added new machine parameters in frontend

parent 15abc7c6
...@@ -62,14 +62,14 @@ ...@@ -62,14 +62,14 @@
</select> </select>
</div><br/> </div><br/>
<!--<div ng-if="backend == 'KVM'" class="from-group"> <div ng-if="backend == 'KVM'" class="from-group">
<label for="disk">Disk Size: (GB)</label> <label for="disk">Disk Size: (GB)</label>
<input class="form-control" ng-model="ddsize" type="number" name="ddsize" min="1" max="10" required=""> <input class="form-control" ng-model="ddsize" type="number" name="disk" min="1" max="10" required="">
</div> </div>
<div ng-show="backend == 'KVM' || backend == 'LXC'" class="from-group"> <div ng-show="backend == 'KVM' || backend == 'LXC'" class="from-group">
<label fro="ram">Ram: (GB)</label> <label for="memory">Ram: (GB)</label>
<input class="form-control" ng-model="ramsize" type="number" name="ramsize" min="1" max="4" required=""> <input class="form-control" ng-model="ramsize" type="number" name="memory" min="1" max="4" required="">
</div><br/>--> </div><br/>
<div ng-show="new_machineForm.$submitted || new_machineForm.name.$touched"> <div ng-show="new_machineForm.$submitted || new_machineForm.name.$touched">
<div ng-show="new_machineForm.name.$error.required" class="alert alert-warning fade in"> <div ng-show="new_machineForm.name.$error.required" class="alert alert-warning fade in">
......
...@@ -480,12 +480,6 @@ sub users { ...@@ -480,12 +480,6 @@ sub users {
sub new_machine { sub new_machine {
my $c = shift; my $c = shift;
my @error = (); my @error = ();
my $ram = ($c->param('ram') or 2);
my $disk = ($c->param('disk') or 8);
my $backend = $c->param('backend');
my $id_iso = $c->param('id_iso');
my $id_template = $c->param('id_template');
if ($c->param('submit')) { if ($c->param('submit')) {
push @error,("Name is mandatory") if !$c->param('name'); push @error,("Name is mandatory") if !$c->param('name');
req_new_domain($c); req_new_domain($c);
...@@ -505,6 +499,8 @@ sub req_new_domain { ...@@ -505,6 +499,8 @@ sub req_new_domain {
,id_template => $c->param('id_template') ,id_template => $c->param('id_template')
,vm=> $c->param('backend') ,vm=> $c->param('backend')
,id_owner => $USER->id ,id_owner => $USER->id
,memory => int($c->param('memory')*1024*1024)
,disk => int($c->param('disk')*1024*1024*1024)
); );
return $req; return $req;
......
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