Review Board 1.6.3

Upload a folder by uploading a zipfile and decompressing it.

Review Request #2370 - submitted 1 year, 6 months ago

Abraham Elmahrek Reviewers
hue
HUE-775 romain, enricoberti
None hue-rw
commit eaac25fc170730961a9844e68492e8fa8959442e
Author: abec <abe@cloudera.com>
Date:   Thu Sep 20 14:42:34 2012 -0700

    HUE-775 [fb] Upload zip file through filebrowser.
    
    - Added test cases to validate unzipping
    - Added upload scenarios to upload test case to ensure proper uploading and extraction
    - Added a hackish solution for explicitly requiring zip extraction
    - New 'uplaod archive' button.

:100644 100644 dbf0308... 248cb0a... M	apps/filebrowser/src/filebrowser/forms.py
:000000 100644 0000000... 70d096a... A	apps/filebrowser/src/filebrowser/lib/archives.py
:000000 100644 0000000... 95cab3d... A	apps/filebrowser/src/filebrowser/lib/archives_test.py
:100644 100644 2e536fd... 3f104f0... M	apps/filebrowser/src/filebrowser/templates/listdir.mako
:100644 100644 2807fd9... 5fb3040... M	apps/filebrowser/src/filebrowser/templates/listdir_components.mako
:000000 100644 0000000... 5391055... A	apps/filebrowser/src/filebrowser/test_data/test.zip
:100644 100644 58b6c19... 2c26a13... M	apps/filebrowser/src/filebrowser/urls.py
:100644 100644 c11cc63... 4536eed... M	apps/filebrowser/src/filebrowser/views.py
:100644 100644 a9c21e1... 413fde1... M	apps/filebrowser/src/filebrowser/views_test.py
:100644 100644 c941e4c... 351ea50... M	desktop/libs/hadoop/src/hadoop/fs/fs_test.py
:100644 100644 b7f33b7... 817fac5... M	desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py
Ran all filebrowser and hadoop lib unit tests.
Visual confirmation.
apps/filebrowser/src/filebrowser/forms.py
Revision dbf0308 New Change
... 50 lines hidden [Expand]
def clean_encoding(self):
51
class RenameForm(forms.Form):
51
class RenameForm(forms.Form):
52
  op = "rename"
52
  op = "rename"
53
  src_path = CharField(label=_("File to rename"), help_text=_("The file to rename."))
53
  src_path = CharField(label=_("File to rename"), help_text=_("The file to rename."))
54
  dest_path = CharField(label=_("New name"), help_text=_("Rename the file to:"))
54
  dest_path = CharField(label=_("New name"), help_text=_("Rename the file to:"))
55

   
55

   
56
class UploadForm(forms.Form):
56
class UploadFileForm(forms.Form):
57
  op = "upload"
57
  op = "upload"
58
  # The "hdfs" prefix in "hdfs_file" triggers the HDFSfileUploadHandler
58
  # The "hdfs" prefix in "hdfs_file" triggers the HDFSfileUploadHandler
59
  hdfs_file = FileField(forms.Form, label=_("File to Upload"))
59
  hdfs_file = FileField(forms.Form, label=_("File to Upload"))
60
  dest = PathField(label=_("Destination Path"), help_text=_("Filename or directory to upload to."))
60
  dest = PathField(label=_("Destination Path"), help_text=_("Filename or directory to upload to."))
61

   
61

   

   
62
class UploadArchiveForm(forms.Form):

   
63
  op = "upload"

   
64
  archive = FileField(forms.Form, label=_("Archive to Upload"))

   
65
  dest = PathField(label=_("Destination Path"), help_text=_("Archive to upload to."))

   
66

   
62
class RemoveForm(forms.Form):
67
class RemoveForm(forms.Form):
63
  op = "remove"
68
  op = "remove"
64
  path = PathField(label=_("File to remove"))
69
  path = PathField(label=_("File to remove"))
65

   
70

   
66
class RmDirForm(forms.Form):
71
class RmDirForm(forms.Form):
... 71 lines hidden [Expand]
apps/filebrowser/src/filebrowser/urls.py
Revision 58b6c19 New Change
 
apps/filebrowser/src/filebrowser/views.py
Revision c11cc63 New Change
 
apps/filebrowser/src/filebrowser/views_test.py
Revision a9c21e1 New Change
 
apps/filebrowser/src/filebrowser/lib/archives.py
New File
 
apps/filebrowser/src/filebrowser/lib/archives_test.py
New File
 
apps/filebrowser/src/filebrowser/templates/listdir.mako
Revision 2e536fd New Change
 
apps/filebrowser/src/filebrowser/templates/listdir_components.mako
Revision 2807fd9 New Change
 
apps/filebrowser/src/filebrowser/test_data/test.zip
New File
 
desktop/libs/hadoop/src/hadoop/fs/fs_test.py
Revision c941e4c New Change
 
desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py
Revision b7f33b7 New Change
 
  1. apps/filebrowser/src/filebrowser/forms.py: Loading...
  2. apps/filebrowser/src/filebrowser/urls.py: Loading...
  3. apps/filebrowser/src/filebrowser/views.py: Loading...
  4. apps/filebrowser/src/filebrowser/views_test.py: Loading...
  5. apps/filebrowser/src/filebrowser/lib/archives.py: Loading...
  6. apps/filebrowser/src/filebrowser/lib/archives_test.py: Loading...
  7. apps/filebrowser/src/filebrowser/templates/listdir.mako: Loading...
  8. apps/filebrowser/src/filebrowser/templates/listdir_components.mako: Loading...
  9. apps/filebrowser/src/filebrowser/test_data/test.zip: Loading...
  10. desktop/libs/hadoop/src/hadoop/fs/fs_test.py: Loading...
  11. desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py: Loading...