summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
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:52 +0000
commit14a84434a1c76f5d0bef7a75f2c7529a9ff166cf (patch)
tree1f00f4bb710398382d20aeaf56e701b328eb8765 /bitbake/lib/toaster/toastergui/templatetags/projecttags.py
parentc07a294e30e09926a07081ebc275c1766304ce38 (diff)
downloadpoky-14a84434a1c76f5d0bef7a75f2c7529a9ff166cf.tar.gz
bitbake: 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 (Bitbake rev: c604e14df8cdb1f47535f093d7044955d4c2057d) Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templatetags/projecttags.py')
-rw-r--r--bitbake/lib/toaster/toastergui/templatetags/projecttags.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index 34c3c21d20..76166ca945 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -208,14 +208,6 @@ def filtered_installedsize(size, installed_size):
208 return size if (installed_size == 0) or (installed_size == "") or (installed_size == None) else installed_size 208 return size if (installed_size == 0) or (installed_size == "") or (installed_size == None) else installed_size
209 209
210@register.filter 210@register.filter
211def filtered_installedname(name, installed_name):
212 """If package.installed_name not null and not empty
213 return <div class=muted> as {{package.installed_name}}
214 otherwise ""
215 """
216 return name if (name == installed_name) or (not installed_name) or (installed_name == "") else name + " as " + installed_name
217
218@register.filter
219def filtered_packageversion(version, revision): 211def filtered_packageversion(version, revision):
220 """ Emit "version-revision" if version and revision are not null 212 """ Emit "version-revision" if version and revision are not null
221 else "version" if version is not null 213 else "version" if version is not null
@@ -245,6 +237,6 @@ def format_vpackage_rowclass(size):
245def format_vpackage_namehelp(name): 237def format_vpackage_namehelp(name):
246 r = name + '&nbsp;' 238 r = name + '&nbsp;'
247 r += '<i class="icon-question-sign get-help hover-help"' 239 r += '<i class="icon-question-sign get-help hover-help"'
248 r += ' title = "' + name + ' only has dependency information available.">' 240 r += ' title="' + name + ' only has dependency information available.">'
249 r += '</i>' 241 r += '</i>'
250 return mark_safe(r) 242 return mark_safe(r)