1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

F #5757: Improve capacity range on VM instantiation (#1824)

This commit is contained in:
Sergio Betanzos 2022-03-03 10:50:25 +01:00 committed by GitHub
parent 91ba298e77
commit 5b98877648
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -110,6 +110,10 @@ define(function(require) {
attr.min = 0.01;
}
if (['range', 'range-float'].includes(attr.type)) {
attr.readonly = true
}
input = UserInputs.attributeInput(attr);
if (attr.type != "range-float"){
@ -132,6 +136,10 @@ define(function(require) {
attr.min = 1;
}
if (['range', 'range-float'].includes(attr.type)) {
attr.readonly = true
}
input = UserInputs.attributeInput(attr);
if (attr.type != "range"){
@ -238,6 +246,14 @@ define(function(require) {
attr.mandatory = true;
}
if (String(element.TEMPLATE.HYPERVISOR).toLowerCase() === "vcenter") {
attr.step = 4;
}
if (['range', 'range-float'].includes(attr.type)) {
attr.readonly = true
}
if(attr.min == undefined){
attr.min = 1;
}

View File

@ -41,6 +41,7 @@
{{#if disabled}}disabled="true"{{/if}}/>
<input type="number" class="visor"
data-min="{{min}}" data-max="{{max_value}}"
value="{{initial}}" required/>
value="{{initial}}" required
{{#if readonly}} readonly {{/if}} />
</div>
</div>