From 453e7a9f44a7b5fa3fe71f8fe6749c2abfcd6bc2 Mon Sep 17 00:00:00 2001 From: juanmont Date: Tue, 28 Mar 2017 10:07:06 +0200 Subject: [PATCH 1/2] F #4913 Disabled datastore creation --- src/sunstone/etc/sunstone-views/admin_vcenter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sunstone/etc/sunstone-views/admin_vcenter.yaml b/src/sunstone/etc/sunstone-views/admin_vcenter.yaml index 75ef5ef014..f0f4250354 100644 --- a/src/sunstone/etc/sunstone-views/admin_vcenter.yaml +++ b/src/sunstone/etc/sunstone-views/admin_vcenter.yaml @@ -544,7 +544,7 @@ tabs: #- 13 # Search data actions: Datastore.refresh: true - Datastore.create_dialog: true + Datastore.create_dialog: false Datastore.import_dialog: true Datastore.addtocluster: true Datastore.rename: true From abb9d28e5c5a5c84ab7988b3b26388e9631888f1 Mon Sep 17 00:00:00 2001 From: juanmont Date: Thu, 30 Mar 2017 12:09:46 +0200 Subject: [PATCH 2/2] F #4913 vcenter create/update template - Removed VM disks Keep checkbox - Removed KEEP_DISKS_ON_DONE attribute - Removed selection Default Datastore - Removed selection Default Resource Pool --- .../form-panels/create/wizard-tabs/general.js | 57 ------------------ .../create/wizard-tabs/general/html.hbs | 58 ------------------- 2 files changed, 115 deletions(-) diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js index 1b014d8544..26f8c49ed0 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js @@ -207,48 +207,6 @@ define(function(require) { var userInputs = {}; - // Retrieve Datastore Attribute - var dsInput = $(".vcenter_datastore_input", context); - if (dsInput.length > 0) { - var dsModify = WizardFields.retrieveInput($('.modify_datastore', dsInput)); - var dsInitial = WizardFields.retrieveInput($('.initial_datastore', dsInput)); - var dsParams = WizardFields.retrieveInput($('.available_datastores', dsInput)); - - if (dsModify === 'fixed' && dsInitial !== '') { - templateJSON['VCENTER_DATASTORE'] = dsInitial; - } else if (dsModify === 'list' && dsParams !== '') { - var dsUserInputsStr = UserInputs.marshall({ - type: 'list', - description: Locale.tr("Which datastore you want this VM to run on?"), - initial: dsInitial, - params: dsParams - }); - - userInputs['VCENTER_DATASTORE'] = dsUserInputsStr; - } - } - - // Retrieve Resource Pool Attribute - var rpInput = $(".vcenter_rp_input", context); - if (rpInput.length > 0) { - var rpModify = WizardFields.retrieveInput($('.modify_rp', rpInput)); - var rpInitial = WizardFields.retrieveInput($('.initial_rp', rpInput)); - var rpParams = WizardFields.retrieveInput($('.available_rps', rpInput)); - - if (rpModify === 'fixed' && rpInitial !== '') { - templateJSON['RESOURCE_POOL'] = rpInitial; - } else if (rpModify === 'list' && rpParams !== '') { - var rpUserInputs = UserInputs.marshall({ - type: 'list', - description: Locale.tr("Which resource pool you want this VM to run in?"), - initial: rpInitial, - params: WizardFields.retrieveInput($('.available_rps', rpInput)) - }); - - userInputs['RESOURCE_POOL'] = rpUserInputs; - } - } - // Since the USER_INPUTS section is not enabled for vCenter, we can assume that there are no more user inputs defined if (!$.isEmptyObject(userInputs)) { templateJSON['USER_INPUTS'] = userInputs; @@ -272,14 +230,6 @@ define(function(require) { delete sunstone_template["NETWORK_SELECT"]; } - if (templateJSON["HYPERVISOR"] == 'vcenter' && - templateJSON["KEEP_DISKS_ON_DONE"] && - templateJSON["KEEP_DISKS_ON_DONE"].toLowerCase() == "yes" ) { - $("#KEEP_DISKS", context).attr("checked", "checked"); - } - - delete templateJSON["KEEP_DISKS_ON_DONE"]; - if (Config.isFeatureEnabled("vcenter_deploy_folder")) { if (templateJSON["HYPERVISOR"] == 'vcenter' && templateJSON["DEPLOY_FOLDER"]) { @@ -333,13 +283,6 @@ define(function(require) { } } - if (templateJSON["VCENTER_DATASTORE"]) { - $('.modify_datastore', context).val('fixed'); - WizardFields.fillInput($('.initial_datastore', context), templateJSON["VCENTER_DATASTORE"]); - - delete templateJSON["VCENTER_DATASTORE"]; - } - if (templateJSON["RESOURCE_POOL"]) { $('.modify_rp', context).val('fixed'); WizardFields.fillInput($('.initial_rp', context), templateJSON["RESOURCE_POOL"]); diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/html.hbs b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/html.hbs index 52cb042f1e..df28cc7354 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/html.hbs +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/html.hbs @@ -61,64 +61,6 @@ -
-
-
- - - -
-
-
- -
-
- -
-
- -
-
- -
-
-
-
- -
-
- -
-
- -