From 2341f57b399975e68e96c44d495f18589ae54808 Mon Sep 17 00:00:00 2001 From: anjali Date: Mon, 22 Mar 2021 04:52:03 +0530 Subject: [PATCH] Added method for objective and change the image name banner.png --- py-scripts/report_library.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/py-scripts/report_library.py b/py-scripts/report_library.py index e1fc2df5..627b6e25 100755 --- a/py-scripts/report_library.py +++ b/py-scripts/report_library.py @@ -14,6 +14,7 @@ class report_library(): _dataframe="", _title="LANForge Test Run Heading", _table_title="LANForge Table Heading", + _obj = "", _date="1/1/2-21 00:00(UTC)", _output_html="outfile.html", _output_pdf="outfile.pdf"): @@ -28,6 +29,7 @@ class report_library(): self.graph_titles="" self.html = "" self.custom_html = "" + self.objective = _obj def set_title(self,_title): @@ -45,6 +47,9 @@ class report_library(): def set_custom_html(self,_custom_html): self.custom_html = _custom_html + def set_obj_html(self,_obj): + self.objective = _obj + def write_html(self): # dataframe_html = self.dataframe.to_html(index=False) # have the index be able to be passed in. # self.build_banner() @@ -81,7 +86,7 @@ class report_library(): BANNER -
+

@@ -116,7 +121,15 @@ class report_library(): def build_custom(self): self.html += self.custom_html - + def build_objective(self): + self.obj_html = """ + +

Objective

+

""" + str(self.objective) + """

+
+ """ + self.html += self.obj_html + # Unit Test if __name__ == "__main__":