diff --git a/CHANGELOG.md b/CHANGELOG.md index df9b96e..c6f7099 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ ## [0.0.3a] - 2015-08-27 + ### Added * Add sample config files for deploying two application instances Paths ==> `/alz` and `/onefl` (Andrei Sura) diff --git a/app/deploy/fabfile.py b/app/deploy/fabfile.py index 8f6fa08..0e8d35a 100644 --- a/app/deploy/fabfile.py +++ b/app/deploy/fabfile.py @@ -485,7 +485,9 @@ def restart_wsgi_app(): def check_app(): """cURL the target server to check if the app is up""" require('environment', provided_by=[production, staging]) - local('curl -sk https://%(project_url)s | grep "Version " ' % env) + local('curl -sk https://%(project_url)s | grep "Version " ' + ' | grep -oE "[0-9.]{1,2}[0-9.]{1,2}[0-9a-z.]{1,4}" | head -1 ' % env) + def print_project_repo(): diff --git a/app/redidropper/models/user_entity.py b/app/redidropper/models/user_entity.py index 7c0e463..89547e4 100644 --- a/app/redidropper/models/user_entity.py +++ b/app/redidropper/models/user_entity.py @@ -67,6 +67,8 @@ def is_active(self): def is_expired(self): """ An user can be blocked by setting expiration date to yesterday""" + if self.access_expires_at is None: + return False return self.access_expires_at < datetime.today() def is_anonymous(self): diff --git a/app/redidropper/static/css/parallax.css b/app/redidropper/static/css/parallax.css index e69c037..f97ea9d 100644 --- a/app/redidropper/static/css/parallax.css +++ b/app/redidropper/static/css/parallax.css @@ -141,3 +141,34 @@ This stylesheet and the associated (x)html may be modified in any way to fit you #support button { color: #FFFFFF; } + +/*So that all content and icon is visible on smaller screens*/ +@media all and (max-width: 1000px) { + #home { + height: 600px; + } + #about { + height: 600px; + } + #information { + height: 600px; + } + #services { + height: 600px; + } + #gettingstarted { + height: 600px; + } + #faq { + height: 600px; + } + #support { + height: 600px; + } + #image2 { + height: 600px; + } + #image3 { + height: 600px; + } +} diff --git a/app/redidropper/static/js/sidebar.js b/app/redidropper/static/js/sidebar.js index 51736ae..237222d 100644 --- a/app/redidropper/static/js/sidebar.js +++ b/app/redidropper/static/js/sidebar.js @@ -5,8 +5,8 @@ $(document).ready(function() { $("#wrapper").toggleClass("toggled"); var icon = $(this).parent().find(".fa") if (icon.hasClass('fa-angle-left')) - icon.removeClass('fa-angle-left').addClass("fa-angle-right"); + icon.removeClass('fa-angle-left').addClass("fa-bars"); else - icon.removeClass('fa-angle-right').addClass("fa-angle-left"); + icon.removeClass('fa-bars').addClass("fa-angle-left"); }); }); diff --git a/docs/functional_specs.md b/docs/functional_specs.md new file mode 100644 index 0000000..69bba37 --- /dev/null +++ b/docs/functional_specs.md @@ -0,0 +1,52 @@ +# Functional Specification for the REDI-Dropper Application + +## Authors + +* Andrei Sura +* Kevin Hanson +* Philip Chase +* Christopher P. Barnes + +## Overview + +The RED-I Dropper application is a tool where by dynamic data is transferred +from multiple locations via a modern JavaScript framerwork over encrypted +channel to storage services for further processing. The application can be +customized to place datasets into processing environments that provide analysis +and quanitified data to aggregation points. + + +## Workflow and Use Cases + +### Ella gets a MRI scan uploaded with RED-I Dropper for analysis. + +Ella is a woman of latin heritage living in Miami, FL. She is a widow living +with her son-in-law and Daughter. She has undergone a neurocognitive assessment +with Dr. Miami and now she has been referred to the brain imaging specialists +at WeCare Hospital to have an MRI brain image performed. A technician conducts +the MRI image collection process. At the conclusion of which consortium staff +acquire the images and visit a website that is able to handle image uploads +potentially 3gb in size per study participant encounter. When the consortium +staff visits the website they utilize a Shibboleth account to +authenticate securely to the RED-I Dropper website. Once logged on, the +consortium staff see a question asking them which subject goes with the MRI +scan. They see a list that shows the study participant’s ID. + +Once the consortium staff verifies that the subject that was scanned is the +same as the one in the list they select the study participant. The staff is +prompted with a file picker where they are able to select +all images obtained from the MRI process at once and set them to upload. +Prior to an image upload the RED-I Dropper program checks to see if a folder +exists on the server for the subjectID and if it doesn't exist +then the folder is created the moment a file is uploaded. As the image +begins to upload, a progress bar displays for the upload process and once +completed they see a message saying “MRI scans for Ella have been uploaded, +thank you!” +The RED-I Dropper server then prefixes the file names with a unique +identifier in the format +“YYYYMMDD_HHMM_SiteID_SubjectID_5digtSequenceNumber” followed by the +original file name. + +Example: +original filename: xyz.jpg +stored filename: 20120101_0123_SiteIDA_SubjectIDB_Sequence123_xyz.jpg diff --git a/docs/img/flowchart_diagram_redi_dropper_file_upload_process.ep b/docs/img/flowchart_diagram_redi_dropper_file_upload_process.ep new file mode 100644 index 0000000..b8046a7 --- /dev/null +++ b/docs/img/flowchart_diagram_redi_dropper_file_upload_process.ep @@ -0,0 +1,497 @@ + +Untitled Page1426168828807_2044870810.4000244140625#ffffff + + Click "Login"button + + + + + + + Go tohttps://redi-dropper.com + + + + + + + EnterUsername, Password + + + + + + + + + + + + + + + + + + Is Shobb AuthSuccess? + + + + + + + Display List ofSubjects basedon the ActiveDirectory Group(UF/Miami/...) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YES + + + + + + + End + + + + + + + + + + + + + + + + + + + + API Call toREDCap Serverto retrieve thelist of Subjects + + + + + + + + + + + + + + + + + + + UploadFile/Files inchunks + + + + + + + + + + + + + + + + + + + Show ProgressFeedback + + + + + + + + Pick File/Filesto upload + + + + + + + + + + + + + + + + + + Is UploadCompleted? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YES + + + + + + + + + + + + + + + + + Is files listcorrect? + + + + + + + + + + + + + YES + + + + + + + + + + + + + + + + + Is there anerror? + + + + + + + + + + + + + NO + + + + + + Compute MD5sum on the filereceived + + + + + + + + + + + + + + + + + + Is MD5 summatching theoriginal file? + + + + + + + Compute MD5sum + + + + + + + + + + + + + ON + + + + + + + + + + + + YES + + + + + + + + + + + + + + + + + Retry Upload? + + + + + + + + + + + + + YES + + + + + + + Begin + + + + + + + + + + + + + NO + + + + + + + + + + + + + + + + + + + + + + + + NO + + + + + + + + + + + + + + + + + + + + + + + + NO + + + + + + + + + + + + ON + + + + + + + DisplayList ofFilesUploaded + + + + + + + + + + + + + + + + + + + + + + + + + YES + + + + + \ No newline at end of file diff --git a/docs/img/flowchart_diagram_redi_dropper_file_upload_process.png b/docs/img/flowchart_diagram_redi_dropper_file_upload_process.png new file mode 100644 index 0000000..bb47eeb Binary files /dev/null and b/docs/img/flowchart_diagram_redi_dropper_file_upload_process.png differ diff --git a/docs/img/saml.png b/docs/img/saml.png new file mode 100644 index 0000000..09a591c Binary files /dev/null and b/docs/img/saml.png differ diff --git a/docs/technical_specs.md b/docs/technical_specs.md new file mode 100644 index 0000000..bddc2eb --- /dev/null +++ b/docs/technical_specs.md @@ -0,0 +1,84 @@ + +# Work in progress + + + +Technical Specifications for REDIDropper +======================================== + + +## Software Architecture Considerations + +1. **use two repositories** + + One repository is used for the **client** component and the second one for the **server** component + + Advantages: + 1. develop the UI separately from the server (different language/framework) + 2. force developers to think about the "Not Breaking the Contract" as defined by the supported API functions + 3. keep the list of issues related to the UI separate from the Server issues + + Disadvantages: + 1. can encounter issues with cross-domain requests if the client is deployed on a different server + 2. forces deployment of two repositories in order to test the application + 3. forces the need to check two repositories during development in order to keep track of changes + + +2. **use frameworks to allow reusing existing solutions** + + Client Candidates: + 1. [Angular](https://angularjs.org/) + 2. [ReactJS](https://github.com/reactjs/react-tutorial) with [Flux](https://github.com/facebook/flux) [comprehensive-guide](http://tylermcginnis.com/reactjs-tutorial-a-comprehensive-guide-to-building-apps-with-react/) + 3. [Knockout](http://knockoutjs.com/) + 4. [BackboneJS](http://backbonejs.org/) [blog-posts](https://github.com/jashkenas/backbone/wiki/Tutorials%2C-blog-posts-and-example-sites) + + Server Candidates: + 1. Python: [Werkzeug](http://werkzeug.pocoo.org/docs/0.9/routing/#), [Flask](http://flask.pocoo.org/docs/0.10/tutorial/), web2py, Tornado, Bottle, CherryPy, Django, Grok, Pylons, Pyjamas, Pyramid + 2. NodeJS: [Express](http://expressjs.com/starter/basic-routing.html), EmberJS, SailsJS + 3. PHP: CakePHP, Slim, Laravel, Joomla, Symfony + 4. Ruby: Sinatra + +3. **implement data transfer between the server component and REDCap** + + Candidates: + 1. [CURL](https://github.com/sburns/advanced-redcap-interfaces/blob/master/slides.md) + 2. [Pycap](http://pycap.readthedocs.org/en/latest/) + + +4. **use a JS library for implementing the large file upload within the browser** + + Candidates: + 1. [ng-flow](https://github.com/flowjs/ng-flow) ( [PHP server component](https://github.com/flowjs/flow.js/blob/master/samples/Backend%20on%20PHP.md) ) + 2. [resumable.js](https://github.com/23/resumable.js/blob/master/samples/Backend%20on%20PHP.md) + 3. [Real ajax uploader](http://www.albanx.com/programing/ajaxupload/?example=2) + + + @TODO: read http://stackoverflow.com/questions/2502596/python-http-post-a-large-file-with-streaming + + +5. understand shibboleth authorization scheme + +![saml2-browser-sso-redirect-post](img/saml.png) + + +6. **choose a server for deployment** + + Candidates: + 1. [Apache](http://flask.pocoo.org/docs/0.10/deploying/mod_wsgi/) + 2. [Nginx](https://www.digitalocean.com/community/tutorials/how-to-deploy-python-wsgi-applications-using-uwsgi-web-server-with-nginx) + + [Servers Comparison](https://www.digitalocean.com/community/tutorials/a-comparison-of-web-servers-for-python-based-web-applications) + + + +## Flow Charts + +![img/flowchart_diagram_redi_dropper_file_upload_process.png](img/flowchart_diagram_redi_dropper_file_upload_process.png) + + +## Creating large test files + +
+   fallocate -l 1G large_file.mri
+   dd if=/dev/zero of=large_file.mri bs=1G count=1
+