You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by in...@apache.org on 2020/03/29 15:17:19 UTC
[hadoop] branch trunk updated: HDFS-15239. Add button to go to the
parent directory in the explorer. Contributed by hemanthboyina.
This is an automated email from the ASF dual-hosted git repository.
inigoiri pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new f7a94ec HDFS-15239. Add button to go to the parent directory in the explorer. Contributed by hemanthboyina.
f7a94ec is described below
commit f7a94ec0a443711cf48c8ab146c5b365e358f0b3
Author: Inigo Goiri <in...@apache.org>
AuthorDate: Sun Mar 29 08:17:02 2020 -0700
HDFS-15239. Add button to go to the parent directory in the explorer. Contributed by hemanthboyina.
---
.../hadoop-hdfs-rbf/src/main/webapps/router/explorer.html | 8 ++++++--
.../hadoop-hdfs-rbf/src/main/webapps/router/explorer.js | 7 +++++++
.../hadoop-hdfs/src/main/webapps/hdfs/explorer.html | 8 ++++++--
hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js | 7 +++++++
4 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/explorer.html b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/explorer.html
index 3a5956d..1f45f4d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/explorer.html
+++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/explorer.html
@@ -172,7 +172,7 @@
</div>
<div class="row">
- <div class="col-xs-10 col-md-10">
+ <div class="col-xs-9 col-md-9">
<form onsubmit="return false;">
<div class="input-group">
<input type="text" class="form-control" id="directory"/>
@@ -182,7 +182,7 @@
</div>
</form>
</div>
- <div class="col-xs-2 col-md-2">
+ <div class="col-xs-3 col-md-3">
<button type="button" class="btn btn-default" data-toggle="modal"
aria-label="New Directory" data-target="#btn-create-directory"
title="Create Directory" id="btn-create-dir">
@@ -199,6 +199,10 @@
<li><a id="explorer-cut">Cut</a></li>
<li><a id="explorer-paste">Paste</a></li>
</ul>
+ <button type="button" class="btn btn-default" data-toggle="modal"
+ aria-label="Parent Directory" title="Parent Directory" id="parentDir">
+ <span class="glyphicon glyphicon-level-up"></span>
+ </button>
</div>
</div>
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 59a4b8a..d2f3729 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
@@ -377,6 +377,13 @@
}
+ $('#parentDir').click(function () {
+ var current = current_directory;
+ var lastIndex = current.lastIndexOf('/');
+ var parent = current.substr(0, lastIndex);
+ browse_directory(parent);
+ })
+
function init() {
dust.loadSource(dust.compile($('#tmpl-explorer').html(), 'explorer'));
dust.loadSource(dust.compile($('#tmpl-block-info').html(), 'block-info'));
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.html b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.html
index bcca5ba..7b5f355 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.html
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.html
@@ -172,7 +172,7 @@
</div>
<div class="row">
- <div class="col-xs-10 col-md-10">
+ <div class="col-xs-9 col-md-9">
<form onsubmit="return false;">
<div class="input-group">
<input type="text" class="form-control" id="directory"/>
@@ -182,7 +182,7 @@
</div>
</form>
</div>
- <div class="col-xs-2 col-md-2">
+ <div class="col-xs-3 col-md-3">
<button type="button" class="btn btn-default" data-toggle="modal"
aria-label="New Directory" data-target="#btn-create-directory"
title="Create Directory" id="btn-create-dir">
@@ -199,6 +199,10 @@
<li><a id="explorer-cut">Cut</a></li>
<li><a id="explorer-paste">Paste</a></li>
</ul>
+ <button type="button" class="btn btn-default" data-toggle="modal"
+ aria-label="Parent Directory" title="Parent Directory" id="parentDir">
+ <span class="glyphicon glyphicon-level-up"></span>
+ </button>
</div>
</div>
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 4a8eb23..f1a5f4a 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
@@ -376,6 +376,13 @@
}).fail(network_error_handler(url));
}
+ $('#parentDir').click(function () {
+ var current = current_directory;
+ var lastIndex = current.lastIndexOf('/');
+ var parent = current.substr(0, lastIndex);
+ browse_directory(parent);
+ })
+
function init() {
dust.loadSource(dust.compile($('#tmpl-explorer').html(), 'explorer'));
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org