DDMAL / Rodan

:dragon_face: A web-based workflow engine.
https://rodan2.simssa.ca/
47 stars 13 forks source link

Integrate Interactive Job Interfaces #145

Closed ahankinson closed 11 years ago

ahankinson commented 11 years ago

We currently have a number of Javascript interfaces for interactive jobs (Jobs that require human input to complete). These include browser-based thresholding, cropping, staff detection and masking.

While these have been implemented in Javascript, we now need to further integrate them with the Cappuccino interface.

In theory, this will be pretty easy. Objective-J is a superset of Javascript, so you can work with "pure" javascript objects in Cappuccino.

The "Raphuccino" module may illustrate some techniques for how this is done: http://www.springenwerk.com/2010/04/introducing-raphuccino.html

There are a number of sub-components for this issue:

  1. Integrate existing JS interfaces into Objective-J class modules. Most of the Javascript code can be found in old_code/old_static/js. Each of these modules (e.g., crop, despeckle, rotate, segment, etc. should be self-contained in their own class) We may wish to turn these modules into a Framework module for Cappuccino ("RodanKit" has a nice ring to it), giving us something like:
    • Frameworks
    • RodanKit
    • RKCrop.j
    • RKDespeckle.j
    • RKThreshold.j
    • RKSegment.j

etc..

  1. Create a mechanism where interactive jobs can be paired with their interactive interface. This should be done entirely client-side. It can be as simple as checking as creating a list of jobs that have interfaces and checking to see if an interactive job has an interface available, or it could be something slightly more clever.
  2. Create and display the list of pending interactive jobs in the interface. There is a mocked-up interface for this already in the Rodan application under the "Jobs" tab. The table should show a list of jobs waiting to be worked on. Clicking the button will bring up the interactive interface for the user to do the work. When the user finishes, they should click "Save," at which point the needs_input flag on the RunJob model gets set to False, and the Celery task will continue.
ahankinson commented 11 years ago

Based on a cursory overview, I think the easiest thing to do will be to extend a CPWebView with the interfaces. This will put the code in its own separate HTML iframe.

antonkhelou commented 11 years ago

Progress has been made on this, see the following commits: 7ed7af8ef63fd1863ea4d5cedbdf1523f9add57d 1d9b67f1731ddf989928751d302d8b3b0c955f34

These commits cover all the server-side interactive job functionality. The bulk of what remains to be done is on the client-side interface, where the RunJob objects must be populated inside the Interactive Jobs View TableView. Each of the records (rows) of the TableView should have an associated RunJob uuid and url (ex: /interactive/crop/). The user should then be able to select a row and press on the "Work on Job" button, which would fire a GET request to the server, with the RunJob uuid attached to the request.

EDIT: I am un-assigning myself from this, since I will no longer be working on Rodan for the summer.

mrbannon commented 11 years ago

Deep is now handling these.

https://github.com/DDMAL/Rodan/wiki/Salzinnes-Demo-Requirements