Files
poky/bitbake/lib/toaster/toastergui/templates/toastertable.html
Elliot Smith 33b011c158 bitbake: toastergui: implement "today" and "yesterday" filters
Add the "today" and "yesterday" filters to the started_on
and completed_on columns in the builds table.

During this work, some minor adjustments were made to the
behaviour of the builds table:

* Amend filter action variable names so they're more succinct.
* Retain order in which actions are added to a filter, as this
ordering is used in the UI when displaying the filter actions.
* Always show the table chrome, otherwise it's not possible
to edit the columns shown until there are 10 or more results.
* Because date range searches may return no results, make sure
that the search bar and "show all results" link are visible
when the query returns no results.

[YOCTO #8738]

(Bitbake rev: f17cfa009e58833e0e55884fa04de8abd522b6bc)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 16:30:00 +00:00

106 lines
3.4 KiB
HTML

{% load static %}
{% load projecttags %}
<script src="{% static 'js/table.js' %}"></script>
<script src="{% static 'js/layerBtn.js' %}"></script>
<script>
$(document).ready(function() {
(function(){
var ctx = {
tableName : "{{table_name}}",
url : "{{ xhr_table_url }}?format=json",
title : "{{title}}",
};
try {
tableInit(ctx);
} catch (e) {
document.write("Problem loading table widget: " + e);
}
})();
});
</script>
{% include 'toastertable-filter.html' %}
<div class="row-fluid" id="no-results-{{table_name}}" style="display:none">
<div class="alert">
<form class="no-results input-append">
<input class="input-xxlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search %}{{request.GET.search}}{%endif%}"/>
<a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
<i class="icon-remove"></i>
</a>
<button class="btn search-submit-{{table_name}}">
Search
</button>
<button class="btn btn-link show-all-{{table_name}}">
Show {{title|lower}}
</button>
</form>
</div>
</div>
<div id="table-container-{{table_name}}" style="visibility: hidden">
<!-- control header -->
<div class="navbar" id="table-chrome-{{table_name}}">
<div class="navbar-inner">
<div class="navbar-search input-append pull-left">
<input class="input-xxlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>
<a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
<i class="icon-remove"></i>
</a>
<button class="btn" id="search-submit-{{table_name}}" >Search</button>
</div>
<div class="pull-right">
<div class="btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown">Edit columns
<span class="caret"></span>
</button>
<ul class="dropdown-menu editcol">
</ul>
</div>
<div style="display:inline">
<span class="divider-vertical"></span>
<span class="help-inline" style="padding-top:5px;">Show rows:</span>
<select style="margin-top:5px;margin-bottom:0px;" class="pagesize-{{table_name}}">
{% with "10 25 50 100 150" as list%}
{% for i in list.split %}
<option value="{{i}}">{{i}}</option>
{% endfor %}
{% endwith %}
</select>
</div>
</div>
</div>
</div>
<!-- The actual table -->
<table class="table table-bordered table-hover tablesorter" id="{{table_name}}">
<thead>
<tr><th></th></tr>
</thead>
<tbody></tbody>
</table>
<!-- Pagination controls -->
<div class="pagination pagination-centered" id="pagination-{{table_name}}">
<ul class="pagination" style="display: block-inline">
</ul>
<div class="pull-right">
<span class="help-inline" style="padding-top:5px;">Show rows:</span>
<select style="margin-top:5px;margin-bottom:0px;" class="pagesize-{{table_name}}">
{% with "10 25 50 100 150" as list%}
{% for i in list.split %}
<option value="{{i}}">{{i}}</option>
{% endfor %}
{% endwith %}
</select>
</div>
</div>
</div>