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