summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/project.html
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/project.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/project.html356
1 files changed, 356 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
index 71adb54431..c859f6bcd1 100644
--- a/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -3,4 +3,360 @@
3{% load humanize %} 3{% load humanize %}
4{% block pagecontent %} 4{% block pagecontent %}
5 5
6<script>
7
8var buildrequests = [];
9
10function targetInPage(targetname) {
11 return targetname in $("ul#target-list > li > a").map(function (i, x) {return x.text});
12}
13
14function setEventHandlers() {
15 $("i#del-target-icon").unbind().click(function (evt) {
16 console.log("del target", evt.target.attributes["x-data"].value);
17 postEditAjaxRequest({"targetDel": evt.target.attributes["x-data"].value});
18 });
19 $("button#add-target-button").unbind().click( function (evt) {
20 if ( $("input#target")[0].value.length == 0) {
21 alert("cannot add empty target");
22 return;
23 }
24 postEditAjaxRequest({"targetAdd" : $("input#target")[0].value});
25 });
26}
27
28function onEditPageUpdate(data) {
29 // update targets
30 var i; var orightml = "";
31
32 $("span#target-count").html(data.targets.length);
33 for (i = 0; i < data.targets.length; i++) {
34 if (! targetInPage(data.targets[i].target)) {
35 orightml += '<li><a href="#">'+data.targets[i].target;
36 if (data.targets[i].task != "" && data.targets[i].task !== null) {
37 orightml += " ("+data.targets[i].task+")";
38 }
39 orightml += '</a><i title="" data-original-title="" class="icon-trash" id="del-target-icon" x-data="'+data.targets[i].pk+'"></i></li>';
40 }
41 }
42
43 $("ul#target-list").html(orightml);
44
45 // update recent builds
46
47 setEventHandlers();
48}
49
50function onEditAjaxSuccess(data, textstatus) {
51 console.log("XHR returned:", data, "(" + textstatus + ")");
52 if (data.error != "ok") {
53 alert("error on request:\n" + data.error);
54 return;
55 }
56 onEditPageUpdate(data);
57}
58
59function onEditAjaxError(jqXHR, textstatus, error) {
60 alert("XHR errored:\n" + error + "\n(" + textstatus + ")");
61}
62
63function postEditAjaxRequest(reqdata) {
64 var ajax = $.ajax({
65 type:"POST",
66 data: $.param(reqdata),
67 url:"{% url 'xhr_projectedit' project.id%}",
68 headers: { 'X-CSRFToken': $.cookie("csrftoken")},
69 success: onEditAjaxSuccess,
70 error: onEditAjaxError,
71 })
72}
73
74$(document).ready(function () {
75 setEventHandlers();
76});
77
78</script>
79
80
81 <div class="page-header">
82 <h1>
83 {{project.name}}
84 {% if project.build_set.all.count == 0 %}
85 <small>No builds yet</small>
86 {% else %}
87 <small><a href="#">{{project.build_set.all.count}} builds</a></small>
88 {% endif %}
89 </h1>
90 </div>
91
92
93 <div class="well">
94 <!--div class="control-group error"-->
95 <button id="build-all-button" class="btn btn-primary btn-large">Build all added targets</button>
96 <div class="input-append build-form controls">
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">
98 <button id="build-button" class="btn btn-large" disabled="">Build</button>
99 </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
116 </script>
117 <!--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>
119 </span>
120 </div-->
121 </div>
122
123 <div id="meta-tizen-alert" class="alert alert-info lead air" style="display:none;">
124 <button type="button" class="close" data-dismiss="alert">?</button>
125 You have added <strong>6</strong> layers: <a href="#">meta-tizen</a> and its dependencies (<a href="#">meta-efl</a>, <a href="#">meta-intel</a>, <a href="#">meta-multimedia</a>, <a href="#">meta-oe</a> and <a href="#">meta-ruby</a>).
126 </div>
127
128
129
130
131
132 {% if builds|length > 0 or buildrequests|length > 0 %}
133 <h2 class="air">Recent Builds</h2>
134
135 <div id="scheduled-builds">
136 {% for br in buildrequests %}
137<div class="alert {% if br.0.state == br.0.REQ_FAILED%}alert-error{%else%}alert-info{%endif%}" id="build-request">
138 <div class="row-fluid">
139 <div class="lead span4">
140 <span>
141 {{br.0.brtarget_set.all.0.target}} {%if br.brtarget_set.all.count > 1%}(+ {{br.brtarget_set.all.count|add:"-1"}}){%endif%} {{br.1.machine.value}} (Created {{br.0.created}})
142 </span>
143 </div>
144 <div class="span2">
145 {{br.0.get_state_display}}
146 </div>
147 <div class="span8">
148{% if br.state == br.REQ_FAILED%}
149 {% for bre in br.0.brerror_set.all %} {{bre.errmsg}} ({{bre.errtype}}) <br/><hr/><code>{{bre.traceback}}</code>{%endfor%}
150{%endif%}
151 </div>
152
153 </div>
154</div>
155
156 {% endfor %}
157
158 </div>
159
160
161
162<!-- Lifted from build.html -->
163 {% for build in builds %}
164<div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}">
165 <div class="row-fluid">
166 <div class="lead span5">
167 {%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}
168 {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
169 <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}">
170 {% endif %}
171 <span data-toggle="tooltip" {%if build.target_set.all.count > 1%}title="Targets: {%for target in build.target_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|naturaltime}})</span>
172 {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
173 </a>
174 {% endif %}
175 </div>
176 {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
177 <div class="span2 lead">
178 {% if build.errors_no %}
179 <i class="icon-minus-sign red"></i> <a href="{%url 'builddashboard' build.pk%}#errors" class="error">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>
180 {% endif %}
181 </div>
182 <div class="span2 lead">
183 {% if build.warnings_no %}
184 <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}#warnings" class="warning">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>
185 {% endif %}
186 </div >
187 <div class="lead pull-right">
188 Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a>
189 </div>
190 {%endif%}{%if build.outcome == build.IN_PROGRESS %}
191 <div class="span4">
192 <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete">
193 <div style="width: {{build.completeper}}%;" class="bar"></div>
194 </div>
195 </div>
196 <div class="lead pull-right">ETA: in {{build.eta|naturaltime}}</div>
197 {%endif%}
198 </div>
199 </div>
200 {% endfor %}
201<!-- end of lift-->
202 {%endif%}
203
204 <h2 class="air">Project configuration</h2>
205
206 <div class="row-fluid">
207
208 <div id="layer-container" class="well well-transparent span4">
209 <h3>
210 Add layers
211 <i data-original-title="OpenEmbedded organises metadata into modules called 'layers'. Layers allow you to isolate different types of customizations from each other. <a href='http://www.yoctoproject.org/docs/1.6.1/dev-manual/dev-manual.html#understanding-and-creating-layers' target='_blank'>More on layers</a>" class="icon-question-sign get-help heading-help" title=""></i>
212 </h3>
213 <form style="margin-top:20px;">
214 <div class="input-append">
215 <input class="input-xlarge" id="layer" autocomplete="off" placeholder="Type a layer name" data-provide="typeahead" data-source="" data-minlength="1" data-autocomplete="off" type="text">
216 <button id="add-layer" class="btn" disabled="">Add</button>
217 </div>
218 <div id="import-alert" class="alert alert-info" style="display:none;">
219 Toaster does not know about this layer. Please <a href="#">import it</a>
220 </div>
221 <div id="dependency-alert" class="alert alert-info" style="display:none;">
222 <p><strong>meta-tizen</strong> depends on the layers below. Check the ones you want to add: </p>
223 <ul class="unstyled">
224 <li>
225 <label class="checkbox">
226 <input checked="checked" type="checkbox">
227 meta-efl
228 </label>
229 </li>
230 <li>
231 <label class="checkbox">
232 <input checked="checked" type="checkbox">
233 meta-intel
234 </label>
235 </li>
236 <li>
237 <label class="checkbox">
238 <input checked="checked" type="checkbox">
239 meta-multimedia
240 </label>
241 </li>
242 <li>
243 <label class="checkbox">
244 <input checked="checked" type="checkbox">
245 meta-oe
246 </label>
247 </li>
248 <li>
249 <label class="checkbox">
250 <input checked="checked" type="checkbox">
251 meta-ruby
252 </label>
253 </li>
254 </ul>
255 <button id="add-layer-dependencies" class="btn btn-info add-layer">Add layers</button>
256 </div>
257
258 <p><a href="#">Import your layer</a> | <a href="#">View all layers</a></p>
259 </form>
260
261 <h4 class="air">
262 Added layers
263 <span class="muted counter">{{project.projectlayer_set.count}}</span>
264 <i data-original-title="Your added layers will be listed in this same order in your <code>bblayers.conf</code> file" class="icon-question-sign get-help heading-help" title=""></i>
265 </h4>
266 <ul class="unstyled configuration-list">
267 {% for pl in project.projectlayer_set.all %}
268 <li>
269 <a href="#">{{pl.name}} (<span class="layer-version">{{pl.giturl}}</span>)</a>
270 {% if pl.optional %}
271 <i title="" data-original-title="" class="icon-trash" id="del-layer-icon" x-data="{{pl.pk}}"></i>
272 {% endif %}
273 </li>
274 {% endfor %}
275 </ul>
276 </div>
277
278 <div id="target-container" class="well well-transparent span4">
279 <h3>
280 Add targets
281 <i data-original-title="A target is what you want to build, usually an image recipe that produces a root file system" class="icon-question-sign get-help heading-help" title=""></i>
282 </h3>
283 <form style="margin-top:20px;">
284 <div class="input-append">
285 <input id="target" class="input-xlarge" autocomplete="off" placeholder="Type a target name" data-provide="typeahead" data-source="" data-minlength="1" data-autocomplete="off" type="text">
286 <button id="add-target-button" class="btn" type="button">Add</button>
287 </div>
288
289 <p><a href="#" class="link">View all targets</a></p>
290 </form>
291 <h4 class="air">
292 Added targets
293 <span id="target-count" class="muted counter">{{project.projecttarget_set.count}}</span>
294 </h4>
295 <ul class="unstyled configuration-list" id="target-list">
296 {% for target in project.projecttarget_set.all %}
297 {% if target %}
298 <li>
299 <a href="#">{{target.target}}{% if target.task%} (target.task){%endif%}</a>
300 {% if target.notprovided %}
301 <i title="" data-original-title="" id="msg1" class="icon-exclamation-sign get-help-yellow" data-title="<strong>Target may not be provided</strong>" data-content="From the layer information it currently has, Toaster thinks this target is not provided by any of your added layers. If a target is not provided by one of your added layers, the build will fail.<h5>What Toaster suggests</h5><p>The <a href='#'>meta-abc</a> and <a href='#'>meta-efg</a> layers provide core-image-notprovided. You could add one of them to your project.</p><button class='btn btn-block'>Add meta-abc</button><button class='btn btn-block'>Add meta-efg</button><button id='dismiss1' class='btn btn-block btn-info'>Stop showing this message</button>"></i>
302 {% elif target.notknown %}
303 <i title="" data-original-title="" id="msg2" class="icon-exclamation-sign get-help-yellow" data-title="<strong>Target may not be provided</strong>" data-content="From the layer information it currently has, Toaster thinks this target is not provided by any of your added layers. If a target is not provided by one of your added layers, the build will fail.<h5>What Toaster suggests</h5><p>Review your added layers to make sure one of them provides core-image-unknown. Clicking on a layer name will give you all the information Toaster has about the layer. </p> <button class='btn btn-block btn-info'>Stop showing this message</button>"></i>
304 {% endif %}
305 <i title="" data-original-title="" class="icon-trash" id="del-target-icon" x-data="{{target.pk}}"></i>
306 </li>
307 {% endif %}
308 {% endfor %}
309
310
311 </ul>
312 </div>
313
314 <div class="well well-transparent span4">
315 <h3>
316 Set machine
317 <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>
318 </h3>
319 <p class="lead">
320 {{machine}}
321 <i title="" data-original-title="" class="icon-pencil"></i>
322 </p>
323 <h3>
324 Set distro
325 <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>
326 </h3>
327 <p class="lead">
328 {{distro}}
329 <i title="" data-original-title="" class="icon-pencil"></i>
330 </p>
331 <p class="localconf">
332 <a href="#" class="link">Edit the <code>local.conf</code> file</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>
334 </p>
335 </div>
336 </div>
337
338 <h2>Project details</h2>
339
340 <div class="well well-transparent">
341 <h3>Project name</h3>
342 <p class="lead">
343 {{project.name}}
344 <i title="" data-original-title="" class="icon-pencil"></i>
345 </p>
346 <h3>Project owner</h3>
347 <p class="lead">
348 {{puser.username}}
349 <i title="" data-original-title="" class="icon-pencil"></i>
350 </p>
351 <h3>Owner's email</h3>
352 <p class="lead">
353 {{puser.email}}
354 <i title="" data-original-title="" class="icon-pencil"></i>
355 </p>
356 <h3>Yocto Project version</h3>
357 <p class="lead">
358 {{project.branch}} - {{project.short_description}}
359 <i title="" data-original-title="" class="icon-pencil"></i>
360 </p>
361 </div>
6{% endblock %} 362{% endblock %}