mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-07 17:17:41 +03:00
Feature #4317: Remove sunstone/capacity_select
This commit is contained in:
parent
4726a6a4bb
commit
64612a48e8
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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");
|
||||
|
@ -115,15 +115,6 @@
|
||||
</div>
|
||||
</div>
|
||||
{{/isFeatureEnabled}}
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
<input type="checkbox" id="sunstone_capacity_select" name="name"/>
|
||||
<label for="sunstone_capacity_select">
|
||||
{{tr "Do not allow to change capacity"}}
|
||||
{{{tip (tr "Users using the cloud view will not be able to select a new capacity for this template")}}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
<input type="checkbox" id="sunstone_network_select" name="name"/>
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user