summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-08-08 17:50:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-29 13:56:49 +0100
commit3a4356dbfea07088b38881abe2c2b5d6bb6c7cf7 (patch)
tree1400c8217a18d1d94fcbb7f892cc12a76b1c596b /bitbake/lib/toaster/toastergui/templates
parent54530006b745d364d60dcf4ce372a1459d3fff78 (diff)
downloadpoky-3a4356dbfea07088b38881abe2c2b5d6bb6c7cf7.tar.gz
bitbake: toaster: create project section navigation structure
We create the navigation structure for the project section. This includes adding URLs for configuration, builds, all layers, layer details and all targets pages. Changes to existing pages to exemplify navigation links. (Bitbake rev: 6f0cb9d106129eb496a4c009d95b0727378e97c1) 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--bitbake/lib/toaster/toastergui/templates/newproject.html5
-rw-r--r--bitbake/lib/toaster/toastergui/templates/project.html47
2 files changed, 28 insertions, 24 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/newproject.html b/bitbake/lib/toaster/toastergui/templates/newproject.html
index 8f1867a94f..6ee27d12d2 100644
--- a/bitbake/lib/toaster/toastergui/templates/newproject.html
+++ b/bitbake/lib/toaster/toastergui/templates/newproject.html
@@ -28,8 +28,9 @@
28 <i class="icon-question-sign get-help" title="This sets the branch for the Yocto Project core layers (meta, meta-yocto and meta-yocto-bsp), and for the layers you use from the OpenEmbedded Metadata Index"></i> 28 <i class="icon-question-sign get-help" title="This sets the branch for the Yocto Project core layers (meta, meta-yocto and meta-yocto-bsp), and for the layers you use from the OpenEmbedded Metadata Index"></i>
29 </label> 29 </label>
30 <select name="projectversion" id="projectversion"> 30 <select name="projectversion" id="projectversion">
31 <!-- TODO: XHR data from http://layers.openembedded.org/layerindex/branch/master/layers/ --> 31 {% for br in branches %}
32 <option value="master" {%if projectversion == "master" %}selected{%endif%}>master</option> 32 <option value="{{br.id}}"{%if projectversion == br.id %} selected{%endif%}>{{br.name}} ({{br.short_description}})</option>
33 {% endfor %}
33 </select> 34 </select>
34 </fieldset> 35 </fieldset>
35 36
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
index c859f6bcd1..0ddfeb31ae 100644
--- a/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -71,10 +71,29 @@ function postEditAjaxRequest(reqdata) {
71 }) 71 })
72} 72}
73 73
74
75
76
74$(document).ready(function () { 77$(document).ready(function () {
75 setEventHandlers(); 78 setEventHandlers();
79
80 /* Provide XHR calls for the "build" buttons.*/
81 $("button#build-all-button").click( function (evt) {
82 var ajax = $.ajax({
83 type:"POST",
84 url:"{% url 'xhr_projectbuild' project.id %}",
85 headers: { 'X-CSRFToken': $.cookie("csrftoken")},
86 success: function (data, textstatus) {
87 if (data.error != "ok") {
88 alert("XHR fail: " + data.error );
89 }
90 },
91 error: function (jqXHR, textstatus, error) { alert("XHR errored:" + error + "(" + textstatus + ")"); },
92 })
93 });
76}); 94});
77 95
96
78</script> 97</script>
79 98
80 99
@@ -97,23 +116,7 @@ $(document).ready(function () {
97 <input class="huge input-xxlarge" placeholder="Or enter the target you want to build" autocomplete="off" data-minlength="1" data-autocomplete="off" data-provide="typeahead" data-source="" type="text"> 116 <input class="huge input-xxlarge" placeholder="Or enter the target you want to build" autocomplete="off" data-minlength="1" data-autocomplete="off" data-provide="typeahead" data-source="" type="text">
98 <button id="build-button" class="btn btn-large" disabled="">Build</button> 117 <button id="build-button" class="btn btn-large" disabled="">Build</button>
99 </div> 118 </div>
100 <script>
101/* Provide XHR calls for the "build" buttons.*/
102$("button#build-all-button").click( function (evt) {
103 var ajax = $.ajax({
104 type:"POST",
105 url:"{% url 'xhr_projectbuild' project.id %}",
106 headers: { 'X-CSRFToken': $.cookie("csrftoken")},
107 success: function (data, textstatus) {
108 if (data.error != "ok") {
109 alert("XHR fail: " + data.error );
110 }
111 },
112 error: function (jqXHR, textstatus, error) { alert("XHR errored:" + error + "(" + textstatus + ")"); },
113 })
114});
115 119
116 </script>
117 <!--span class="help-inline">This target is not provided <br />by any of your added layers 120 <!--span class="help-inline">This target is not provided <br />by any of your added layers
118 <i class="icon-question-sign get-help get-help-red" title="Review your list of added layers to make sure one of them provides core-image-xyz. Clicking on a layer name will give you all the information Toaster has about the layer"></i> 121 <i class="icon-question-sign get-help get-help-red" title="Review your list of added layers to make sure one of them provides core-image-xyz. Clicking on a layer name will give you all the information Toaster has about the layer"></i>
119 </span> 122 </span>
@@ -255,7 +258,7 @@ $("button#build-all-button").click( function (evt) {
255 <button id="add-layer-dependencies" class="btn btn-info add-layer">Add layers</button> 258 <button id="add-layer-dependencies" class="btn btn-info add-layer">Add layers</button>
256 </div> 259 </div>
257 260
258 <p><a href="#">Import your layer</a> | <a href="#">View all layers</a></p> 261 <p><a href="{% url 'importlayer' %}">Import your layer</a> | <a href="{% url 'layers'%}">View all layers</a></p>
259 </form> 262 </form>
260 263
261 <h4 class="air"> 264 <h4 class="air">
@@ -286,7 +289,7 @@ $("button#build-all-button").click( function (evt) {
286 <button id="add-target-button" class="btn" type="button">Add</button> 289 <button id="add-target-button" class="btn" type="button">Add</button>
287 </div> 290 </div>
288 291
289 <p><a href="#" class="link">View all targets</a></p> 292 <p><a href="{% url 'targets' %}" class="link">View all targets</a></p>
290 </form> 293 </form>
291 <h4 class="air"> 294 <h4 class="air">
292 Added targets 295 Added targets
@@ -328,10 +331,10 @@ $("button#build-all-button").click( function (evt) {
328 {{distro}} 331 {{distro}}
329 <i title="" data-original-title="" class="icon-pencil"></i> 332 <i title="" data-original-title="" class="icon-pencil"></i>
330 </p> 333 </p>
331 <p class="localconf"> 334 <p class="link-action">
332 <a href="#" class="link">Edit the <code>local.conf</code> file</a> 335 <a href="{% url 'projectconf' project.id %}" class="link">Edit configuration variables</a>
333 <i data-original-title="The <code>local.conf</code> file is where other project configuration options are set. Pretty much any configuration option can be set in this file. Each option, like everything else in the build system, is a variable - value pair" class="icon-question-sign get-help heading-help" title=""></i> 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>
334 </p> 337 </p>
335 </div> 338 </div>
336 </div> 339 </div>
337 340