blob: ea3c9c732412525ab3fd1d8900ce2636cdabf5e0 [file] [log] [blame]
Patrick Williamsf1e5d692016-03-30 15:21:19 -05001{% extends "base.html" %}
2{% load projecttags %}
3{% load humanize %}
4{% load static %}
5{% block pagecontent %}
6
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05007<div class="section">
8 <ul class="breadcrumb">
9 <li>
10 <a href="{% url 'project' project.id %}">{{project.name}}</a>
11 <span class="divider">&rarr;</span>
12 </li>
13 <li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a>
14 <span class="divider">&rarr;</span>
15 </li>
16 <li class="active">
17 {{recipe.name}} ({{recipe.layer_version.layer.name}})
18 </li>
19 </ul>
20</div>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050021
22<script src="{% static 'js/customrecipe.js' %}"></script>
23<script>
24 $(document).ready(function (){
25 var ctx = {
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050026 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 Williamsf1e5d692016-03-30 15:21:19 -050033 };
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 Williamsd8c66bc2016-06-20 12:57:21 -050043<!-- 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 Williamsf1e5d692016-03-30 15:21:19 -050082
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 Williamsd8c66bc2016-06-20 12:57:21 -050091 <small>({{recipe.layer_version.layer.name}})</small>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050092 </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 Williamsd8c66bc2016-06-20 12:57:21 -050099 <a class="btn btn-large span6 build-custom-image" href="#" style="width: 50%">
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500100 Build {{recipe.name}}
101 </a>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500102 <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 Williamsf1e5d692016-03-30 15:21:19 -0500118 <i class="icon-remove"></i>
119 </a>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500120 <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 Williamsf1e5d692016-03-30 15:21:19 -0500122 </form>
123 </div>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500124 </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 Williamsf1e5d692016-03-30 15:21:19 -0500141 </div>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500142 <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 Williamsd8c66bc2016-06-20 12:57:21 -0500150 <dd id="total-num-packages">{{recipe.get_all_packages.count}}</dd>
151 <dt>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500152 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 Williamsd8c66bc2016-06-20 12:57:21 -0500155 <dd id="total-size-packages">{{approx_pkg_size.size__sum|filtered_filesizeformat}}</dd>
156 {% if last_build %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500157 <dt>Last build</dt>
158 <dd>
159 <i class="icon-ok-sign success"></i>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500160 <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500161 </dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500162 {% 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 Williamsf1e5d692016-03-30 15:21:19 -0500177 <dt>Recipe file</dt>
178 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500179 <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 Williamsf1e5d692016-03-30 15:21:19 -0500182 <dt>Layer</dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500183 <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 Williamsf1e5d692016-03-30 15:21:19 -0500186 Summary
187 </dt>
188 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500189 {{recipe.summary}}
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500190 </dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500191 {% endif %}
192 {% if recipe.description %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500193 <dt>
194 Description
195 </dt>
196 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500197 {{recipe.description}}
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500198 </dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500199 {% endif %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500200 <dt>Version</dt>
201 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500202 {{recipe.version}}
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500203 </dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500204 {% if recipe.section %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500205 <dt>Section</dt>
206 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500207 {{recipe.section}}
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500208 </dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500209 {% endif %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500210 <dt>License</dt>
211 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500212 {{recipe.license}}
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500213 <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 Williamsd8c66bc2016-06-20 12:57:21 -0500214 </dd>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500215 </dl>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500216 <!--
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500217 <i class="icon-trash no-tooltip"></i>
218 <a href="#" class="error" id="delete">Delete custom image</a>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500219 -->
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500220 </div>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500221 </div>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500222
223 {% endblock %}