Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | {% extends "basebuildpage.html" %} |
| 2 | {% load projecttags %} |
| 3 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 4 | {% 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] | 5 | {% block localbreadcrumb %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 6 | <li>{{mainheading}}</li> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 7 | {% endblock %} |
| 8 | |
| 9 | {% block nav-tasks %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 10 | {% if 'Tasks' == mainheading %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 17 | {% if 'Time' == mainheading %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 24 | {% if 'CPU usage' == mainheading %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 31 | {% if 'Disk I/O' == mainheading %} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 43 | <h1>{{mainheading}}</h1> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 44 | </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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 58 | {{mainheading}} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 59 | {%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 %} |