target.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. {% extends "basebuildpage.html" %}
  2. {% block title %} Packages included - {{ target.target }} {{ target.build.machine }} - {{ target.build.project.name }} - Toaster {% endblock %}
  3. {% block localbreadcrumb %}
  4. <li>{{target.target}}</li>
  5. {% endblock localbreadcrumb%}
  6. {% load projecttags %}
  7. {% block nav-target %}
  8. {% for t in build.get_sorted_target_list %}
  9. {% ifequal target.pk t.pk %}
  10. <li class="active"><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li>
  11. {% else %}
  12. <li><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li>
  13. {% endifequal %}
  14. {% endfor %}
  15. {% endblock %}
  16. {% block buildinfomain %}
  17. <div class="col-md-10">
  18. <div class="page-header">
  19. <h1>
  20. {% if request.GET.search and objects.paginator.count > 0 %}
  21. {{objects.paginator.count}} package{{objects.paginator.count|pluralize}} found
  22. {% elif request.GET.search and objects.paginator.count == 0 %}
  23. No packages found
  24. {% else %}
  25. {{target.target}}
  26. {% endif %}
  27. </h1>
  28. </div>
  29. <div id="navTab">
  30. <ul class="nav nav-pills">
  31. <li class="active">
  32. <a href="#target">
  33. <i class="icon-question-sign get-help" title="Of all the packages built, the subset installed in the root file system of this image"></i>
  34. Packages included ({{target.package_count}} - {{packages_sum|filtered_filesizeformat}})
  35. </a>
  36. </li>
  37. <li>
  38. <a href="{% url 'dirinfo' build.id target.id %}">
  39. <i class="icon-question-sign get-help" title="The directories and files in the root file system of this image"></i>
  40. Directory structure
  41. </a>
  42. </li>
  43. </ul>
  44. <div id="image-packages" class="tab-pane">
  45. {% if objects.paginator.count == 0 %}
  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="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="input-append-addon btn" tabindex="-1"><i class="glyphicon glyphicon-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. {% else %}
  54. {% include "basetable_top.html" %}
  55. {% for package in objects %}
  56. <tr>
  57. {# order of the table data must match the columns defined in template's context tablecols #}
  58. <td class="package_name">
  59. <a href="{% url 'package_included_detail' build.id target.id package.id %}">
  60. {{package.name}}
  61. </a>
  62. {% if package.installed_name and package.name != package.installed_name %}
  63. <span class="muted"> as {{package.installed_name}}</span>
  64. <i class="icon-question-sign get-help hover-help" title='{{package.name|add:" was renamed at packaging time and was installed in your image as "|add:package.installed_name}}'></i>
  65. {% endif %}
  66. </td>
  67. <td class="package_version">
  68. <a href="{% url 'package_included_detail' build.id target.id package.id %}">
  69. {{package.version|filtered_packageversion:package.revision}}
  70. </a>
  71. </td>
  72. <td class="license">
  73. {{package.license}}
  74. </td>
  75. <td class="size sizecol">
  76. {{package.size|filtered_installedsize:package.installed_size|filtered_filesizeformat}}
  77. </td>
  78. <td class="size_over_total sizecol">
  79. {{package|filter_sizeovertotal:packages_sum}}
  80. </td>
  81. <td class="depends">
  82. {% with deps=package.runtime_dependencies %}
  83. {% with deps_count=deps|length %}
  84. {% if deps_count > 0 %}
  85. <a class="btn"
  86. title="<a href='{% url "package_included_dependencies" build.id target.id package.id %}'>{{package.name}}</a> dependencies"
  87. data-content="<ul class='list-unstyled'>
  88. {% for i in deps|dictsort:'depends_on.name' %}
  89. <li><a href='{% url "package_included_detail" build.pk target.id i.depends_on.pk %}'>{{i.depends_on.name}}</a></li>
  90. {% endfor %}
  91. </ul>">
  92. {{deps_count}}
  93. </a>
  94. {% endif %}
  95. {% endwith %}
  96. {% endwith %}
  97. </td>
  98. <td class="brought_in_by">
  99. {% with rdeps=package.reverse_runtime_dependencies %}
  100. {% with rdeps_count=rdeps|length %}
  101. {% if rdeps_count > 0 %}
  102. <a class="btn"
  103. title="<a href='{% url "package_included_reverse_dependencies" build.id target.id package.id %}'>{{package.name}}</a> reverse dependencies"
  104. data-content="<ul class='list-unstyled'>
  105. {% for i in rdeps|dictsort:'package.name' %}
  106. <li><a href='{% url "package_included_detail" build.id target.id i.package.id %}'>{{i.package.name}}</a></li>
  107. {% endfor %}
  108. </ul>">
  109. {{rdeps_count}}
  110. </a>
  111. {% endif %}
  112. {% endwith %}
  113. {% endwith %}
  114. </td>
  115. <td class="recipe_name">
  116. {% if package.recipe.version %}
  117. <a href="{% url 'recipe' build.id package.recipe_id %}">
  118. {{ package.recipe.name }}
  119. </a>
  120. {% endif %}
  121. </td>
  122. <td class="recipe_version">
  123. {% if package.recipe.version %}
  124. <a href="{% url 'recipe' build.id package.recipe_id %}">
  125. {{ package.recipe.version }}
  126. </a>
  127. {% endif %}
  128. </td>
  129. <td class="layer_name">
  130. {{ package.recipe.layer_version.layer.name }}
  131. </td>
  132. <td class="layer_branch">
  133. {{ package.recipe.layer_version.branch}}
  134. </td>
  135. <td class="layer_commit">
  136. <a class="btn"
  137. data-content="<ul class='list-unstyled'>
  138. <li>{{package.recipe.layer_version.commit}}</li>
  139. </ul>">
  140. {{package.recipe.layer_version.commit|truncatechars:13}}
  141. </a>
  142. </td>
  143. </tr>
  144. {% endfor %}
  145. {% include "basetable_bottom.html" %}
  146. {% endif %}
  147. </div> <!-- tabpane -->
  148. </div> <!--span 10-->
  149. {% endblock buildinfomain %}