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
35d54526
Commit
35d54526
authored
Feb 15, 2018
by
joelalju
Browse files
[#447]Minimum size enforced
parent
44321e19
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
35d54526
...
...
@@ -189,8 +189,9 @@ sub _update_isos {
,
xml
=>
'
yakkety64-amd64.xml
'
,
xml_volume
=>
'
yakkety64-volume.xml
'
,
url
=>
'
http://releases.ubuntu.com/17.10/
'
,
file_re
=>
,'
ubuntu-17.10.*desktop-amd64.iso
'
,
md5_url
=>
,'
$url/MD5SUMS
'
,
file_re
=>
'
ubuntu-17.10.*desktop-amd64.iso
'
,
md5_url
=>
'
$url/MD5SUMS
'
,
min_disk_size
=>
'
9
'
}
,
zesty
=>
{
name
=>
'
Ubuntu Zesty Zapus
'
...
...
@@ -199,8 +200,8 @@ sub _update_isos {
,
xml
=>
'
yakkety64-amd64.xml
'
,
xml_volume
=>
'
yakkety64-volume.xml
'
,
url
=>
'
http://releases.ubuntu.com/17.04/
'
,
file_re
=>
,
'
ubuntu-17.04.*desktop-amd64.iso
'
,
md5_url
=>
,
'
http://releases.ubuntu.com/17.04/MD5SUMS
'
,
file_re
=>
'
ubuntu-17.04.*desktop-amd64.iso
'
,
md5_url
=>
'
http://releases.ubuntu.com/17.04/MD5SUMS
'
}
,
serena64
=>
{
name
=>
'
Mint 18.1 Mate 64 bits
'
...
...
@@ -1164,6 +1165,7 @@ sub list_domains {
return
@domains
;
}
=head2 list_domains_data
List all domains in raw format. Return a list of id => { name , id , is_active , is_base }
...
...
public/js/admin.js
View file @
35d54526
...
...
@@ -51,10 +51,25 @@ ravadaApp.directive("solShowMachine", swMach)
});
};
$scope
.
name_duplicated
=
false
;
$scope
.
ddsize
=
20
;
$scope
.
swapsize
=
{
value
:
1
};
$scope
.
ramSize
=
1
;
$scope
.
seeswap
=
0
;
$scope
.
change_iso
=
function
(
device
)
{
if
(
device
!=
null
)
{
return
device
;
$scope
.
showMinSize
=
false
;
$scope
.
min_size
=
1
;
$scope
.
change_iso
=
function
(
id
)
{
if
(
id
.
min_disk_size
!=
null
)
{
$scope
.
showMinSize
=
true
;
$scope
.
min_size
=
id
.
min_disk_size
;
}
else
{
$scope
.
showMinSize
=
false
;
$scope
.
min_size
=
1
;
}
if
(
id
.
device
!=
null
)
{
return
id
.
device
;
}
else
return
"
<NONE>
"
;
};
...
...
@@ -73,16 +88,14 @@ ravadaApp.directive("solShowMachine", swMach)
$scope
.
name_duplicated
=
false
;
}
};
$scope
.
ddsize
=
20
;
$scope
.
swapsize
=
{
value
:
1
};
$scope
.
ramSize
=
1
;
$scope
.
seeswap
=
0
;
$scope
.
type
=
function
(
v
)
{
return
typeof
(
v
);
}
$scope
.
show_swap
=
function
()
{
$scope
.
seeswap
=
!
(
$scope
.
seeswap
);
};
$http
.
get
(
'
/list_machines.json
'
).
then
(
function
(
response
)
{
$scope
.
base
=
response
.
data
;
...
...
templates/ng-templates/new_machine_template.html.ep
View file @
35d54526
...
...
@@ -23,7 +23,7 @@
name ="id_iso"
ng-model="id_iso"
ng-options="item.name for item in images track by item.id"
ng-change="iso_file = change_iso(id_iso
.device
)"
ng-change="iso_file = change_iso(id_iso)"
required=""
></select>
<div ng-show="id_iso.description">
...
...
@@ -49,6 +49,7 @@
ng-model="iso_file"
ng-options="item for item in isos track by item"
required=""
></select>
</div>
</div>
...
...
@@ -78,19 +79,22 @@
</div>
<div class="form-group row" ng-if="backend == 'KVM'">
<label for="disk" class="col-lg-3 control-label"><%=l 'Disk Size: (GB)' %></label>
<label for="disk" class="col-lg-3 control-label"><%=l 'Disk Size: (GB)' %></label>
<div class="col-lg-2">
<input class="slider form-control" ng-model="ddsize" type="range" name="disk"
min="
1
" max="100" value="20" required="">
min="
{{min_size}}
" max="100" value="20" required="">
</div>{{ddsize}}
<a ng-show="!seeswap"
ng-click="show_swap()"
class="label label-primary"
align="right">Add swap</a>
<a ng-show="seeswap"
ng-click="show_swap()"
class="label label-primary"
align="right">Remove swap</a>
<a ng-show="!seeswap"
ng-click="show_swap()"
class="label label-primary"
align="right">Add swap</a>
<a ng-show="seeswap"
ng-click="show_swap()"
class="label label-primary"
align="right">Remove swap</a>
<div ng-show="showMinSize">
<font color="#500000"><%=l 'The Minimum Disk Size needed for this ISO is' %> {{min_size}}GB.</font>
</div>
</div>
<div class="form-group row" ng-show="seeswap" ng-if="backend == 'KVM'">
<label for="swap" class="col-lg-3 control-label"><%=l 'Swap Size: (GB)' %></label>
...
...
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