Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Hue Filechooser in Workflow Page always loads abfs:// if configured a…
…nd it wont load well (#GH-1764)

* [abfs] Hue Filechooser in Workflow Page always loads abfs:// if connfigured and it wont load well GH-1763
  • Loading branch information
Akhilsnaik committed Feb 10, 2021
1 parent f032e92 commit 8d2c963
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions apps/filebrowser/src/filebrowser/views.py
Expand Up @@ -204,7 +204,18 @@ def view(request, path):
decoded_path = unquote_url(path)
if path != decoded_path:
path = decoded_path
# default_to_home is set in bootstrap.js

# default_abfs_home is set in jquery.filechooser.js
if 'default_abfs_home' in request.GET:
from azure.abfs.__init__ import get_home_dir_for_ABFS
home_dir_path = get_home_dir_for_ABFS()
if request.fs.isdir(home_dir_path):
return format_preserving_redirect(
request,
'/filebrowser/view=' + urllib_quote(home_dir_path.encode('utf-8'), safe=SAFE_CHARACTERS_URI_COMPONENTS)
)

# default_to_home is set in jquery.filechooser.js
if 'default_to_home' in request.GET:
home_dir_path = request.user.get_home_directory()
if request.fs.isdir(home_dir_path):
Expand All @@ -213,7 +224,7 @@ def view(request, path):
'/filebrowser/view=' + urllib_quote(home_dir_path.encode('utf-8'), safe=SAFE_CHARACTERS_URI_COMPONENTS)
)

# default_to_home is set in bootstrap.js
# default_to_home is set in jquery.filechooser.js
if 'default_to_trash' in request.GET:
home_trash_path = _home_trash_path(request.fs, request.user, path)
if request.fs.isdir(home_trash_path):
Expand Down
Expand Up @@ -112,7 +112,7 @@ const defaults = {
abfs: {
scheme: 'abfs',
root: 'abfs://',
home: 'abfs://',
home: '/?default_abfs_home',
icon: {
svg: {
brand: '#hi-adls',
Expand Down

0 comments on commit 8d2c963

Please sign in to comment.