From 64612a48e8f3fab33d29ef4138e5b5aeebe4eb46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Mon, 15 Feb 2016 17:27:19 +0100 Subject: [PATCH] Feature #4317: Remove sunstone/capacity_select --- src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb | 6 ------ .../models/OpenNebulaJSON/VirtualRouterJSON.rb | 6 ------ .../form-panels/create/wizard-tabs/general.js | 10 ---------- .../form-panels/create/wizard-tabs/general/html.hbs | 9 --------- .../app/tabs/templates-tab/form-panels/instantiate.js | 7 ------- 5 files changed, 38 deletions(-) diff --git a/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb b/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb index d60610cec6..cffe2d095b 100644 --- a/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb @@ -103,12 +103,6 @@ module OpenNebulaJSON def instantiate(params=Hash.new) if params['template'] - select_capacity = self['TEMPLATE/SUNSTONE_CAPACITY_SELECT'] - if (select_capacity && select_capacity.upcase == "NO") - params['template'].delete("CPU") - params['template'].delete("MEMORY") - end - select_network = self['TEMPLATE/SUNSTONE_NETWORK_SELECT'] if (select_network && select_network.upcase == "NO") params['template'].delete("NIC") diff --git a/src/sunstone/models/OpenNebulaJSON/VirtualRouterJSON.rb b/src/sunstone/models/OpenNebulaJSON/VirtualRouterJSON.rb index 4056e7fd44..feb16e9b52 100644 --- a/src/sunstone/models/OpenNebulaJSON/VirtualRouterJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/VirtualRouterJSON.rb @@ -60,12 +60,6 @@ module OpenNebulaJSON def instantiate(params=Hash.new) if params['template'] - select_capacity = self['TEMPLATE/SUNSTONE_CAPACITY_SELECT'] - if (select_capacity && select_capacity.upcase == "NO") - params['template'].delete("CPU") - params['template'].delete("MEMORY") - end - select_network = self['TEMPLATE/SUNSTONE_NETWORK_SELECT'] if (select_network && select_network.upcase == "NO") params['template'].delete("NIC") 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 1eae73ed15..0ad771c244 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 @@ -119,9 +119,6 @@ define(function(require) { } var sunstone_template = {}; - if ($('#sunstone_capacity_select:checked', context).length > 0) { - sunstone_template["CAPACITY_SELECT"] = "NO" - } if ($('#sunstone_network_select:checked', context).length > 0) { sunstone_template["NETWORK_SELECT"] = "NO" @@ -139,13 +136,6 @@ define(function(require) { function _fill(context, templateJSON) { var sunstone_template = templateJSON.SUNSTONE; if (sunstone_template) { - if (sunstone_template["CAPACITY_SELECT"] && - sunstone_template["CAPACITY_SELECT"].toUpperCase() == "NO") { - $("#sunstone_capacity_select", context).attr("checked", "checked"); - } - - delete sunstone_template["CAPACITY_SELECT"]; - if (sunstone_template["NETWORK_SELECT"] && sunstone_template["NETWORK_SELECT"].toUpperCase() == "NO") { $("#sunstone_network_select", context).attr("checked", "checked"); 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 63817a49dc..e201ab4a65 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 @@ -115,15 +115,6 @@ {{/isFeatureEnabled}} -
-
- - -
-
diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate.js index 803f81c068..3ffe1cf9fe 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate.js @@ -226,13 +226,6 @@ define(function(require) { }); } - if (template_json.VMTEMPLATE.TEMPLATE.SUNSTONE && - template_json.VMTEMPLATE.TEMPLATE.SUNSTONE.CAPACITY_SELECT && - template_json.VMTEMPLATE.TEMPLATE.SUNSTONE.CAPACITY_SELECT.toUpperCase() == "NO"){ - - capacityContext.hide(); - } - idsDone += 1; if (idsLength == idsDone){ Sunstone.enableFormPanelSubmit(TAB_ID);