summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-08-29 16:42:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-01 08:51:33 +0100
commit372c9d144e87ab5f360c9763101916fbcb94e469 (patch)
treef2068f0b5ea257b65ee6f0c0f8397c97ab82025d /bitbake
parentacd4a1799d51a9f0b192d12b2c58387595b27bf7 (diff)
downloadpoky-372c9d144e87ab5f360c9763101916fbcb94e469.tar.gz
bitbake: toastergui: added pages for project details
We add new pages for the layer importing, layer details, showing project builds and project configuration. The pages are in read-only mode, but they're needed as to be able to verify the quality of data in the system. Write capabilities will be added in a subsequent patch. [YOCTO #6595] [YOCTO #6590] [YOCTO #6591] [YOCTO #6588] [YOCTO #6589] (Bitbake rev: eed9ae5c2a2bd7567e12ae9a4f02a5a966a1e1a3) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/importlayer.html68
-rw-r--r--bitbake/lib/toaster/toastergui/templates/layerdetails.html159
-rw-r--r--bitbake/lib/toaster/toastergui/templates/layers.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/project.html58
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectbuilds.html59
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectconf.html62
-rw-r--r--bitbake/lib/toaster/toastergui/urls.py2
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py192
8 files changed, 564 insertions, 38 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html
new file mode 100644
index 0000000000..7e48eac66e
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html
@@ -0,0 +1,68 @@
1{% extends "baseprojectpage.html" %}
2{% load projecttags %}
3{% load humanize %}
4
5{% block localbreadcrumb %}
6<li>Layers</li>
7{% endblock %}
8
9{% block projectinfomain %}
10 <div class="page-header">
11 <h1>Import layer</h1>
12 </div>
13 <form>
14 {% if project %}
15 <span class="help-block" style="padding-left:19px;">The layer you are importing must be compatible with {{project.release.name}} ({{project.release.description}}), which is the release you are using in this project.</span>
16 {% endif %}
17 <fieldset class="air">
18 <legend>Layer repository information</legend>
19 <label>
20 Git repository URL
21 <i class="icon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories."></i>
22 </label>
23 <input id="repo" type="text" class="input-xxlarge" required>
24 <label class="project-form">
25 Repository subdirectory
26 <span class="muted">(optional)</span>
27 <i class="icon-question-sign get-help" title="Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)"></i>
28 </label>
29 <input type="text" id="subdir">
30 <label class="project-form">Branch, tag or commit</label>
31 <input type="text" class="span4" id="layer-version" required>
32 <label class="project-form">
33 Layer name
34 <i class="icon-question-sign get-help" title="Something like 'meta-mylayer'. Your layer name must be unique and can only include letters, numbers and dashes"></i>
35 </label>
36 <input id="layer-name" type="text" required>
37 </fieldset>
38 <fieldset class="air">
39 <legend>
40 Layer dependencies
41 <span class="muted">(optional)</span>
42 <i class="icon-question-sign get-help heading-help" title="Other layers this layer depends upon"></i>
43 </legend>
44 <ul class="unstyled configuration-list">
45 <li>
46 <a href="" class="layer-info" title="OpenEmbedded | daisy">openembedded-core (meta)</a>
47 <i class="icon-trash"></i>
48 </li>
49 </ul>
50 <div class="input-append">
51 <input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off"
52 data-provide="typeahead" data-source='
53 []
54 ' placeholder="Type a layer name" id="layer-dependency" class="input-xlarge">
55 <a class="btn" type="button" id="add-layer-dependency" disabled>
56 Add layer
57 </a>
58 </div>
59 <span class="help-inline">You can only add layers Toaster knows about</span>
60 </fieldset>
61 <div class="form-actions">
62 <a href="#dependencies-message" class="btn btn-primary btn-large" data-toggle="modal" data-target="#dependencies-message" disabled>Import and add to project</a>
63 <a href="layer-details-just-imported.html" class="btn btn-large" disabled>Just import for the moment</a>
64 <span class="help-inline" style="vertical-align: middle;">To import a layer, you need to enter a repository URL, a branch, tag or commit and a layer name</span>
65 </div>
66 </form>
67
68{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
new file mode 100644
index 0000000000..78dc54bfd1
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
@@ -0,0 +1,159 @@
1{% extends "baseprojectpage.html" %}
2{% load projecttags %}
3{% load humanize %}
4
5{% block localbreadcrumb %}
6<li>Layer Details</li>
7{% endblock %}
8
9{% block projectinfomain %}
10<div class="page-header">
11 <h1>Layer Details</h1>
12</div>
13
14 <div class="row-fluid span7 tabbable">
15 <ul class="nav nav-pills">
16 <li class="active">
17 <a data-toggle="tab" href="#information">Layer details</a>
18 </li>
19 <li>
20 <a data-toggle="tab" href="#targets">Targets (0)</a>
21 </li>
22 <li>
23 <a data-toggle="tab" href="#machines">Machines (0)</a>
24 </li>
25 <li>
26 <a data-toggle="tab" href="#classes">Classes (0)</a>
27 </li>
28 <li>
29 <a data-toggle="tab" href="#bbappends">bbappends (0)</a>
30 </li>
31 </ul>
32 <div class="tab-content">
33 <div name="information" id="information" class="tab-pane active">
34 <dl class="dl-horizontal">
35 <dt class="">
36 <i class="icon-question-sign get-help" title="Fetch/clone URL of the repository"></i>
37 Repository URL
38 </dt>
39 <dd>
40 <form id="change-repo-form" class="control-group">
41 <div class="input-append">
42 <input type="text" class="input-xlarge" id="type-repo" value="{{layerversion.layer.vcs_url}}">
43 <button id="apply-change-repo" class="btn" type="button">Change</button>
44 <!--a href="#" id="cancel-change-repo" class="btn btn-link">Cancel</a-->
45 </div>
46 <span class="help-block">Cloning this Git repository failed</span>
47 </form>
48 </dd>
49 <dt>
50 <i class="icon-question-sign get-help" title="Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)"></i>
51 Repository subdirectory
52 </dt>
53 <dd>
54 <span id="subdir">{{layerversion.dirpath}}</span>
55 <i id="change-subdir" class="icon-pencil"></i>
56 <i id="delete-subdir" class="icon-trash"></i>
57 <form id="change-subdir-form" style="display:none;">
58 <div class="input-append">
59 <input type="text" id="type-subdir" value="meta-acer">
60 <button id="apply-change-subdir" class="btn" type="button">Change</button>
61 <a href="#" id="cancel-change-subdir" class="btn btn-link">Cancel</a>
62 </div>
63 </form>
64 </dd>
65 <dt>Brach, tag or commit</dt>
66 <dd>
67 {{layerversion.up_branch.name}}
68 <i class="icon-pencil"></i>
69 </dd>
70 <dt>
71 <i class="icon-question-sign get-help" title="The Yocto Project versions with which this layer is compatible. Currently Toaster supports Yocto Project 1.6 and 1.7"></i>
72 Yocto Project compatibility
73 </dt>
74 <dd>
75 <i class="icon-pencil"></i>
76 </dd>
77 <dt>
78 <i class="icon-question-sign get-help" title="Other layers this layer depends upon"></i>
79 Layer dependencies
80 </dt>
81 <dd>
82 <ul class="unstyled">
83 {% for ld in layer.dependencies.all %}
84 <li>
85 <a href="#">openembedded core (meta)</a>
86 <i class="icon-trash"></i>
87 </li>
88 {% endfor %}
89 </ul>
90 <div class="input-append">
91 <input type="text" autocomplete="off" data-minLength="1" data-autocomplete="off"
92 data-provide="typeahead" data-source='
93 '
94 placeholder="Type a layer name" id="layer-dependency">
95 <a class="btn" type="button" id="add-layer-dependency" disabled>
96 Add layer
97 </a>
98 </div>
99 <span class="help-block">You can only add layers Toaster knows about</span>
100 </dd>
101 </dl>
102 </div>
103 <div name="targets" id="targets" class="tab-pane">
104 <div class="alert alert-info">
105 <strong>There is no target data for {{layerversion.layer.name}} ... yet</strong> <br />
106 Toaster learns about layers as they are built. Once you have used {{layerversion.layer.name}} in a build, Toaster will show you
107 here the targets it provides.
108 </div>
109 </div>
110 <div name="machines" id="machines" class="tab-pane">
111 <div class="alert alert-info">
112 <strong>There is no machine data for {{layerversion.layer.name}} ... yet</strong> <br />
113 Toaster learns about layers as they are built. Once you have used {{layerversion.layer.name}} in a build, Toaster will show you
114 here the machines it provides.
115 </div>
116 </div>
117 </div>
118</div>
119<div class="row span4 well">
120<h2>About {{layerversion.layer.name}}</h2>
121<dl>
122
123 <dt>
124 Summary
125 <i class="icon-question-sign get-help" title="One-line description of the layer"></i>
126 </dt>
127 <dd>
128 <span >{{layerversion.layer.summary}}</span>
129 <i class="icon-pencil"></i>
130 </dd>
131 <!--form>
132 <textarea class="span12" rows="2"></textarea>
133 <button class="btn" type="button">Change</button>
134 <a href="#" class="btn btn-link">Cancel</a>
135 </form-->
136 <dt>
137 Description
138 </dt>
139 <dd>
140 <span >{{layerversion.layer.description}}</span>
141 <i class="icon-pencil"></i>
142 </dd>
143 <!--form>
144 <textarea class="span12" rows="6"></textarea>
145 <button class="btn" type="button">Change</button>
146 <a href="#" class="btn btn-link">Cancel</a>
147 </form-->
148 <dt>
149 Maintainer(s)
150 </dt>
151 <dd>
152 <span class="muted">Not set</span>
153 <i class="icon-pencil"></i>
154 </dd>
155</dl>
156</div>
157
158
159{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/layers.html b/bitbake/lib/toaster/toastergui/templates/layers.html
index bc6e5a3073..281b72aec5 100644
--- a/bitbake/lib/toaster/toastergui/templates/layers.html
+++ b/bitbake/lib/toaster/toastergui/templates/layers.html
@@ -33,7 +33,7 @@
33{% include "basetable_top.html" %} 33{% include "basetable_top.html" %}
34 {% for lv in objects %} 34 {% for lv in objects %}
35 <tr class="data"> 35 <tr class="data">
36 <td class="layer">{{lv.layer.name}}</td> 36 <td class="layer"><a href="{% url 'layerdetails' lv.id %}">{{lv.layer.name}}</a></td>
37 <td class="description">{{lv.layer.summary}}</td> 37 <td class="description">{{lv.layer.summary}}</td>
38 <td class="source"><a href="{% url 'layerdetails' lv.pk %}">{{lv.layer_source.name}}</a></td> 38 <td class="source"><a href="{% url 'layerdetails' lv.pk %}">{{lv.layer_source.name}}</a></td>
39 <td class="git-repo"><a href="{% url 'layerdetails' lv.pk %}"><code>{{lv.layer.layer_index_url}}</code></a></td> 39 <td class="git-repo"><a href="{% url 'layerdetails' lv.pk %}"><code>{{lv.layer.layer_index_url}}</code></a></td>
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
index d7bfa2b9de..c3a470c54a 100644
--- a/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -110,22 +110,34 @@ $(document).ready(function () {
110 110
111 111
112 <div class="well"> 112 <div class="well">
113 <!--div class="control-group error"--> 113 <form class="build-form">
114 <button id="build-all-button" class="btn btn-primary btn-large">Build all added targets</button> 114 <div class="input-append input-prepend controls">
115 <div class="input-append build-form controls"> 115 <input type="text" class="huge span7" placeholder="Type the target(s) you want to build" autocomplete="off" data-minLength="1" data-autocomplete="off"
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"> 116 data-provide="typeahead" data-source='["core-image-base [meta | daisy]",
117 <button id="build-button" class="btn btn-large" disabled="">Build</button> 117 "core-image-clutter [meta | daisy]",
118 "core-image-directfb [meta | daisy]",
119 "core-image-myimage [meta-imported-layer | 3e1dbabbf3&hellip;]",
120 "core-image-anotherimage [meta-imported-layer | master]",
121 "core-image-full-cmdline [meta | daisy]",
122 "core-image-lsb [meta | daisy]",
123 "core-image-lsb-dev [meta | daisy]",
124 "core-image-lsb-sdk [meta| daisy]",
125 "core-image-minimal [meta| daisy]"
126 ]'>
127 <a href="#" id="build-button" class="btn btn-large btn-primary" disabled>
128 Build
129 <i class="icon-question-sign get-help heading-help" style="margin-left: 5px;" title="Type the name of one or more targets you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to a target name, like so: <code>core-image-minimal:do_build</code>"></i>
130 </a>
118 </div> 131 </div>
119 132 <p>
120 <!--span class="help-inline">This target is not provided <br />by any of your added layers 133 <a href="all-targets.html" style="padding-right: 5px;">
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> 134 View all targets
122 </span> 135 </a>
123 </div--> 136 |
124 </div> 137 <a href="{% url 'projectbuilds' project.id%}" style="padding-left:5px;">
125 138 View all project builds ({{project.build_set.count}})
126 <div id="meta-tizen-alert" class="alert alert-info lead air" style="display:none;"> 139 </a>
127 <button type="button" class="close" data-dismiss="alert">?</button> 140 </form>
128 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>).
129 </div> 141 </div>
130 142
131 143
@@ -145,11 +157,11 @@ $(document).ready(function () {
145 </span> 157 </span>
146 </div> 158 </div>
147 <div class="span2"> 159 <div class="span2">
148 {{br.0.get_state_display}} 160 {{br.0.get_state_display}}
149 </div> 161 </div>
150 <div class="span8"> 162 <div class="span8">
151{% if br.state == br.REQ_FAILED%} 163{% if br.state == br.REQ_FAILED%}
152 {% for bre in br.0.brerror_set.all %} {{bre.errmsg}} ({{bre.errtype}}) <br/><hr/><code>{{bre.traceback}}</code>{%endfor%} 164 {% for bre in br.0.brerror_set.all %} {{bre.errmsg}} ({{bre.errtype}}) <br/><hr/><code>{{bre.traceback}}</code>{%endfor%}
153{%endif%} 165{%endif%}
154 </div> 166 </div>
155 167
@@ -224,14 +236,14 @@ $(document).ready(function () {
224 <div id="dependency-alert" class="alert alert-info" style="display:none;"> 236 <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> 237 <p><strong>meta-tizen</strong> depends on the layers below. Check the ones you want to add: </p>
226 <ul class="unstyled"> 238 <ul class="unstyled">
227 {% for f in layer_dependency %} 239 {% for f in layer_dependency %}
228 <li> 240 <li>
229 <label class="checkbox"> 241 <label class="checkbox">
230 <input checked="checked" type="checkbox"> 242 <input checked="checked" type="checkbox">
231 meta-ruby 243 meta-ruby
232 </label> 244 </label>
233 </li> 245 </li>
234 {% endfor %} 246 {% endfor %}
235 </ul> 247 </ul>
236 <button id="add-layer-dependencies" class="btn btn-info add-layer">Add layers</button> 248 <button id="add-layer-dependencies" class="btn btn-info add-layer">Add layers</button>
237 </div> 249 </div>
@@ -278,9 +290,9 @@ $(document).ready(function () {
278 {% if target %} 290 {% if target %}
279 <li> 291 <li>
280 <a href="#">{{target.target}}{% if target.task%} (target.task){%endif%}</a> 292 <a href="#">{{target.target}}{% if target.task%} (target.task){%endif%}</a>
281 {% if target.notprovided %} 293 {% if target.notprovided %}
282 <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> 294 <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>
283 {% elif target.notknown %} 295 {% elif target.notknown %}
284 <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> 296 <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>
285 {% endif %} 297 {% endif %}
286 <i title="" data-original-title="" class="icon-trash" id="del-target-icon" x-data="{{target.pk}}"></i> 298 <i title="" data-original-title="" class="icon-trash" id="del-target-icon" x-data="{{target.pk}}"></i>
@@ -347,7 +359,7 @@ $(document).ready(function () {
347 </p> 359 </p>
348 <h3>Yocto Project version</h3> 360 <h3>Yocto Project version</h3>
349 <p class="lead"> 361 <p class="lead">
350 {{project.release}} - {{project.short_description}} 362 {{project.release.name}} - {{project.release.description}}
351 <i title="" data-original-title="" class="icon-pencil"></i> 363 <i title="" data-original-title="" class="icon-pencil"></i>
352 </p> 364 </p>
353 </div> 365 </div>
diff --git a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
new file mode 100644
index 0000000000..8c5942c7cb
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
@@ -0,0 +1,59 @@
1{% extends "baseprojectpage.html" %}
2{% load projecttags %}
3{% load humanize %}
4
5{% block localbreadcrumb %}
6<li>Project builds</li>
7{% endblock %}
8
9{% block projectinfomain %}
10 <div class="page-header">
11 <h1>
12 All builds
13 <i class="icon-question-sign get-help heading-help" title="This page lists all the layers compatible with Yocto Project 1.7 'Dxxxx' that Toaster knows about. They include community-created layers suitable for use on top of OpenEmbedded Core and any layers 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 layers" 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 layers</a>
24 </div>
25 </div-->
26 <div id="layer-added" class="alert alert-info lead" style="display:none;"></div>
27 <div id="layer-removed" class="alert alert-info lead" style="display:none;">
28 <button type="button" class="close" data-dismiss="alert">&times;</button>
29 <strong>1</strong> layer 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 build in objects %}
35 <tr class="data">
36 <td class="outcome"><a href="{% url "builddashboard" build.id %}">{%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%}</a></td>
37 <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td>
38 <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
39 <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
40 <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
41 <td class="failed_tasks error">{% query build.task_build outcome=4 order__gt=0 as exectask%}{% if exectask.count == 1 %}<a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>{% elif exectask.count > 1%}<a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}}</a>{%endif%}</td>
42 <td class="errors_no">{% if build.errors_no %}<a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>{%endif%}</td>
43 <td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td>
44 <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td>
45 <td class="log">{{build.cooker_log_path}}</td>
46 <td class="output">
47 {% if build.outcome == build.SUCCEEDED %}
48 <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
49 {% endif %}
50 </td>
51 </tr>
52
53 {% endfor %}
54{% include "basetable_bottom.html" %}
55
56 <!-- Modals -->
57
58
59{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html
new file mode 100644
index 0000000000..e8b0c39f25
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html
@@ -0,0 +1,62 @@
1{% extends "baseprojectpage.html" %}
2{% load projecttags %}
3{% load humanize %}
4
5{% block localbreadcrumb %}
6<li>Project configuration</li>
7{% endblock %}
8
9{% block projectinfomain %}
10 <div class="page-header">
11 <h1>Configuration Variables</h1>
12 </div>
13
14 <div style="padding-left:19px;">
15
16 <dl class="dl-vertical">
17 {% for c in configvars %}
18 <dt>
19 {{c.name}}
20 <i class="icon-question-sign get-help" title="{{c.desc}}"></i>
21 </dt>
22 <dd class="lead">
23 <span id="distro">{{c.value}}</span>
24 <i class="icon-pencil" id="change-distro-icon"></i>
25 <form id="change-distro-form" style="display:none;">
26 <div class="input-append">
27 <input type="text" id="new-distro" value="poky tiny">
28 <button id="apply-change-distro" class="btn" type="button">Save</button>
29 <button id="cancel-change-distro" type="button" class="btn btn-link">Cancel</button>
30 </div>
31 </form>
32 </dd>
33 {% endfor %}
34
35
36 </dl>
37 <form id="variable-form">
38 <fieldset style="padding-left:0px;">
39 <legend>Add variable</legend>
40 <label>
41 Variable
42 <i class="icon-question-sign get-help" title="Variable names are case sensitive, cannot have spaces, and can only include letters, numbers, underscores and dashes"></i>
43 </label>
44 <input id="variable" type="text" placeholder="Type variable name">
45 <label>Value</label>
46 <input id="value" type="text" placeholder="Type variable value">
47 <div style="display:block;margin-top:10px;">
48 <a href="#" class="btn save" disabled>
49 Add variable
50 </a>
51 </div>
52 </fieldset>
53 </form>
54 <!--button id="add-variable" class="btn air">
55 <i class="icon-plus"></i>
56 Add variable
57 </button-->
58
59 </div>
60
61
62{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py
index 30f006348a..a9c05922c2 100644
--- a/bitbake/lib/toaster/toastergui/urls.py
+++ b/bitbake/lib/toaster/toastergui/urls.py
@@ -76,7 +76,7 @@ urlpatterns = patterns('toastergui.views',
76 76
77 url(r'^project/(?P<pid>\d+)/$', 'project', name='project'), 77 url(r'^project/(?P<pid>\d+)/$', 'project', name='project'),
78 url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'), 78 url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'),
79 url(r'^project/(?P<pid>\d+)/builds$', 'projectbuilds', name='projectbuild'), 79 url(r'^project/(?P<pid>\d+)/builds$', 'projectbuilds', name='projectbuilds'),
80 80
81 url(r'^xhr_projectbuild/(?P<pid>\d+)/$', 'xhr_projectbuild', name='xhr_projectbuild'), 81 url(r'^xhr_projectbuild/(?P<pid>\d+)/$', 'xhr_projectbuild', name='xhr_projectbuild'),
82 url(r'^xhr_projectedit/(?P<pid>\d+)/$', 'xhr_projectedit', name='xhr_projectedit'), 82 url(r'^xhr_projectedit/(?P<pid>\d+)/$', 'xhr_projectedit', name='xhr_projectedit'),
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 167b687d03..13788b0d55 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -903,7 +903,7 @@ def tasks_common(request, build_id, variant, task_anchor):
903 retval = _verify_parameters( request.GET, mandatory_parameters ) 903 retval = _verify_parameters( request.GET, mandatory_parameters )
904 if retval: 904 if retval:
905 if task_anchor: 905 if task_anchor:
906 mandatory_parameters['anchor']=task_anchor 906 mandatory_parameters['anchor']=task_anchor
907 return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id) 907 return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id)
908 (filter_string, search_term, ordering_string) = _search_tuple(request, Task) 908 (filter_string, search_term, ordering_string) = _search_tuple(request, Task)
909 queryset_all = Task.objects.filter(build=build_id).exclude(order__isnull=True).exclude(outcome=Task.OUTCOME_NA) 909 queryset_all = Task.objects.filter(build=build_id).exclude(order__isnull=True).exclude(outcome=Task.OUTCOME_NA)
@@ -917,19 +917,19 @@ def tasks_common(request, build_id, variant, task_anchor):
917 else: 917 else:
918 queryset = _get_queryset(Task, queryset_all, filter_string, search_term, ordering_string, 'order') 918 queryset = _get_queryset(Task, queryset_all, filter_string, search_term, ordering_string, 'order')
919 919
920 # compute the anchor's page 920 # compute the anchor's page
921 if anchor: 921 if anchor:
922 request.GET = request.GET.copy() 922 request.GET = request.GET.copy()
923 del request.GET['anchor'] 923 del request.GET['anchor']
924 i=0 924 i=0
925 a=int(anchor) 925 a=int(anchor)
926 count_per_page=int(request.GET.get('count', 100)) 926 count_per_page=int(request.GET.get('count', 100))
927 for task in queryset.iterator(): 927 for task in queryset.iterator():
928 if a == task.order: 928 if a == task.order:
929 new_page= (i / count_per_page ) + 1 929 new_page= (i / count_per_page ) + 1
930 request.GET.__setitem__('page', new_page) 930 request.GET.__setitem__('page', new_page)
931 mandatory_parameters['page']=new_page 931 mandatory_parameters['page']=new_page
932 return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id) 932 return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id)
933 i += 1 933 i += 1
934 934
935 tasks = _build_page_range(Paginator(queryset, request.GET.get('count', 100)),request.GET.get('page', 1)) 935 tasks = _build_page_range(Paginator(queryset, request.GET.get('count', 100)),request.GET.get('page', 1))
@@ -1917,10 +1917,12 @@ if toastermain.settings.MANAGED:
1917 return HttpResponse(json.dumps({"error":str(e) + "\n" + traceback.format_exc()}), content_type = "application/json") 1917 return HttpResponse(json.dumps({"error":str(e) + "\n" + traceback.format_exc()}), content_type = "application/json")
1918 1918
1919 def importlayer(request): 1919 def importlayer(request):
1920 raise Exception("TODO: implement page #6595") 1920 template = "importlayer.html"
1921 context = {
1922 }
1923 return render(request, template, context)
1921 1924
1922 def layers(request): 1925 def layers(request):
1923 # "TODO: implement page #6590"
1924 template = "layers.html" 1926 template = "layers.html"
1925 # define here what parameters the view needs in the GET portion in order to 1927 # define here what parameters the view needs in the GET portion in order to
1926 # be able to display something. 'count' and 'page' are mandatory for all views 1928 # be able to display something. 'count' and 'page' are mandatory for all views
@@ -2000,7 +2002,11 @@ if toastermain.settings.MANAGED:
2000 return render(request, template, context) 2002 return render(request, template, context)
2001 2003
2002 def layerdetails(request, layerid): 2004 def layerdetails(request, layerid):
2003 raise Exception("TODO: implement page #6591") 2005 template = "layerdetails.html"
2006 context = {
2007 'layerversion': Layer_Version.objects.get(pk = layerid),
2008 }
2009 return render(request, template, context)
2004 2010
2005 def targets(request): 2011 def targets(request):
2006 template = "targets.html" 2012 template = "targets.html"
@@ -2159,11 +2165,171 @@ if toastermain.settings.MANAGED:
2159 return render(request, template, context) 2165 return render(request, template, context)
2160 2166
2161 def projectconf(request, pid): 2167 def projectconf(request, pid):
2162 raise Exception("TODO: implement page #6588") 2168 template = "projectconf.html"
2169 context = {
2170 'configvars': ProjectVariable.objects.filter(project_id = pid),
2171 }
2172 return render(request, template, context)
2163 2173
2164 def projectbuilds(request, pid): 2174 def projectbuilds(request, pid):
2165 raise Exception("TODO: implement page #6589") 2175 template = 'projectbuilds.html'
2176 # define here what parameters the view needs in the GET portion in order to
2177 # be able to display something. 'count' and 'page' are mandatory for all views
2178 # that use paginators.
2179 mandatory_parameters = { 'count': 10, 'page' : 1, 'orderby' : 'completed_on:-' };
2180 retval = _verify_parameters( request.GET, mandatory_parameters )
2166 2181
2182 # boilerplate code that takes a request for an object type and returns a queryset
2183 # for that object type. copypasta for all needed table searches
2184 (filter_string, search_term, ordering_string) = _search_tuple(request, Build)
2185 queryset_all = Build.objects.all.exclude(outcome = Build.IN_PROGRESS)
2186 queryset_with_search = _get_queryset(Build, queryset_all, None, search_term, ordering_string, '-completed_on')
2187 queryset = _get_queryset(Build, queryset_all, filter_string, search_term, ordering_string, '-completed_on')
2188
2189 # retrieve the objects that will be displayed in the table; builds a paginator and gets a page range to display
2190 build_info = _build_page_range(Paginator(queryset, request.GET.get('count', 10)),request.GET.get('page', 1))
2191
2192
2193 # set up list of fstypes for each build
2194 fstypes_map = {};
2195 for build in build_info:
2196 targets = Target.objects.filter( build_id = build.id )
2197 comma = "";
2198 extensions = "";
2199 for t in targets:
2200 if ( not t.is_image ):
2201 continue
2202 tif = Target_Image_File.objects.filter( target_id = t.id )
2203 for i in tif:
2204 s=re.sub('.*tar.bz2', 'tar.bz2', i.file_name)
2205 if s == i.file_name:
2206 s=re.sub('.*\.', '', i.file_name)
2207 if None == re.search(s,extensions):
2208 extensions += comma + s
2209 comma = ", "
2210 fstypes_map[build.id]=extensions
2211
2212 # send the data to the template
2213 context = {
2214 'objects' : build_info,
2215 'objectname' : "builds",
2216 'default_orderby' : 'completed_on:-',
2217 'fstypes' : fstypes_map,
2218 'search_term' : search_term,
2219 'total_count' : queryset_with_search.count(),
2220 # Specifies the display of columns for the table, appearance in "Edit columns" box, toggling default show/hide, and specifying filters for columns
2221 'tablecols' : [
2222 {'name': 'Outcome', # column with a single filter
2223 'qhelp' : "The outcome tells you if a build successfully completed or failed", # the help button content
2224 'dclass' : "span2", # indication about column width; comes from the design
2225 'orderfield': _get_toggle_order(request, "outcome"), # adds ordering by the field value; default ascending unless clicked from ascending into descending
2226 'ordericon':_get_toggle_order_icon(request, "outcome"),
2227 # filter field will set a filter on that column with the specs in the filter description
2228 # the class field in the filter has no relation with clclass; the control different aspects of the UI
2229 # still, it is recommended for the values to be identical for easy tracking in the generated HTML
2230 'filter' : {'class' : 'outcome',
2231 'label': 'Show:',
2232 'options' : [
2233 ('Successful builds', 'outcome:' + str(Build.SUCCEEDED), queryset_with_search.filter(outcome=str(Build.SUCCEEDED)).count()), # this is the field search expression
2234 ('Failed builds', 'outcome:'+ str(Build.FAILED), queryset_with_search.filter(outcome=str(Build.FAILED)).count()),
2235 ]
2236 }
2237 },
2238 {'name': 'Target', # default column, disabled box, with just the name in the list
2239 'qhelp': "This is the build target or build targets (i.e. one or more recipes or image recipes)",
2240 'orderfield': _get_toggle_order(request, "target__target"),
2241 'ordericon':_get_toggle_order_icon(request, "target__target"),
2242 },
2243 {'name': 'Machine',
2244 'qhelp': "The machine is the hardware for which you are building a recipe or image recipe",
2245 'orderfield': _get_toggle_order(request, "machine"),
2246 'ordericon':_get_toggle_order_icon(request, "machine"),
2247 'dclass': 'span3'
2248 }, # a slightly wider column
2249 {'name': 'Started on', 'clclass': 'started_on', 'hidden' : 1, # this is an unchecked box, which hides the column
2250 'qhelp': "The date and time you started the build",
2251 'orderfield': _get_toggle_order(request, "started_on", True),
2252 'ordericon':_get_toggle_order_icon(request, "started_on"),
2253 'filter' : {'class' : 'started_on',
2254 'label': 'Show:',
2255 'options' : [
2256 ("Today's builds" , 'started_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=timezone.now()).count()),
2257 ("Yesterday's builds", 'started_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(hours=24))).count()),
2258 ("This week's builds", 'started_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(days=7))).count()),
2259 ]
2260 }
2261 },
2262 {'name': 'Completed on',
2263 'qhelp': "The date and time the build finished",
2264 'orderfield': _get_toggle_order(request, "completed_on", True),
2265 'ordericon':_get_toggle_order_icon(request, "completed_on"),
2266 'orderkey' : 'completed_on',
2267 'filter' : {'class' : 'completed_on',
2268 'label': 'Show:',
2269 'options' : [
2270 ("Today's builds", 'completed_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=timezone.now()).count()),
2271 ("Yesterday's builds", 'completed_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(hours=24))).count()),
2272 ("This week's builds", 'completed_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(days=7))).count()),
2273 ]
2274 }
2275 },
2276 {'name': 'Failed tasks', 'clclass': 'failed_tasks', # specifing a clclass will enable the checkbox
2277 'qhelp': "How many tasks failed during the build",
2278 'filter' : {'class' : 'failed_tasks',
2279 'label': 'Show:',
2280 'options' : [
2281 ('Builds with failed tasks', 'task_build__outcome:4', queryset_with_search.filter(task_build__outcome=4).count()),
2282 ('Builds without failed tasks', 'task_build__outcome:NOT4', queryset_with_search.filter(~Q(task_build__outcome=4)).count()),
2283 ]
2284 }
2285 },
2286 {'name': 'Errors', 'clclass': 'errors_no',
2287 'qhelp': "How many errors were encountered during the build (if any)",
2288 'orderfield': _get_toggle_order(request, "errors_no", True),
2289 'ordericon':_get_toggle_order_icon(request, "errors_no"),
2290 'orderkey' : 'errors_no',
2291 'filter' : {'class' : 'errors_no',
2292 'label': 'Show:',
2293 'options' : [
2294 ('Builds with errors', 'errors_no__gte:1', queryset_with_search.filter(errors_no__gte=1).count()),
2295 ('Builds without errors', 'errors_no:0', queryset_with_search.filter(errors_no=0).count()),
2296 ]
2297 }
2298 },
2299 {'name': 'Warnings', 'clclass': 'warnings_no',
2300 'qhelp': "How many warnings were encountered during the build (if any)",
2301 'orderfield': _get_toggle_order(request, "warnings_no", True),
2302 'ordericon':_get_toggle_order_icon(request, "warnings_no"),
2303 'orderkey' : 'warnings_no',
2304 'filter' : {'class' : 'warnings_no',
2305 'label': 'Show:',
2306 'options' : [
2307 ('Builds with warnings','warnings_no__gte:1', queryset_with_search.filter(warnings_no__gte=1).count()),
2308 ('Builds without warnings','warnings_no:0', queryset_with_search.filter(warnings_no=0).count()),
2309 ]
2310 }
2311 },
2312 {'name': 'Time', 'clclass': 'time', 'hidden' : 1,
2313 'qhelp': "How long it took the build to finish",
2314 'orderfield': _get_toggle_order(request, "timespent", True),
2315 'ordericon':_get_toggle_order_icon(request, "timespent"),
2316 'orderkey' : 'timespent',
2317 },
2318 {'name': 'Log',
2319 'dclass': "span4",
2320 'qhelp': "Path to the build main log file",
2321 'clclass': 'log', 'hidden': 1,
2322 'orderfield': _get_toggle_order(request, "cooker_log_path"),
2323 'ordericon':_get_toggle_order_icon(request, "cooker_log_path"),
2324 'orderkey' : 'cooker_log_path',
2325 },
2326 {'name': 'Output', 'clclass': 'output',
2327 'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory",
2328 },
2329 ]
2330 }
2331
2332 return render(request, template, context)
2167else: 2333else:
2168 # these are pages that are NOT available in interactive mode 2334 # these are pages that are NOT available in interactive mode
2169 def managedcontextprocessor(request): 2335 def managedcontextprocessor(request):