From b759ecc5182ad2f8eec6de35596d4839500bbb45 Mon Sep 17 00:00:00 2001 From: Abel Coronado Date: Thu, 28 Sep 2017 16:14:22 +0200 Subject: [PATCH] B #5408 (#502) * B #5408: VMGroup datatable show configurable (instantiate VM) * B #5408: VNet datatable show configurable (instantiate VM) * B #5408: Hide VMGroup when its disabled from .yaml * B #5408: Updated all .yamls --- src/sunstone/etc/sunstone-views/admin.yaml | 6 ++++++ src/sunstone/etc/sunstone-views/admin_vcenter.yaml | 6 ++++++ src/sunstone/etc/sunstone-views/groupadmin.yaml | 6 ++++++ .../etc/sunstone-views/groupadmin_vcenter.yaml | 12 ++++++++++++ src/sunstone/etc/sunstone-views/user.yaml | 6 ++++++ src/sunstone/public/app/tabs/provision-tab.js | 1 + .../form-panels/instantiate/templateRow.hbs | 4 ++++ 7 files changed, 41 insertions(+) diff --git a/src/sunstone/etc/sunstone-views/admin.yaml b/src/sunstone/etc/sunstone-views/admin.yaml index 286ee00d1c..0c1bdcc6e9 100644 --- a/src/sunstone/etc/sunstone-views/admin.yaml +++ b/src/sunstone/etc/sunstone-views/admin.yaml @@ -59,6 +59,12 @@ features: # True to show the datastore datatable to instantiate VM show_ds_instantiate: true + # True to show the vmgroup datatable to instantiate VM + show_vmgroup_instantiate: true + + # True to show the vnet datatable to instantiate VM + show_vnet_instantiate: true + # True to show the host datatable to instantiate VM show_host_instantiate: true diff --git a/src/sunstone/etc/sunstone-views/admin_vcenter.yaml b/src/sunstone/etc/sunstone-views/admin_vcenter.yaml index b0ccf957b0..2b01e203f6 100644 --- a/src/sunstone/etc/sunstone-views/admin_vcenter.yaml +++ b/src/sunstone/etc/sunstone-views/admin_vcenter.yaml @@ -59,6 +59,12 @@ features: # True to show the datastore datatable to instantiate VM show_ds_instantiate: false + # True to show the vmgroup datatable to instantiate VM + show_vmgroup_instantiate: true + + # True to show the vnet datatable to instantiate VM + show_vnet_instantiate: true + # True to show the host datatable to instantiate VM show_host_instantiate: false diff --git a/src/sunstone/etc/sunstone-views/groupadmin.yaml b/src/sunstone/etc/sunstone-views/groupadmin.yaml index b2fb055f53..83ecc68385 100644 --- a/src/sunstone/etc/sunstone-views/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/groupadmin.yaml @@ -59,6 +59,12 @@ features: # True to show the datastore datatable to instantiate VM show_ds_instantiate: false + # True to show the vmgroup datatable to instantiate VM + show_vmgroup_instantiate: true + + # True to show the vnet datatable to instantiate VM + show_vnet_instantiate: true + # True to show the host datatable to instantiate VM show_host_instantiate: false diff --git a/src/sunstone/etc/sunstone-views/groupadmin_vcenter.yaml b/src/sunstone/etc/sunstone-views/groupadmin_vcenter.yaml index 539b7971ec..76bc97f0e9 100644 --- a/src/sunstone/etc/sunstone-views/groupadmin_vcenter.yaml +++ b/src/sunstone/etc/sunstone-views/groupadmin_vcenter.yaml @@ -56,6 +56,18 @@ features: # True to show the option to make an instance persistent instantiate_persistent: true + # True to show the datastore datatable to instantiate VM + show_ds_instantiate: false + + # True to show the vmgroup datatable to instantiate VM + show_vmgroup_instantiate: true + + # True to show the vnet datatable to instantiate VM + show_vnet_instantiate: true + + # True to show the host datatable to instantiate VM + show_host_instantiate: false + # True to show an input to specify the the VMs and Template path/folder where a vCenter VM will # deployed to vcenter_vm_folder: false diff --git a/src/sunstone/etc/sunstone-views/user.yaml b/src/sunstone/etc/sunstone-views/user.yaml index c3dfc75c50..dc9347e2a2 100644 --- a/src/sunstone/etc/sunstone-views/user.yaml +++ b/src/sunstone/etc/sunstone-views/user.yaml @@ -59,6 +59,12 @@ features: # True to show the datastore datatable to instantiate VM show_ds_instantiate: false + # True to show the vmgroup datatable to instantiate VM + show_vmgroup_instantiate: true + + # True to show the vnet datatable to instantiate VM + show_vnet_instantiate: true + # True to show the host datatable to instantiate VM show_host_instantiate: false diff --git a/src/sunstone/public/app/tabs/provision-tab.js b/src/sunstone/public/app/tabs/provision-tab.js index 3324f9a704..2e106a5b07 100644 --- a/src/sunstone/public/app/tabs/provision-tab.js +++ b/src/sunstone/public/app/tabs/provision-tab.js @@ -998,6 +998,7 @@ define(function(require) { VMGroupSection.insert(template_json, $(".vmgroupContext", create_vm_context)); } else { $(".provision_vmgroup_selector", create_vm_context).html(""); + $(".provision_vmgroup", create_vm_context).hide(); } if (Config.provision.create_vm.isEnabled("datastore_select")) { diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate/templateRow.hbs b/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate/templateRow.hbs index 846432cb5f..220d4c1150 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate/templateRow.hbs +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate/templateRow.hbs @@ -48,12 +48,14 @@
+ {{#isFeatureEnabled "show_vnet_instantiate"}}
+ {{/isFeatureEnabled}} {{#advancedSection (tr "Advanced options") }} {{#isFeatureEnabled "show_host_instantiate"}}
@@ -117,6 +119,7 @@
+ {{#isFeatureEnabled "show_vmgroup_instantiate"}}
@@ -133,6 +136,7 @@
+ {{/isFeatureEnabled}}