Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 58B181779E for ; Mon, 31 Aug 2015 19:32:06 +0000 (UTC) Received: (qmail 71164 invoked by uid 500); 31 Aug 2015 19:32:06 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 71132 invoked by uid 500); 31 Aug 2015 19:32:06 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 71116 invoked by uid 99); 31 Aug 2015 19:32:05 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Aug 2015 19:32:05 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 9B7AD26CCDA; Mon, 31 Aug 2015 19:32:04 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2620837389049873483==" MIME-Version: 1.0 Subject: Re: Review Request 37792: Ambari File Browser view - Downloading a directory always creates a zip with name hdfs.zip From: "Yusaku Sako" To: "Yusaku Sako" , "Sid Wagle" , "Srimanth Gunturi" Cc: "Nitiraj Rathore" , "Ambari" Date: Mon, 31 Aug 2015 19:32:04 -0000 Message-ID: <20150831193204.16296.1499@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Yusaku Sako" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/37792/ X-Sender: "Yusaku Sako" References: <20150826093757.13584.25144@reviews.apache.org> In-Reply-To: <20150826093757.13584.25144@reviews.apache.org> Reply-To: "Yusaku Sako" X-ReviewRequest-Repository: ambari --===============2620837389049873483== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37792/#review97127 ----------------------------------------------------------- Ship it! Ship It! - Yusaku Sako On Aug. 26, 2015, 9:37 a.m., Nitiraj Rathore wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37792/ > ----------------------------------------------------------- > > (Updated Aug. 26, 2015, 9:37 a.m.) > > > Review request for Ambari, Srimanth Gunturi, Sid Wagle, and Yusaku Sako. > > > Bugs: AMBARI-12877 > https://issues.apache.org/jira/browse/AMBARI-12877 > > > Repository: ambari > > > Description > ------- > > Earlier : > Downloaded zip file is always named hdfs.zip > > In this Patch : > When single file/ folder is downloaded then zip is named based on that file (eg. somefile.txt.zip or someFolder.zip). If multiples files / folders are downloaded then the zip is named as hdfs.zip itself. > > Changes in Patch: > Earlier he file ambari/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java was hardcoding the name of the zip as hdfs.zip in the HTTP header "Content-Disposition". > Now first we check the number of entries in DownloadRequest.entries and if it is one then we name the zip after the name of this file or folder otherwise the zip is still named as hdfs.zip. > > > Diffs > ----- > > contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java 4d45a76 > contrib/views/files/src/test/java/org/apache/ambari/view/filebrowser/FilebrowserTest.java d481323 > > Diff: https://reviews.apache.org/r/37792/diff/ > > > Testing > ------- > > The unit test file ambari/contrib/views/files/src/test/java/org/apache/ambari/view/filebrowser/FilebrowserTest.java has been updated to add one more test which checks for 5 combinations for file/folder downloads and if the name of zip file comes as expected or not. > > Manual UI test has been done and found to work as expected > > > Thanks, > > Nitiraj Rathore > > --===============2620837389049873483==--