提交 4fdb2df6 编写于 作者: C Cleber Rosa

HTML result: use names closer to underlying result instance

There's no need to have different names on the ReportModel class from
the Result instance, which is really the source of information.

This change is a step towards using better known names and possibly
making the ReportModel a child of Result itself.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 36ea7bf1
......@@ -62,10 +62,10 @@ class ReportModel(object):
else:
return value
def job_id(self):
def job_unique_id(self):
return self.result.job_unique_id
def execution_time(self):
def tests_total_time(self):
return "%.2f" % self.result.tests_total_time
def results_dir(self, relative_links=True):
......@@ -85,7 +85,7 @@ class ReportModel(object):
self.html_output_dir)
return urllib.quote(path)
def total(self):
def tests_total(self):
return self.result.tests_total
def passed(self):
......
......@@ -37,7 +37,7 @@
<!-- Table -->
<table class="table table-bordered">
<tr>
<td>ID</td><td><tt>{{job_id}}</tt></td>
<td>ID</td><td><tt>{{job_unique_id}}</tt></td>
</tr>
<tr>
<td>Host</td><td><tt>{{hostname}}</tt></td>
......@@ -46,10 +46,10 @@
<td>Results Dir</td><td><a href="{{results_dir}}"><tt>{{results_dir_basename}}</tt></a></td>
</tr>
<tr>
<td>Cumulative test time</td><td>{{execution_time}} s</td>
<td>Cumulative test time</td><td>{{tests_total_time}} s</td>
</tr>
<tr>
<td>Stats</td><td>From {{total}} tests executed, {{passed}} passed (pass rate of {{pass_rate}}%)</td>
<td>Stats</td><td>From {{tests_total}} tests executed, {{passed}} passed (pass rate of {{pass_rate}}%)</td>
</tr>
</table>
</div>
......@@ -68,7 +68,7 @@
{{#tests}}
<tr class="{{row_class}}">
<td>{{time_start}}</td>
<td><a href="{{logdir}}">{{test}}</a></td>
<td><a href="{{logdir}}">{{name}}</a></td>
<td>{{status}}</td>
<td>{{time}}</td>
<td>{{& fail_reason}}</td>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册