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