You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/08/28 09:15:04 UTC

[cloudstack] branch 4.13 updated: ui: Hide cpuspeed for custom constrained offering (#3996)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.13
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.13 by this push:
     new ba4b04f  ui: Hide cpuspeed for custom constrained offering (#3996)
ba4b04f is described below

commit ba4b04ff37ebd063a9c4ed73d3555c8f499ceb1a
Author: Wei Zhou <w....@global.leaseweb.com>
AuthorDate: Fri Aug 28 11:14:51 2020 +0200

    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
---
 ui/scripts/instances.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 6d7e26f..71e629c 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -2196,7 +2196,11 @@
                                                 return;
 
                                             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=memory]').css('display', 'inline-block');
                                             } else {