diff options
author | David Reyna <David.Reyna@windriver.com> | 2015-02-26 21:42:00 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-27 07:36:08 +0000 |
commit | 8c476c27bb532b33004cba363bdf5794bba3a6f7 (patch) | |
tree | a95b3b6e89d70be7490d39aa9d15c20096463de0 /bitbake/lib/toaster/toastergui/templates | |
parent | 6768a3069da45b3512601d8361bf64f06ee11e6f (diff) | |
download | poky-8c476c27bb532b33004cba363bdf5794bba3a6f7.tar.gz |
bitbake: toaster: all projects data and sorts
Implement the 'last build' data methods, enhance variable display,
add empty page and empty sort support.
[YOCTO #6682]
(Bitbake rev: cc6ca17e80844ecb4a777276d5f5177ebbcd93f9)
Signed-off-by: David Reyna <David.Reyna@windriver.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/managed_builds.html | 22 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/projects.html | 60 |
2 files changed, 60 insertions, 22 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_builds.html b/bitbake/lib/toaster/toastergui/templates/managed_builds.html index a4db55b967..e23b832bae 100644 --- a/bitbake/lib/toaster/toastergui/templates/managed_builds.html +++ b/bitbake/lib/toaster/toastergui/templates/managed_builds.html | |||
@@ -56,6 +56,13 @@ | |||
56 | </td> | 56 | </td> |
57 | <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td> | 57 | <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td> |
58 | <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td> | 58 | <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td> |
59 | {% if MANAGED %} | ||
60 | <td class="project"> | ||
61 | {% if build.project %} | ||
62 | <a href="{% url 'project' build.project.id %}">{{build.project.name}}</a> | ||
63 | {% endif %} | ||
64 | </td> | ||
65 | {% endif %} | ||
59 | <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td> | 66 | <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td> |
60 | <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td> | 67 | <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td> |
61 | <td class="failed_tasks error"> | 68 | <td class="failed_tasks error"> |
@@ -91,13 +98,6 @@ | |||
91 | <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a> | 98 | <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a> |
92 | {% endif %} | 99 | {% endif %} |
93 | </td> | 100 | </td> |
94 | {% if MANAGED %} | ||
95 | <td class="project"> | ||
96 | {% if build.project %} | ||
97 | <a href="{% url 'project' build.project.id %}">{{build.project.name}}</a> | ||
98 | {% endif %} | ||
99 | </td> | ||
100 | {% endif %} | ||
101 | </tr> | 101 | </tr> |
102 | 102 | ||
103 | 103 | ||
@@ -114,6 +114,11 @@ | |||
114 | <td class="machine"> | 114 | <td class="machine"> |
115 | <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.machine}}</a> | 115 | <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.machine}}</a> |
116 | </td> | 116 | </td> |
117 | {% if MANAGED %} | ||
118 | <td class="project"> | ||
119 | <a href="{% url 'project' buildrequest.project.id %}">{{buildrequest.project.name}}</a> | ||
120 | </td> | ||
121 | {% endif %} | ||
117 | <td class="started_on"> | 122 | <td class="started_on"> |
118 | <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.created|date:"d/m/y H:i"}}</a> | 123 | <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.created|date:"d/m/y H:i"}}</a> |
119 | </td> | 124 | </td> |
@@ -132,9 +137,6 @@ | |||
132 | </td> | 137 | </td> |
133 | <td class="output"> {# we have no output here #} | 138 | <td class="output"> {# we have no output here #} |
134 | </td> | 139 | </td> |
135 | <td class="project"> | ||
136 | <a href="{% url 'project' buildrequest.project.id %}">{{buildrequest.project.name}}</a> | ||
137 | </td> | ||
138 | </tr> | 140 | </tr> |
139 | {%endif%} | 141 | {%endif%} |
140 | {% endfor %} | 142 | {% endfor %} |
diff --git a/bitbake/lib/toaster/toastergui/templates/projects.html b/bitbake/lib/toaster/toastergui/templates/projects.html index 0396e25a3a..88d5bd32df 100644 --- a/bitbake/lib/toaster/toastergui/templates/projects.html +++ b/bitbake/lib/toaster/toastergui/templates/projects.html | |||
@@ -12,25 +12,61 @@ | |||
12 | 12 | ||
13 | <div class="page-header top-air"> | 13 | <div class="page-header top-air"> |
14 | <h1> | 14 | <h1> |
15 | All projects | 15 | {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %} |
16 | {{objects.paginator.count}} project{{objects.paginator.count|pluralize}} found | ||
17 | {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %} | ||
18 | No projects found | ||
19 | {%else%} | ||
20 | All projects | ||
21 | {%endif%} | ||
16 | </h1> | 22 | </h1> |
17 | </div> | 23 | </div> |
18 | 24 | ||
19 | {% include "basetable_top_projectbuilds.html" %} | 25 | {% if objects.paginator.count == 0 %} |
26 | <div class="row-fluid"> | ||
27 | <div class="alert"> | ||
28 | <form class="no-results input-append" id="searchform"> | ||
29 | <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="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %} | ||
30 | <button class="btn" type="submit" value="Search">Search</button> | ||
31 | <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all projects</button> | ||
32 | </form> | ||
33 | </div> | ||
34 | </div> | ||
35 | |||
36 | {% else %} {# We have builds to display #} | ||
37 | {% include "basetable_top_projectbuilds.html" %} | ||
20 | {% for o in objects %} | 38 | {% for o in objects %} |
21 | <tr class="data"> | 39 | <tr class="data"> |
22 | <td><a href="{% url 'project' o.id %}">{{o.name}}</a></td> | 40 | <td><a href="{% url 'project' o.id %}">{{o.name}}</a></td> |
23 | <td><a href="{% url 'project' o.id %}">{{o.release.name}}</a></td> | 41 | <td><a href="{% url 'project' o.id %}#project-details">{{o.release.name}}</a></td> |
24 | <td>{{o.get_current_machine_name}}</td> | 42 | <td><a href="{% url 'project' o.id %}#machine-distro">{{o.get_current_machine_name}}</a></td> |
25 | <td>{{o.get_number_of_builds}}</td> | 43 | {% if o.get_number_of_builds == 0 %} |
26 | <td class="loutcome">{{o.get_last_outcome}}</td> | 44 | <td class="muted">{{o.get_number_of_builds}}</td> |
27 | <td class="ltarget">{{o.get_last_target}}</td> | 45 | <td class="updated"></td> |
28 | <td class="lerrors">{{o.get_last_errors}}</td> | 46 | <td class="loutcome"></td> |
29 | <td class="lwarnings">{{o.get_last_warnings}}</td> | 47 | <td class="ltarget"></td> |
30 | <td class="limagefiles">{{o.get_last_imgfiles}}</td> | 48 | <td class="lerrors"></td> |
31 | <td class="updated">{{o.updated|date:"d/m/y H:i"}}</td> | 49 | <td class="lwarnings"></td> |
50 | <td class="limagefiles"></td> | ||
51 | {% else %} | ||
52 | <td><a href="{% url 'projectbuilds' o.id %}">{{o.get_number_of_builds}}</a></td> | ||
53 | <td class="updated"><a href="{% url "builddashboard" o.get_last_build_id %}">{{o.updated|date:"d/m/y H:i"}}</a></td> | ||
54 | <td class="loutcome"><a href="{% url "builddashboard" o.get_last_build_id %}">{%if o.get_last_outcome == build_SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif o.get_last_outcome == build_FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td> | ||
55 | <td class="ltarget"><a href="{% url "builddashboard" o.get_last_build_id %}">{{o.get_last_target}} </a></td> | ||
56 | <td class="lerrors">{% if o.get_last_errors %}<a class="errors_no error" href="{% url "builddashboard" o.get_last_build_id %}#errors">{{o.get_last_errors}} error{{o.get_last_errors|pluralize}}</a>{%endif%}</td> | ||
57 | <td class="lwarnings">{% if o.get_last_warnings %}<a class="warnings_no warning" href="{% url "builddashboard" o.get_last_build_id %}#warnings">{{o.get_last_warnings}} warning{{o.get_last_warnings|pluralize}}</a>{%endif%}</td> | ||
58 | <td class="limagefiles"> | ||
59 | {% if o.get_last_outcome == build_SUCCEEDED %} | ||
60 | <a href="{%url "builddashboard" o.get_last_build_id %}#images">{{fstypes|get_dict_value:o.id}}</a> | ||
61 | {% endif %} | ||
62 | </td> | ||
63 | |||
64 | {% endif %} | ||
32 | </tr> | 65 | </tr> |
33 | {% endfor %} | 66 | {% endfor %} |
34 | {% include "basetable_bottom.html" %} | 67 | {% include "basetable_bottom.html" %} |
68 | {% endif %} {# empty #} | ||
35 | 69 | ||
36 | {% endblock %} | 70 | {% endblock %} |
71 | |||
72 | |||