aboutsummaryrefslogtreecommitdiff
path: root/app/utils/report/boot.py
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2015-03-31 11:39:00 +0200
committerMilo Casagrande <milo.casagrande@linaro.org>2015-03-31 11:39:00 +0200
commit8acf74b907479050b50680216393c4855f1384b6 (patch)
tree6da022dd979bb873b9186b8b094e6e22409b3cfa /app/utils/report/boot.py
parent8e66afabfc1e072a0a0756c154a53dd3c7c3509a (diff)
Add link to frontend for HTML boot email.
Diffstat (limited to 'app/utils/report/boot.py')
-rw-r--r--app/utils/report/boot.py26
1 files changed, 23 insertions, 3 deletions
diff --git a/app/utils/report/boot.py b/app/utils/report/boot.py
index 9ef13d0..9634b9c 100644
--- a/app/utils/report/boot.py
+++ b/app/utils/report/boot.py
@@ -714,7 +714,7 @@ def _parse_and_structure_results(**kwargs):
},
"data": {
"arch": {
- "defconfig": ["List of failed boards"]
+ "defconfig": [("TXT", "HTML")]
}
}
}
@@ -829,8 +829,28 @@ def _parse_and_structure_results(**kwargs):
"%d failed labs", lab_count
) % lab_count)
- defconf_struct.append(
- G_(u"%s: %s") % (board, lab_count_str))
+ # Copy the kwargs parameters and add the local ones.
+ # This is needed to create the HTML version of some
+ # of the values we are parsing.
+ substitutions = kwargs.copy()
+ substitutions["board"] = board
+ substitutions["defconfig"] = defconfig
+
+ board_url = (
+ "%(base_url)s/boot/%(board)s/job/%(job)s"
+ "/kernel/%(kernel)s"
+ "/defconfig/%(defconfig)s/" % substitutions
+ )
+
+ substitutions["url"] = board_url
+ substitutions["count"] = lab_count_str
+
+ html_string = (
+ G_(u"<a href=\"%(url)s\">%(board)s</a>: %(count)s")
+ % substitutions)
+
+ txt_string = G_(u"%s: %s") % (board, lab_count_str)
+ defconf_struct.append((txt_string, html_string))
if failed_data:
parsed_data["failed_data"] = {}