Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | {% extends "basebuildpage.html" %} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 2 | {% load humanize %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3 | {% load projecttags %} |
| 4 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 5 | {% block title %} {{mainheading}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster{% endblock %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | {% block localbreadcrumb %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 7 | <li>{{mainheading}}</li> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | {% endblock %} |
| 9 | |
| 10 | {% block nav-tasks %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 11 | {% if 'Tasks' == mainheading %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 18 | {% if 'Time' == mainheading %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | <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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 24 | |
| 25 | {% block nav-cputime %} |
| 26 | {% if 'CPU time' == mainheading %} |
| 27 | <li class="active"><a href="{% url 'cputime' build.pk %}">CPU time</a></li> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | {% else %} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 29 | <li><a href="{% url 'cputime' build.pk %}">CPU time</a></li> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | {% endif %} |
| 31 | {% endblock %} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 32 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | {% block nav-diskio %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 34 | {% if 'Disk I/O' == mainheading %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 46 | <h1>{{mainheading}}</h1> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | </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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 61 | {{mainheading}} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 62 | {%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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 113 | <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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 118 | </td> |
| 119 | <td class="disk_io"> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 120 | {{task.disk_io|format_none_and_zero|intcomma}} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 121 | </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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 134 | // highlight heading on the column for the field used for ordering |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 135 | 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 %} |