ui: Hide cpuspeed for custom constrained offering (#3996)

For customer constrained offering, the cpu speed is fixed.
Therefore the 'CpuSpeed' field should be hidden for customer constrained offering when change vm offering on UI.
It is visible only for unconstrained offering.

This is regression issue of #3245
This commit is contained in:
Wei Zhou 2020-08-28 11:14:51 +02:00 committed by GitHub
parent 1da76d27f1
commit ba4b04ff37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2196,7 +2196,11 @@
return; return;
if (selectedServiceofferingObj.iscustomized == true) { if (selectedServiceofferingObj.iscustomized == true) {
$form.find('.form-item[rel=cpuSpeed]').css('display', 'inline-block'); if (selectedServiceofferingObj.cpuspeed) {
$form.find('.form-item[rel=cpuSpeed]').hide();
} else {
$form.find('.form-item[rel=cpuSpeed]').css('display', 'inline-block');
}
$form.find('.form-item[rel=cpuNumber]').css('display', 'inline-block'); $form.find('.form-item[rel=cpuNumber]').css('display', 'inline-block');
$form.find('.form-item[rel=memory]').css('display', 'inline-block'); $form.find('.form-item[rel=memory]').css('display', 'inline-block');
} else { } else {