aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2015-03-31 12:09:10 +0200
committerMilo Casagrande <milo.casagrande@linaro.org>2015-03-31 12:09:10 +0200
commit33c2329812780833e1a653c2239331d3de32df76 (patch)
tree5027a2e9442f9fc988ba87b8982528c7b42bc633
parent8acf74b907479050b50680216393c4855f1384b6 (diff)
Add link to frontend for HTML boot email.
* Link conflict boot reports.
-rw-r--r--app/utils/report/boot.py27
-rw-r--r--app/utils/report/templates/boot.html2
-rw-r--r--app/utils/report/templates/boot.txt2
3 files changed, 26 insertions, 5 deletions
diff --git a/app/utils/report/boot.py b/app/utils/report/boot.py
index 9634b9c..fdf16b9 100644
--- a/app/utils/report/boot.py
+++ b/app/utils/report/boot.py
@@ -794,10 +794,31 @@ def _parse_and_structure_results(**kwargs):
defconf_struct = arch_struct[defconfig_string]
for board in boards:
- board_string = G_(u"%s:") % board
+ # 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
+
+ html_string = (
+ G_(u"<a href=\"%(url)s\">%(board)s</a>:")
+ % substitutions)
+
+ txt_string = G_(u"%s:") % board
- defconf_struct[board_string] = []
- board_struct = defconf_struct[board_string]
+ defconf_struct[(txt_string, html_string)] = []
+ board_struct = defconf_struct[
+ (txt_string, html_string)
+ ]
for lab in def_get(board).viewkeys():
board_struct.append(
diff --git a/app/utils/report/templates/boot.html b/app/utils/report/templates/boot.html
index 509aa2c..b5f7907 100644
--- a/app/utils/report/templates/boot.html
+++ b/app/utils/report/templates/boot.html
@@ -85,7 +85,7 @@
</td>
</tr>
{%- for board in platforms.conflict_data.data[arch][defconfig] %}
- <tr><td style="padding-left: 50px">{{ board }}</td></tr>
+ <tr><td style="padding-left: 50px">{{ board[1] }}</td></tr>
{%- for lab in platforms.conflict_data.data[arch][defconfig][board] %}
<tr><td style="padding-left: 75px;">{{ lab }}</td></tr>
{%- endfor %}{# lab #}
diff --git a/app/utils/report/templates/boot.txt b/app/utils/report/templates/boot.txt
index bdcfa62..29618c4 100644
--- a/app/utils/report/templates/boot.txt
+++ b/app/utils/report/templates/boot.txt
@@ -49,7 +49,7 @@
{% for defconfig in platforms.conflict_data.data[arch] %}
{{ defconfig }}
{%- for board in platforms.conflict_data.data[arch][defconfig] %}
- {{ board }}
+ {{ board[0] }}
{%- for lab in platforms.conflict_data.data[arch][defconfig][board] %}
{{ lab }}
{%- endfor %}{# lab #}