mirror of https://github.com/apache/cloudstack.git
bug 14532: cloudstack 3.0 UI - IP Address page - StaticNAT IP - configuration - clicking Firewall - show Firewall multiEdit screen instead of NAT Port Range screen because createIpForwardingRule/deleteIpForwardingRule/listIpForwardingRules API are obsolete in cloudstack 3.0
This commit is contained in:
parent
1ee12a8080
commit
297ec02dea
|
|
@ -798,7 +798,8 @@
|
|||
</li>
|
||||
<li class="firewall">
|
||||
<div class="name"><span><fmt:message key="label.firewall"/></span></div>
|
||||
<div class="view-details" net-target="staticNAT"><fmt:message key="label.view.all"/></div>
|
||||
<!--<div class="view-details" net-target="staticNAT"><fmt:message key="label.view.all"/></div>-->
|
||||
<div class="view-details" net-target="firewall"><fmt:message key="label.view.all"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1631,6 +1631,10 @@
|
|||
|
||||
vmDetails: cloudStack.sections.instances.listView.detailView,
|
||||
|
||||
|
||||
//"NAT Port Range" multiEdit screen for StaticNAT is obsolete in cloudstack 3.0 because createIpForwardingRule/deleteIpForwardingRule/listIpForwardingRules API are obsolete in cloudstack 3.0.
|
||||
//cloudstack 3.0 is using createFirewallRule/listFirewallRules/deleteFirewallRule API for both staticNAT and non-staticNAT .
|
||||
/*
|
||||
staticNAT: {
|
||||
noSelect: true,
|
||||
fields: {
|
||||
|
|
@ -1730,6 +1734,8 @@
|
|||
}, 100);
|
||||
}
|
||||
},
|
||||
*/
|
||||
|
||||
|
||||
// Load balancing rules
|
||||
loadBalancing: {
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
return $('<div>').multiEdit(args);
|
||||
};
|
||||
|
||||
var makeMultiEditPanel = function($item, options) {
|
||||
if (!options) options = {};
|
||||
if ($item.closest('li').hasClass('disabled')) return false;
|
||||
var makeMultiEditPanel = function($item) {
|
||||
if ($item.closest('li').hasClass('disabled'))
|
||||
return false;
|
||||
|
||||
var targetId = $item.attr('net-target');
|
||||
var targetName = $item.parent().find('.name').find('span').html();
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
var $browser = $item.closest('.detail-view').data('view-args').$browser;
|
||||
|
||||
$browser.cloudBrowser('addPanel', {
|
||||
title: options.title ? options.title : targetName,
|
||||
title: targetName,
|
||||
maximizeIfSelected: true,
|
||||
complete: function($newPanel) {
|
||||
$newPanel.detailView({
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
context: context,
|
||||
tabs: {
|
||||
network: {
|
||||
title: options.title ? options.title : targetName,
|
||||
title: targetName,
|
||||
custom: function(args) {
|
||||
return portMultiEdit($.extend(target, {
|
||||
context: context
|
||||
|
|
@ -94,7 +94,8 @@
|
|||
|
||||
if(includingFirewall == true) {
|
||||
$chart.find('li.firewall .view-details').click(function() {
|
||||
makeMultiEditPanel($(this), { title: _l('label.nat.port.range')});
|
||||
//makeMultiEditPanel($(this), { title: _l('label.nat.port.range')});
|
||||
makeMultiEditPanel($(this));
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
|
@ -130,25 +131,7 @@
|
|||
return $(this).hasClass(id);
|
||||
}).addClass('disabled');
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
if (preFilter.length == 3) { // 'firewall', 'portForwarding', 'loadBalancing'
|
||||
return staticNATChart(args, true); //static NAT including Firewall
|
||||
}
|
||||
else if (preFilter.length == 4) { // 'firewall', 'portForwarding', 'loadBalancing', 'staticnatFirewall'
|
||||
return staticNATChart(args, false); //static NAT excluding Firewall
|
||||
}
|
||||
else {
|
||||
$(preFilter).each(function() {
|
||||
var id = this;
|
||||
|
||||
var $li = $chart.find('li').filter(function() {
|
||||
return $(this).hasClass(id);
|
||||
}).addClass('disabled');
|
||||
});
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
$chart.find('.view-details').click(function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue