This is imperfect and rough but provides a bare minimum implementation of a bunch of important functionality that the absence of represents serious enough usability problems that I think it belongs in 19.09.
For admins, there is no way to track workflow invocations being scheduled currently and we routinely ask people to set the state on the workflow invocation column with SQL directly. This is a serious issue and this commit provides a new list in the admin interface of active invocations with state tracking (for steps scheduled and jobs executed) with a cancel button for each.
The same component that gets embedded in the grid for state tracking is also now added to the landing page after workflows are executed. Each invocation gets its own tracking widget - we don't name workflow invocations so the creation time is used to distinguish between invocations (we could probably iterate on this and do something with inputs?). Even if ephemeral, this provides users a way of tracking workflow invocation progress and notifying them if scheduling fails. Previously we had no such notifications. It also provides them a way to cancel workflow invocations (less of a bug then these other points, but still important).
Once the workflow has finished executing, an invocation report link will appear - again the lack of a link inside of the app to the invocation report added in 19.09. Previously there was no link in the UI for this report.
Implement markdown backend and frontend components as well generator plugin framework to allow customizable workflow invocation reports.
Architectural Choices on the Client
Old-style embedded objects vs components
In theory, this could make really nice use of excellent VueJS components for dataset display, dataset collection display, workflow display, etc.. These aren't available yet, we don't even really have Backbone stuff that exist very well outside history panels, so this re-uses "components" from Galaxy Pages for datasets and reuses the collection display for history panels as a stand-alone display for collections (I got this trick from DIsplayStructured.vue). This isn't ideal and I know that but at least reusing things this way will provide a path forward for migrating both pages and this new Markdown language (which could easily replace or co-exist with pages HTML someday) together seamlessly as the real modern components become available and doesn't increase the overall work needed to integrate newer style components. In fact, this might even be the impetus for creating and polishing more of these components.
markdown-it vs markdown-it-vue
I tried this with markdown-it-vue also but it added very little in terms of reducing client code, obscured entirely how to attach plugins to the markdown rendering process, and brought in many, many more extra packages that we don't need or want.
Given there is no representation of invocations in the GUI and not editor for reports config this is a bit challenging still. But here is goes:
- Source Galaxy's virtualenv.
- Login to a user and grab an API key, set in the following command:
- ``GALAXY_TEST_EXTERNAL=http://localhost:8080 GALAXY_TEST_USER_API_KEY=38175dfc69d9009992b69efcca8b209b pytest test/api/test_workflows.py::WorkflowsApiTestCase::test_workflow_invocation_report_custom``
- In the web browser go to http://localhost:8080/api/invocations and grab the latest invocation ID. Replace it in the follow query string.
- Navigate to http://localhost:8080/workflows/invocations/report?id=c887f1d0da42bdfe