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

Proposed by Senthil Kumaran S
Status: Superseded
Proposed branch: lp:~stylesen/lava-scheduler/sub-job-links
Merge into: lp:lava-scheduler
Prerequisite: lp:lava-scheduler/multinode
Diff against target: 41 lines (+20/-0) (has conflicts)
2 files modified
lava_scheduler_app/models.py (+9/-0)
lava_scheduler_app/templates/lava_scheduler_app/job_sidebar.html (+11/-0)
Text conflict in lava_scheduler_app/models.py
Text conflict in lava_scheduler_app/urls.py
Text conflict in lava_scheduler_app/views.py
To merge this branch: bzr merge lp:~stylesen/lava-scheduler/sub-job-links
Reviewer Review Type Date Requested Status
Linaro Automation & Validation Pending
Review via email: mp+181466@code.launchpad.net

This proposal has been superseded by a proposal from 2013-08-24.

Description of the change

List all subjobs of a multinode job.

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

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

Approved, thanks Senthil.

Unmerged revisions

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-22 06:02:59 +0000
3+++ lava_scheduler_app/models.py 2013-08-22 06:03:00 +0000
4@@ -642,6 +642,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-22 06:02:59 +0000
23+++ lava_scheduler_app/templates/lava_scheduler_app/job_sidebar.html 2013-08-22 06:03:00 +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