Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334720 - [client] need UI for import/export
Summary: [client] need UI for import/export
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Szymon Brandys CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 334698
Blocks:
  Show dependency tree
 
Reported: 2011-01-18 18:00 EST by Susan McCourt CLA
Modified: 2011-09-01 11:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2011-01-18 18:00:06 EST
For M5, we want users to be able import files into Orion from the file system and export back out.
Comment 1 Susan McCourt CLA 2011-01-18 18:13:12 EST
We may want to check out
http://dojotoolkit.org/reference-guide/dojox/form/FileUploader.html
Comment 2 Susan McCourt CLA 2011-01-19 17:23:50 EST
I just added a link to the nav-table view for export.
You can click on "Download as ZIP" to get the contents of a folder as a zip.
Comment 3 Szymon Brandys CLA 2011-01-20 09:02:46 EST
(In reply to comment #2)
> I just added a link to the nav-table view for export.
> You can click on "Download as ZIP" to get the contents of a folder as a zip.

Works nice. The only inconvenience is that you leave the IDE when you click on it. I'm looking at the import now.
Comment 4 Szymon Brandys CLA 2011-01-27 13:35:12 EST
I have released the first version of the dialog. If you create a folder and go into it, you will see an extra option in the toolbar which opens "Import from zip" dialog.

Click "Select File" to choose a file to import and then "Submit". It will do POST on the folder ImportLocation and will send the content. The dialog will not be closed, you need to click "x". I'll fix that tomorrow.

I was not able to modify headers. It seems it cannot be done when sending a form. I'll double check that. I'll polish the UI tomorrow with Gosia's help.
Comment 5 Szymon Brandys CLA 2011-01-27 13:36:16 EST
Moreover fileMask seems not to work, so you are able to select non-zip files too. It looks like a bug in Dojo.
Comment 6 John Arthorne CLA 2011-01-27 16:52:44 EST
I have changed the servlet implementation to accept the multi-part form input provided by the dojo FileUpload dialog. Now it assumes the POST contains an entire zip file in the body by default. It will switch to chunked upload only if the X-Xfer-Content-Length header is specified.

Some polish items:

 - Dialog doesn't close when the upload is completed
 - Navigator tree/table doesn't refresh to show the uploaded content
 - It will fail if the client doesn't specify a zip file. The failure mode is bad, the browser opens a "Save As" dialog to save the JSON response object describing the failure.
Comment 7 Szymon Brandys CLA 2011-01-28 08:15:13 EST
(In reply to comment #6)
> - Dialog doesn't close when the upload is completed
> - Navigator tree/table doesn't refresh to show the uploaded content

Fixed.

> - It will fail if the client doesn't specify a zip file. The failure mode is...

Investigating.
Comment 8 John Arthorne CLA 2011-02-03 14:10:09 EST
Basic UI was done for M5. We can open additional bugs for follow-on work.