blob: 84bc10386dcae01dd592eb2b22863ac65d93eb04 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001{% extends "basebuildpage.html" %}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05002{% load humanize %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003{% load projecttags %}
4
Patrick Williamsf1e5d692016-03-30 15:21:19 -05005{% block title %} {{mainheading}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster{% endblock %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006{% block localbreadcrumb %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -05007<li>{{mainheading}}</li>
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008{% endblock %}
9
10{% block nav-tasks %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050011 {% if 'Tasks' == mainheading %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012 <li class="active"><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
13 {% else %}
14 <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
15 {% endif %}
16{% endblock %}
17{% block nav-buildtime %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050018 {% if 'Time' == mainheading %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019 <li class="active"><a href="{% url 'buildtime' build.pk %}">Time</a></li>
20 {% else %}
21 <li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
22 {% endif %}
23{% endblock %}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050024
25{% block nav-cputime %}
26 {% if 'CPU time' == mainheading %}
27 <li class="active"><a href="{% url 'cputime' build.pk %}">CPU time</a></li>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028 {% else %}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050029 <li><a href="{% url 'cputime' build.pk %}">CPU time</a></li>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030 {% endif %}
31{% endblock %}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050032
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033{% block nav-diskio %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050034 {% if 'Disk I/O' == mainheading %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035 <li class="active"><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
36 {% else %}
37 <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
38 {% endif %}
39{% endblock %}
40
41{% block buildinfomain %}
42<div class="span10">
43{% if not request.GET.filter and not request.GET.search and not objects.paginator.count %}
44 <!-- Empty - no data in database -->
45 <div class="page-header">
Patrick Williamsf1e5d692016-03-30 15:21:19 -050046 <h1>{{mainheading}}</h1>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047 </div>
48 <div class="alert alert-info lead">
49 No data was recorded for this build.
50 </div>
51
52{% else %}
53
54 <div class="page-header">
55 <h1>
56 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
57 {{objects.paginator.count}} task{{objects.paginator.count|pluralize}} found
58 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
59 No tasks found
60 {%else%}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050061 {{mainheading}}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050062 {%endif%}
63 </h1>
64 </div>
65
66 {% if objects.paginator.count == 0 %}
67 <div class="row-fluid">
68 <div class="alert">
69 <form class="no-results input-append" id="searchform">
70 <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
71 <button class="btn" type="submit" value="Search">Search</button>
72 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all tasks</button>
73 </form>
74 </div>
75 </div>
76
77
78 {% else %}
79 {% include "basetable_top.html" %}
80
81 {% for task in objects %}
82 <tr {{ task|task_color }} id="{{task.order}}">
83 <td class="order">
84 <a href="{%url "task" build.pk task.pk%}">{{task.order}}</a>
85 </td>
86 <td class="recipe_name" >
87 <a href="{% url "recipe" build.pk task.recipe.pk %}">{{task.recipe.name}}</a>
88 </td>
89 <td class="recipe_version">
90 <a href="{% url "recipe" build.pk task.recipe.pk %}">{{task.recipe.version}}</a>
91 </td>
92 <td class="task_name">
93 <a href="{%url "task" build.pk task.pk%}">{{task.task_name}}</a> {% if task.get_description %}<i class="icon-question-sign get-help hover-help" title="{{task.get_description}}"></i> {% endif %}
94 </td>
95 <td class="executed">
96 <a href="{%url "task" build.pk task.pk%}">{{task.get_executed_display}}</a>
97 </td>
98 <td class="outcome">
99 <a href="{%url "task" build.pk task.pk%}">{{task.get_outcome_display}} </a>
100 {% if task.outcome = task.OUTCOME_FAILED %}
101 <a href="{% url 'build_artifact' build.pk "tasklogfile" task.pk %}">
102 <i class="icon-download-alt" title="Download task log file"></i>
103 </a>
104 {% endif %}
105 <i class="icon-question-sign get-help hover-help" title="{{task.get_outcome_help}}"></i>
106 </td>
107 <td class="cache_attempt">
108 <a href="{%url "task" build.pk task.pk%}">{{task.get_sstate_result_display|format_none_and_zero}}</a>
109 </td>
110 <td class="time_taken">
111 {{task.elapsed_time|format_none_and_zero|floatformat:2}}
112 </td>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500113 <td class="cpu_time_system">
114 {{task.cpu_time_system|format_none_and_zero|floatformat:2}}
115 </td>
116 <td class="cpu_time_user">
117 {{task.cpu_time_user|format_none_and_zero|floatformat:2}}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500118 </td>
119 <td class="disk_io">
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500120 {{task.disk_io|format_none_and_zero|intcomma}}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500121 </td>
122
123 </tr>
124 {% endfor %}
125
126 {% include "basetable_bottom.html" %}
127 {% endif %} {# objects.paginator.count #}
128{% endif %} {# empty #}
129</div>
130
131<script type="text/javascript">
132
133 $(document).ready(function() {
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500134 // highlight heading on the column for the field used for ordering
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500135 if (location.href.search('#') > -1) {
136 var task_order = location.href.split('#')[1];
137 $("#" + task_order).addClass("highlight");
138 }
139 });
140
141</script>
142
143{% endblock %}