ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keta Patel (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-14932) "download zip" does not work
Date Fri, 05 Feb 2016 02:37:39 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-14932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15133533#comment-15133533
] 

Keta Patel commented on AMBARI-14932:
-------------------------------------

[~srimanth.gunturi], I would like to get some insight from you on this issue as this is related
to the changes made in AMBARI-14228.

1.
The patch submitted for the Jira AMBARI-14228 has changed the "download" function in the "ambari/contrib/views/files/src/main/resources/ui/app/controllers/file.js"

This is seen in images named "file_1.tiff" and "file_2.tiff"

2.
The new function created "downloadFile" makes a call to the "linkFor" function in "ambari/contrib/views/files/src/main/resources/ui/app/adapter.js"
with a new parameter "checkperm". The corresponding changes made to adapter.js file can be
seen in "adapter.tiff".
Note:
==== 
This "checkperm" paramter is used only when the "option" is "browse" (i.e. to download an
individual file). It is not being used for the other 2 APIs with "option" of "zip" and "concat".

3.
The "DownloadService.tiff" shows the server code changes made for "browse" API where they
use "checkperm" to decide if the response should contain "allowed" property or not.
"file_2.tiff" shows how if the return value does not contain "data.allowed", further processing
to download does not occur.

My questions:
1.) What is the purpose of setting "allowed" to true in the response if we always pass "checkperm"
as true?
2.) Should the issue of handling "zip" and "concat" APIs involve change with the Response
having "allowed" property or changing the condition in "downloadFile" function of the controller
before calling the API?
3.) We are calling "linkFor" 2 times in the "downloadFile" of the controller. Why is this
double call required? Can't we use the same link saved from the earlier call instead of calling
"linkFor" again?

Thank you!

> "download zip"  does not work
> -----------------------------
>
>                 Key: AMBARI-14932
>                 URL: https://issues.apache.org/jira/browse/AMBARI-14932
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-views, contrib
>    Affects Versions: trunk
>            Reporter: Keta Patel
>            Assignee: Keta Patel
>         Attachments: DownloadService.tiff, adapter.tiff, file_1.tiff, file_2.tiff, screenshot.tiff
>
>
> Steps to Reproduce:
> 1. go to "View" - "FILES" - " Create Instance"
> 2. go to hdfs file view
> 3. click "download zip" icon
> The click doesn't download any file. The REST call returns 200 OK status.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message