Render batch execution description as markdown
This commit is contained in:
parent
cc2308c399
commit
5969515f25
2 changed files with 16 additions and 4 deletions
|
@ -38,6 +38,7 @@ from six import StringIO
|
|||
|
||||
import json
|
||||
import six
|
||||
import markdown
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import orm
|
||||
|
||||
|
@ -175,6 +176,10 @@ class BatchMasterView(MasterView):
|
|||
if kwargs['execute_enabled']:
|
||||
url = self.get_action_url('execute', batch)
|
||||
kwargs['execute_form'] = self.make_execute_form(batch, action_url=url)
|
||||
description = (self.handler.describe_execution(batch)
|
||||
or "TODO: handler does not provide a description for this batch")
|
||||
kwargs['execution_described'] = markdown.markdown(
|
||||
description, extensions=['fenced_code', 'codehilite'])
|
||||
else:
|
||||
kwargs['why_not_execute'] = self.handler.why_not_execute(batch)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue