add a (hidden) ./svg URL on workflows (fix #1663)
This commit is contained in:
parent
f705d652f5
commit
ab7f7619e2
|
@ -527,7 +527,7 @@ class WorkflowStatusDirectory(Directory):
|
|||
|
||||
class WorkflowPage(Directory):
|
||||
_q_exports = ['', 'edit', 'delete', 'newstatus', ('status', 'status_dir'), 'update_order',
|
||||
'duplicate', 'export']
|
||||
'duplicate', 'export', 'svg']
|
||||
|
||||
def __init__(self, component):
|
||||
try:
|
||||
|
@ -588,6 +588,11 @@ class WorkflowPage(Directory):
|
|||
if not str(self.workflow.id).startswith(str('_')):
|
||||
self.get_new_status_form()
|
||||
|
||||
def svg(self):
|
||||
response = get_response()
|
||||
response.set_content_type('image/svg+xml')
|
||||
return graphviz(self.workflow, include=False)
|
||||
|
||||
def export(self):
|
||||
x = self.workflow.export_to_xml()
|
||||
indent(x)
|
||||
|
|
Loading…
Reference in New Issue