summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-05-26 16:12:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-15 08:35:04 +0100
commita786ac14f1c6c02c38dc141125035445413f1250 (patch)
tree0e591f980a70afecbbde39c77e62b7f12ec4a889 /bitbake/lib/toaster/toastergui/templates
parentb63f9518e718db09e14c8287fadf0bebcdf5ec9e (diff)
downloadpoky-a786ac14f1c6c02c38dc141125035445413f1250.tar.gz
bitbake: toaster: port table for Built packages to ToasterTable
This is the table that displays all the packages built in the build. Build -> Packages. Adds a template snippet for the git revision popover. (Bitbake rev: df62f38ff4e634544c9b1e97c5f6ca45e84a4f1e) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basebuildpage.html26
-rw-r--r--bitbake/lib/toaster/toastergui/templates/bpackage.html106
-rw-r--r--bitbake/lib/toaster/toastergui/templates/buildinfo-toastertable.html23
-rw-r--r--bitbake/lib/toaster/toastergui/templates/snippets/gitrev_popover.html8
4 files changed, 43 insertions, 120 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
index 76a602bf07..c002e42b7d 100644
--- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
+++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
@@ -23,10 +23,19 @@
23 {% block localbreadcrumb %}{% endblock %} 23 {% block localbreadcrumb %}{% endblock %}
24 </ul> 24 </ul>
25 <script> 25 <script>
26 $( function () { 26 $(document).ready(function(){
27 $('#breadcrumb > li').append('<span class="divider">&rarr;</span>'); 27 $('#breadcrumb > li').append('<span class="divider">&rarr;</span>');
28 $('#breadcrumb > li:last').addClass("active"); 28 $('#breadcrumb > li:last').addClass("active");
29 $('#breadcrumb > li:last > span').remove(); 29 $('#breadcrumb > li:last > span').remove();
30
31 $("#build-menu li a").each(function(){
32 /* Set the page active state in the Build menu */
33 if (window.location.href.split('?')[0] === $(this).prop("href")){
34 $(this).parent().addClass("active");
35 } else {
36 $(this).parent().removeClass("active");
37 }
38 });
30 }); 39 });
31 </script> 40 </script>
32 </div> 41 </div>
@@ -35,7 +44,7 @@
35 <div class="row"> 44 <div class="row">
36 <!-- begin left sidebar container --> 45 <!-- begin left sidebar container -->
37 <div id="nav" class="col-md-2"> 46 <div id="nav" class="col-md-2">
38 <ul class="nav nav-list well"> 47 <ul class="nav nav-list well" id="build-menu">
39 <li 48 <li
40 {% if request.resolver_match.url_name == 'builddashboard' %} 49 {% if request.resolver_match.url_name == 'builddashboard' %}
41 class="active" 50 class="active"
@@ -54,25 +63,14 @@
54 {% block nav-configuration %} 63 {% block nav-configuration %}
55 <li><a href="{% url 'configuration' build.pk %}">Configuration</a></li> 64 <li><a href="{% url 'configuration' build.pk %}">Configuration</a></li>
56 {% endblock %} 65 {% endblock %}
57 {% block nav-tasks %} 66
58 <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li> 67 <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
59 {% endblock %}
60 {% block nav-recipes %}
61 <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li> 68 <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li>
62 {% endblock %}
63 {% block nav-packages %}
64 <li><a href="{% url 'packages' build.pk %}">Packages</a></li> 69 <li><a href="{% url 'packages' build.pk %}">Packages</a></li>
65 {% endblock %}
66 <li class="nav-header">Performance</li> 70 <li class="nav-header">Performance</li>
67 {% block nav-buildtime %}
68 <li><a href="{% url 'buildtime' build.pk %}">Time</a></li> 71 <li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
69 {% endblock %}
70 {% block nav-cputime %}
71 <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li> 72 <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li>
72 {% endblock %}
73 {% block nav-diskio %}
74 <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li> 73 <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
75 {% endblock %}
76 74
77 <li class="divider"></li> 75 <li class="divider"></li>
78 76
diff --git a/bitbake/lib/toaster/toastergui/templates/bpackage.html b/bitbake/lib/toaster/toastergui/templates/bpackage.html
deleted file mode 100644
index 575c27b3b5..0000000000
--- a/bitbake/lib/toaster/toastergui/templates/bpackage.html
+++ /dev/null
@@ -1,106 +0,0 @@
1{% extends "basebuildpage.html" %}
2
3{% load projecttags %}
4
5{% block title %} Packages built - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
6{% block localbreadcrumb %}
7<li>Packages</li>
8{% endblock %}
9
10{% block nav-packages %}
11 <li class="active"><a href="{% url 'packages' build.pk %}">Packages</a></li>
12{% endblock %}
13
14{% block buildinfomain %}
15<div class="col-md-10">
16
17{% if not request.GET.filter and not request.GET.search and not objects.paginator.count %}
18
19<!-- Empty - no data in database -->
20<div class="page-header">
21 <h1>
22 Packages
23 </h1>
24</div>
25<div class="alert alert-info lead">
26 <strong>No packages were built.</strong> How did this happen? Well, BitBake reuses as much stuff as possible.
27 If all of the packages needed were already built and available in your build infrastructure, BitBake
28 will not rebuild any of them. This might be slightly confusing, but it does make everything faster.
29</div>
30
31{% else %}
32
33<div class="page-header">
34 <h1>
35 {% if request.GET.search and objects.paginator.count > 0 %}
36 {{objects.paginator.count}} package{{objects.paginator.count|pluralize}} found
37 {%elif request.GET.search and objects.paginator.count == 0%}
38 No packages found
39 {%else%}
40 Packages
41 {%endif%}
42 </h1>
43</div>
44
45 {% if objects.paginator.count == 0 %}
46 <div class="alert">
47 <form class="no-results input-append" id="searchform">
48 <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="input-append-addon btn" tabindex="-1"><i class="glyphicon glyphicon-remove"></i></a>{% endif %}
49 <button class="btn" type="submit" value="Search">Search</button>
50 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all packages</button>
51 </form>
52 </div>
53
54 {% else %}
55 {% include "basetable_top.html" %}
56
57 {% for package in objects %}
58
59 <tr class="data">
60
61 <!-- Package -->
62 <td class="package_name"><a href="{% url "package_built_detail" build.pk package.pk %}">{{package.name}}</a></td>
63 <!-- Package Version -->
64 <td class="package_version">{%if package.version%}<a href="{% url "package_built_detail" build.pk package.pk %}">{{package.version}}-{{package.revision}}</a>{%endif%}</td>
65 <!-- Package Size -->
66 <td class="size sizecol">{{package.size|filtered_filesizeformat}}</td>
67 <!-- License -->
68 <td class="license">{{package.license}}</td>
69
70 {%if package.recipe%}
71 <!-- Recipe -->
72 <td class="recipe__name"><a href="{% url "recipe" build.pk package.recipe.pk %}">{{package.recipe.name}}</a></td>
73 <!-- Recipe Version -->
74 <td class="recipe__version"><a href="{% url "recipe" build.pk package.recipe.pk %}">{{package.recipe.version}}</a></td>
75
76 <!-- Layer -->
77 <td class="recipe__layer_version__layer__name">{{package.recipe.layer_version.layer.name}}</td>
78 <!-- Layer branch -->
79 <td class="recipe__layer_version__branch">{{package.recipe.layer_version.branch}}</td>
80 <!-- Layer commit -->
81 <td class="recipe__layer_version__layer__commit">
82 <a class="btn"
83 data-content="<ul class='list-unstyled'>
84 <li>{{package.recipe.layer_version.commit}}</li>
85 </ul>">
86 {{package.recipe.layer_version.commit|truncatechars:13}}
87 </a>
88 </td>
89 <!-- Layer directory -->
90 {%else%}
91 <td class="recipe__name"></td>
92 <td class="recipe__version"></td>
93 <td class="recipe__layer_version__layer__name"></td>
94 <td class="recipe__layer_version__branch"></td>
95 <td class="recipe__layer_version__layer__commit"></td>
96 <td class="recipe__layer_version__local_path"></td>
97 {%endif%}
98
99 </tr>
100 {% endfor %}
101
102 {% include "basetable_bottom.html" %}
103 {% endif %} {# objects.paginator.count #}
104{% endif %} {# Empty #}
105</div>
106{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/buildinfo-toastertable.html b/bitbake/lib/toaster/toastergui/templates/buildinfo-toastertable.html
new file mode 100644
index 0000000000..4ce5c4a8a5
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/buildinfo-toastertable.html
@@ -0,0 +1,23 @@
1{% extends "basebuildpage.html" %}
2
3{% load projecttags %}
4
5{% block title %} {{title}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
6{% block localbreadcrumb %}
7<li>{{title}}</li>
8{% endblock %}
9
10{% block nav-packages %}
11{% endblock %}
12
13{% block buildinfomain %}
14<div class="span10">
15{% url 'builtpackagestable' build.id as xhr_table_url %}
16 <div class="page-header">
17 <h1>
18 {{title}} (<span class="table-count-{{table_name}}">0</span>) </h2>
19 </h1>
20 </div>
21 {% include "toastertable.html" %}
22</div>
23{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/snippets/gitrev_popover.html b/bitbake/lib/toaster/toastergui/templates/snippets/gitrev_popover.html
new file mode 100644
index 0000000000..281a3bd765
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/snippets/gitrev_popover.html
@@ -0,0 +1,8 @@
1{% load projecttags %}
2{% if vcs_ref|is_shaid %}
3<a class="btn" data-content="<ul class='unstyled'> <li>{{vcs_ref}}</li> </ul>">
4 {{vcs_ref|truncatechars:10}}
5</a>
6{% else %}
7{{vcs_ref}}
8{% endif %}