Merge lp:~fu-wei/lava-dashboard/multinode into lp:lava-dashboard/multinode

Proposed by Fu Wei on 2013-09-05
Status: Rejected
Rejected by: Neil Williams on 2013-09-06
Proposed branch: lp:~fu-wei/lava-dashboard/multinode
Merge into: lp:lava-dashboard/multinode
Diff against target: 42 lines (+16/-5)
2 files modified
dashboard_app/models.py (+15/-0)
dashboard_app/templates/dashboard_app/_test_run_list_table.html (+1/-5)
To merge this branch: bzr merge lp:~fu-wei/lava-dashboard/multinode
Reviewer Review Type Date Requested Status
Neil Williams 2013-09-05 Disapprove on 2013-09-06
Tyler Baker 2013-09-05 Approve on 2013-09-05
Review via email: mp+184073@code.launchpad.net

Description of the change

Fix the bug of showing "Device" in "Test Runs"

To post a comment you must log in.
Tyler Baker (tyler-baker) wrote :

Have tested this locally. Working properly.

review: Approve
Neil Williams (codehelp) wrote :

This MP was aimed at the shared multinode branch which isn't used anymore. The change was merged into trunk at rev 418 by Tyler. Closing this MP.

review: Disapprove
Fu Wei (fu-wei) wrote :

Cool, I have saw that in the trunk, It is Good news. :-)

Unmerged revisions

412. By Fu Wei on 2013-09-05

Fix the bug of showing "Device" in "Test Runs"

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dashboard_app/models.py'
2--- dashboard_app/models.py 2013-04-01 08:50:05 +0000
3+++ dashboard_app/models.py 2013-09-05 10:29:17 +0000
4@@ -1027,6 +1027,21 @@
5 class Meta:
6 ordering = ['-import_assigned_date']
7
8+ def show_device(self):
9+ all_attributes = self.attributes.all()
10+ for one_attributes in all_attributes:
11+ if one_attributes.name == "target":
12+ return one_attributes.value
13+
14+ for one_attributes in all_attributes:
15+ if one_attributes.name == "target.hostname":
16+ return one_attributes.value
17+
18+ for one_attributes in all_attributes:
19+ if one_attributes.name == "target.device_type":
20+ return one_attributes.value
21+ return "Target Device"
22+
23
24 class TestRunDenormalization(models.Model):
25 """
26
27=== modified file 'dashboard_app/templates/dashboard_app/_test_run_list_table.html'
28--- dashboard_app/templates/dashboard_app/_test_run_list_table.html 2013-08-14 11:32:27 +0000
29+++ dashboard_app/templates/dashboard_app/_test_run_list_table.html 2013-09-05 10:29:17 +0000
30@@ -14,11 +14,7 @@
31 <tbody>
32 {% for test_run in test_run_list %}
33 <tr>
34- {% for attribute in test_run.attributes.all %}
35- {% if attribute.name == "target" %}
36- <td>{{ attribute.value }}</td>
37- {% endif %}
38- {% endfor %}
39+ <td>{{ test_run.show_device }}</td>
40 <td><a href="{{ test_run.get_absolute_url }}"><code>{{ test_run.test }} results<code/></a></td>
41 <td>{{ test_run.test }}</td>
42 <td>{{ test_run.get_summary_results.pass }}</td>

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: