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

Haohui Mai commented on HDFS-7995:
----------------------------------

Sorry for the late reply. Thanks for the work.

{code}
+  <div class="modal" id="perm-info" tabindex="-1" role="dialog" 
aria-hidden="true">
{code}

It makes sense to give the id a prefix (e.g. {{explorer}}) to avoid confusion. 
The same comment applies to things like {{perm-heading}}, etc.

{code}
+            <td><span class="explorer-perm-links editable-click">
+                  {type|helper_to_directory}{permission|helper_to_permission}
+                  {aclBit|helper_to_acl_bit}
+                </span></td>

-            <td><a style="cursor:pointer" inode-type="{type}" 
class="explorer-browse-links" inode-path="{pathSuffix}">{pathSuffix}</a></td>
+            <td><a style="cursor:pointer" inode-type="{type}" 
class="explorer-browse-links">{pathSuffix}</a></td>{code}

The change seems unnecessary.


{code}
+  function view_perm_details(filename, abs_path, perms) {
{code}

There is no need to parse the permission from the string as the original data 
is available in the {{LISTSTATUS}} call. What you can do is to expose it 
through a data field. e.g.,

{code}
+          <tr inode-path="{pathSuffix}" data-permission="{permission}">
{code}

{code}
+  function convertCheckboxesToOctalPermissions() {
{code}

It is easier to calculate the permission by expose the location of the bit 
using an attribute. e.g., 
{code}
var p = 0;
$.each('perm inputbox:checked').function() {
  p += 1 << (+$(this).attr('data-bit'));
}
return p.toString(8);
{code}

> Implement chmod in the HDFS Web UI
> ----------------------------------
>
>                 Key: HDFS-7995
>                 URL: https://issues.apache.org/jira/browse/HDFS-7995
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Ravi Prakash
>            Assignee: Ravi Prakash
>         Attachments: HDFS-7995.01.patch, HDFS-7995.02.patch
>
>
> We should let users change the permissions of files and directories using the 
> HDFS Web UI



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

Reply via email to