|
@@ -1059,11 +1059,11 @@ class AutocompleteResults {
|
|
|
return [];
|
|
return [];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let suggestions: Suggestion[] = [];
|
|
|
|
|
|
|
+ const suggestions: Suggestion[] = [];
|
|
|
|
|
|
|
|
let path = suggestHdfs.path;
|
|
let path = suggestHdfs.path;
|
|
|
if (path === '') {
|
|
if (path === '') {
|
|
|
- suggestions = [
|
|
|
|
|
|
|
+ suggestions.push(
|
|
|
{
|
|
{
|
|
|
value: 'adl://',
|
|
value: 'adl://',
|
|
|
meta: MetaLabels.Keyword,
|
|
meta: MetaLabels.Keyword,
|
|
@@ -1098,7 +1098,7 @@ class AutocompleteResults {
|
|
|
category: Category.Files,
|
|
category: Category.Files,
|
|
|
popular: false
|
|
popular: false
|
|
|
}
|
|
}
|
|
|
- ];
|
|
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
let fetchFunction = 'fetchHdfsPath';
|
|
let fetchFunction = 'fetchHdfsPath';
|
|
@@ -1142,14 +1142,18 @@ class AutocompleteResults {
|
|
|
fetchFunction
|
|
fetchFunction
|
|
|
];
|
|
];
|
|
|
this.lastKnownRequests.push(
|
|
this.lastKnownRequests.push(
|
|
|
- apiHelperFn({
|
|
|
|
|
|
|
+ apiHelperFn.bind(apiHelper)({
|
|
|
pathParts: parts,
|
|
pathParts: parts,
|
|
|
successCallback: (data: { error?: unknown; files: FileDetails[] }) => {
|
|
successCallback: (data: { error?: unknown; files: FileDetails[] }) => {
|
|
|
if (!data.error) {
|
|
if (!data.error) {
|
|
|
data.files.forEach(file => {
|
|
data.files.forEach(file => {
|
|
|
if (file.name !== '..' && file.name !== '.') {
|
|
if (file.name !== '..' && file.name !== '.') {
|
|
|
|
|
+ let value = path === '' ? '/' + file.name : file.name;
|
|
|
|
|
+ if (file.type === 'dir') {
|
|
|
|
|
+ value += '/';
|
|
|
|
|
+ }
|
|
|
suggestions.push({
|
|
suggestions.push({
|
|
|
- value: path === '' ? '/' + file.name : file.name,
|
|
|
|
|
|
|
+ value,
|
|
|
meta: file.type,
|
|
meta: file.type,
|
|
|
category: Category.Files,
|
|
category: Category.Files,
|
|
|
popular: false,
|
|
popular: false,
|