mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8821: Provide appropriate message in the UI when configuring the Firewall rules.
This commit is contained in:
parent
dd9ba48efa
commit
93ed525c00
|
|
@ -2172,3 +2172,5 @@ label.ssh.key.pairs=SSH Key Pairs
|
|||
message.desc.create.ssh.key.pair=Please fill in the following data to create or register a ssh key pair.<br><br>(1) If public key is set, CloudStack will register the public key. You can use it through your private key.<br><br>(2) If public key is not set, CloudStack will create a new SSH Key pair. In this case, please copy and save the private key. CloudStack will not keep it.<br>
|
||||
message.removed.ssh.key.pair=Removed a SSH Key Pair
|
||||
message.please.select.ssh.key.pair.use.with.this.vm=Please select a ssh key pair you want this VM to use:
|
||||
message.configure.firewall.rules.allow.traffic=Configure the rules to allow Traffic
|
||||
message.configure.firewall.rules.block.traffic=Configure the rules to block Traffic
|
||||
|
|
@ -1041,5 +1041,7 @@ dictionary = {
|
|||
'label.role': '<fmt:message key="label.role" />',
|
||||
'label.root.disk.controller': '<fmt:message key="label.root.disk.controller" />',
|
||||
'label.root.disk.offering': '<fmt:message key="label.root.disk.offering" />',
|
||||
'message.configure.firewall.rules.allow.traffic': '<fmt:message key="message.configure.firewall.rules.allow.traffic" />',
|
||||
'message.configure.firewall.rules.block.traffic': '<fmt:message key="message.configure.firewall.rules.block.traffic" />',
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1410,6 +1410,7 @@
|
|||
title: 'label.egress.rules',
|
||||
custom: function(args) {
|
||||
var context = args.context;
|
||||
var isConfigRulesMsgShown = false;
|
||||
|
||||
return $('<div>').multiEdit({
|
||||
context: context,
|
||||
|
|
@ -1612,6 +1613,34 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (!isConfigRulesMsgShown) {
|
||||
isConfigRulesMsgShown = true;
|
||||
$.ajax({
|
||||
url: createURL('listNetworkOfferings'),
|
||||
data: {
|
||||
id: args.context.networks[0].networkofferingid
|
||||
},
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var response = json.listnetworkofferingsresponse.networkoffering ?
|
||||
json.listnetworkofferingsresponse.networkoffering[0] : null;
|
||||
|
||||
if (response != null) {
|
||||
if (response.egressdefaultpolicy == true) {
|
||||
cloudStack.dialog.notice({
|
||||
message: _l('message.configure.firewall.rules.block.traffic')
|
||||
});
|
||||
} else {
|
||||
cloudStack.dialog.notice({
|
||||
message: _l('message.configure.firewall.rules.allow.traffic')
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue