|
@@ -78,6 +78,12 @@
|
|
|
return data.RemoteException !== undefined ? data.RemoteException.message : "";
|
|
|
}
|
|
|
|
|
|
+ function encode_path(abs_path) {
|
|
|
+ abs_path = encodeURIComponent(abs_path);
|
|
|
+ var re = /%2F/g;
|
|
|
+ return abs_path.replace(re, '/');
|
|
|
+ }
|
|
|
+
|
|
|
function view_file_details(path, abs_path) {
|
|
|
function show_block_info(blocks) {
|
|
|
var menus = $('#file-info-blockinfo-list');
|
|
@@ -102,12 +108,6 @@
|
|
|
menus.change();
|
|
|
}
|
|
|
|
|
|
- function encode_path(abs_path) {
|
|
|
- abs_path = encodeURIComponent(abs_path);
|
|
|
- var re = /%2F/g;
|
|
|
- return abs_path.replace(re, '/');
|
|
|
- }
|
|
|
-
|
|
|
abs_path = encode_path(abs_path);
|
|
|
var url = '/webhdfs/v1' + abs_path + '?op=GET_BLOCK_LOCATIONS';
|
|
|
$.get(url).done(function(data) {
|
|
@@ -149,7 +149,7 @@
|
|
|
return chunk.write('' + new Date(Number(value)).toLocaleString());
|
|
|
}
|
|
|
};
|
|
|
- var url = '/webhdfs/v1' + dir + '?op=LISTSTATUS';
|
|
|
+ var url = '/webhdfs/v1' + encode_path(dir) + '?op=LISTSTATUS';
|
|
|
$.get(url, function(data) {
|
|
|
var d = get_response(data, "FileStatuses");
|
|
|
if (d === null) {
|