mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-18 19:44:21 +01:00
firewallRuleUiEnabled has been removed from listcapabilitiesresponse API. Here is related UI change. In network page, we now use listnetworksresponse to determine whether or not to show firewall section.
This commit is contained in:
parent
ace7d63a25
commit
079eb0f9eb
@ -597,7 +597,6 @@ $(document).ready(function() {
|
|||||||
g_timezoneoffset = null;
|
g_timezoneoffset = null;
|
||||||
g_timezone = null;
|
g_timezone = null;
|
||||||
g_supportELB = null;
|
g_supportELB = null;
|
||||||
g_firewallRuleUiEnabled = null;
|
|
||||||
|
|
||||||
$.cookie('JSESSIONID', null);
|
$.cookie('JSESSIONID', null);
|
||||||
$.cookie('sessionKey', null);
|
$.cookie('sessionKey', null);
|
||||||
@ -609,7 +608,6 @@ $(document).ready(function() {
|
|||||||
$.cookie('timezoneoffset', null);
|
$.cookie('timezoneoffset', null);
|
||||||
$.cookie('timezone', null);
|
$.cookie('timezone', null);
|
||||||
$.cookie('supportELB', null);
|
$.cookie('supportELB', null);
|
||||||
$.cookie('firewallRuleUiEnabled', null);
|
|
||||||
|
|
||||||
$("body").stopTime();
|
$("body").stopTime();
|
||||||
|
|
||||||
@ -710,9 +708,6 @@ $(document).ready(function() {
|
|||||||
g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean
|
g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean
|
||||||
$.cookie('supportELB', g_supportELB, { expires: 1});
|
$.cookie('supportELB', g_supportELB, { expires: 1});
|
||||||
|
|
||||||
g_firewallRuleUiEnabled = json.listcapabilitiesresponse.capability.firewallRuleUiEnabled.toString(); //convert boolean to string if it's boolean
|
|
||||||
$.cookie('firewallRuleUiEnabled', g_firewallRuleUiEnabled, { expires: 1});
|
|
||||||
|
|
||||||
if (json.listcapabilitiesresponse.capability.userpublictemplateenabled != null) {
|
if (json.listcapabilitiesresponse.capability.userpublictemplateenabled != null) {
|
||||||
g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean
|
g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean
|
||||||
$.cookie('userpublictemplateenabled', g_userPublicTemplateEnabled, { expires: 1});
|
$.cookie('userpublictemplateenabled', g_userPublicTemplateEnabled, { expires: 1});
|
||||||
@ -810,9 +805,6 @@ $(document).ready(function() {
|
|||||||
if(g_supportELB == null)
|
if(g_supportELB == null)
|
||||||
g_supportELB = $.cookie("supportELB");
|
g_supportELB = $.cookie("supportELB");
|
||||||
|
|
||||||
if(g_firewallRuleUiEnabled == null)
|
|
||||||
g_firewallRuleUiEnabled = $.cookie("firewallRuleUiEnabled");
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: createURL("command=listCapabilities"),
|
data: createURL("command=listCapabilities"),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
@ -825,9 +817,6 @@ $(document).ready(function() {
|
|||||||
g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean
|
g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean
|
||||||
$.cookie('supportELB', g_supportELB, { expires: 1});
|
$.cookie('supportELB', g_supportELB, { expires: 1});
|
||||||
|
|
||||||
g_firewallRuleUiEnabled = json.listcapabilitiesresponse.capability.firewallRuleUiEnabled.toString(); //convert boolean to string if it's boolean
|
|
||||||
$.cookie('firewallRuleUiEnabled', g_firewallRuleUiEnabled, { expires: 1});
|
|
||||||
|
|
||||||
if (json.listcapabilitiesresponse.capability.userpublictemplateenabled != null) {
|
if (json.listcapabilitiesresponse.capability.userpublictemplateenabled != null) {
|
||||||
g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean
|
g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean
|
||||||
$.cookie('userpublictemplateenabled', g_userPublicTemplateEnabled, { expires: 1});
|
$.cookie('userpublictemplateenabled', g_userPublicTemplateEnabled, { expires: 1});
|
||||||
|
|||||||
@ -213,10 +213,7 @@ function afterLoadIpJSP() {
|
|||||||
|
|
||||||
//****** Advanced Zone (begin) *******************************************************************************************************************
|
//****** Advanced Zone (begin) *******************************************************************************************************************
|
||||||
else {
|
else {
|
||||||
if(g_firewallRuleUiEnabled == "true")
|
|
||||||
$("#tab_firewall").show();
|
$("#tab_firewall").show();
|
||||||
else
|
|
||||||
$("#tab_firewall").hide();
|
|
||||||
|
|
||||||
$("#tab_details,#tab_content_details").show();
|
$("#tab_details,#tab_content_details").show();
|
||||||
|
|
||||||
@ -470,8 +467,6 @@ function afterLoadIpJSP() {
|
|||||||
array1.push("&startPort="+startPort);
|
array1.push("&startPort="+startPort);
|
||||||
array1.push("&endPort="+endPort);
|
array1.push("&endPort="+endPort);
|
||||||
array1.push("&protocol="+protocol);
|
array1.push("&protocol="+protocol);
|
||||||
|
|
||||||
if(g_firewallRuleUiEnabled == "true")
|
|
||||||
array1.push("&openfirewall=false");
|
array1.push("&openfirewall=false");
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -612,7 +607,6 @@ function afterLoadIpJSP() {
|
|||||||
var virtualMachineId = $createPortForwardingRow.find("#vm").val();
|
var virtualMachineId = $createPortForwardingRow.find("#vm").val();
|
||||||
array1.push("&virtualmachineid=" + virtualMachineId);
|
array1.push("&virtualmachineid=" + virtualMachineId);
|
||||||
|
|
||||||
if(g_firewallRuleUiEnabled == "true")
|
|
||||||
array1.push("&openfirewall=false");
|
array1.push("&openfirewall=false");
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -718,7 +712,6 @@ function afterLoadIpJSP() {
|
|||||||
var algorithm = createLoadBalancerRow.find("#algorithm_select").val();
|
var algorithm = createLoadBalancerRow.find("#algorithm_select").val();
|
||||||
array1.push("&algorithm="+algorithm);
|
array1.push("&algorithm="+algorithm);
|
||||||
|
|
||||||
if(g_firewallRuleUiEnabled == "true")
|
|
||||||
array1.push("&openfirewall=false");
|
array1.push("&openfirewall=false");
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -847,24 +840,16 @@ function ipToRightPanel($midmenuItem1) {
|
|||||||
$("#tab_details").click();
|
$("#tab_details").click();
|
||||||
|
|
||||||
if(ipObj.isstaticnat == true) {
|
if(ipObj.isstaticnat == true) {
|
||||||
if(g_firewallRuleUiEnabled == "true") {
|
|
||||||
$("#tab_firewall").show();
|
$("#tab_firewall").show();
|
||||||
$("#tab_port_range").hide();
|
$("#tab_port_range").hide();
|
||||||
}
|
|
||||||
else {
|
|
||||||
$("#tab_firewall").hide();
|
|
||||||
$("#tab_port_range").show();
|
|
||||||
}
|
|
||||||
$("#tab_port_forwarding, #tab_load_balancer, #tab_vpn").hide();
|
$("#tab_port_forwarding, #tab_load_balancer, #tab_vpn").hide();
|
||||||
}
|
}
|
||||||
else { //ipObj.isstaticnat == false
|
else { //ipObj.isstaticnat == false
|
||||||
$("#tab_port_range").hide();
|
$("#tab_port_range").hide();
|
||||||
if(ipObj.forvirtualnetwork == true) { // Public network
|
if(ipObj.forvirtualnetwork == true) { // Public network
|
||||||
if(isIpManageable(ipObj.domainid, ipObj.account) == true) { // IP is managable
|
if(isIpManageable(ipObj.domainid, ipObj.account) == true) { // IP is managable
|
||||||
if(g_firewallRuleUiEnabled == "true")
|
|
||||||
$("#tab_firewall").show();
|
$("#tab_firewall").show();
|
||||||
else
|
|
||||||
$("#tab_firewall").hide();
|
|
||||||
//Port Forwarding tab
|
//Port Forwarding tab
|
||||||
if(networkObj != null) {
|
if(networkObj != null) {
|
||||||
var firewallServiceObj = ipFindNetworkServiceByName("Firewall", networkObj);
|
var firewallServiceObj = ipFindNetworkServiceByName("Firewall", networkObj);
|
||||||
@ -1178,7 +1163,6 @@ function showEnableVPNDialog($thisTab) {
|
|||||||
array1.push("&account="+ipObj.account);
|
array1.push("&account="+ipObj.account);
|
||||||
array1.push("&domainid="+ipObj.domainid);
|
array1.push("&domainid="+ipObj.domainid);
|
||||||
array1.push("&zoneid="+ipObj.zoneid);
|
array1.push("&zoneid="+ipObj.zoneid);
|
||||||
if(g_firewallRuleUiEnabled == "true")
|
|
||||||
array1.push("&openfirewall=true");
|
array1.push("&openfirewall=true");
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|||||||
@ -1527,7 +1527,6 @@ var g_enableLogging = false;
|
|||||||
var g_timezoneoffset = null;
|
var g_timezoneoffset = null;
|
||||||
var g_timezone = null;
|
var g_timezone = null;
|
||||||
var g_supportELB = null;
|
var g_supportELB = null;
|
||||||
var g_firewallRuleUiEnabled = null; //true or false
|
|
||||||
|
|
||||||
// capabilities
|
// capabilities
|
||||||
var g_directAttachSecurityGroupsEnabled = "false";
|
var g_directAttachSecurityGroupsEnabled = "false";
|
||||||
|
|||||||
@ -85,9 +85,6 @@
|
|||||||
if(g_supportELB == null)
|
if(g_supportELB == null)
|
||||||
g_supportELB = $.cookie("supportELB");
|
g_supportELB = $.cookie("supportELB");
|
||||||
|
|
||||||
if(g_firewallRuleUiEnabled == null)
|
|
||||||
g_firewallRuleUiEnabled = $.cookie("firewallRuleUiEnabled");
|
|
||||||
|
|
||||||
var userValid = false;
|
var userValid = false;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -99,9 +96,6 @@
|
|||||||
g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean
|
g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean
|
||||||
$.cookie('supportELB', g_supportELB, { expires: 1});
|
$.cookie('supportELB', g_supportELB, { expires: 1});
|
||||||
|
|
||||||
g_firewallRuleUiEnabled = json.listcapabilitiesresponse.capability.firewallRuleUiEnabled.toString(); //convert boolean to string if it's boolean
|
|
||||||
$.cookie('firewallRuleUiEnabled', g_firewallRuleUiEnabled, { expires: 1});
|
|
||||||
|
|
||||||
g_userProjectsEnabled = json.listcapabilitiesresponse.capability.allowusercreateprojects;
|
g_userProjectsEnabled = json.listcapabilitiesresponse.capability.allowusercreateprojects;
|
||||||
$.cookie('userProjectsEnabled', g_userProjectsEnabled, { expires: 1 });
|
$.cookie('userProjectsEnabled', g_userProjectsEnabled, { expires: 1 });
|
||||||
|
|
||||||
@ -205,9 +199,6 @@
|
|||||||
g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean
|
g_supportELB = json.listcapabilitiesresponse.capability.supportELB.toString(); //convert boolean to string if it's boolean
|
||||||
$.cookie('supportELB', g_supportELB, { expires: 1});
|
$.cookie('supportELB', g_supportELB, { expires: 1});
|
||||||
|
|
||||||
g_firewallRuleUiEnabled = json.listcapabilitiesresponse.capability.firewallRuleUiEnabled.toString(); //convert boolean to string if it's boolean
|
|
||||||
$.cookie('firewallRuleUiEnabled', g_firewallRuleUiEnabled, { expires: 1});
|
|
||||||
|
|
||||||
if (json.listcapabilitiesresponse.capability.userpublictemplateenabled != null) {
|
if (json.listcapabilitiesresponse.capability.userpublictemplateenabled != null) {
|
||||||
g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean
|
g_userPublicTemplateEnabled = json.listcapabilitiesresponse.capability.userpublictemplateenabled.toString(); //convert boolean to string if it's boolean
|
||||||
$.cookie('userpublictemplateenabled', g_userPublicTemplateEnabled, { expires: 1});
|
$.cookie('userpublictemplateenabled', g_userPublicTemplateEnabled, { expires: 1});
|
||||||
|
|||||||
@ -662,7 +662,7 @@
|
|||||||
add: {
|
add: {
|
||||||
label: 'Add VMs',
|
label: 'Add VMs',
|
||||||
action: function(args) {
|
action: function(args) {
|
||||||
var openFirewall = g_firewallRuleUiEnabled == "true" ? false : true;
|
var openFirewall = false;
|
||||||
var data = {
|
var data = {
|
||||||
algorithm: args.data.algorithm,
|
algorithm: args.data.algorithm,
|
||||||
name: args.data.name,
|
name: args.data.name,
|
||||||
@ -1645,7 +1645,7 @@
|
|||||||
add: {
|
add: {
|
||||||
label: 'Add VMs',
|
label: 'Add VMs',
|
||||||
action: function(args) {
|
action: function(args) {
|
||||||
var openFirewall = g_firewallRuleUiEnabled == "true" ? false : true;
|
var openFirewall = false;
|
||||||
var data = {
|
var data = {
|
||||||
algorithm: args.data.algorithm,
|
algorithm: args.data.algorithm,
|
||||||
name: args.data.name,
|
name: args.data.name,
|
||||||
@ -1915,7 +1915,7 @@
|
|||||||
add: {
|
add: {
|
||||||
label: 'Add VM',
|
label: 'Add VM',
|
||||||
action: function(args) {
|
action: function(args) {
|
||||||
var openFirewall = g_firewallRuleUiEnabled == "true" ? false : true;
|
var openFirewall = false;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('createPortForwardingRule'),
|
url: createURL('createPortForwardingRule'),
|
||||||
|
|||||||
@ -8,7 +8,6 @@ var g_enableLogging = false;
|
|||||||
var g_timezoneoffset = null;
|
var g_timezoneoffset = null;
|
||||||
var g_timezone = null;
|
var g_timezone = null;
|
||||||
var g_supportELB = null;
|
var g_supportELB = null;
|
||||||
var g_firewallRuleUiEnabled = null; //true or false
|
|
||||||
var g_directAttachSecurityGroupsEnabled = "false";
|
var g_directAttachSecurityGroupsEnabled = "false";
|
||||||
var g_userPublicTemplateEnabled = "true";
|
var g_userPublicTemplateEnabled = "true";
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user