From b5d712251c2804723fd06650c4da96e8026c8fa6 Mon Sep 17 00:00:00 2001 From: hemanthboyina Date: Mon, 3 Aug 2020 23:21:01 +0530 Subject: [PATCH] HDFS-15503. File and directory permissions are not able to be modified from WebUI. (cherry picked from commit 82f3ffcd64d25cf3a2f5e280e07140994e0ba8cb) --- .../hadoop-hdfs-rbf/src/main/webapps/router/explorer.js | 4 +++- .../hadoop-hdfs/src/main/webapps/hdfs/explorer.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/explorer.js b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/explorer.js index d2f372920a..448e2790e3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/explorer.js +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/explorer.js @@ -108,7 +108,8 @@ */ function view_perm_details(e, filename, abs_path, perms) { $('.explorer-perm-links').popover('destroy'); - e.popover({html: true, content: $('#explorer-popover-perm-info').html(), trigger: 'focus'}) + setTimeout(function() { + e.popover({html: true,sanitize: false, content: $('#explorer-popover-perm-info').html(), trigger: 'focus'}) .on('shown.bs.popover', function(e) { var popover = $(this), parent = popover.parent(); //Convert octal to binary permissions @@ -122,6 +123,7 @@ }); }) .popover('show'); + }, 100); } // Use WebHDFS to set permissions on an absolute path diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js index f1a5f4a48c..8ad7a65708 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js @@ -108,7 +108,8 @@ */ function view_perm_details(e, filename, abs_path, perms) { $('.explorer-perm-links').popover('destroy'); - e.popover({html: true, content: $('#explorer-popover-perm-info').html(), trigger: 'focus'}) + setTimeout(function() { + e.popover({html: true,sanitize: false, content: $('#explorer-popover-perm-info').html(), trigger: 'focus'}) .on('shown.bs.popover', function(e) { var popover = $(this), parent = popover.parent(); //Convert octal to binary permissions @@ -122,6 +123,7 @@ }); }) .popover('show'); + }, 100); } // Use WebHDFS to set permissions on an absolute path