blob: 353410f92a65c3bae12be7dd1e326797d76436e7 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001{% extends "basebuildpage.html" %}
2{% load projecttags %}
3
Patrick Williamsf1e5d692016-03-30 15:21:19 -05004{% block title %} {{mainheading}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster{% endblock %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005{% block localbreadcrumb %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -05006<li>{{mainheading}}</li>
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007{% endblock %}
8
9{% block nav-tasks %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050010 {% if 'Tasks' == mainheading %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011 <li class="active"><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
12 {% else %}
13 <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
14 {% endif %}
15{% endblock %}
16{% block nav-buildtime %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050017 {% if 'Time' == mainheading %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018 <li class="active"><a href="{% url 'buildtime' build.pk %}">Time</a></li>
19 {% else %}
20 <li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
21 {% endif %}
22{% endblock %}
23{% block nav-cpuusage %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050024 {% if 'CPU usage' == mainheading %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025 <li class="active"><a href="{% url 'cpuusage' build.pk %}">CPU usage</a></li>
26 {% else %}
27 <li><a href="{% url 'cpuusage' build.pk %}">CPU usage</a></li>
28 {% endif %}
29{% endblock %}
30{% block nav-diskio %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050031 {% if 'Disk I/O' == mainheading %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032 <li class="active"><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
33 {% else %}
34 <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
35 {% endif %}
36{% endblock %}
37
38{% block buildinfomain %}
39<div class="span10">
40{% if not request.GET.filter and not request.GET.search and not objects.paginator.count %}
41 <!-- Empty - no data in database -->
42 <div class="page-header">
Patrick Williamsf1e5d692016-03-30 15:21:19 -050043 <h1>{{mainheading}}</h1>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050044 </div>
45 <div class="alert alert-info lead">
46 No data was recorded for this build.
47 </div>
48
49{% else %}
50
51 <div class="page-header">
52 <h1>
53 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
54 {{objects.paginator.count}} task{{objects.paginator.count|pluralize}} found
55 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
56 No tasks found
57 {%else%}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050058 {{mainheading}}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050059 {%endif%}
60 </h1>
61 </div>
62
63 {% if objects.paginator.count == 0 %}
64 <div class="row-fluid">
65 <div class="alert">
66 <form class="no-results input-append" id="searchform">
67 <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 %}
68 <button class="btn" type="submit" value="Search">Search</button>
69 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all tasks</button>
70 </form>
71 </div>
72 </div>
73
74
75 {% else %}
76 {% include "basetable_top.html" %}
77
78 {% for task in objects %}
79 <tr {{ task|task_color }} id="{{task.order}}">
80 <td class="order">
81 <a href="{%url "task" build.pk task.pk%}">{{task.order}}</a>
82 </td>
83 <td class="recipe_name" >
84 <a href="{% url "recipe" build.pk task.recipe.pk %}">{{task.recipe.name}}</a>
85 </td>
86 <td class="recipe_version">
87 <a href="{% url "recipe" build.pk task.recipe.pk %}">{{task.recipe.version}}</a>
88 </td>
89 <td class="task_name">
90 <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 %}
91 </td>
92 <td class="executed">
93 <a href="{%url "task" build.pk task.pk%}">{{task.get_executed_display}}</a>
94 </td>
95 <td class="outcome">
96 <a href="{%url "task" build.pk task.pk%}">{{task.get_outcome_display}} </a>
97 {% if task.outcome = task.OUTCOME_FAILED %}
98 <a href="{% url 'build_artifact' build.pk "tasklogfile" task.pk %}">
99 <i class="icon-download-alt" title="Download task log file"></i>
100 </a>
101 {% endif %}
102 <i class="icon-question-sign get-help hover-help" title="{{task.get_outcome_help}}"></i>
103 </td>
104 <td class="cache_attempt">
105 <a href="{%url "task" build.pk task.pk%}">{{task.get_sstate_result_display|format_none_and_zero}}</a>
106 </td>
107 <td class="time_taken">
108 {{task.elapsed_time|format_none_and_zero|floatformat:2}}
109 </td>
110 <td class="cpu_used">
111 {{task.cpu_usage|format_none_and_zero|floatformat:2}}{% if task.cpu_usage %}%{% endif %}
112 </td>
113 <td class="disk_io">
114 {{task.disk_io|format_none_and_zero}}
115 </td>
116
117 </tr>
118 {% endfor %}
119
120 {% include "basetable_bottom.html" %}
121 {% endif %} {# objects.paginator.count #}
122{% endif %} {# empty #}
123</div>
124
125<script type="text/javascript">
126
127 $(document).ready(function() {
128 // enable blue hightlight animation for the order link
129 if (location.href.search('#') > -1) {
130 var task_order = location.href.split('#')[1];
131 $("#" + task_order).addClass("highlight");
132 }
133 });
134
135</script>
136
137{% endblock %}