[Reports] Get rid of Mako in reports, finally

This transforms the last Mako template into Jinja2
markup and completely removes Mako support.

This is the final step of switching to usage of Jinja2.

Change-Id: I8b0ebe291e92f566d947d0e3e56614270e56c113
This commit is contained in:
Alexander Maretskiy 2016-10-07 14:48:16 +03:00
parent d3d799e024
commit cfa25394cb
3 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ python $BASE/new/rally/tests/ci/osresources.py\
rally -v --rally-debug task start --task $TASK $TASK_ARGS rally -v --rally-debug task start --task $TASK $TASK_ARGS
mkdir -p rally-plot/extra mkdir -p rally-plot/extra
python $BASE/new/rally/tests/ci/render.py ci/index.mako > rally-plot/extra/index.html python $BASE/new/rally/tests/ci/render.py ci/index.html > rally-plot/extra/index.html
cp $TASK rally-plot/task.txt cp $TASK rally-plot/task.txt
tar -czf rally-plot/plugins.tar.gz -C $RALLY_PLUGINS_DIR . tar -czf rally-plot/plugins.tar.gz -C $RALLY_PLUGINS_DIR .
rally task results | python -m json.tool > rally-plot/results.json rally task results | python -m json.tool > rally-plot/results.json

View File

@ -22,7 +22,7 @@ from rally.ui import utils
HELP_MESSAGE = ( HELP_MESSAGE = (
"Usage:\n\t" "Usage:\n\t"
"render.py ci/template.mako" "render.py ci/template.html"
"[<key-1>=<value-1> <key-2>=<value-2> ...]\n\n\t" "[<key-1>=<value-1> <key-2>=<value-2> ...]\n\n\t"
"Where key-1,value-1 and key-2,value-2 are key pairs of template.") "Where key-1,value-1 and key-2,value-2 are key pairs of template.")

View File

@ -180,7 +180,7 @@ def main():
else: else:
print("Ignoring file %s" % fname) print("Ignoring file %s" % fname)
print("Exit statuses: %r" % statuses) print("Exit statuses: %r" % statuses)
template = utils.get_template("ci/index.mako") template = utils.get_template("ci/index.html")
with open("rally-plot/extra/index.html", "w") as output: with open("rally-plot/extra/index.html", "w") as output:
output.write(template.render()) output.write(template.render())
return any(statuses) return any(statuses)