diff options
Diffstat (limited to 'yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html')
-rw-r--r-- | yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html | 193 |
1 files changed, 137 insertions, 56 deletions
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html index 823bbd8a1..ea3c9c732 100644 --- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html +++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html @@ -4,13 +4,32 @@ {% load static %} {% block pagecontent %} -{% include "projecttopbar.html" %} +<div class="section"> + <ul class="breadcrumb"> + <li> + <a href="{% url 'project' project.id %}">{{project.name}}</a> + <span class="divider">→</span> + </li> + <li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a> + <span class="divider">→</span> + </li> + <li class="active"> + {{recipe.name}} ({{recipe.layer_version.layer.name}}) + </li> + </ul> +</div> <script src="{% static 'js/customrecipe.js' %}"></script> <script> $(document).ready(function (){ var ctx = { - tableApiUrl: "{% url 'recipeselectpackages' project.id recipe.pk %}?format=json" + recipe : { + id: {{recipe.pk}}, + name: "{{recipe.name}}", + includedPackagesCount: {{recipe.includes_set.count}}, + baseRecipeId: {{recipe.base_recipe.pk}}, + xhrPackageListUrl: "{% url 'xhr_customrecipe_packages' recipe.pk %}", + } }; try { @@ -21,6 +40,45 @@ } }); </script> +<!-- package dependencies modal --> +<div style="display:none" id="package-deps-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> + <h3><span class="package-to-add-name"></span> dependencies</h3> + </div> + <div class="modal-body"> + <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> + <ul id="package-add-dep-list"> + </ul> + </div> + <div class="modal-footer"> + <p class="help-block text-left">Total package size: <strong id="package-deps-total-size"></strong></p> + <button id="add-package-deps-modal-btn" type="submit" class="btn btn-primary" data-dismiss="modal">Add package</button> + <button class="btn" data-dismiss="modal">Cancel</button> + </div> +</div> +<!-- end package dependencies modal --> + +<!-- package reverse dependencies modal --> +<div style="display:none" id="package-reverse-deps-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> + <h3><span class="package-to-rm-name"></span> reverse dependencies</h3> + </div> + <div class="modal-body"> + <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> + <ul id="package-reverse-dep-list"> + </ul> + <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> + </div> + <div class="modal-footer"> + <p class="help-block text-left">Total package size: <strong id="package-reverse-deps-total-size"></strong></p> + <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> + <button class="btn" data-dismiss="modal">Cancel</button> + </div> +</div> +<!-- end package dependencies modal --> + <div class="row-fluid span11"> <div class="alert alert-success lead" id="image-created-notification" style="margin-top: 15px; display: none"> @@ -30,7 +88,7 @@ <div class="page-header air"> <h1> {{recipe.name}} - <small>({{recipe.base_recipe.name}})</small> + <small>({{recipe.layer_version.layer.name}})</small> </h1> </div> </div> @@ -38,44 +96,49 @@ <div class="row-fluid span11"> <div class="span8"> <div class="button-place btn-group" style="width: 100%"> - <a class="btn btn-large span6" href="#" id="build-custom-image" style="width: 50%"> + <a class="btn btn-large span6 build-custom-image" href="#" style="width: 50%"> Build {{recipe.name}} </a> - <button class="btn btn-large span6" data-toggle="modal" data-target="#download-file" id="download" style="width: 50%"> - Download recipe file - </button> - </div> - <div id="no-package-results" class="air" style="display:none;"> - <div class="alert"> - <h3>No packages found</h3> - <p>You might consider <a href="all-software-recipes.html">searching the list of recipes</a> instead. If you find a recipe that matches the name of the package you want:</p> - <ol> - <li>Add the layer providing the recipe to your project</li> - <li>Build the recipe</li> - <li>Once the build completes, come back to this page and search for the package</li> - </ol> - <form class="input-append no-results"> - <input type="text" class="input-xlarge" value="search query"> - <a href="#" class="add-on btn"> + <a href="{% url 'customrecipedownload' project.id recipe.id %}" class="btn btn-large span6" style="width: 50%"> + Download recipe file + </a> + </div> + <div id="no-results-special-{{table_name}}" class="air" style="display:none;"> + <div class="alert"> + <h3>No packages found</h3> + <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> + <ol> + <li>Add the layer providing the recipe to your project</li> + <li>Build the recipe</li> + <li>Once the build completes, come back to this page and search for the package</li> + </ol> + <form class="input-append no-results"> + <input type="text" class="input-xlarge no-results-search-input" id="no-results-search-input-{{table_name}}" name="search" placeholder="Search {{title|lower}}" /> + <a href="#" class="add-on btn" id="no-results-remove-search-btn" tabindex="-1"> <i class="icon-remove"></i> </a> - <button class="btn">Search</button> - <button class="btn btn-link" id="show-all">Show all packages</button> + <button class="btn search-submit-{{table_name}}">Search</button> + <button class="btn btn-link" id="no-results-show-all-packages">Show all packages</button> </form> </div> + </div> + <div id="results-found-{{table_name}}"> + <div id="packages-table"> + {% if recipe.get_all_packages.count == 0 and last_build == None %} + <h2> Add | Remove packages </h2> + <div class="alert alert-info air"> + <p class="lead">Toaster has no package information for {{recipe.name}}. To generate package information, build {{recipe.name}}</p> + <button class="btn btn-info btn-large build-custom-image" style="margin:20px 0 10px 0;">Build {{recipe.name}}</button> + </div> + {% else %} + {# ToasterTable for Adding remove packages #} + {% url 'recipeselectpackages' project.id recipe.id as xhr_table_url %} + <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>) </h2> + {% include "toastertable.html" %} + {% endif %} + </div> + </div> </div> - <div id="packages-table"> - {% url 'recipeselectpackages' project.id recipe.id as xhr_table_url %} - {% with 'recipeselection' as table_name %} - {% with 'Add | Remove packages' as title %} - - <h2>{{title}} (<span class="table-count-{{table_name}}"></span>) </h2> - - {% include "toastertable.html" %} - {% endwith %} - {% endwith %} - </div> - </div> <div class="span4 well"> <h2 style="margin-bottom:20px;">About {{recipe.name}}</h2> @@ -84,59 +147,77 @@ Approx. packages included <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> </dt> - <dd class="no-packages">{{recipe.packages.count}}</dd> - <!-- <dt> + <dd id="total-num-packages">{{recipe.get_all_packages.count}}</dd> + <dt> Approx. package size <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> </dt> - <dd>244.3 MB</dd> + <dd id="total-size-packages">{{approx_pkg_size.size__sum|filtered_filesizeformat}}</dd> + {% if last_build %} <dt>Last build</dt> <dd> <i class="icon-ok-sign success"></i> - <a href="build-dashboard.html">11/06/15 15:22</a> + <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a> </dd> + {% endif %} + <dt>Layer</dt> + <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd> + <dt>Based on</dt> + <dd><a href="{% url 'recipedetails' project.id recipe.base_recipe.pk %}">{{recipe.base_recipe.name}}</a></dd> + {% if recipe.get_last_successful_built_target %} + {% with recipe.get_last_successful_built_target as last_build_target %} + <dt>Last build</dt> + <dd> + <i class="icon-ok-sign success"></i> + <a href="{% url 'builddashboard' last_build_target.build.pk %}"> + {{last_build_target.build.completed_on|date:"d/m/y H:i"}}</a> + </dd> + {% endwith %} + {% endif %} <dt>Recipe file</dt> <dd> - <code>custom-image-name.bb</code> - <a href="#download-file" data-toggle="modal"><i class="icon-download-alt" title="" data-original-title="Download recipe file"></i></a> - </dd> --> + <code>{{recipe.name}}_{{recipe.version}}.bb</code> + <a href="{% url 'customrecipedownload' project.pk recipe.pk %}"><i class="icon-share" title="" data-original-title="View recipe file"></i></a> + </dd> <dt>Layer</dt> - <!-- TODO recipe details page --> - <dd><a href="{% url 'layerdetails' project.id recipe.base_recipe.layer_version.pk %}">{{recipe.base_recipe.layer_version.layer.name}}</a></dd> - <!--<dt> + <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd> + {% if recipe.summary %} + <dt> Summary </dt> <dd> - <span class="muted">Not set</span> - <i class="icon-pencil" data-original-title="" title=""></i> + {{recipe.summary}} </dd> + {% endif %} + {% if recipe.description %} <dt> Description </dt> <dd> - <span class="muted">Not set</span> - <i class="icon-pencil" data-original-title="" title=""></i> + {{recipe.description}} </dd> + {% endif %} <dt>Version</dt> <dd> - 1.0 - <i class="icon-pencil" data-original-title="" title=""></i> + {{recipe.version}} </dd> + {% if recipe.section %} <dt>Section</dt> <dd> - base - <i class="icon-pencil" data-original-title="" title=""></i> - <i class="icon-trash" data-original-title="" title=""></i> + {{recipe.section}} </dd> + {% endif %} <dt>License</dt> <dd> - MIT + {{recipe.license}} <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> - </dd> --> + </dd> </dl> + <!-- <i class="icon-trash no-tooltip"></i> <a href="#" class="error" id="delete">Delete custom image</a> + --> </div> -</div> + </div> {% endblock %} |