From 44cb1ae089777f5ab0cce1af6f5604990ab8b75a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= <cmartin@opennebula.org> Date: Thu, 11 Dec 2014 11:30:09 +0100 Subject: [PATCH] Feature #3175 #3424: Revert commit:9816b0b --- .../public/js/plugins/templates-tab.js | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index c73c515b8a..5af65150cd 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -2586,7 +2586,60 @@ function generate_nic_tab_content(str_nic_tab_id){ '<div name="str_nic_tab_id" str_nic_tab_id="'+str_nic_tab_id+'">'+ generateSecurityGroupTableSelect("vm_create_nic_"+str_nic_tab_id)+ '</div>'+ - '</fieldset>'}); + '</fieldset>'+ + + // Hidden inputs for white/black ports and icmp drop. These inputs are + // deprecated, but keeping them hidden allows to preserve the values for + // previous templates in the update wizard. + + '<div style="display: none;">'+ + '<fieldset>'+ + '<legend>'+tr("TCP Firewall")+'</legend>'+ + '<div class="row">'+ + '<div class="large-12 columns text-center">'+ + '<input type="radio" class="tcp_type" name="tcp_type" id="'+str_nic_tab_id+'white_tcp_type" value="WHITE_PORTS_TCP"><label for="'+str_nic_tab_id+'white_tcp_type">' + tr("Whitelist") +'</label>'+ + '<input type="radio" class="tcp_type" name="tcp_type" id="'+str_nic_tab_id+'black_tcp_type" value="BLACK_PORTS_TCP"><label for="'+str_nic_tab_id+'black_tcp_type">' + tr("Blacklist") +'</label>'+ + '</div>'+ + '</div>'+ + '<div class="row">'+ + '<div class="large-12 columns">'+ + '<label for="TCP_PORTS">'+tr("PORTS")+ + '<span class="tip">'+tr("A list of ports separated by commas or a ranges separated by semicolons, e.g.: 22,80,5900:6000")+'</span>'+ + '</label>'+ + '<input type="text" id="TCP_PORTS" name="ports" />'+ + '</div>'+ + '</div>'+ + '</fieldset>'+ + '<fieldset>'+ + '<legend>'+tr("UDP Firewall")+'</legend>'+ + '<div class="row">'+ + '<div class="large-12 columns text-center">'+ + '<input type="radio" class="udp_type" name="udp_type" id="'+str_nic_tab_id+'white_udp_type" value="WHITE_PORTS_UDP"><label for="'+str_nic_tab_id+'white_udp_type">' + tr("Whitelist") +'</label>'+ + '<input type="radio" class="udp_type" name="udp_type" id="'+str_nic_tab_id+'black_udp_type" value="BLACK_PORTS_UDP"><label for="'+str_nic_tab_id+'black_udp_type">' + tr("Blacklist") +'</label>'+ + '</div>'+ + '</div>'+ + '<div class="row">'+ + '<div class="large-12 columns">'+ + '<label for="UDP_PORTS">'+tr("PORTS")+ + '<span class="tip">'+tr("A list of ports separated by commas or a ranges separated by semicolons, e.g.: 22,80,5900:6000")+'</span>'+ + '</label>'+ + '<input type="text" id="UDP_PORTS" name="ports" />'+ + '</div>'+ + '</div>'+ + '</fieldset>'+ + '<fieldset>'+ + '<legend>'+tr("ICMP")+'</legend>'+ + '<div class="row">'+ + '<div class="large-12 columns">'+ + '<label>'+ + '<input type="checkbox" name="icmp_type" value="ICMP" id="icmp_type"> '+ + tr("Drop")+ + '</label>'+ + '</div>'+ + '</div>'+ + '</fieldset>'+ + '</div>' +}); return html; }