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

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


The following commit(s) were added to refs/heads/4.11 by this push:
     new 4f49bf6  ui: hide hvm tickbox for vmware, otherwise display (#2781)
4f49bf6 is described below

commit 4f49bf6770c384d1bc017413afb6f63514108bf8
Author: ernjvr <ern...@gmail.com>
AuthorDate: Wed Aug 1 13:06:11 2018 +0200

    ui: hide hvm tickbox for vmware, otherwise display (#2781)
    
    On the 'Register Template From URL' screen, when a user selects the VMware 
option from the Hypervisor dropdown:
    
    It incorrectly displays the 'HVM' checkbox.
    This checkbox must be hidden in the VMware context.
    This checkbox must still be visible in any other hypervisor context.
    
    To Reproduce:
    Go to the 'Register Template From URL' screen by clicking the 'Templates' 
tab on the lefthand side.
    On the 'Templates' screen click the 'Add' button to display the 'Register 
Template From URL' screen.
    On the 'Register Template From URL' screen, select the VMware option from 
the Hypervisor dropdown:
    
    Actual Behaviour:
    It incorrectly displays the 'HVM' checkbox.
    
    Expected behaviour:
    This checkbox must be hidden in the VMware context.
    This checkbox must still be visible in any other hypervisor context.
---
 ui/scripts/templates.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 6dba18b..96660fa 100755
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -251,12 +251,14 @@
                                                     
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
                                                     
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').hide();
                                                     
$form.find('.form-item[rel=directdownload]').hide();
+                                                    
$form.find('.form-item[rel=requireshvm]').hide();
                                                 } else if ($(this).val() == 
"XenServer") {
                                                     
$form.find('.form-item[rel=rootDiskControllerType]').hide();
                                                     
$form.find('.form-item[rel=nicAdapterType]').hide();
                                                     
$form.find('.form-item[rel=keyboardType]').hide();
                                                     
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').hide();
                                                     
$form.find('.form-item[rel=directdownload]').hide();
+                                                    
$form.find('.form-item[rel=requireshvm]').css('display', 'inline-block');
 
                                                     if (isAdmin()) {
                                                         
$form.find('.form-item[rel=xenserverToolsVersion61plus]').css('display', 
'inline-block');
@@ -268,6 +270,7 @@
                                                     
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
                                                     
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').css('display', 
'inline-block');
                                                     
$('#label_root_disk_controller').prop('selectedIndex', 2);
+                                                    
$form.find('.form-item[rel=requireshvm]').css('display', 'inline-block');
                                                     if (isAdmin()) {
                                                       
$form.find('.form-item[rel=directdownload]').css('display', 'inline-block');
                                                     }
@@ -278,6 +281,7 @@
                                                     
$form.find('.form-item[rel=xenserverToolsVersion61plus]').hide();
                                                     
$form.find('.form-item[rel=rootDiskControllerTypeKVM]').hide();
                                                     
$form.find('.form-item[rel=directdownload]').hide();
+                                                    
$form.find('.form-item[rel=requireshvm]').css('display', 'inline-block');
                                                 }
                                             });
 

Reply via email to