Commit 35d54526 authored by joelalju's avatar joelalju
Browse files

[#447]Minimum size enforced

parent 44321e19
......@@ -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 }
......
......@@ -52,9 +52,24 @@ ravadaApp.directive("solShowMachine", swMach)
};
$scope.name_duplicated = false;
$scope.change_iso = function(device) {
if (device != null) {
return device;
$scope.ddsize=20;
$scope.swapsize={value:1};
$scope.ramSize=1;
$scope.seeswap=0;
$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,10 +88,7 @@ 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);
}
......@@ -84,6 +96,7 @@ ravadaApp.directive("solShowMachine", swMach)
$scope.seeswap = !($scope.seeswap);
};
$http.get('/list_machines.json').then(function(response) {
$scope.base = response.data;
});
......
......@@ -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>
......@@ -81,7 +82,7 @@
<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()"
......@@ -91,6 +92,9 @@
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>
......
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