kbase/narrative — pull request #79 by briehl (2014-12-20 04:13:34+00:00)
Title: Update job management to handle methods as well as apps

This updates the job management apparatus to deal with method calls along with app calls. If a method spec indicates that it will be long running (has a 'job_id_output_field' property in its spec), this triggers the method to more or less behave as an app:
- It will 'lock' while running
- It will register a job id from the kernel (thanks Roman!) and store it in the Narrative
- It will visually look like an app task while running
- When the job finishes, it will emit an output cell with the spec-defined widget and output.

Currently, this doesn't unlock the cell, but I kinda feel like that bit of UX is worth revisiting. *Should* a method or app unlock its inputs when finished running, then allow the user to overwrite the outputs?

Either way, this is a step toward fixing some problems with running methods. I tested using the "Insert a Genome into Species Tree" method. I'm unsure of the state of some of the others. Next steps from here include merging the kbaseNarrativeMethodCell and kbaseNarrativeAppCell codebases and linking those cells' delete buttons to their respective jobs (if a user deletes a cell, they should at least be given the option to remove the associated job).