summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-01-15 13:00:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 16:29:59 +0000
commit294579b531d5a96a17aa863554e71f4680d35812 (patch)
treed42f10f98cb26d233860eec59cbdf0799d53ae28 /bitbake/lib/toaster/toastergui/templates
parent6c12ca7f932d2fa06c2f2e2e6c98c76bb4d487d3 (diff)
downloadpoky-294579b531d5a96a17aa863554e71f4680d35812.tar.gz
bitbake: toastergui: convert all builds page to ToasterTable
For better long-term maintainability, use ToasterTable instead of Django template and view code to display the all builds page. NB the builds.html template has been left in, as this will otherwise cause conflicts when merging the new theme. [YOCTO #8738] (Bitbake rev: e0590fc8103afeb4c5e613a826057555c8193d59) 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>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/builds-toastertable.html62
1 files changed, 62 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html b/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html
new file mode 100644
index 0000000000..419d2b52f4
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html
@@ -0,0 +1,62 @@
1{% extends 'base.html' %}
2
3{% block title %} All builds - Toaster {% endblock %}
4
5{% block pagecontent %}
6 <div class="page-header top-air">
7 <h1 data-role="page-title"></h1>
8 </div>
9
10 <div class="row-fluid">
11 {# TODO need to pass this data to context #}
12 {#% include 'mrb_section.html' %#}
13
14 {% url 'builds' as xhr_table_url %}
15 {% include 'toastertable.html' %}
16 </div>
17
18 <script>
19 $(document).ready(function () {
20 var tableElt = $("#{{table_name}}");
21 var titleElt = $("[data-role='page-title']");
22
23 tableElt.on("table-done", function (e, total, tableParams) {
24 var title = "All builds";
25
26 if (tableParams.search || tableParams.filter) {
27 if (total === 0) {
28 title = "No builds found";
29 }
30 else if (total > 0) {
31 title = total + " build" + (total > 1 ? 's' : '') + " found";
32 }
33 }
34
35 titleElt.text(title);
36 });
37
38 /* {% if last_date_from and last_date_to %}
39 // TODO initialize the date range controls;
40 // this will need to be added via ToasterTable
41 date_init(
42 "started_on",
43 "{{last_date_from}}",
44 "{{last_date_to}}",
45 "{{dateMin_started_on}}",
46 "{{dateMax_started_on}}",
47 "{{daterange_selected}}"
48 );
49
50 date_init(
51 "completed_on",
52 "{{last_date_from}}",
53 "{{last_date_to}}",
54 "{{dateMin_completed_on}}",
55 "{{dateMax_completed_on}}",
56 "{{daterange_selected}}"
57 );
58 {% endif %}
59 */
60 });
61 </script>
62{% endblock %}