Ticket #7211: workflow_parser.py.patch
| File workflow_parser.py.patch, 1.2 KB (added by scottb@…, 4 years ago) |
|---|
-
Z:\workflow_parser.py
old new 43 43 return self.coloruse.index(min(self.coloruse)) 44 44 45 45 def actions2graphviz(actions, show_ops=False, show_perms=False): 46 46 """Returns a list of lines to be fed to graphviz.""" 47 47 # The size value makes it easier to create a useful printout. 48 48 color_scheme = ColorScheme() 49 digraph_lines = ['digraph G {\n rotate=90\ncenter=1\nsize="10,8"\n']49 digraph_lines = ['digraph G {\ncenter=1\nsize="10,8"\n'] 50 50 for action, attributes in actions.items(): 51 51 label = [attributes['name'], ] 52 52 if show_ops: 53 53 label += attributes['operations'] 54 54 if show_perms: 55 55 label += attributes['permissions'] 56 if 'set_resolution' in attributes: 57 label += ['(' + attributes['set_resolution'] + ')'] 56 58 for oldstate in attributes['oldstates']: 57 59 color = color_scheme.get_color(attributes['name']) 58 60 digraph_lines.append( 59 61 '"%s" -> "%s" [label="%s" color=%s fontcolor=%s]\n' % \ 60 62 (oldstate, attributes['newstate'], '\\n'.join(label), color, 61 63 color))
