From f36ccab454aa8ba156c234706d2667d5cae4ef94 Mon Sep 17 00:00:00 2001 From: Patrice Buriez Date: Fri, 9 Nov 2018 10:33:50 +0100 Subject: Generate report from a file instead of string ``$ yardstick report generate ...`` now renders a template stored in a file instead of from an imported string Instead of using Django, templating is done by jinja2, as this is used in other parts of Yardstick. JIRA: YARDSTICK-1367 Topic: report/html_table (2 of 11) Change-Id: Iaff53e7e28903e46164ce0977f6b8adbe04d23d7 Signed-off-by: Emma Foley Signed-off-by: Patrice Buriez --- yardstick/common/html_template.py | 124 -------------------------------------- yardstick/common/report.html.j2 | 121 +++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 124 deletions(-) create mode 100644 yardstick/common/report.html.j2 (limited to 'yardstick/common') diff --git a/yardstick/common/html_template.py b/yardstick/common/html_template.py index e17c76637..c15dd8238 100644 --- a/yardstick/common/html_template.py +++ b/yardstick/common/html_template.py @@ -8,130 +8,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################# -template = """ - - - - - - - - - - - - - -
-

Yardstick User Interface

-

Report of {{task_id}} Generated

-
- -
-
-
-
-
-
-
-
-
-
-
-
- - - - - - -""" - report_template = """ diff --git a/yardstick/common/report.html.j2 b/yardstick/common/report.html.j2 new file mode 100644 index 000000000..ab76510ca --- /dev/null +++ b/yardstick/common/report.html.j2 @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + +
+

Yardstick User Interface

+

Report of {{task_id}} Generated

+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + + -- cgit 1.2.3-korg