Esempio n. 1
0
 def get_formatted_graph(fmt, wbs):
     if fmt not in FMTS:
         flask.abort(404)
     issues = get_issues(server, build_query(("Milestone", "Meta-epic"), wbs))
     graph = graphviz.Source(jira2dot(issues, attr_func=attr_func, rank_func=rank_func,
                                      ranks=cycles()), format=fmt)
     with tempdir() as dirname:
         graph.render("graph", cleanup=True, directory=dirname)
         return flask.send_file(os.path.join(dirname, "graph%s%s" % (os.path.extsep, fmt)))
Esempio n. 2
0
def render_text(server, query, generator):
    return "<pre>%s</pre>" % (generator(get_issues(server, query)))