1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

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

(cherry picked from commit 5b988776484b03e8f7c470a91e20b8bc903a3eb7)
This commit is contained in:
Sergio Betanzos 2022-03-03 10:50:25 +01:00 committed by Tino Vazquez
parent 5bcfcf2501
commit 720ded5717
No known key found for this signature in database
GPG Key ID: 14201E424D02047E
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>