[Verify] Moving compare.mako to rally/ui/templates/verification

The compare.mako file was moved from rally/verification/tempest/report_templates
to rally/ui/templates/verification. The report_templates folder was removed.

Change-Id: Ic1dcb4c82901c95826b808f9632df9a10115fd87
This commit is contained in:
Yaroslav Lobankov
2015-10-20 12:48:44 +03:00
parent f76ccdcf40
commit 28facb31ad
3 changed files with 24 additions and 21 deletions

View File

@@ -11,7 +11,7 @@
# under the License.
"""Output verification comparison results in html."""
import os
from rally.ui import utils as ui_utils
__description__ = "List differences between two verification runs"
__title__ = "Verification Comparison"
@@ -19,8 +19,6 @@ __version__ = "0.1"
def create_report(results):
import mako.template
template_kw = {
"heading": {
"title": __title__,
@@ -31,11 +29,7 @@ def create_report(results):
"results": results
}
template_path = os.path.join(os.path.dirname(__file__),
"report_templates",
"compare.mako")
template = ui_utils.get_template("verification/compare.mako")
output = template.render(**template_kw)
with open(template_path) as f:
template = mako.template.Template(f.read(), strict_undefined=True)
output = template.render(**template_kw)
return output.encode("utf8")
return output.encode("utf8")