From 620553df864634e7061c9124ea70a90e5c067cde Mon Sep 17 00:00:00 2001 From: Dave Lerner Date: Thu, 23 Jan 2014 11:47:41 -0600 Subject: bitbake: toaster: Implementation of package detail views Adds new package detail views. The views are based on specifications found in attachments to: https://bugzilla.yoctoproject.org/show_bug.cgi?id=4328 specifically: design-1.5.1-package-details.pdf, and design-1.1.1-included-package-details. This patch includes a redefinition of constant numbers for task dependency tasks. This is needed in order to achieve sorting criteria from the design. This change invalidates currently dependency information for currently existing builds, as it breaks compatibility. [YOCTO #4328] (Bitbake rev: 6855925c06e7e5bb15ae9d0c08d77f3a9a2574bc) Signed-off-by: Dave Lerner Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- .../lib/toaster/toastergui/templates/bpackage.html | 2 +- .../templates/package_built_dependencies.html | 112 ++++++++++++++++++ .../toastergui/templates/package_built_detail.html | 71 ++++++++++++ .../toastergui/templates/package_detail_base.html | 125 +++++++++++++++++++++ .../templates/package_included_dependencies.html | 93 +++++++++++++++ .../templates/package_included_detail.html | 46 ++++++++ .../package_included_reverse_dependencies.html | 47 ++++++++ .../templates/package_included_tabs.html | 33 ++++++ .../lib/toaster/toastergui/templates/recipe.html | 6 +- 9 files changed, 531 insertions(+), 4 deletions(-) create mode 100644 bitbake/lib/toaster/toastergui/templates/package_built_dependencies.html create mode 100644 bitbake/lib/toaster/toastergui/templates/package_built_detail.html create mode 100644 bitbake/lib/toaster/toastergui/templates/package_detail_base.html create mode 100644 bitbake/lib/toaster/toastergui/templates/package_included_dependencies.html create mode 100644 bitbake/lib/toaster/toastergui/templates/package_included_detail.html create mode 100644 bitbake/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html create mode 100644 bitbake/lib/toaster/toastergui/templates/package_included_tabs.html (limited to 'bitbake/lib/toaster/toastergui/templates') diff --git a/bitbake/lib/toaster/toastergui/templates/bpackage.html b/bitbake/lib/toaster/toastergui/templates/bpackage.html index 3329ddae51..b78ae4644f 100644 --- a/bitbake/lib/toaster/toastergui/templates/bpackage.html +++ b/bitbake/lib/toaster/toastergui/templates/bpackage.html @@ -26,7 +26,7 @@ {% for package in objects %} - {{package.name}} ({{package.filelist_bpackage.count}} files) + {{package.name}} ({{package.filelist_bpackage.count}} files) {{package.version}}-{{package.revision}} {%if package.recipe%}{{package.recipe.name}}{{package.package_name}}{%endif%} diff --git a/bitbake/lib/toaster/toastergui/templates/package_built_dependencies.html b/bitbake/lib/toaster/toastergui/templates/package_built_dependencies.html new file mode 100644 index 0000000000..c67f60e20b --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/package_built_dependencies.html @@ -0,0 +1,112 @@ +{% extends "package_detail_base.html" %} +{% load projecttags %} + +{% block tabcontent %} + {% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %} + +
+
+ {% ifequal runtime_deps|length 0 %} +
+ {{fullPackageSpec}} has no runtime dependencies. +
+ {% else %} +
+ {{fullPackageSpec}} is not included in any image. These are its projected runtime dependencies if you were to include it in future builds. +
+ + + + + + + + + {% for runtime_dep in runtime_deps %} + + {% ifequal runtime_dep.version '' %} + + + + + + + {% else %} + + + + + + {% endifequal %} + + {% endfor %} +
PackageVersionSize
{{runtime_dep.name}}{{runtime_dep.version}}
+ + {{runtime_dep.name}} + + {{runtime_dep.version}}{{runtime_dep.size|filtered_filesizeformat}}
+ {% endifequal %} + {% ifnotequal other_deps|length 0 %} +

Other runtime relationships

+ + + + + + + + + + + + {% for other_dep in other_deps %} + + {% ifequal other_dep.version '' %} + + + + + + + {% else %} + + + + + + + + {% endifequal %} + {% endfor %} +
PackageVersionSize + + Relationship type +
{{other_dep.name}}{{other_dep.version}} + {{other_dep.dep_type_display}} + +
+ + {{other_dep.name}} + + {{other_dep.version}}{{other_dep.size|filtered_filesizeformat}} + {{other_dep.dep_type_display}} + +
+ {% endifnotequal %} +
+
+ {% endwith %} +{% endblock tabcontent %} diff --git a/bitbake/lib/toaster/toastergui/templates/package_built_detail.html b/bitbake/lib/toaster/toastergui/templates/package_built_detail.html new file mode 100644 index 0000000000..fe856a3cb6 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/package_built_detail.html @@ -0,0 +1,71 @@ +{% extends "package_detail_base.html" %} +{% load projecttags %} + +{% block tabcontent %} + {% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec packageFileCount=package.buildfilelist_package.count %} + + {% if package.buildtargetlist_package.count == 0 %} + {# Not included case #} + +
+
+ + {% if packageFileCount > 0 %} +
+ {{fullPackageSpec}} is not included in any image. These are the files that would be added to an image root file system if you were to include it in future builds. +
+ + + + + + + + {% for file in package.buildfilelist_package.all|dictsort:"path" %} + + + + + + + {% endfor %} +
FileSize
{{file.path}}{{file.size|filtered_filesizeformat}}
+ + {% else %} +
+ {{fullPackageSpec}} does not generate any files. +
+ {% endif %} + +
+
+ {% else %} + {# Included case #} +
+
+
+ Package included in: + {% for itarget in package.buildtargetlist_package.all|dictsort:"target.target" %} + + {% if forloop.counter0 > 0 %} + ,  + {% endif %} + {{itarget.target.target}} + + {% endfor %} +
+
+
+ {% endif %} + + {% endwith %} +{% endblock tabcontent %} diff --git a/bitbake/lib/toaster/toastergui/templates/package_detail_base.html b/bitbake/lib/toaster/toastergui/templates/package_detail_base.html new file mode 100644 index 0000000000..a7aaab6de7 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/package_detail_base.html @@ -0,0 +1,125 @@ +{% extends "basebuilddetailpage.html" %} +{% load projecttags %} + +{% block localbreadcrumb %} +{% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %} + {% if target %} +
  • {{target.target}}
  • + {% else %} +
  • Packages
  • + {% endif %} +
  • {{fullPackageSpec}}
  • +{% endwith %} +{% endblock localbreadcrumb %} + +{% block pagedetailinfomain %} +{% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %} + +
    + +
    + + {% block twocolumns %} +
    + {% block tabcontent %} + {% endblock tabcontent %} +
    + +
    +

    Package information

    + + +
    +
    + Size + +
    +
    + {% comment %} + if recipe is absent, filesize is not 0 + {% endcomment %} + {% if package.recipe_id > 0 %} + {{package.size|filtered_filesizeformat}} + {% if target.file_size %} + ({{package.size|multiply:100|divide:target.file_size}}% of included package size) + {% endif %} + + {% endif %} +
    + +
    + License + +
    +
    {{package.license}}
    + + {% comment %} + # Removed per review on 1/18/2014 until license data population + # problemse are resolved. +
    + License files + +
    +
    + {% endcomment %} + +
    + Recipe + +
    +
    + {% if package.recipe_id > 0 %} + {{package.recipe.name}} + {% else %} + {{package.recipe.name}} + {% endif %} +
    + +
    + Recipe version + +
    +
    {{package.recipe.version}}
    + +
    + Layer + +
    +
    + {{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 + # decision on index search algorithm + + + {% endcomment %} + + {% endif %} +
    + +
    + Layer branch + +
    +
    {{package.recipe.layer_version.branch}}
    +
    + Layer commit + +
    + +
    {{package.recipe.layer_version.commit}}
    +
    + Layer directory + +
    +
    {{package.recipe.layer_version.layer.local_path}}
    +
    +
    + {% endblock twocolumns %} +{% endwith %} +{% endblock pagedetailinfomain %} diff --git a/bitbake/lib/toaster/toastergui/templates/package_included_dependencies.html b/bitbake/lib/toaster/toastergui/templates/package_included_dependencies.html new file mode 100644 index 0000000000..c8c2dddf29 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/package_included_dependencies.html @@ -0,0 +1,93 @@ +{% extends "package_detail_base.html" %} +{% load projecttags %} + +{% block title %} + {% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %} +

    {{fullPackageSpec}} ({{target.target}})

    + {% endwith %} +{% endblock title %} + +{% block tabcontent %} + {% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec packageFileCount=package.buildfilelist_package.count %} + {% include "package_included_tabs.html" with active_tab="dependencies" %} +
    +
    + {% ifnotequal runtime_deps|length 0 %} + + + + + + + + + {% for runtime_dep in runtime_deps %} + + + + + + + + {% endfor %} +
    PackageVersionSize
    + + {{runtime_dep.name}} + + {{runtime_dep.version}}{{runtime_dep.size|filtered_filesizeformat}}
    + {% else %} +
    + {{fullPackageSpec}} has no runtime dependencies. +
    + {% endifnotequal %} + + {% ifnotequal other_deps|length 0 %} +

    Other runtime relationships

    + + + + + + + + + + + {% for other_dep in other_deps %} + + {% if other_dep.installed %} + + + + + + + {% else %} + + + + + + + {% endif %} + + {% endfor %} +
    PackageVersionSize + + Relationship type +
    + + {{other_dep.name}} + + {{other_dep.version}}{{other_dep.size|filtered_filesizeformat}} + {{other_dep.dep_type_display}} + +
    {{other_dep.name}}{{other_dep.version}} + {{other_dep.dep_type_display}} + +
    + {% endifnotequal %} +
    +
    + {% endwith %} +{% endblock tabcontent %} diff --git a/bitbake/lib/toaster/toastergui/templates/package_included_detail.html b/bitbake/lib/toaster/toastergui/templates/package_included_detail.html new file mode 100644 index 0000000000..018de3eb42 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/package_included_detail.html @@ -0,0 +1,46 @@ +{% extends "package_detail_base.html" %} +{% load projecttags %} + +{% block title %} +{% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %} +

    {{fullPackageSpec}} ({{target.target}})

    +{% endwith %} +{% endblock title %} + +{% block tabcontent %} +{% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec packageFileCount=package.buildfilelist_package.count %} + {% include "package_included_tabs.html" with active_tab="detail" %} +
    +
    + {% if packageFileCount > 0 %} + + + + + + + + {% for file in package.buildfilelist_package.all|dictsort:"path" %} + + + + + + + {% endfor %} +
    FileSize
    + + {{file.path}} + + {{file.size|filtered_filesizeformat}}
    + + {% else %} +
    + {{fullPackageSpec}} does not generate any files. +
    + {% endif %} +
    +
    + +{% endwith %} +{% endblock tabcontent %} diff --git a/bitbake/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html b/bitbake/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html new file mode 100644 index 0000000000..9cfc7fe7c2 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/package_included_reverse_dependencies.html @@ -0,0 +1,47 @@ +{% extends "package_detail_base.html" %} +{% load projecttags %} + +{% block title %} + {% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %} +

    {{fullPackageSpec}} ({{target.target}})

    + {% endwith %} +{% endblock title %} + +{% block tabcontent %} + {% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec packageFileCount=package.buildfilelist_package.count %} + {% include "package_included_tabs.html" with active_tab="reverse" %} +
    +
    + + {% ifequal reverse_deps|length 0 %} +
    + {{fullPackageSpec}} has no reverse runtime dependencies. +
    + {% else %} + + + + + + + + + {% for reverse_dep in reverse_deps|dictsort:"name" %} + + + + + + + + {% endfor %} +
    PackagePackage VersionSize
    + + {{reverse_dep.name}} + + {{reverse_dep.version}}{{reverse_dep.size|filtered_filesizeformat}}
    + {% endifequal %} +
    +
    + {% endwith %} +{% endblock tabcontent %} diff --git a/bitbake/lib/toaster/toastergui/templates/package_included_tabs.html b/bitbake/lib/toaster/toastergui/templates/package_included_tabs.html new file mode 100644 index 0000000000..5a97ba36b3 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/package_included_tabs.html @@ -0,0 +1,33 @@ + + diff --git a/bitbake/lib/toaster/toastergui/templates/recipe.html b/bitbake/lib/toaster/toastergui/templates/recipe.html index 5dea75382f..eba15baad3 100644 --- a/bitbake/lib/toaster/toastergui/templates/recipe.html +++ b/bitbake/lib/toaster/toastergui/templates/recipe.html @@ -161,9 +161,9 @@ {% for package in packages %} - {{package.name}} - {{package.version}}-{{package.revision}} - {{package.size}} + {{package.name}} + {{package.version}}_{{package.revision}} + {{package.size}} {% endfor %} -- cgit v1.2.3-54-g00ecf