1{% extends "base.html" %} 2{% load projecttags %} 3{% load humanize %} 4{% load static %} 5{% block pagecontent %} 6 7{% with recipe.get_base_recipe_file as base_recipe_file %} 8 <ul class="breadcrumb"> 9 <li> 10 <a href="{% url 'project' project.id %}">{{project.name}}</a> 11 <span class="divider">→</span> 12 </li> 13 <li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a> 14 <span class="divider">→</span> 15 </li> 16 <li class="active"> 17 {{recipe.name}} ({{recipe.layer_version.layer.name}}) 18 </li> 19 </ul> 20 21<script src="{% static 'js/customrecipe.js' %}"></script> 22<script> 23 $(document).ready(function (){ 24 var ctx = { 25 recipe : { 26 id: {{recipe.pk}}, 27 name: "{{recipe.name}}", 28 includedPackagesCount: {{recipe.includes_set.count}}, 29 baseRecipeId: {{recipe.base_recipe.pk}}, 30 xhrPackageListUrl: "{% url 'xhr_customrecipe_packages' recipe.pk %}", 31 xhrCustomRecipeUrl: "{% url 'xhr_customrecipe_id' recipe.pk %}", 32 } 33 }; 34 35 try { 36 customRecipePageInit(ctx); 37 } catch (e) { 38 document.write("Sorry, An error has occurred loading this page"); 39 console.warn(e); 40 } 41 }); 42</script> 43 44<!-- Delete recipe modal --> 45<div id="delete-recipe-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> 46 <div class="modal-dialog"> 47 <div class="modal-content"> 48 <div class="modal-body"> 49 <p>Are you sure you want to delete the <strong>{{recipe.name}}</strong> 50 custom image?</p> 51 </div> 52 <div class="modal-footer"> 53 <button type="button" class="btn btn-primary" id="delete-custom-recipe-confirmed"> 54 <span data-role="submit-state">Delete custom image</span> 55 <span data-role="loading-state" style="display:none"> 56 <span class="fa-pulse"> 57 <i class="fa-pulse icon-spinner"></i> 58 </span> 59 Deleting custom image... 60 </span> 61 </button> 62 <button type="button" class="btn btn-link" data-dismiss="modal">Cancel</button> 63 </div> 64 </div><!-- /.modal-content --> 65 </div><!-- /.modal-dialog --> 66</div><!-- /.modal --> 67<!-- end delete recipe modal --> 68 69<!-- package dependencies modal --> 70<div id="package-deps-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> 71 <div class="modal-dialog"> 72 <div class="modal-content"> 73 <div class="modal-header"> 74 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> 75 <h3><span class="package-to-add-name"></span> dependencies</h3> 76 </div> 77 <div class="modal-body"> 78 <p>Based on information from a previous build it is likely that adding <strong class="package-to-add-name"></strong> will also add the following packages to your custom image: 79 </p> 80 <ul id="package-add-dep-list"> 81 </ul> 82 </div> 83 <div class="modal-footer"> 84 <p class="help-block text-left">Total package size: <strong id="package-deps-total-size"></strong></p> 85 <button id="add-package-deps-modal-btn" type="submit" class="btn btn-primary" data-dismiss="modal">Add packages</button> 86 <button class="btn btn-link" data-dismiss="modal">Cancel</button> 87 </div> 88 </div><!-- /.modal-content --> 89 </div><!-- /.modal-dialog --> 90</div><!-- /.modal --> 91<!-- end package dependencies modal --> 92 93<!-- package reverse dependencies modal --> 94<div style="display:none" id="package-reverse-deps-modal" class="modal fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> 95 <div class="modal-dialog"> 96 <div class="modal-content"> 97 <div class="modal-header"> 98 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> 99 <h3><span class="package-to-rm-name"></span> reverse dependencies</h3> 100 </div> 101 <div class="modal-body"> 102 <p> <strong class="reverse-deps-count"></strong> <span class="reverse-deps-package"></span> in your image <span class="reverse-deps-depends"></span> on <strong class="package-to-rm-name"></strong>:</p> 103 <ul id="package-reverse-dep-list"> 104 </ul> 105 <p>In order to remove <strong class="package-to-rm-name"></strong>, you must remove <span class="reverse-deps-this"></span> <strong class="reverse-deps-count"></strong> <span class="reverse-deps-package"></span> as well.</p> 106 </div> 107 <div class="modal-footer"> 108 <p class="help-block text-left">Total package size: <strong id="package-reverse-deps-total-size"></strong></p> 109 <button id="rm-package-reverse-deps-modal-btn" type="submit" class="btn btn-primary" data-dismiss="modal">Remove all <span class="reverse-deps-count-plus1"></button> 110 <button class="btn btn-link" data-dismiss="modal">Cancel</button> 111 </div> 112 </div><!-- /.modal-content --> 113 </div><!-- /.modal-dialog --> 114</div><!-- /.modal --> 115<!-- end package dependencies modal --> 116 117<div class="alert alert-success alert-dismissible change-notification" id="image-created-notification" style="display: none"> 118 <button type="button" data-dismiss="alert" class="close">×</button> 119 <p>Your custom image <strong>{{recipe.name}}</strong> has been created. You can now add or remove packages as needed.</p> 120</div> 121<div class="page-header"> 122 <h1> 123 {{recipe.name}} 124 <small>({{recipe.layer_version.layer.name}})</small> 125 </h1> 126</div> 127 128<div class="row"> 129 <div class="col-md-8"> 130 <div class="button-place btn-group" style="width: 100%"> 131 <a class="btn btn-default btn-lg build-custom-image" href="#" style="width: 50%"> 132 Build {{recipe.name}} 133 </a> 134 <a href="{% url 'customrecipedownload' project.id recipe.id %}" class="btn btn-default btn-lg" style="width: 50%" 135 {% if not base_recipe_file %} 136 disabled="disabled" 137 {% endif %}> 138 Download recipe file 139 {% if not base_recipe_file %} 140 <i class="icon-question-sign get-help" 141 data-original-title="The recipe file doesn't exist yet, so you cannot download it. You need to build your custom image first"></i> 142 {% endif %} 143 </a> 144 </div> 145 <div id="no-results-special-{{table_name}}" class="top-air" style="display:none;"> 146 <div class="alert alert-warning"> 147 <h3>No packages found</h3> 148 <p>You might consider <a href={% url 'projectsoftwarerecipes' project.id %}>searching the list of recipes</a> instead.</p> 149 <p>If you find a recipe that matches the name of the package you want:</p> 150 <ol> 151 <li>Add the layer providing the recipe to your project</li> 152 <li>Build the recipe</li> 153 <li>Once the build completes, come back to this page and search for the package</li> 154 </ol> 155 <form class="form-inline no-results"> 156 <div class="form-group"> 157 <div class="btn-group"> 158 <input type="text" class="form-control no-results-search-input" id="no-results-search-input-{{table_name}}" name="search" placeholder="Search {{title|lower}}" /> 159 <span class="remove-search-btn-{{table_name}} glyphicon glyphicon-remove-circle" id="no-results-remove-search-btn" tabindex="-1"></span> 160 </div> 161 </div> 162 <button class="btn btn-default search-submit-{{table_name}}">Search</button> 163 <button class="btn btn-link" id="no-results-show-all-packages">Show all packages</button> 164 </form> 165 </div> 166 </div> 167 <div id="results-found-{{table_name}}"> 168 <div id="packages-table"> 169 {% if recipe.get_all_packages.count == 0 and last_build == None %} 170 <h2> Add | Remove packages </h2> 171 <div class="alert alert-info"> 172 <p class="lead">Toaster has no package information for {{recipe.name}}. To generate package information, build {{recipe.name}}</p> 173 <button class="btn btn-info btn-lg build-custom-image" style="margin:20px 0 10px 0;">Build {{recipe.name}}</button> 174 </div> 175 {% else %} 176 {# ToasterTable for Adding remove packages #} 177 {% url 'recipeselectpackages' project.id recipe.id as xhr_table_url %} 178 <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>) </h2> 179 {% include "toastertable.html" %} 180 {% endif %} 181 </div> 182 </div> 183 </div> 184 <div class="col-md-4"> 185 <div class="well"> 186 <h2>About {{recipe.name}}</h2> 187 188 <dl class="item-info"> 189 <dt> 190 Approx. packages included 191 <span class="glyphicon glyphicon-question-sign get-help" title="" data-original-title="The number of packages included is based on information from previous builds and from parsing layers, so we can never be sure it is 100% accurate"></span> 192 </dt> 193 <dd id="total-num-packages">{{recipe.get_all_packages.count}}</dd> 194 <dt> 195 Approx. package size 196 <span class="glyphicon glyphicon-question-sign get-help" title="Package size is based on information from previous builds, so we can never be sure it is 100% accurate"></span> 197 </dt> 198 <dd id="total-size-packages">{{approx_pkg_size.size__sum|filtered_filesizeformat}}</dd> 199 {% if last_build %} 200 <dt>Last build</dt> 201 <dd> 202 <span class="glyphicon glyphicon-ok-circle"></span> 203 <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a> 204 </dd> 205 {% endif %} 206 <dt>Based on</dt> 207 <dd><a href="{% url 'recipedetails' project.id recipe.base_recipe.pk %}">{{recipe.base_recipe.name}}</a></dd> 208 {% if recipe.get_last_successful_built_target %} 209 {% with recipe.get_last_successful_built_target as last_build_target %} 210 <dt>Last build</dt> 211 <dd> 212 <span class="glyphicon glyphicon-ok-circle"></span> 213 <a href="{% url 'builddashboard' last_build_target.build.pk %}"> 214 {{last_build_target.build.completed_on|date:"d/m/y H:i"}}</a> 215 </dd> 216 {% endwith %} 217 {% endif %} 218 {% if base_recipe_file %} 219 <dt>Recipe file</dt> 220 <dd> 221 <code>{{recipe.name}}_{{recipe.version}}.bb</code> 222 <a href="{% url 'customrecipedownload' project.pk recipe.pk %}"><span class="glyphicon glyphicon-download-alt" data-toggle="tooltip" title="Download recipe file"></span></a> 223 </dd> 224 {% endif %} 225 <dt>Layer</dt> 226 <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd> 227 {% if recipe.summary %} 228 <dt> 229 Summary 230 </dt> 231 <dd> 232 {{recipe.summary}} 233 </dd> 234 {% endif %} 235 {% if recipe.description %} 236 <dt> 237 Description 238 </dt> 239 <dd> 240 {{recipe.description}} 241 </dd> 242 {% endif %} 243 <dt>Version</dt> 244 <dd> 245 {{recipe.version}} 246 </dd> 247 {% if recipe.section %} 248 <dt>Section</dt> 249 <dd> 250 {{recipe.section}} 251 </dd> 252 {% endif %} 253 <dt>License</dt> 254 <dd> 255 {{recipe.license}} 256 <span class="glyphicon glyphicon-question-sign get-help" title="All custom images have their license set to MIT. This is because the license applies only to the recipe (.bb) file, and not to the image itself. To see which licenses apply to the image you must check the license manifest generated with each build"></i> 257 </dd> 258 </dl> 259 <i class="icon-trash text-danger"></i> 260 <a href="#delete-recipe-modal" data-target="#delete-recipe-modal" data-toggle="modal" class="text-danger" id="delete-recipe"> 261 Delete custom image 262 </a> 263 </div> 264 </div> 265</div> 266 267{% endwith %}{# end base_recipe_file #} 268{% endblock %} 269