[ https://issues.apache.org/jira/browse/CLOUDSTACK-10329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16404170#comment-16404170 ]
ASF GitHub Bot commented on CLOUDSTACK-10329: --------------------------------------------- rafaelweingartner commented on a change in pull request #2494: [CLOUDSTACK-10329] Button in ACL rules page to export all rules as a CSV file URL: https://github.com/apache/cloudstack/pull/2494#discussion_r175302601 ########## File path: ui/scripts/vpc.js ########## @@ -15,6 +15,53 @@ // specific language governing permissions and limitations // under the License. (function($, cloudStack) { + var isNumeric = function (n) { + return !isNaN(parseFloat(n)); + }; + var createSafeCsvValue = function(value){ + if(value){ + return '"' + value + '"'; Review comment: @nitin-maharana thanks for the review, but I did not quite understand your question. Here is an example of CSV generated using the code of this PR: ``` "id","#Rule","CIDR","Action","Protocol","#Protocol","Start Port","End Port","ICMP Type","ICMP Code","Traffic Type","Reason" "ef06c57e-dc8b-40d9-a461-5a30072384ab","2","19.168.56.0/12","Allow","all",,,,,,"Ingress", "45835dfb-260c-461d-8051-444ac764151e","102","19.168.56.0/12","Allow","tcp",,"1","1",,,"Ingress", ``` I am using this `createSafeCsvValue ` to enclose the value with double quotes, which will avoid problems with values that may have commas in them. If you open the file generated with this code in Excel, it is transparent for users. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Button in ACL rules page to export all rules as a CSV file > ----------------------------------------------------------- > > Key: CLOUDSTACK-10329 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10329 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: Rafael Weingärtner > Assignee: Rafael Weingärtner > Priority: Major > Fix For: 4.12 > > > It is interesting to create a button in the ACL rule listing page to export > all rules in a CSV file. This file can facilitate the auditing and reporting > of rules. -- This message was sent by Atlassian JIRA (v7.6.3#76005)