Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | {% extends "basebuildpage.html" %} |
| 2 | |
| 3 | {% load projecttags %} |
| 4 | |
| 5 | {% block localbreadcrumb %} |
| 6 | <li>Packages</li> |
| 7 | {% endblock %} |
| 8 | |
| 9 | {% block nav-packages %} |
| 10 | <li class="active"><a href="{% url 'packages' build.pk %}">Packages</a></li> |
| 11 | {% endblock %} |
| 12 | |
| 13 | {% block buildinfomain %} |
| 14 | <div class="span10"> |
| 15 | |
| 16 | {% if not request.GET.filter and not request.GET.search and not objects.paginator.count %} |
| 17 | |
| 18 | <!-- Empty - no data in database --> |
| 19 | <div class="page-header"> |
| 20 | <h1> |
| 21 | Packages |
| 22 | </h1> |
| 23 | </div> |
| 24 | <div class="alert alert-info lead"> |
| 25 | <strong>No packages were built.</strong> How did this happen? Well, BitBake reuses as much stuff as possible. |
| 26 | If all of the packages needed were already built and available in your build infrastructure, BitBake |
| 27 | will not rebuild any of them. This might be slightly confusing, but it does make everything faster. |
| 28 | </div> |
| 29 | |
| 30 | {% else %} |
| 31 | |
| 32 | <div class="page-header"> |
| 33 | <h1> |
| 34 | {% if request.GET.search and objects.paginator.count > 0 %} |
| 35 | {{objects.paginator.count}} package{{objects.paginator.count|pluralize}} found |
| 36 | {%elif request.GET.search and objects.paginator.count == 0%} |
| 37 | No packages found |
| 38 | {%else%} |
| 39 | Packages |
| 40 | {%endif%} |
| 41 | </h1> |
| 42 | </div> |
| 43 | |
| 44 | {% if objects.paginator.count == 0 %} |
| 45 | <div class="row-fluid"> |
| 46 | <div class="alert"> |
| 47 | <form class="no-results input-append" id="searchform"> |
| 48 | <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 %} |
| 49 | <button class="btn" type="submit" value="Search">Search</button> |
| 50 | <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all packages</button> |
| 51 | </form> |
| 52 | </div> |
| 53 | </div> |
| 54 | |
| 55 | {% else %} |
| 56 | {% include "basetable_top.html" %} |
| 57 | |
| 58 | {% for package in objects %} |
| 59 | |
| 60 | <tr class="data"> |
| 61 | |
| 62 | <!-- Package --> |
| 63 | <td class="package_name"><a href="{% url "package_built_detail" build.pk package.pk %}">{{package.name}}</a></td> |
| 64 | <!-- Package Version --> |
| 65 | <td class="package_version">{%if package.version%}<a href="{% url "package_built_detail" build.pk package.pk %}">{{package.version}}-{{package.revision}}</a>{%endif%}</td> |
| 66 | <!-- Package Size --> |
| 67 | <td class="size sizecol">{{package.size|filtered_filesizeformat}}</td> |
| 68 | <!-- License --> |
| 69 | <td class="license">{{package.license}}</td> |
| 70 | |
| 71 | {%if package.recipe%} |
| 72 | <!-- Recipe --> |
| 73 | <td class="recipe__name"><a href="{% url "recipe" build.pk package.recipe.pk %}">{{package.recipe.name}}</a></td> |
| 74 | <!-- Recipe Version --> |
| 75 | <td class="recipe__version"><a href="{% url "recipe" build.pk package.recipe.pk %}">{{package.recipe.version}}</a></td> |
| 76 | |
| 77 | <!-- Layer --> |
| 78 | <td class="recipe__layer_version__layer__name">{{package.recipe.layer_version.layer.name}}</td> |
| 79 | <!-- Layer branch --> |
| 80 | <td class="recipe__layer_version__branch">{{package.recipe.layer_version.branch}}</td> |
| 81 | <!-- Layer commit --> |
| 82 | <td class="recipe__layer_version__layer__commit"> |
| 83 | <a class="btn" |
| 84 | data-content="<ul class='unstyled'> |
| 85 | <li>{{package.recipe.layer_version.commit}}</li> |
| 86 | </ul>"> |
| 87 | {{package.recipe.layer_version.commit|truncatechars:13}} |
| 88 | </a> |
| 89 | </td> |
| 90 | <!-- Layer directory --> |
| 91 | {%else%} |
| 92 | <td class="recipe__name"></td> |
| 93 | <td class="recipe__version"></td> |
| 94 | <td class="recipe__layer_version__layer__name"></td> |
| 95 | <td class="recipe__layer_version__branch"></td> |
| 96 | <td class="recipe__layer_version__layer__commit"></td> |
| 97 | <td class="recipe__layer_version__local_path"></td> |
| 98 | {%endif%} |
| 99 | |
| 100 | </tr> |
| 101 | {% endfor %} |
| 102 | |
| 103 | {% include "basetable_bottom.html" %} |
| 104 | {% endif %} {# objects.paginator.count #} |
| 105 | {% endif %} {# Empty #} |
| 106 | </div> |
| 107 | {% endblock %} |