mirror of
https://git.yoctoproject.org/poky
synced 2026-09-20 03:49:32 +02:00
bitbake: toaster: add pagination to the Simple UI
In an effort to make the Simple UI more usable and reponsive, this patch adds pagination support for the pages with lots of entries: Builds, Configuration and Tasks. (Bitbake rev: d4f075c050ad9ecebe750420d49961a7f30d090b) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
415ebb738d
commit
192583a91e
@@ -26,7 +26,7 @@ function filterTableRows(test) {
|
||||
|
||||
{% block pagename %}
|
||||
{% endblock %}
|
||||
<div align="left" style="display:inline-block; width: 40%; margin-left: 2em"> Search: <input type="search" id="filterstring" style="width: 80%" onkeyup="filterTableRows($('#filterstring').val())" autocomplete="off">
|
||||
<div align="left" style="display:inline-block; width: 40%; margin-left: 2em"> Filter: <input type="search" id="filterstring" style="width: 80%" onkeyup="filterTableRows($('#filterstring').val())" autocomplete="off">
|
||||
</div>
|
||||
{% if hideshowcols %}
|
||||
<div align="right" style="display: inline-block; width: 40%">Show/Hide columns:
|
||||
@@ -36,7 +36,25 @@ function filterTableRows(test) {
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div style="display: block; float:right; margin-left: auto; margin-right:5em"><span class="pagination" style="vertical-align: top; margin-right: 3em">Showing {{objects.start_index}} to {{objects.end_index}} out of {{objects.paginator.count}} entries. </span>
|
||||
<ul class="pagination" style="display: block-inline">
|
||||
{%if objects.has_previous %}
|
||||
<li><a href="?page={{objects.previous_page_number}}">«</a></li>
|
||||
{%else%}
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
{%endif%}
|
||||
{% for i in objects.page_range %}
|
||||
<li{%if i == objects.number %} class="active" {%endif%}><a href="?page={{i}}">{{i}}</a></li>
|
||||
{% endfor %}
|
||||
{%if objects.has_next%}
|
||||
<li><a href="?page={{objects.next_page_number}}">»</a></li>
|
||||
{%else%}
|
||||
<li class="disabled"><a href="#">»</a></li>
|
||||
{%endif%}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed" style="width:95%">
|
||||
{% block pagetable %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{% extends "basebuildpage.html" %}
|
||||
|
||||
{% block pagetitle %}Files for package {{files.0.bpackage.name}} {% endblock %}
|
||||
{% block pagetitle %}Files for package {{objects.0.bpackage.name}} {% endblock %}
|
||||
{% block pagetable %}
|
||||
{% if not files %}
|
||||
{% if not objects %}
|
||||
<p>No files were recorded for this package!</p>
|
||||
{% else %}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<th>Size (Bytes)</th>
|
||||
</tr>
|
||||
|
||||
{% for file in files %}
|
||||
{% for file in objects %}
|
||||
|
||||
<tr class="data">
|
||||
<td>{{file.path}}</td>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{% block pagetitle %}Packages{% endblock %}
|
||||
{% block pagetable %}
|
||||
{% if not packages %}
|
||||
{% if not objects %}
|
||||
<p>No packages were recorded for this target!</p>
|
||||
{% else %}
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
<th>Dependencies List (all)</th>
|
||||
</tr>
|
||||
|
||||
{% for package in packages %}
|
||||
{% for package in objects %}
|
||||
|
||||
<tr class="data">
|
||||
<td><a name="#{{package.name}}" href="{% url "bfile" build.pk package.pk %}">{{package.name}} ({{package.filelist_bpackage.count}} files)</a></td>
|
||||
<td>{{package.version}}-{{package.revision}}</td>
|
||||
<td><a href="{% url "layer_versions_recipes" package.recipe.layer_version_id %}#{{package.recipe.name}}">{{package.recipe.name}}</a>{{package.package_name}}</a></td>
|
||||
<td>{%if package.recipe%}<a href="{% url "layer_versions_recipes" package.recipe.layer_version_id %}#{{package.recipe.name}}">{{package.recipe.name}}</a>{{package.package_name}}</a>{%endif%}</td>
|
||||
|
||||
<td>{{package.summary}}</td>
|
||||
<td>{{package.section}}</td>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<th>Bitbake Version</th>
|
||||
<th>Build Name</th>
|
||||
</tr>
|
||||
{% for build in builds %}
|
||||
{% for build in objects %}
|
||||
<tr class="data">
|
||||
<td><a href="{% url "configuration" build.id %}">{{build.get_outcome_display}}</a></td>
|
||||
<td>{{build.started_on}}</td>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
|
||||
{% for variable in configuration %}
|
||||
{% for variable in objects %}
|
||||
|
||||
<tr class="data">
|
||||
<td>{{variable.variable_name}}</td>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<th>Known Versions</th>
|
||||
</tr>
|
||||
|
||||
{% for layer in layers %}
|
||||
{% for layer in objects %}
|
||||
|
||||
<tr class="data">
|
||||
<td>{{layer.name}}</td>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "basebuildpage.html" %}
|
||||
|
||||
{% block pagetable %}
|
||||
{% if not packages %}
|
||||
{% if not objects %}
|
||||
<p>No packages were recorded for this target!</p>
|
||||
{% else %}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<th>Depends on</th>
|
||||
</tr>
|
||||
|
||||
{% for package in packages %}
|
||||
{% for package in objects %}
|
||||
|
||||
<tr class="data">
|
||||
<td><a name="#{{package.name}}">{{package.name}}</a></td>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<th style="width: 30em">Recipe Dependency</th>
|
||||
|
||||
|
||||
{% for recipe in recipes %}
|
||||
{% for recipe in objects %}
|
||||
|
||||
<tr class="data">
|
||||
<td><a name="{{recipe.name}}">{{recipe.name}}</a></td>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{% block pagetitle %}Tasks{% endblock %}
|
||||
{% block pagetable %}
|
||||
{% if not tasks %}
|
||||
{% if not objects %}
|
||||
<p>No tasks were executed in this build!</p>
|
||||
{% else %}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<th>Depends</th>
|
||||
</tr>
|
||||
|
||||
{% for task in tasks %}
|
||||
{% for task in objects %}
|
||||
|
||||
<tr class="data">
|
||||
<td>{{task.order}}</td>
|
||||
|
||||
Reference in New Issue
Block a user