|
@@ -16,12 +16,13 @@
|
|
|
# limitations under the License.
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
import json
|
|
import json
|
|
|
|
|
+import urllib
|
|
|
|
|
|
|
|
from django.urls import reverse
|
|
from django.urls import reverse
|
|
|
from django.utils.translation import ugettext as _
|
|
from django.utils.translation import ugettext as _
|
|
|
|
|
|
|
|
from desktop.conf import DEFAULT_USER
|
|
from desktop.conf import DEFAULT_USER
|
|
|
-from desktop.lib.paths import get_desktop_root
|
|
|
|
|
|
|
+from desktop.lib.paths import get_desktop_root, SAFE_CHARACTERS_URI_COMPONENTS
|
|
|
|
|
|
|
|
from notebook.connectors.base import Notebook
|
|
from notebook.connectors.base import Notebook
|
|
|
|
|
|
|
@@ -36,7 +37,7 @@ def compress_files_in_hdfs(request, file_names, upload_path, archive_name):
|
|
|
shell_notebook = Notebook(
|
|
shell_notebook = Notebook(
|
|
|
name=_('HDFS Compression to %(upload_path)s/hue_compressed.zip') % {'upload_path': upload_path},
|
|
name=_('HDFS Compression to %(upload_path)s/hue_compressed.zip') % {'upload_path': upload_path},
|
|
|
isManaged=True,
|
|
isManaged=True,
|
|
|
- onSuccessUrl=reverse('filebrowser.views.view', kwargs={'path': upload_path})
|
|
|
|
|
|
|
+ onSuccessUrl='/filebrowser/view=' + urllib.quote(upload_path.encode('utf-8'), safe=SAFE_CHARACTERS_URI_COMPONENTS)
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
shell_notebook.add_shell_snippet(
|
|
shell_notebook.add_shell_snippet(
|