diff --git a/ui/index.jsp b/ui/index.jsp index 5de56a509ba..de4ce604f11 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -798,7 +798,8 @@
  • -
    + +
  • diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 94a26c9e3fe..3bc82ec7e25 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -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: { diff --git a/ui/scripts/ui-custom/ipRules.js b/ui/scripts/ui-custom/ipRules.js index bb8c000308e..0ccf7966ace 100644 --- a/ui/scripts/ui-custom/ipRules.js +++ b/ui/scripts/ui-custom/ipRules.js @@ -7,9 +7,9 @@ return $('
    ').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() {