aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/templates/package_detail_base.html
diff options
context:
space:
mode:
authorDave Lerner <dave.lerner@windriver.com>2014-03-24 16:37:17 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-28 13:44:26 +0000
commitc604e14df8cdb1f47535f093d7044955d4c2057d (patch)
tree39069ee519a36b4f54e0bb517d18ed69bc90e06c /lib/toaster/toastergui/templates/package_detail_base.html
parent65bdd6cf8d0cc2af6cd424de735a5e3f2e54fa99 (diff)
downloadbitbake-contrib-c604e14df8cdb1f47535f093d7044955d4c2057d.tar.gz
toaster: show installed package name
[YOCTO #5922] Implement changes that show the installed package name after the official 'recipe-named' package name. If the alias exists and is different than the package name, then the alias is shown as a 'muted' string after the package name in the form 'as some-alias-name'. This formatting appears in the included package pages in the elements: * local breadcrumbs at the top of package included pages, * <h1> title headings along with a help bubble that is not hovering, and * package lists where the help bubble appears when the mouse hovers over the row. The changes in detail in this patch per file are: views.py - added function that tests whether the package object's installed_name should be shown, - added function that appends package name with version and revision to encapsulate package name formatting in one place and referred to as package.fullpackagespec, - changed package_built* and package_included* functions to use both of the above new formatting functions, passing the formatted values to templates, and - adhered to django coding styles by renaming module local 'get_package*' functions with "_" prefix. package_detail_base.html - added display of package aliases for included package page, - refactored to use package.fullpackagespec, formatted by view function, - added javascript function to format package alias with help, and - removed trailing whitespace. package_included_detail.html - used javascript function above to format package alias, and - refactored to use package.fullpackagespec. package_included_dependencies.html - used javascript function above to format package alias, - refactored to use package.fullpackagespec, - forced empty data cells following hover-help to draw borders by appending space, and - removed trailing whitespace. package_included_reverse_dependencies.html - use javascript function above to format package alias, - refactor to use views fullpackagespe, and - force empty data cells following hover-help to draw borders by appending space. package_built_detail.html - refactored to use package.fullpackagespec, and - removed trailing whitespace. package_built_dependencies.html - refactored to use package.fullpackagespec, and - removed trailing whitespace. projecttags.py - removed unused filter to handle installed name - removed extra spaces around "title = " in format_vpackage_namehelp Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Diffstat (limited to 'lib/toaster/toastergui/templates/package_detail_base.html')
-rw-r--r--lib/toaster/toastergui/templates/package_detail_base.html36
1 files changed, 28 insertions, 8 deletions
diff --git a/lib/toaster/toastergui/templates/package_detail_base.html b/lib/toaster/toastergui/templates/package_detail_base.html
index 6925aecb4..5ec9dd79f 100644
--- a/lib/toaster/toastergui/templates/package_detail_base.html
+++ b/lib/toaster/toastergui/templates/package_detail_base.html
@@ -1,24 +1,45 @@
{% extends "basebuilddetailpage.html" %}
{% load projecttags %}
+{% block extraheadcontent %}
+ <!-- functions to format package 'installed_package' alias -->
+ <script>
+ function fmtAliasHelp(package_name, alias, hover) {
+ var r = null;
+ if (alias != null && alias != '') {
+ r = '<span class="muted"> as ' + alias + '&nbsp';
+ r += '<i class="icon-question-sign get-help';
+ if (hover) {
+ r+= ' hover-help';
+ }
+ else {
+ r+= ' heading-help';
+ }
+ r += '"';
+ title = package_name + ' was renamed at packaging time and was installed on your system as ' + alias;
+ r += ' title="' + title + '">';
+ r += '</i>';
+ r += '</span>';
+ document.write(r);
+ }
+ }
+ </script>
+{% endblock extraheadcontent %}
{% block localbreadcrumb %}
-{% with fullPackageSpec=package.name|add:"_"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %}
{% if target %}
<li><a href="{% url "target" build.id target.id %}">{{target.target}}</a></li>
+ <li>{{package.fullpackagespec}} {% if package.alias %} as {{package.alias}}{% endif %}</li>
{% else %}
<li><a href="{% url "packages" build.id %}"> Packages </a></li>
+ <li>{{package.fullpackagespec}}</li>
{% endif %}
- <li>{{fullPackageSpec}}</li>
-{% endwith %}
{% endblock localbreadcrumb %}
{% block pagedetailinfomain %}
-{% with fullPackageSpec=package.name|add:"_"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %}
-
<div class="row span11">
<div class="page-header">
{% block title %}
- <h1>{{fullPackageSpec}}</h1>
+ <h1>{{package.fullpackagespec}}</h1>
{% endblock title %}
</div> <!-- page-header -->
</div> <!-- row span11 page-header -->
@@ -93,7 +114,7 @@
{{package.recipe.layer_version.layer.name}}
{% if package.recipe.layer_version.layer.name|format_none_and_zero != "" %}
{% comment %}
- # Removed per team meeting of 1/29/2014 until
+ # Removed per team meeting of 1/29/2014 until
# decision on index search algorithm
<a href="http://layers.openembedded.org" target="_blank">
<i class="icon-share get-info"></i>
@@ -121,5 +142,4 @@
</dl>
</div> <!-- row4 well -->
{% endblock twocolumns %}
-{% endwith %}
{% endblock pagedetailinfomain %}