Merge lp:~stylesen/lava-scheduler/sub-job-links into lp:lava-scheduler/multinode

Proposed by Neil Williams
Status: Merged
Approved by: Neil Williams
Approved revision: 282
Merged at revision: 283
Proposed branch: lp:~stylesen/lava-scheduler/sub-job-links
Merge into: lp:lava-scheduler/multinode
Diff against target: 41 lines (+20/-0)
2 files modified
lava_scheduler_app/models.py (+9/-0)
lava_scheduler_app/templates/lava_scheduler_app/job_sidebar.html (+11/-0)
To merge this branch: bzr merge lp:~stylesen/lava-scheduler/sub-job-links
Reviewer Review Type Date Requested Status
Neil Williams Approve
Review via email: mp+181950@code.launchpad.net

This proposal supersedes a proposal from 2013-08-22.

Description of the change

List all subjobs of a multinode job.

See https://cards.linaro.org/browse/LAVA-635 for details.

Re-submitting to merge into the multinode branch where it will update the pending merge but also be visible on staging.v.l.o prior to the merge. Retaining approval (the merge applies without conflicts to the multinode branch)

To post a comment you must log in.
Revision history for this message
Neil Williams (codehelp) wrote : Posted in a previous version of this proposal

Approved, thanks Senthil.

Revision history for this message
Neil Williams (codehelp) wrote :

Approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_scheduler_app/models.py'
2--- lava_scheduler_app/models.py 2013-08-19 12:38:47 +0000
3+++ lava_scheduler_app/models.py 2013-08-24 08:54:26 +0000
4@@ -638,6 +638,15 @@
5 "LAVA job notification: " + description, mail,
6 settings.SERVER_EMAIL, recipients)
7
8+ @property
9+ def sub_jobs_list(self):
10+ if self.target_group:
11+ jobs = TestJob.objects.filter(
12+ target_group=self.target_group).order_by('id')
13+ return jobs
14+ else:
15+ return None
16+
17
18 class DeviceStateTransition(models.Model):
19 created_on = models.DateTimeField(auto_now_add=True)
20
21=== modified file 'lava_scheduler_app/templates/lava_scheduler_app/job_sidebar.html'
22--- lava_scheduler_app/templates/lava_scheduler_app/job_sidebar.html 2013-08-14 13:35:55 +0000
23+++ lava_scheduler_app/templates/lava_scheduler_app/job_sidebar.html 2013-08-24 08:54:26 +0000
24@@ -62,6 +62,17 @@
25
26 <dt>Finished at:</dt>
27 <dd>{{ job.end_time|default:"not finished" }}</dd>
28+
29+ {% if job.target_group %}
30+ <dt>Sub Jobs:</dt>
31+ {% for subjob in job.sub_jobs_list %}
32+ <dd>
33+ <a href="{% url lava.scheduler.job.detail subjob.pk %}">
34+ {{ subjob.sub_id }}</a>
35+ </dd>
36+ {% endfor %}
37+ {% endif %}
38+
39 </dl>
40 <h2>Views</h2>
41 <ul>

Subscribers

People subscribed via source and target branches

to status/vote changes: