Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
fc3c32a9
Commit
fc3c32a9
authored
Oct 26, 2016
by
Francesc Guasch
Browse files
[#8] Added new machine parameters in frontend
parent
15abc7c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/templates/new_machine.html
View file @
fc3c32a9
...
...
@@ -62,14 +62,14 @@
</select>
</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>
<input class="form-control" ng-model="ddsize" type="number" name="d
dsize
" min="1" max="10" required="">
<input
class=
"form-control"
ng-model=
"ddsize"
type=
"number"
name=
"d
isk
"
min=
"1"
max=
"10"
required=
""
>
</div>
<div
ng-show=
"backend == 'KVM' || backend == 'LXC'"
class=
"from-group"
>
<label f
ro="ram
">Ram: (GB)</label>
<input class="form-control" ng-model="ramsize" type="number" name="
ramsize
" min="1" max="4" required="">
</div><br/>
-->
<label
f
or=
"memory
"
>
Ram: (GB)
</label>
<input
class=
"form-control"
ng-model=
"ramsize"
type=
"number"
name=
"
memory
"
min=
"1"
max=
"4"
required=
""
>
</div><br/>
<div
ng-show=
"new_machineForm.$submitted || new_machineForm.name.$touched"
>
<div
ng-show=
"new_machineForm.name.$error.required"
class=
"alert alert-warning fade in"
>
...
...
rvd_front.pl
View file @
fc3c32a9
...
...
@@ -480,12 +480,6 @@ sub users {
sub
new_machine
{
my
$c
=
shift
;
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
'))
{
push
@error
,("
Name is mandatory
")
if
!
$c
->
param
('
name
');
req_new_domain
(
$c
);
...
...
@@ -505,6 +499,8 @@ sub req_new_domain {
,
id_template
=>
$c
->
param
('
id_template
')
,
vm
=>
$c
->
param
('
backend
')
,
id_owner
=>
$USER
->
id
,
memory
=>
int
(
$c
->
param
('
memory
')
*
1024
*
1024
)
,
disk
=>
int
(
$c
->
param
('
disk
')
*
1024
*
1024
*
1024
)
);
return
$req
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment