summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-08-29 16:41:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-01 08:51:32 +0100
commitacd4a1799d51a9f0b192d12b2c58387595b27bf7 (patch)
tree194260d1e025db5cfb94662c81fbef2488f1798e /bitbake/lib/toaster/toastergui/templates
parentfd0398f2c1355597a95242e6c8400eae6ad60fa4 (diff)
downloadpoky-acd4a1799d51a9f0b192d12b2c58387595b27bf7.tar.gz
bitbake: toaster: add project pages for machines, targets, layers
We add new pages for the all-machines and all-targets project-related views. We update the existing template structure to create a base project view, similar to a base build view, that includes a breadcrumb. Updating existing all layers view to use the new structure. We update methods in the models to provide corrent information display. [YOCTO #6592] [YOCTO #6593] (Bitbake rev: 973f582a19441c1ec67061160e4c50ce03ed7b68) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r--[-rwxr-xr-x]bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html0
-rw-r--r--bitbake/lib/toaster/toastergui/templates/baseprojectpage.html43
-rw-r--r--[-rwxr-xr-x]bitbake/lib/toaster/toastergui/templates/layers.html9
-rw-r--r--bitbake/lib/toaster/toastergui/templates/machines.html63
-rw-r--r--bitbake/lib/toaster/toastergui/templates/project.html69
-rw-r--r--[-rwxr-xr-x]bitbake/lib/toaster/toastergui/templates/recipes.html0
-rw-r--r--bitbake/lib/toaster/toastergui/templates/targets.html186
7 files changed, 328 insertions, 42 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html b/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
index 5149768517..5149768517 100755..100644
--- a/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
+++ b/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
diff --git a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
new file mode 100644
index 0000000000..54edaaf27c
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
@@ -0,0 +1,43 @@
1{% extends "base.html" %}
2{% load projecttags %}
3{% load humanize %}
4{% block pagecontent %}
5
6
7 <div class="">
8<!-- Breadcrumbs -->
9 <div class="section">
10 <ul class="breadcrumb" id="breadcrumb">
11 <li><a href="{% url 'all-builds' %}">All builds</a></li>
12 {% block parentbreadcrumb %}
13 {% if project %}
14 <li>
15 <a href="{%url 'project' project.id %}">{{project.name}}
16 </a>
17 </li>
18 {% endif %}
19 {% endblock %}
20 {% block localbreadcrumb %}{% endblock %}
21 </ul>
22 <script>
23 $( function () {
24 $('#breadcrumb > li').append("<span class=\"divider\">→</span>");
25 $('#breadcrumb > li:last').addClass("active");
26 $('#breadcrumb > li:last > span').remove();
27 });
28 </script>
29 </div>
30
31 <div class="row-fluid">
32
33 <!-- Begin right container -->
34 {% block projectinfomain %}{% endblock %}
35 <!-- End right container -->
36
37
38 </div>
39 </div>
40
41
42{% endblock %}
43
diff --git a/bitbake/lib/toaster/toastergui/templates/layers.html b/bitbake/lib/toaster/toastergui/templates/layers.html
index d7d159e1e6..bc6e5a3073 100755..100644
--- a/bitbake/lib/toaster/toastergui/templates/layers.html
+++ b/bitbake/lib/toaster/toastergui/templates/layers.html
@@ -1,7 +1,12 @@
1{% extends "base.html" %} 1{% extends "baseprojectpage.html" %}
2{% load projecttags %} 2{% load projecttags %}
3{% load humanize %} 3{% load humanize %}
4{% block pagecontent %} 4
5{% block localbreadcrumb %}
6<li>Layers</li>
7{% endblock %}
8
9{% block projectinfomain %}
5 <div class="page-header"> 10 <div class="page-header">
6 <h1> 11 <h1>
7 All layers 12 All layers
diff --git a/bitbake/lib/toaster/toastergui/templates/machines.html b/bitbake/lib/toaster/toastergui/templates/machines.html
new file mode 100644
index 0000000000..18e7485d50
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/machines.html
@@ -0,0 +1,63 @@
1{% extends "baseprojectpage.html" %}
2{% load projecttags %}
3{% load humanize %}
4
5{% block localbreadcrumb %}
6<li>Machines</li>
7{% endblock %}
8
9{% block projectinfomain %}
10 <div class="page-header">
11 <h1>
12 All machines
13 <i class="icon-question-sign get-help heading-help" title="This page lists all the machines compatible with Yocto Project 1.7 'Dxxxx' that Toaster knows about. They include community-created targets suitable for use on top of OpenEmbedded Core and any targets you have imported"></i>
14 </h1>
15 </div>
16 <!--div class="alert">
17 <div class="input-append" style="margin-bottom:0px;">
18 <input class="input-xxlarge" type="text" placeholder="Search targets" value="browser" />
19 <a class="add-on btn">
20 <i class="icon-remove"></i>
21 </a>
22 <button class="btn" type="button">Search</button>
23 <a class="btn btn-link" href="#">Show all targets</a>
24 </div>
25 </div-->
26 <div id="target-added" class="alert alert-info lead" style="display:none;"></div>
27 <div id="target-removed" class="alert alert-info lead" style="display:none;">
28 <button type="button" class="close" data-dismiss="alert">&times;</button>
29 <strong>1</strong> target deleted from <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a>
30 </div>
31
32
33{% include "basetable_top.html" %}
34 {% for o in objects %}
35 <tr class="data">
36 <td class="machine">
37 {{o.name}}
38 <a machine="_blank" href="http://layers.openembedded.org/layerindex/branch/master/machines/?q=3g-router-image"><i class="icon-share get-info"></i></a>
39 </td>
40 <td class="description">{{o.description}}</td>
41 <td class="machine-file">
42 <code>{{o.file_path}}</code>
43 <a href="http://github.com/embeddedgeeks/meta-embeddedgeeks/blob/master/machines-core/images/3g-router-image.bb" machine="_blank"><i class="icon-share get-info"></i></a>
44 </td>
45 <td class="layer"><a href="#">{{o.layer_version.layer.name}}</a></td>
46 <td class="source">{{o.layer_source.name}}</td>
47 <td class="branch">{{o.layer_version.commit}}</td>
48 <td class="build">
49 <a id="build-machine" href="project-with-machines.html?machine=3g-router-image" class="btn btn-block" style="display:none;">
50 Build machine
51 </a>
52 <a id="add-layer" href="#" class="btn btn-block nopop" title="1 layer added">
53 <i class="icon-plus"></i>
54 Add layer
55 <i class="icon-question-sign get-help" title="To build this machine, you must first add the meta-embeddedgeeks layer to your project"></i>
56 </a>
57 </td>
58 </tr>
59 {% endfor %}
60
61{% include "basetable_bottom.html" %}
62
63{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
index 3c59fcf2ac..d7bfa2b9de 100644
--- a/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -224,36 +224,14 @@ $(document).ready(function () {
224 <div id="dependency-alert" class="alert alert-info" style="display:none;"> 224 <div id="dependency-alert" class="alert alert-info" style="display:none;">
225 <p><strong>meta-tizen</strong> depends on the layers below. Check the ones you want to add: </p> 225 <p><strong>meta-tizen</strong> depends on the layers below. Check the ones you want to add: </p>
226 <ul class="unstyled"> 226 <ul class="unstyled">
227 <li> 227 {% for f in layer_dependency %}
228 <label class="checkbox">
229 <input checked="checked" type="checkbox">
230 meta-efl
231 </label>
232 </li>
233 <li>
234 <label class="checkbox">
235 <input checked="checked" type="checkbox">
236 meta-intel
237 </label>
238 </li>
239 <li>
240 <label class="checkbox">
241 <input checked="checked" type="checkbox">
242 meta-multimedia
243 </label>
244 </li>
245 <li>
246 <label class="checkbox">
247 <input checked="checked" type="checkbox">
248 meta-oe
249 </label>
250 </li>
251 <li> 228 <li>
252 <label class="checkbox"> 229 <label class="checkbox">
253 <input checked="checked" type="checkbox"> 230 <input checked="checked" type="checkbox">
254 meta-ruby 231 meta-ruby
255 </label> 232 </label>
256 </li> 233 </li>
234 {% endfor %}
257 </ul> 235 </ul>
258 <button id="add-layer-dependencies" class="btn btn-info add-layer">Add layers</button> 236 <button id="add-layer-dependencies" class="btn btn-info add-layer">Add layers</button>
259 </div> 237 </div>
@@ -315,27 +293,38 @@ $(document).ready(function () {
315 </div> 293 </div>
316 294
317 <div class="well well-transparent span4"> 295 <div class="well well-transparent span4">
296
318 <h3> 297 <h3>
319 Set machine 298 Project machine
320 <i data-original-title="The machine is the hardware for which you want to build. You can only set one machine per project" class="icon-question-sign get-help heading-help" title=""></i> 299 <i class="icon-question-sign get-help heading-help" title="The machine is the hardware for which you want to build. You can only set one machine per project"></i>
321 </h3> 300 </h3>
322 <p class="lead"> 301 <p class="lead" id="selected-machine"> {{machine}}
323 {{machine}} 302 <i id="change-machine" class="icon-pencil"></i>
324 <i title="" data-original-title="" class="icon-pencil"></i>
325 </p> 303 </p>
326 <h3> 304 <form id="select-machine">
327 Set distro 305 <div class="alert alert-info">
328 <i data-original-title="When you build an image using the Yocto Project and do not alter the distro, you are creating a Poky distribution" class="icon-question-sign get-help heading-help" title=""></i> 306 <strong>Machine changes have a big impact on build outcome.</strong>
329 </h3> 307 You cannot really compare the builds for the new machine with the previous ones.
330 <p class="lead"> 308 </div>
331 {{distro}} 309 <div class="input-append">
332 <i title="" data-original-title="" class="icon-pencil"></i> 310 <input type="text" id="machine" autocomplete="off" value="qemux86" data-provide="typeahead"
311 data-minLength="1"
312 data-autocomplete="off"
313 data-source='[
314 ]'>
315 <button id="apply-change-machine" class="btn" type="button">Save</button>
316 <a href="#" id="cancel-machine" class="btn btn-link">Cancel</a>
317 </div>
318 <p><a href="{% url 'machines' %}" class="link">View all machines</a></p>
319 </form>
320 <p class="link-action">
321 <a href="{% url 'projectconf' project.id %}" class="link">Edit configuration variables</a>
322 <i class="icon-question-sign get-help heading-help" title="You can set other project configuration options here. Each option, like everything else in the build system, is a variable - value pair"></i>
333 </p> 323 </p>
334 <p class="link-action"> 324
335 <a href="{% url 'projectconf' project.id %}" class="link">Edit configuration variables</a>
336 <i class="icon-question-sign get-help heading-help" title="You can set other project configuration options here. Each option, like everything else in the build system, is a variable - value pair"></i>
337 </p>
338 </div> 325 </div>
326
327
339 </div> 328 </div>
340 329
341 <h2>Project details</h2> 330 <h2>Project details</h2>
diff --git a/bitbake/lib/toaster/toastergui/templates/recipes.html b/bitbake/lib/toaster/toastergui/templates/recipes.html
index 791a487a81..791a487a81 100755..100644
--- a/bitbake/lib/toaster/toastergui/templates/recipes.html
+++ b/bitbake/lib/toaster/toastergui/templates/recipes.html
diff --git a/bitbake/lib/toaster/toastergui/templates/targets.html b/bitbake/lib/toaster/toastergui/templates/targets.html
new file mode 100644
index 0000000000..3afdf0a5e9
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/targets.html
@@ -0,0 +1,186 @@
1{% extends "baseprojectpage.html" %}
2{% load projecttags %}
3{% load humanize %}
4
5{% block localbreadcrumb %}
6<li>Targets</li>
7{% endblock %}
8
9{% block projectinfomain %}
10 <div class="page-header">
11 <h1>
12 All targets
13 <i class="icon-question-sign get-help heading-help" title="This page lists all the targets compatible with Yocto Project 1.7 'Dxxxx' that Toaster knows about. They include community-created targets suitable for use on top of OpenEmbedded Core and any targets you have imported"></i>
14 </h1>
15 </div>
16 <!--div class="alert">
17 <div class="input-append" style="margin-bottom:0px;">
18 <input class="input-xxlarge" type="text" placeholder="Search targets" value="browser" />
19 <a class="add-on btn">
20 <i class="icon-remove"></i>
21 </a>
22 <button class="btn" type="button">Search</button>
23 <a class="btn btn-link" href="#">Show all targets</a>
24 </div>
25 </div-->
26 <div id="target-added" class="alert alert-info lead" style="display:none;"></div>
27 <div id="target-removed" class="alert alert-info lead" style="display:none;">
28 <button type="button" class="close" data-dismiss="alert">&times;</button>
29 <strong>1</strong> target deleted from <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a>
30 </div>
31
32
33{% include "basetable_top.html" %}
34 {% for o in objects %}
35 <tr class="data">
36 <td class="target">
37 {{o.name}} ({{o.id}}, {{o.up_id}})
38 <a target="_blank" href="{{o.get_layersource_view_url}}"><i class="icon-share get-info"></i></a>
39 </td>
40 <td class="version">{{o.version}}</td>
41 <td class="description">{{o.description}}</td>
42 <td class="recipe-file">
43 <code>{{o.file_path}}</code>
44 <a href="{{o.get_vcs_link_url}}" target="_blank"><i class="icon-share get-info"></i></a>
45 </td>
46 <td class="target-section">{{o.section}}</td>
47 <td class="license">{{o.license}}</td>
48 <td class="layer"><a href="#">{{o.layer_version.layer.name}}</a></td>
49 <td class="source">{{o.layer_source.name}}</td>
50 <td class="branch">{{o.layer_version.commit}}</td>
51 <td class="build">
52 <a id="build-target" href="project-with-targets.html?target=3g-router-image" class="btn btn-block" style="display:none;">
53 Build target
54 </a>
55 <a id="add-layer" href="#" class="btn btn-block nopop" title="1 layer added">
56 <i class="icon-plus"></i>
57 Add layer
58 <i class="icon-question-sign get-help" title="To build this target, you must first add the meta-embeddedgeeks layer to your project"></i>
59 </a>
60 </td>
61 </tr>
62 {% endfor %}
63{% include "basetable_bottom.html" %}
64
65 <!-- Modals -->
66
67 <!-- 'Layer dependencies modal' -->
68 <div id="dependencies-message" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
69 <div class="modal-header">
70 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
71 <h3>meta-acer dependencies</h3>
72 </div>
73 <div class="modal-body">
74 <p><strong>meta-acer</strong> depends on some targets that are not added to your project. Select the ones you want to add:</p>
75 <ul class="unstyled">
76 <li>
77 <label class="checkbox">
78 <input type="checkbox" checked="checked">
79 meta-android
80 </label>
81 </li>
82 <li>
83 <label class="checkbox">
84 <input type="checkbox" checked="checked">
85 meta-oe
86 </label>
87 </li>
88 </ul>
89 </div>
90 <div class="modal-footer">
91 <button id="add-target-dependencies" type="submit" class="btn btn-primary" data-dismiss="modal" >Add targets</button>
92 <button class="btn" data-dismiss="modal">Cancel</button>
93 </div>
94 </div>
95
96 <script src="assets/js/jquery-1.9.1.min.js" type='text/javascript'></script>
97 <script src="assets/js/jquery.tablesorter.min.js" type='text/javascript'></script>
98 <script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
99 <script src="assets/js/bootstrap.min.js" type='text/javascript'></script>
100 <script src="assets/js/prettify.js" type='text/javascript'></script>
101 <script src="assets/js/jit.js" type='text/javascript'></script>
102 <script src="assets/js/main.js" type='text/javascript'></script>
103
104 <script>
105 $(document).ready(function() {
106
107 //show or hide selected columns on load
108 $("input:checkbox").each(function(){
109 var selectedType = $(this).val();
110 if($(this).is(":checked")){
111 $("."+selectedType).show();
112 }
113 else{
114 $("."+selectedType).hide();
115 }
116 });
117
118 // enable add target button
119 $('#add-target-with-deps').removeAttr('disabled');
120
121 //edit columns functionality (show / hide table columns)
122 $("input:checkbox").change();
123 $("input:checkbox").change(function(){
124 var selectedType = $(this).val();
125 if($(this).is(":checked")){
126 $("."+selectedType).show();
127 }
128 else{
129 $("."+selectedType).hide();
130 }
131 });
132
133 //turn edit columns dropdown into a multi-select menu
134 $('.dropdown-menu input, .dropdown-menu label').click(function(e) {
135 e.stopPropagation();
136 });
137
138 //show tooltip with applied filter
139 $('#filtered').tooltip({container:'table', placement:'bottom', delay:{hide:1500}, html:true});
140
141 $('#filtered').click(function() {
142 $(this).tooltip('hide');
143 });
144
145 //show target added tooltip
146 $("#remove-target, #add-target, #add-target-with-deps2").tooltip({ trigger: 'manual' });
147
148 // add target without dependencies
149 $("#add-target").click(function(){
150 $('#target-removed').hide();
151 $('#target-added').html('<button type="button" class="close" data-dismiss="alert">&times;</button><strong>1</strong> target added to <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a>').fadeIn();
152 $('#add-target').tooltip('show');
153 $("#add-target").hide();
154 $(".add-targets .tooltip").delay(2000).fadeOut(function(){
155 $("#remove-target").delay(300).fadeIn();
156 });
157 });
158
159 // add target with dependencies
160 $(document).on("click", "#add-target-dependencies", function() {
161 $('#target-removed').hide();
162 $('#target-added').html('<button type="button" class="close" data-dismiss="alert">&times;</button><strong>3</strong> targets added to <a href="project-with-targets.html">your project</a>: <a href="#">meta-acer</a> and its dependencies <a href="#">meta-android</a> and <a href="#">meta-oe</a>').delay(400).fadeIn(function(){
163 $('#add-target-with-deps').tooltip('show');
164 $("#add-target-with-deps, #add-target-with-deps").hide();
165 $(".add-targets .tooltip").delay(2000).fadeOut(function(){
166 $("#remove-target-with-deps").delay(300).fadeIn();
167 });
168 });
169 });
170
171 // delete target
172 $("#remove-target").click(function(){
173 $('#target-added').hide();
174 $('#target-removed').show();
175 $('#remove-target').tooltip('show');
176 $("#remove-target").hide();
177 $(".add-targets .tooltip").delay(2000).fadeOut(function(){
178 $("#add-target").delay(300).fadeIn();
179 });
180 });
181
182 });
183
184</script>
185
186{% endblock %}