summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-07-31 15:09:03 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 11:26:11 +0100
commitb06a633f25aec303e867c6109fb97d63d9ee1f73 (patch)
treee8cb117fa87f50114d63fa1104804abeb0708433 /bitbake
parent3d3a2dbf5fc10773bb18ab7fb00f3db254139f47 (diff)
downloadpoky-b06a633f25aec303e867c6109fb97d63d9ee1f73.tar.gz
bitbake: toastergui: Implement new project navigation
Change the structure of the project page to include a navigation menu and top tab navigation. Remove old breadcrumb method. [YOCTO #7329] (Bitbake rev: 66fa0dd988e01ec79e74be7a5697eaa3b4f017d8) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/static/css/default.css1
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/base.js54
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/layerdetails.js13
-rw-r--r--bitbake/lib/toaster/toastergui/templates/base.html5
-rw-r--r--bitbake/lib/toaster/toastergui/templates/baseprojectbuildspage.html15
-rw-r--r--bitbake/lib/toaster/toastergui/templates/baseprojectpage.html64
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_top.html1
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_top_buildprojects.html14
-rw-r--r--bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html3
-rw-r--r--bitbake/lib/toaster/toastergui/templates/builds.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html19
-rw-r--r--bitbake/lib/toaster/toastergui/templates/importlayer.html11
-rw-r--r--bitbake/lib/toaster/toastergui/templates/layerdetails.html27
-rw-r--r--bitbake/lib/toaster/toastergui/templates/project.html38
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectbuilds.html5
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectconf.html8
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projecttopbar.html38
-rw-r--r--bitbake/lib/toaster/toastergui/urls.py6
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py1
19 files changed, 180 insertions, 145 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css
index da78f47f85..072a71d834 100644
--- a/bitbake/lib/toaster/toastergui/static/css/default.css
+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
@@ -179,7 +179,6 @@ table { table-layout: fixed; word-wrap: break-word; }
179.well-alert > .lead { color: #C09853; padding-bottom: .75em; } 179.well-alert > .lead { color: #C09853; padding-bottom: .75em; }
180.configuration-alert { margin-bottom: 0px; padding: 8px 14px; } 180.configuration-alert { margin-bottom: 0px; padding: 8px 14px; }
181.configuration-alert p { margin-bottom: 0px; } 181.configuration-alert p { margin-bottom: 0px; }
182fieldset { padding-left: 19px; }
183.project-form { margin-top: 10px; } 182.project-form { margin-top: 10px; }
184.add-layers .btn-block + .btn-block, .build .btn-block + .btn-block { margin-top: 0px; } 183.add-layers .btn-block + .btn-block, .build .btn-block + .btn-block { margin-top: 0px; }
185input.huge { font-size: 17.5px; padding: 11px 19px; } 184input.huge { font-size: 17.5px; padding: 11px 19px; }
diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js
index f1711c134f..6fd77ea457 100644
--- a/bitbake/lib/toaster/toastergui/static/js/base.js
+++ b/bitbake/lib/toaster/toastergui/static/js/base.js
@@ -3,33 +3,57 @@
3function basePageInit(ctx) { 3function basePageInit(ctx) {
4 4
5 var newBuildButton = $("#new-build-button"); 5 var newBuildButton = $("#new-build-button");
6 /* Hide the button if we're on the project,newproject or importlyaer page 6 var newBuildTargetInput;
7 var newBuildTargetBuildBtn;
8
9 var selectedProject = libtoaster.ctx;
10 var selectedTarget;
11
12 var newBuildProjectInput = $("#new-build-button #project-name-input");
13 var newBuildProjectSaveBtn = $("#new-build-button #save-project-button");
14
15 $("#config-nav .nav li a").each(function(){
16 if (window.location.pathname === $(this).attr('href'))
17 $(this).parent().addClass('active');
18 else
19 $(this).parent().removeClass('active');
20 });
21
22 if ($(".total-builds").length !== 0){
23 libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){
24 if (prjInfo.builds)
25 $(".total-builds").text(prjInfo.builds.length);
26 });
27 }
28
29 /* Hide the button if we're on the project,newproject or importlyaer page
7 * or if there are no projects yet defined 30 * or if there are no projects yet defined
31 * only show if there isn't already a build-target-input already
8 */ 32 */
9 if (ctx.numProjects === 0 || ctx.currentUrl.search('newproject|project/\\d$|importlayer$') > 0) { 33 if (ctx.numProjects > 0 &&
10 newBuildButton.hide(); 34 ctx.currentUrl.search('newproject') < 0 &&
35 $(".build-target-input").length === 1) {
36
37 newBuildTargetInput = $("#new-build-button .build-target-input");
38 newBuildTargetBuildBtn = $("#new-build-button .build-button");
39
40 newBuildButton.show();
41 _setupNewBuildButton();
42 } else if ($(".build-target-input").length > 0) {
43 newBuildTargetInput = $("#project-topbar .build-target-input");
44 newBuildTargetBuildBtn = $("#project-topbar .build-button");
45 } else {
11 return; 46 return;
12 } 47 }
13 48
14 var selectedProject = libtoaster.ctx;
15 var selectedTarget;
16 49
17 /* Hide the change project icon when there is only one project */ 50 /* Hide the change project icon when there is only one project */
18 if (ctx.numProjects === 1) { 51 if (ctx.numProjects === 1) {
19 $('#project .icon-pencil').hide(); 52 $('#project .icon-pencil').hide();
20 } 53 }
21 54
22 newBuildButton.show().removeAttr("disabled");
23
24
25 var newBuildProjectInput = $("#new-build-button #project-name-input");
26 var newBuildTargetBuildBtn = $("#new-build-button #build-button");
27 var newBuildTargetInput = $("#new-build-button #build-target-input");
28 var newBuildProjectSaveBtn = $("#new-build-button #save-project-button");
29
30 55
31 _checkProjectBuildable(); 56 _checkProjectBuildable();
32 _setupNewBuildButton();
33 57
34 58
35 function _checkProjectBuildable() { 59 function _checkProjectBuildable() {
@@ -57,8 +81,6 @@ function basePageInit(ctx) {
57 selectedProject.projectName = item.name; 81 selectedProject.projectName = item.name;
58 selectedProject.projectId = item.id; 82 selectedProject.projectId = item.id;
59 selectedProject.projectBuildsUrl = item.projectBuildsUrl; 83 selectedProject.projectBuildsUrl = item.projectBuildsUrl;
60
61
62 }); 84 });
63 85
64 } 86 }
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
index 0accd971d4..e522373b3f 100644
--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -15,6 +15,19 @@ function layerDetailsPageInit (ctx) {
15 layerDepBtn.removeAttr("disabled"); 15 layerDepBtn.removeAttr("disabled");
16 }); 16 });
17 17
18 $(".breadcrumb li:first a").click(function(e){
19 /* By default this link goes to the project configuration page. However
20 * if we have some builds we go there instead of the default href
21 */
22 libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){
23 if (prjInfo.builds && prjInfo.builds.length > 0) {
24 window.location.replace(libtoaster.ctx.projectBuildsUrl);
25 e.preventDefault();
26 return;
27 }
28 });
29 });
30
18 function addRemoveDep(depLayerId, add, doneCb) { 31 function addRemoveDep(depLayerId, add, doneCb) {
19 var data = { layer_version_id : ctx.layerVersion.id }; 32 var data = { layer_version_id : ctx.layerVersion.id };
20 if (add) 33 if (add)
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html
index b34e6c37d3..6c3e1a3823 100644
--- a/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/bitbake/lib/toaster/toastergui/templates/base.html
@@ -80,7 +80,6 @@
80 {% endif %} 80 {% endif %}
81 </span> 81 </span>
82<ul class="nav"> 82<ul class="nav">
83
84 <li {% if "builds" in request.path %} 83 <li {% if "builds" in request.path %}
85 class="active" 84 class="active"
86 {% endif %}> 85 {% endif %}>
@@ -105,7 +104,7 @@
105 <a class="btn" id="new-project-button" href="{% url 'newproject' %}">New project</a> 104 <a class="btn" id="new-project-button" href="{% url 'newproject' %}">New project</a>
106 </div> 105 </div>
107 <!-- New build popover --> 106 <!-- New build popover -->
108 <div class="btn-group pull-right" id="new-build-button"> 107 <div class="btn-group pull-right" id="new-build-button" style="display:none">
109 <button class="btn dropdown-toggle" data-toggle="dropdown"> 108 <button class="btn dropdown-toggle" data-toggle="dropdown">
110 New build 109 New build
111 <i class="icon-caret-down"></i> 110 <i class="icon-caret-down"></i>
@@ -136,7 +135,7 @@
136 <li id="targets-form"> 135 <li id="targets-form">
137 <h6>Recipe(s):</h6> 136 <h6>Recipe(s):</h6>
138 <form> 137 <form>
139 <input type="text" class="input-xlarge" id="build-target-input" placeholder="Type a recipe name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" disabled/> 138 <input type="text" class="input-xlarge build-target-input" placeholder="Type a recipe name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" disabled/>
140 <div> 139 <div>
141 <button class="btn btn-primary" id="build-button" disabled>Build</button> 140 <button class="btn btn-primary" id="build-button" disabled>Build</button>
142 </div> 141 </div>
diff --git a/bitbake/lib/toaster/toastergui/templates/baseprojectbuildspage.html b/bitbake/lib/toaster/toastergui/templates/baseprojectbuildspage.html
new file mode 100644
index 0000000000..8b043d1e44
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/baseprojectbuildspage.html
@@ -0,0 +1,15 @@
1{% extends "base.html" %}
2{% load projecttags %}
3{% load humanize %}
4{% block pagecontent %}
5
6{% include "projecttopbar.html" %}
7
8<!-- Begin main page container -->
9<div class="row-fluid">
10 {% block projectinfomain %}{% endblock %}
11</div>
12<!-- End main container -->
13
14{% endblock %}
15
diff --git a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
index c8a7743b13..ac32deac2f 100644
--- a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
+++ b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
@@ -3,44 +3,40 @@
3{% load humanize %} 3{% load humanize %}
4{% block pagecontent %} 4{% block pagecontent %}
5 5
6{% include "projecttopbar.html" %}
7<script type="text/javascript">
8 $(document).ready(function(){
9 $("#config-nav .nav li a").each(function(){
10 if (window.location.pathname === $(this).attr('href'))
11 $(this).parent().addClass('active');
12 else
13 $(this).parent().removeClass('active');
14 });
6 15
7 <div class="row-fluid"> 16 $("#topbar-configuration-tab").addClass("active")
8<!-- Breadcrumbs --> 17 });
9 <div class="section"> 18</script>
10 <ul class="breadcrumb" id="breadcrumb">
11 <li><a href="{% url 'all-builds' %}">All builds</a></li>
12 {% block parentbreadcrumb %}
13 {% if project %}
14 {% if project_html %}
15 <li>
16 {{project.name}}
17 </li>
18 {% else %}
19 <li>
20 <a href="{%url 'project' project.id %}"><span id="project_name">{{project.name}}</span>
21 </a>
22 </li>
23 {% endif %}
24 {% endif %}
25 {% endblock %}
26 {% block localbreadcrumb %}{% endblock %}
27 </ul>
28 <script>
29 $( function () {
30 $('#breadcrumb > li').append("<span class=\"divider\">→</span>");
31 $('#breadcrumb > li:last').addClass("active");
32 $('#breadcrumb > li:last > span').remove();
33 });
34 </script>
35 </div>
36 19
37 <!-- Begin main page container --> 20<div class="row-fluid">
38 <div style="padding: 0px, margin: 0px, display: inline"> 21 <!-- only on config pages -->
22 <div id="config-nav" class="span2">
23 <ul class="nav nav-list well">
24 <li class="nav-header">Configuration</li>
25 <li><a href="{% url 'project' project.id %}">Basic configuration</a></li>
26 <li><a href="{% url 'projectconf' project.id %}">BitBake variables</a></li>
27 <li class="nav-header">Compatible metadata</li>
28<!-- <li><a href="all-image-recipes.html">Image recipes</a></li> -->
29 <li><a href="{% url 'projecttargets' project.id %}">Recipes</a></li>
30 <li><a href="{% url 'projectmachines' project.id %}">Machines</a></li>
31 <li><a href="{% url 'projectlayers' project.id %}">Layers</a></li>
32 <li class="nav-header">Actions</li>
33 <li><a href="{% url 'importlayer' project.id %}">Import layer</a></li>
34 </ul>
35 </div>
36 <div class="span10">
39 {% block projectinfomain %}{% endblock %} 37 {% block projectinfomain %}{% endblock %}
40 </div>
41 <!-- End main container -->
42 </div> 38 </div>
43 39</div>
44 40
45{% endblock %} 41{% endblock %}
46 42
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top.html b/bitbake/lib/toaster/toastergui/templates/basetable_top.html
index 8dd56ed224..d4bac36d77 100644
--- a/bitbake/lib/toaster/toastergui/templates/basetable_top.html
+++ b/bitbake/lib/toaster/toastergui/templates/basetable_top.html
@@ -168,7 +168,6 @@
168 <button class="btn" type="submit" value="Search">Search</button> 168 <button class="btn" type="submit" value="Search">Search</button>
169 </form> 169 </form>
170 <div class="pull-right"> 170 <div class="pull-right">
171 {% block custombuttons%} {% endblock %}
172{% if tablecols %} 171{% if tablecols %}
173 <div class="btn-group"> 172 <div class="btn-group">
174 <button class="btn dropdown-toggle" data-toggle="dropdown">Edit columns 173 <button class="btn dropdown-toggle" data-toggle="dropdown">Edit columns
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top_buildprojects.html b/bitbake/lib/toaster/toastergui/templates/basetable_top_buildprojects.html
deleted file mode 100644
index 7b19f4befe..0000000000
--- a/bitbake/lib/toaster/toastergui/templates/basetable_top_buildprojects.html
+++ /dev/null
@@ -1,14 +0,0 @@
1{% extends "basetable_top.html" %}
2
3{%block custombuttons %}
4 <div class="btn-group builds-projects">
5 <button class="btn dropdown-toggle" data-toggle="dropdown">
6 <span class="selection">Show all builds</span>
7 <i class="icon-caret-down"></i>
8 </button>
9 <ul class="dropdown-menu">
10 <li><a href="{% url 'all-builds'%}">Show all builds</a></li>
11 <li><a href="{% url 'all-projects'%}">Show all projects</a></li>
12 </ul>
13 </div>
14{%endblock%}
diff --git a/bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html b/bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html
index 9bb9bc1785..70fa1fb9a4 100644
--- a/bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html
+++ b/bitbake/lib/toaster/toastergui/templates/buildrequestdetails.html
@@ -4,9 +4,6 @@
4{% load projecttags %} 4{% load projecttags %}
5{% load humanize %} 5{% load humanize %}
6 6
7{% block localbreadcrumb %}
8<li> {{buildrequest.get_sorted_target_list.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} {{buildrequest.get_machine}} ({{buildrequest.updated|date:"d/m/y H:i"}}) </li>
9{% endblock %}
10 7
11{% block projectinfomain %} 8{% block projectinfomain %}
12 <!-- begin content --> 9 <!-- begin content -->
diff --git a/bitbake/lib/toaster/toastergui/templates/builds.html b/bitbake/lib/toaster/toastergui/templates/builds.html
index 00d1d4edd1..b68fa6f6db 100644
--- a/bitbake/lib/toaster/toastergui/templates/builds.html
+++ b/bitbake/lib/toaster/toastergui/templates/builds.html
@@ -59,7 +59,7 @@
59 59
60 60
61 {% else %} 61 {% else %}
62 {% include "basetable_top_buildprojects.html" %} 62 {% include "basetable_top.html" %}
63 <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work --> 63 <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
64 {% for build in objects %} 64 {% for build in objects %}
65 <tr class="data"> 65 <tr class="data">
diff --git a/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html b/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
index 78e942c7c0..654cdf4bab 100644
--- a/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
+++ b/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
@@ -3,19 +3,13 @@
3{% load humanize %} 3{% load humanize %}
4{% load static %} 4{% load static %}
5 5
6{% block localbreadcrumb %}
7
8
9<li>{{title}}</li>{% endblock %}
10
11{% block projectinfomain %} 6{% block projectinfomain %}
12<div class="page-header"> 7
13 <h1>{{title}} (<span class="table-count-{{table_name}}"></span>) 8<h2>{{title}} (<span class="table-count-{{table_name}}"></span>)
14 {% if project.release %} 9 {% if project.release %}
15 <i class="icon-question-sign get-help heading-help" title="This page lists {{title}} compatible with the release selected for this project, which is {{project.release.description}}"></i> 10 <i class="icon-question-sign get-help heading-help" title="This page lists {{title}} compatible with the release selected for this project, which is {{project.release.description}}"></i>
16 {% endif %} 11 {% endif %}
17 </h1> 12</h2>
18</div>
19<div id="zone1alerts" style="display:none"> 13<div id="zone1alerts" style="display:none">
20 <div class="alert alert-info lead"> 14 <div class="alert alert-info lead">
21 <button type="button" class="close" id="hide-alert">&times;</button> 15 <button type="button" class="close" id="hide-alert">&times;</button>
@@ -24,4 +18,5 @@
24</div> 18</div>
25{% url table_name project.id as xhr_table_url %} 19{% url table_name project.id as xhr_table_url %}
26{% include "toastertable.html" %} 20{% include "toastertable.html" %}
21
27{% endblock %} 22{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html
index 6a5d412d13..d6984bcc9f 100644
--- a/bitbake/lib/toaster/toastergui/templates/importlayer.html
+++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html
@@ -3,9 +3,6 @@
3{% load humanize %} 3{% load humanize %}
4{% load static %} 4{% load static %}
5 5
6{% block localbreadcrumb %}
7<li>Import layer</li>
8{% endblock %}
9 6
10{% block projectinfomain %} 7{% block projectinfomain %}
11 8
@@ -27,12 +24,10 @@
27 }); 24 });
28 </script> 25 </script>
29 26
30 <div class="page-header"> 27 <h2>Import layer</h2>
31 <h1>Import layer</h1>
32 </div>
33 28
34 <form> 29 <form>
35 <span class="help-block" style="padding-left:19px;">The layer you are importing must be compatible with <strong>{{project.release.description}}</strong>, which is the release you are using in this project.</span> 30 <span class="help-block">The layer you are importing must be compatible with <strong>{{project.release.description}}</strong>, which is the release you are using in this project.</span>
36 <fieldset class="air"> 31 <fieldset class="air">
37 <legend>Layer repository information</legend> 32 <legend>Layer repository information</legend>
38 <div class="alert alert-error" id="import-error" style="display:none"> 33 <div class="alert alert-error" id="import-error" style="display:none">
@@ -123,7 +118,7 @@
123 </div> 118 </div>
124 <span class="help-inline">You can only add layers Toaster knows about</span> 119 <span class="help-inline">You can only add layers Toaster knows about</span>
125 </fieldset> 120 </fieldset>
126 <div class="form-actions" id="form-actions"> 121 <div class="air" id="form-actions">
127 <button class="btn btn-primary btn-large" data-toggle="modal" id="import-and-add-btn" data-target="#dependencies-message" disabled>Import and add to project</button> 122 <button class="btn btn-primary btn-large" data-toggle="modal" id="import-and-add-btn" data-target="#dependencies-message" disabled>Import and add to project</button>
128 <span class="help-inline" id="import-and-add-hint" style="vertical-align: middle;">To import a layer you need to enter a layer name, a Git repository URL and a revision (branch, tag or commit)</span> 123 <span class="help-inline" id="import-and-add-hint" style="vertical-align: middle;">To import a layer you need to enter a layer name, a Git repository URL and a revision (branch, tag or commit)</span>
129 </div> 124 </div>
diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
index 7d81b14b61..6269b3630f 100644
--- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html
+++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
@@ -1,14 +1,25 @@
1{% extends "baseprojectpage.html" %} 1{% extends "base.html" %}
2{% load projecttags %} 2{% load projecttags %}
3{% load humanize %} 3{% load humanize %}
4{% load static %} 4{% load static %}
5{% block localbreadcrumb %} 5
6<li><a href="{% url 'projectlayers' project.id %}">All compatible layers</a></li> 6{% block pagecontent %}
7<li> 7
8 {{layerversion.layer.name}} ({{layerversion.get_vcs_reference|truncatechars:13}}) 8<div class="section">
9</li> 9 <ul class="breadcrumb">
10{% endblock %} 10 <li>
11{% block projectinfomain %} 11 <a href="{% url 'project' project.id %}">{{project.name}}</a>
12 <span class="divider">→</span>
13 </li>
14 <li><a href="{% url 'projectlayers' project.id %}">Compatible layers</a>
15 <span class="divider">→</span>
16 </li>
17 <li>
18 {{layerversion.layer.name}} ({{layerversion.get_vcs_reference|truncatechars:13}})
19 </li>
20 </ul>
21</div>
22
12{# If this is not an imported layer then hide the edit ui #} 23{# If this is not an imported layer then hide the edit ui #}
13{% if not layerversion.layer_source_id or layerversion.layer_source.sourcetype != layerversion.layer_source.TYPE_IMPORTED %} 24{% if not layerversion.layer_source_id or layerversion.layer_source.sourcetype != layerversion.layer_source.TYPE_IMPORTED %}
14<style scoped> 25<style scoped>
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
index b5d97cb419..0fbfb599b7 100644
--- a/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -30,12 +30,7 @@ vim: expandtab tabstop=2
30 30
31{%else%} 31{%else%}
32 32
33<div id="main" role="main" data-ng-app="project" data-ng-controller="prjCtrl" class="top-padded" data-ng-cloak> 33<div id="main" role="main" data-ng-app="project" data-ng-controller="prjCtrl" data-ng-cloak>
34
35 <!-- project name -->
36 <div class="page-header">
37 <h1>{[project.name]}</h1>
38 </div>
39 34
40 <!-- alerts section 1--> 35 <!-- alerts section 1-->
41 <div data-ng-repeat="a in zone1alerts"> 36 <div data-ng-repeat="a in zone1alerts">
@@ -120,27 +115,6 @@ vim: expandtab tabstop=2
120 </script> 115 </script>
121 116
122 117
123 <!-- build form -->
124 <div class="well">
125 <form class="build-form" data-ng-submit="buildNamedTarget()">
126 <div class="input-append controls">
127 <input type="text" class="huge input-xxlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-ng-model="targetName" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!project.release || !layers.length"/>
128 <button type="submit" class="btn btn-large btn-primary" data-ng-disabled="!targetName.length">
129 Build
130 </button>
131 </div>
132 <i class="icon-question-sign get-help get-help-blue" title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to a recipe name, like so: <code>core-image-minimal:do_build</code>"></i>
133 <p>
134 <a href="{% url 'projecttargets' project.id %}">View all compatible recipes</a>
135 <i class="icon-question-sign get-help get-help-blue heading-help" title="View all the recipes you can build with the release selected for this project, which is {[project.release.desc]}"></i>
136 {% if completedbuilds.count %}
137 | <a href="{% url 'projectbuilds' project.id %}">View all project builds ({{completedbuilds.count}})</a>
138 {% endif %}
139 </p>
140 </form>
141 </div>
142
143
144 <!-- latest builds list --> 118 <!-- latest builds list -->
145 119
146 <a id="buildslist"></a> 120 <a id="buildslist"></a>
@@ -290,7 +264,7 @@ vim: expandtab tabstop=2
290 </div> 264 </div>
291 <form data-ng-submit="layerAdd()"> 265 <form data-ng-submit="layerAdd()">
292 <div class="input-append"> 266 <div class="input-append">
293 <input type="text" class="input-xlarge" id="layer" autocomplete="off" placeholder="Type a layer name" data-minLength="1" data-ng-model="layerAddName" data-typeahead="e for e in getLayersAutocompleteSuggestions($viewValue)" data-typeahead-template-url="layers_suggestion_details" data-typeahead-on-select="onLayerSelect($item, $model, $label)" data-typeahead-editable="false" data-ng-class="{ 'has-error': layerAddName.$invalid }" data-ng-disabled="!project.release" /> 267 <input type="text" style="width: 100%" id="layer" autocomplete="off" placeholder="Type a layer name" data-minLength="1" data-ng-model="layerAddName" data-typeahead="e for e in getLayersAutocompleteSuggestions($viewValue)" data-typeahead-template-url="layers_suggestion_details" data-typeahead-on-select="onLayerSelect($item, $model, $label)" data-typeahead-editable="false" data-ng-class="{ 'has-error': layerAddName.$invalid }" data-ng-disabled="!project.release" />
294 <input type="submit" id="add-layer" class="btn" value="Add" data-ng-disabled="!layerAddName.length"/> 268 <input type="submit" id="add-layer" class="btn" value="Add" data-ng-disabled="!layerAddName.length"/>
295 </div> 269 </div>
296 {% csrf_token %} 270 {% csrf_token %}
@@ -317,7 +291,7 @@ vim: expandtab tabstop=2
317 </h3> 291 </h3>
318 <form data-ng-submit="buildNamedTarget()"> 292 <form data-ng-submit="buildNamedTarget()">
319 <div class="input-append"> 293 <div class="input-append">
320 <input type="text" class="input-xlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-minLength="1" data-ng-model="targetName1" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!project.release || !layers.length"> 294 <input type="text" style="width: 100%" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-minLength="1" data-ng-model="targetName1" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!project.release || !layers.length">
321 <button type="submit" class="btn btn-primary" data-ng-disabled="!targetName1.length"> 295 <button type="submit" class="btn btn-primary" data-ng-disabled="!targetName1.length">
322 Build </button> 296 Build </button>
323 </div> 297 </div>
@@ -420,8 +394,10 @@ vim: expandtab tabstop=2
420 </div> 394 </div>
421 </div> 395 </div>
422 396
423<!-- end main --> 397</div> <!-- end main -->
424</div> 398
399</div> <!-- end row -->
400
425 401
426 402
427<!-- load application logic !--> 403<!-- load application logic !-->
diff --git a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
index ac87d8c166..646755b183 100644
--- a/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
+++ b/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
@@ -1,10 +1,7 @@
1{% extends "baseprojectpage.html" %} 1{% extends "baseprojectbuildspage.html" %}
2{% load projecttags %} 2{% load projecttags %}
3{% load humanize %} 3{% load humanize %}
4 4
5{% block localbreadcrumb %}
6<li>Project builds</li>
7{% endblock %}
8 5
9{% block extraheadcontent %} 6{% block extraheadcontent %}
10<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'> 7<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'>
diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html
index 01ece24511..4c5a188a86 100644
--- a/bitbake/lib/toaster/toastergui/templates/projectconf.html
+++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html
@@ -2,14 +2,10 @@
2{% load projecttags %} 2{% load projecttags %}
3{% load humanize %} 3{% load humanize %}
4 4
5{% block localbreadcrumb %}
6<li>Configuration variables</li>
7{% endblock %}
8 5
9{% block projectinfomain %} 6{% block projectinfomain %}
10 <div class="page-header"> 7
11 <h1>Configuration variables</h1> 8<h2>Bitbake variables</h2>
12 </div>
13 9
14 <div style="padding-left:19px;"> 10 <div style="padding-left:19px;">
15 11
diff --git a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
new file mode 100644
index 0000000000..46473cb76b
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
@@ -0,0 +1,38 @@
1<!-- project name -->
2<div class="row-fluid page-header">
3 <h1>{{project.name}}</h1>
4</div>
5
6<div class="row-fluid" id="project-topbar">
7 <ul class="nav nav-pills">
8 <li>
9 <a href="{% url 'projectbuilds' project.id %}">
10 Builds (<span class="total-builds"></span>)
11 </a>
12 </li>
13 <li id="topbar-configuration-tab">
14 <a href="{% url 'project' project.id %}">
15 Configuration
16 </a>
17 </li>
18 <!-- Coming soon
19 <li>
20 <a href="my-image-recipes.html">
21 My image recipes
22 </a>
23 </li>
24 -->
25 <li class="pull-right">
26 <form class="form-inline" style="margin-bottom: 0">
27
28 <i class="icon-question-sign get-help heading-help" data-placement="left" title="" data-original-title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to the recipe name, like so: <code>busybox:clean</code>">
29 </i>
30 <div class="input-append">
31 <input type="text" class="input-xlarge build-target-input" placeholder="Type the recipe you want to build" autocomplete="off">
32 <button class="btn btn-primary build-button" data-project-id="{{project.id}}" disabled>Build
33 </button>
34 </div>
35 </form>
36 </li>
37 </ul>
38</div>
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py
index feb15139fb..beb43038a1 100644
--- a/bitbake/lib/toaster/toastergui/urls.py
+++ b/bitbake/lib/toaster/toastergui/urls.py
@@ -87,13 +87,13 @@ urlpatterns = patterns('toastergui.views',
87 url(r'^project/(?P<pid>\d+)/machines/$', 87 url(r'^project/(?P<pid>\d+)/machines/$',
88 tables.MachinesTable.as_view(template_name="generic-toastertable-page.html"), 88 tables.MachinesTable.as_view(template_name="generic-toastertable-page.html"),
89 { 'table_name': tables.MachinesTable.__name__.lower(), 89 { 'table_name': tables.MachinesTable.__name__.lower(),
90 'title' : 'All compatible machines' }, 90 'title' : 'Compatible machines' },
91 name="projectmachines"), 91 name="projectmachines"),
92 92
93 url(r'^project/(?P<pid>\d+)/recipes/$', 93 url(r'^project/(?P<pid>\d+)/recipes/$',
94 tables.RecipesTable.as_view(template_name="generic-toastertable-page.html"), 94 tables.RecipesTable.as_view(template_name="generic-toastertable-page.html"),
95 { 'table_name': tables.RecipesTable.__name__.lower(), 95 { 'table_name': tables.RecipesTable.__name__.lower(),
96 'title' : 'All compatible recipes' }, 96 'title' : 'Compatible recipes' },
97 name="projecttargets"), 97 name="projecttargets"),
98 98
99 url(r'^project/(?P<pid>\d+)/availablerecipes/$', 99 url(r'^project/(?P<pid>\d+)/availablerecipes/$',
@@ -105,7 +105,7 @@ urlpatterns = patterns('toastergui.views',
105 url(r'^project/(?P<pid>\d+)/layers/$', 105 url(r'^project/(?P<pid>\d+)/layers/$',
106 tables.LayersTable.as_view(template_name="generic-toastertable-page.html"), 106 tables.LayersTable.as_view(template_name="generic-toastertable-page.html"),
107 { 'table_name': tables.LayersTable.__name__.lower(), 107 { 'table_name': tables.LayersTable.__name__.lower(),
108 'title' : 'All compatible layers' }, 108 'title' : 'Compatible layers' },
109 name="projectlayers"), 109 name="projectlayers"),
110 110
111 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)$', 111 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)$',
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 82650d0a02..9c63aae251 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -2627,6 +2627,7 @@ if True:
2627 except InvalidRequestException as e: 2627 except InvalidRequestException as e:
2628 raise RedirectException('projectbuilds', request.GET, e.response, pid = pid) 2628 raise RedirectException('projectbuilds', request.GET, e.response, pid = pid)
2629 2629
2630 context['project'] = prj
2630 _set_parameters_values(pagesize, orderby, request) 2631 _set_parameters_values(pagesize, orderby, request)
2631 2632
2632 return context 2633 return context