Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 1 | {% extends "base.html" %} |
| 2 | {% load projecttags %} |
| 3 | {% load humanize %} |
| 4 | {% load static %} |
| 5 | {% block pagecontent %} |
| 6 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 7 | <div class="section"> |
| 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 | </div> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 21 | |
| 22 | <script src="{% static 'js/customrecipe.js' %}"></script> |
| 23 | <script> |
| 24 | $(document).ready(function (){ |
| 25 | var ctx = { |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 26 | recipe : { |
| 27 | id: {{recipe.pk}}, |
| 28 | name: "{{recipe.name}}", |
| 29 | includedPackagesCount: {{recipe.includes_set.count}}, |
| 30 | baseRecipeId: {{recipe.base_recipe.pk}}, |
| 31 | xhrPackageListUrl: "{% url 'xhr_customrecipe_packages' recipe.pk %}", |
| 32 | } |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 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> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 43 | <!-- package dependencies modal --> |
| 44 | <div style="display:none" id="package-deps-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> |
| 45 | <div class="modal-header"> |
| 46 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> |
| 47 | <h3><span class="package-to-add-name"></span> dependencies</h3> |
| 48 | </div> |
| 49 | <div class="modal-body"> |
| 50 | <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:</p> |
| 51 | <ul id="package-add-dep-list"> |
| 52 | </ul> |
| 53 | </div> |
| 54 | <div class="modal-footer"> |
| 55 | <p class="help-block text-left">Total package size: <strong id="package-deps-total-size"></strong></p> |
| 56 | <button id="add-package-deps-modal-btn" type="submit" class="btn btn-primary" data-dismiss="modal">Add package</button> |
| 57 | <button class="btn" data-dismiss="modal">Cancel</button> |
| 58 | </div> |
| 59 | </div> |
| 60 | <!-- end package dependencies modal --> |
| 61 | |
| 62 | <!-- package reverse dependencies modal --> |
| 63 | <div style="display:none" id="package-reverse-deps-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> |
| 64 | <div class="modal-header"> |
| 65 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> |
| 66 | <h3><span class="package-to-rm-name"></span> reverse dependencies</h3> |
| 67 | </div> |
| 68 | <div class="modal-body"> |
| 69 | <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> |
| 70 | <ul id="package-reverse-dep-list"> |
| 71 | </ul> |
| 72 | <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> |
| 73 | </div> |
| 74 | <div class="modal-footer"> |
| 75 | <p class="help-block text-left">Total package size: <strong id="package-reverse-deps-total-size"></strong></p> |
| 76 | <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> |
| 77 | <button class="btn" data-dismiss="modal">Cancel</button> |
| 78 | </div> |
| 79 | </div> |
| 80 | <!-- end package dependencies modal --> |
| 81 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 82 | |
| 83 | <div class="row-fluid span11"> |
| 84 | <div class="alert alert-success lead" id="image-created-notification" style="margin-top: 15px; display: none"> |
| 85 | <button type="button" data-dismiss="alert" class="close">x</button> |
| 86 | Your custom image <strong>{{recipe.name}}</strong> has been created. You can now add or remove packages as needed. |
| 87 | </div> |
| 88 | <div class="page-header air"> |
| 89 | <h1> |
| 90 | {{recipe.name}} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 91 | <small>({{recipe.layer_version.layer.name}})</small> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 92 | </h1> |
| 93 | </div> |
| 94 | </div> |
| 95 | |
| 96 | <div class="row-fluid span11"> |
| 97 | <div class="span8"> |
| 98 | <div class="button-place btn-group" style="width: 100%"> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 99 | <a class="btn btn-large span6 build-custom-image" href="#" style="width: 50%"> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 100 | Build {{recipe.name}} |
| 101 | </a> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 102 | <a href="{% url 'customrecipedownload' project.id recipe.id %}" class="btn btn-large span6" style="width: 50%"> |
| 103 | Download recipe file |
| 104 | </a> |
| 105 | </div> |
| 106 | <div id="no-results-special-{{table_name}}" class="air" style="display:none;"> |
| 107 | <div class="alert"> |
| 108 | <h3>No packages found</h3> |
| 109 | <p>You might consider <a href={% url 'projectsoftwarerecipes' project.id %}>searching the list of recipes</a> instead. If you find a recipe that matches the name of the package you want:</p> |
| 110 | <ol> |
| 111 | <li>Add the layer providing the recipe to your project</li> |
| 112 | <li>Build the recipe</li> |
| 113 | <li>Once the build completes, come back to this page and search for the package</li> |
| 114 | </ol> |
| 115 | <form class="input-append no-results"> |
| 116 | <input type="text" class="input-xlarge no-results-search-input" id="no-results-search-input-{{table_name}}" name="search" placeholder="Search {{title|lower}}" /> |
| 117 | <a href="#" class="add-on btn" id="no-results-remove-search-btn" tabindex="-1"> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 118 | <i class="icon-remove"></i> |
| 119 | </a> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 120 | <button class="btn search-submit-{{table_name}}">Search</button> |
| 121 | <button class="btn btn-link" id="no-results-show-all-packages">Show all packages</button> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 122 | </form> |
| 123 | </div> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 124 | </div> |
| 125 | <div id="results-found-{{table_name}}"> |
| 126 | <div id="packages-table"> |
| 127 | {% if recipe.get_all_packages.count == 0 and last_build == None %} |
| 128 | <h2> Add | Remove packages </h2> |
| 129 | <div class="alert alert-info air"> |
| 130 | <p class="lead">Toaster has no package information for {{recipe.name}}. To generate package information, build {{recipe.name}}</p> |
| 131 | <button class="btn btn-info btn-large build-custom-image" style="margin:20px 0 10px 0;">Build {{recipe.name}}</button> |
| 132 | </div> |
| 133 | {% else %} |
| 134 | {# ToasterTable for Adding remove packages #} |
| 135 | {% url 'recipeselectpackages' project.id recipe.id as xhr_table_url %} |
| 136 | <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>) </h2> |
| 137 | {% include "toastertable.html" %} |
| 138 | {% endif %} |
| 139 | </div> |
| 140 | </div> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 141 | </div> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 142 | <div class="span4 well"> |
| 143 | <h2 style="margin-bottom:20px;">About {{recipe.name}}</h2> |
| 144 | |
| 145 | <dl> |
| 146 | <dt> |
| 147 | Approx. packages included |
| 148 | <i class="icon-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"></i> |
| 149 | </dt> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 150 | <dd id="total-num-packages">{{recipe.get_all_packages.count}}</dd> |
| 151 | <dt> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 152 | Approx. package size |
| 153 | <i class="icon-question-sign get-help" title="" data-original-title="Package size is based on information from previous builds, so we can never be sure it is 100% accurate"></i> |
| 154 | </dt> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 155 | <dd id="total-size-packages">{{approx_pkg_size.size__sum|filtered_filesizeformat}}</dd> |
| 156 | {% if last_build %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 157 | <dt>Last build</dt> |
| 158 | <dd> |
| 159 | <i class="icon-ok-sign success"></i> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 160 | <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 161 | </dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 162 | {% endif %} |
| 163 | <dt>Layer</dt> |
| 164 | <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd> |
| 165 | <dt>Based on</dt> |
| 166 | <dd><a href="{% url 'recipedetails' project.id recipe.base_recipe.pk %}">{{recipe.base_recipe.name}}</a></dd> |
| 167 | {% if recipe.get_last_successful_built_target %} |
| 168 | {% with recipe.get_last_successful_built_target as last_build_target %} |
| 169 | <dt>Last build</dt> |
| 170 | <dd> |
| 171 | <i class="icon-ok-sign success"></i> |
| 172 | <a href="{% url 'builddashboard' last_build_target.build.pk %}"> |
| 173 | {{last_build_target.build.completed_on|date:"d/m/y H:i"}}</a> |
| 174 | </dd> |
| 175 | {% endwith %} |
| 176 | {% endif %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 177 | <dt>Recipe file</dt> |
| 178 | <dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 179 | <code>{{recipe.name}}_{{recipe.version}}.bb</code> |
| 180 | <a href="{% url 'customrecipedownload' project.pk recipe.pk %}"><i class="icon-share" title="" data-original-title="View recipe file"></i></a> |
| 181 | </dd> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 182 | <dt>Layer</dt> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 183 | <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd> |
| 184 | {% if recipe.summary %} |
| 185 | <dt> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 186 | Summary |
| 187 | </dt> |
| 188 | <dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 189 | {{recipe.summary}} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 190 | </dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 191 | {% endif %} |
| 192 | {% if recipe.description %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 193 | <dt> |
| 194 | Description |
| 195 | </dt> |
| 196 | <dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 197 | {{recipe.description}} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 198 | </dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 199 | {% endif %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 200 | <dt>Version</dt> |
| 201 | <dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 202 | {{recipe.version}} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 203 | </dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 204 | {% if recipe.section %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 205 | <dt>Section</dt> |
| 206 | <dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 207 | {{recipe.section}} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 208 | </dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 209 | {% endif %} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 210 | <dt>License</dt> |
| 211 | <dd> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 212 | {{recipe.license}} |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 213 | <i class="icon-question-sign get-help" title="" data-original-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> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 214 | </dd> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 215 | </dl> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 216 | <!-- |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 217 | <i class="icon-trash no-tooltip"></i> |
| 218 | <a href="#" class="error" id="delete">Delete custom image</a> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 219 | --> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 220 | </div> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 221 | </div> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 222 | |
| 223 | {% endblock %} |