You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/09/11 13:52:38 UTC

[1/2] git commit: updated refs/heads/master to 6e2ac99

Repository: cloudstack
Updated Branches:
  refs/heads/master d80740347 -> 6e2ac9974


CLOUDSTACK-8821: Provide appropriate message in the UI when configuring the Firewall rules.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/93ed525c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/93ed525c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/93ed525c

Branch: refs/heads/master
Commit: 93ed525c00ae809ce813f120b6c260fd197ca311
Parents: dd9ba48
Author: Nitin Kumar Maharana <ni...@citrix.com>
Authored: Wed Sep 9 12:42:15 2015 +0530
Committer: Nitin Kumar Maharana <ni...@citrix.com>
Committed: Wed Sep 9 12:42:15 2015 +0530

----------------------------------------------------------------------
 .../classes/resources/messages.properties       |  2 ++
 ui/dictionary.jsp                               |  2 ++
 ui/scripts/network.js                           | 29 ++++++++++++++++++++
 3 files changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93ed525c/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index 492b46e..a2edde3 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -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
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93ed525c/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index 7d17267..4161498 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -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>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93ed525c/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index e59ef09..110bc4b 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -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')
+                                                                });
+                                                            }
+                                                        }
+                                                    }
+                                                });
+                                            }
                                         }
                                     });
                                 }


[2/2] git commit: updated refs/heads/master to 6e2ac99

Posted by da...@apache.org.
Merge pull request #791 from nitin-maharana/CloudStack-Nitin3

CLOUDSTACK-8821: UI Change while configuring firewall rule.It provides appropriate message in the UI when configuring the firewall rules in Network page.
If the default egress policy is allow, then it says to block traffic. If the default egress policy is deny, then it says to allow traffic.

* pr/791:
  CLOUDSTACK-8821: Provide appropriate message in the UI when configuring the Firewall rules.

Signed-off-by: Daan Hoogland <da...@onecht.net>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6e2ac997
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6e2ac997
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6e2ac997

Branch: refs/heads/master
Commit: 6e2ac9974abd2fb0b02ff01f633a3ba9e952c29b
Parents: d807403 93ed525
Author: Daan Hoogland <da...@onecht.net>
Authored: Fri Sep 11 13:52:18 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Fri Sep 11 13:52:19 2015 +0200

----------------------------------------------------------------------
 .../classes/resources/messages.properties       |  2 ++
 ui/dictionary.jsp                               |  2 ++
 ui/scripts/network.js                           | 29 ++++++++++++++++++++
 3 files changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6e2ac997/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------