summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-24 14:53:21 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-26 09:27:32 +0100
commitf28116ec108ec0651dac9956707358aac00fef13 (patch)
tree88de4c706bc7ab9ff7d0a643c0f5d80a9f5b4c23 /bitbake
parent583e3207642af9cf3247501bb31ca1ef9bf599fe (diff)
downloadpoky-f28116ec108ec0651dac9956707358aac00fef13.tar.gz
bitbake: toasterui: fixes after html5 compliance testing
This patch brings fixes for issues highlighted by HTML5 compliance testing. (Bitbake rev: 7aecb974d44d9bc711ffba5cc65e770811397fba) 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/orm/models.py4
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/base.js2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/configvars.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/detail_search_header.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/importlayer.html15
-rw-r--r--bitbake/lib/toaster/toastergui/templates/target.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/toastertable-simple.html4
-rw-r--r--bitbake/lib/toaster/toastergui/templates/toastertable.html4
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py11
11 files changed, 33 insertions, 17 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 8488aa4648..7e8ab16cf5 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -180,7 +180,9 @@ class Project(models.Model):
180 if release == None: 180 if release == None:
181 release = self.release 181 release = self.release
182 # layers on the same branch or layers specifically set for this project 182 # layers on the same branch or layers specifically set for this project
183 queryset = Layer_Version.objects.filter((Q(up_branch__name = release.branch_name) & Q(project = None)) | Q(project = self) | Q(build__project = self)) 183 queryset = Layer_Version.objects.filter(Q(project = self) | Q(build__project = self))
184 if release is not None:
185 queryset = queryset.filter(Q(up_branch__name = release.branch_name) & Q(project = None))
184 if layer_name is not None: 186 if layer_name is not None:
185 # we select only a layer name 187 # we select only a layer name
186 queryset = queryset.filter(layer__name = layer_name) 188 queryset = queryset.filter(layer__name = layer_name)
diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js
index d079f23994..f1711c134f 100644
--- a/bitbake/lib/toaster/toastergui/static/js/base.js
+++ b/bitbake/lib/toaster/toastergui/static/js/base.js
@@ -39,7 +39,7 @@ function basePageInit(ctx) {
39 39
40 libtoaster.getProjectInfo(selectedProject.projectPageUrl, 40 libtoaster.getProjectInfo(selectedProject.projectPageUrl,
41 function (data) { 41 function (data) {
42 if (data.machine.name === undefined || data.layers.length === 0) { 42 if (data.machine === null || data.machine.name === undefined || data.layers.length === 0) {
43 /* we can't build anything with out a machine and some layers */ 43 /* we can't build anything with out a machine and some layers */
44 $("#new-build-button #targets-form").hide(); 44 $("#new-build-button #targets-form").hide();
45 $("#new-build-button .alert").show(); 45 $("#new-build-button .alert").show();
diff --git a/bitbake/lib/toaster/toastergui/templates/configvars.html b/bitbake/lib/toaster/toastergui/templates/configvars.html
index 89576733c2..8a572ae397 100644
--- a/bitbake/lib/toaster/toastergui/templates/configvars.html
+++ b/bitbake/lib/toaster/toastergui/templates/configvars.html
@@ -39,7 +39,7 @@
39 <div class="row-fluid"> 39 <div class="row-fluid">
40 <div class="alert"> 40 <div class="alert">
41 <form class="no-results input-append" id="searchform"> 41 <form class="no-results input-append" id="searchform">
42 <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %} 42 <input id="search" name="search" class="input-xxlarge" type="text" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
43 <button class="btn" type="submit" value="Search">Search</button> 43 <button class="btn" type="submit" value="Search">Search</button>
44 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all variables</button> 44 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all variables</button>
45 </form> 45 </form>
diff --git a/bitbake/lib/toaster/toastergui/templates/detail_search_header.html b/bitbake/lib/toaster/toastergui/templates/detail_search_header.html
index ca8e158cb1..7bea3f47f6 100644
--- a/bitbake/lib/toaster/toastergui/templates/detail_search_header.html
+++ b/bitbake/lib/toaster/toastergui/templates/detail_search_header.html
@@ -28,7 +28,7 @@ $(document).ready(function() {
28 <form id="searchform" class="navbar-search input-append pull-left"> 28 <form id="searchform" class="navbar-search input-append pull-left">
29 {% endif %} 29 {% endif %}
30 30
31 <input id="search" class="input-xlarge" type="text" placeholder="Search {{search_what}}" name="search" value="{{request.GET.search}}"> 31 <input id="search" class="input-xlarge" type="text" placeholder="Search {{search_what}}" name="search" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}">
32 <input type="hidden" value="name:+" name="orderby"> 32 <input type="hidden" value="name:+" name="orderby">
33 <input type="hidden" value="l" name="page"> 33 <input type="hidden" value="l" name="page">
34 {% if request.GET.search %} 34 {% if request.GET.search %}
diff --git a/bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html b/bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html
index 5214444ee0..6ce292e5a2 100644
--- a/bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html
+++ b/bitbake/lib/toaster/toastergui/templates/detail_sorted_header.html
@@ -9,7 +9,7 @@
9 <thead> 9 <thead>
10 <!-- Table header row; generated from "tablecols" entry in the context dict --> 10 <!-- Table header row; generated from "tablecols" entry in the context dict -->
11 <tr> 11 <tr>
12 {% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}"> 12 {% for tc in tablecols %}<th class="{%if tc.dclass%}{{tc.dclass}}{% endif %} {%if tc.class %}{{tc.clclass}}{% endif %}">
13 {%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%} 13 {%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%}
14 {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })">{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%} 14 {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })">{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%}
15 {%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%} 15 {%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%}
diff --git a/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html b/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
index d7ad2e7eee..78e942c7c0 100644
--- a/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
+++ b/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
@@ -11,7 +11,9 @@
11{% block projectinfomain %} 11{% block projectinfomain %}
12<div class="page-header"> 12<div class="page-header">
13 <h1>{{title}} (<span class="table-count-{{table_name}}"></span>) 13 <h1>{{title}} (<span class="table-count-{{table_name}}"></span>)
14 {% if project.release %}
14 <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> 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>
16 {% endif %}
15 </h1> 17 </h1>
16</div> 18</div>
17<div id="zone1alerts" style="display:none"> 19<div id="zone1alerts" style="display:none">
diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html
index 498a204aff..6a5d412d13 100644
--- a/bitbake/lib/toaster/toastergui/templates/importlayer.html
+++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html
@@ -9,6 +9,7 @@
9 9
10{% block projectinfomain %} 10{% block projectinfomain %}
11 11
12 {% if project and project.release %}
12 <script src="{% static 'js/layerDepsModal.js' %}"></script> 13 <script src="{% static 'js/layerDepsModal.js' %}"></script>
13 <script src="{% static 'js/importlayer.js' %}"></script> 14 <script src="{% static 'js/importlayer.js' %}"></script>
14 <script> 15 <script>
@@ -31,9 +32,7 @@
31 </div> 32 </div>
32 33
33 <form> 34 <form>
34 {% if project %}
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> 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>
36 {% endif %}
37 <fieldset class="air"> 36 <fieldset class="air">
38 <legend>Layer repository information</legend> 37 <legend>Layer repository information</legend>
39 <div class="alert alert-error" id="import-error" style="display:none"> 38 <div class="alert alert-error" id="import-error" style="display:none">
@@ -131,4 +130,16 @@
131 </div> 130 </div>
132 </form> 131 </form>
133 132
133 {% else %} {#project and project release#}
134 <div class="page-header">
135 <h1>Import layer</h1>
136 </div>
137 <div class="alert alert-info" id="import-error" >
138 <h3>Unsupported project type</h3>
139 <p>This project does not support importing layers.</p>
140 <ul></ul>
141 </div>
142
143 {% endif %}
144
134{% endblock %} 145{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/target.html b/bitbake/lib/toaster/toastergui/templates/target.html
index fa59f4eeba..65e6c4a07b 100644
--- a/bitbake/lib/toaster/toastergui/templates/target.html
+++ b/bitbake/lib/toaster/toastergui/templates/target.html
@@ -53,7 +53,7 @@
53 <div class="row-fluid"> 53 <div class="row-fluid">
54 <div class="alert"> 54 <div class="alert">
55 <form class="no-results input-append" id="searchform"> 55 <form class="no-results input-append" id="searchform">
56 <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %} 56 <input id="search" name="search" class="input-xxlarge" type="text" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
57 <button class="btn" type="submit" value="Search">Search</button> 57 <button class="btn" type="submit" value="Search">Search</button>
58 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all packages</button> 58 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all packages</button>
59 </form> 59 </form>
diff --git a/bitbake/lib/toaster/toastergui/templates/toastertable-simple.html b/bitbake/lib/toaster/toastergui/templates/toastertable-simple.html
index ea7b38e130..212318bc53 100644
--- a/bitbake/lib/toaster/toastergui/templates/toastertable-simple.html
+++ b/bitbake/lib/toaster/toastergui/templates/toastertable-simple.html
@@ -29,7 +29,7 @@
29<div class="row-fluid" id="no-results-{{table_name}}" style="display:none"> 29<div class="row-fluid" id="no-results-{{table_name}}" style="display:none">
30 <div class="alert"> 30 <div class="alert">
31 <form class="no-results input-append"> 31 <form class="no-results input-append">
32 <input class="input-xlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/> 32 <input class="input-xlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>
33 <a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1"> 33 <a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
34 <i class="icon-remove"></i> 34 <i class="icon-remove"></i>
35 </a> 35 </a>
@@ -44,7 +44,7 @@
44 <div class="row-fluid" id="table-chrome-{{table_name}}"> 44 <div class="row-fluid" id="table-chrome-{{table_name}}">
45 <div class="navbar-search input-append pull-left"> 45 <div class="navbar-search input-append pull-left">
46 46
47 <input class="input-xlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/> 47 <input class="input-xlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>
48 <a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1"> 48 <a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
49 <i class="icon-remove"></i> 49 <i class="icon-remove"></i>
50 </a> 50 </a>
diff --git a/bitbake/lib/toaster/toastergui/templates/toastertable.html b/bitbake/lib/toaster/toastergui/templates/toastertable.html
index c7c7a84bf7..047311636c 100644
--- a/bitbake/lib/toaster/toastergui/templates/toastertable.html
+++ b/bitbake/lib/toaster/toastergui/templates/toastertable.html
@@ -29,7 +29,7 @@
29<div class="row-fluid" id="no-results-{{table_name}}" style="display:none"> 29<div class="row-fluid" id="no-results-{{table_name}}" style="display:none">
30 <div class="alert"> 30 <div class="alert">
31 <form class="no-results input-append"> 31 <form class="no-results input-append">
32 <input class="input-xxlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/> 32 <input class="input-xxlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search %}{{request.GET.search}}{%endif%}"/>
33 <a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1"> 33 <a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
34 <i class="icon-remove"></i> 34 <i class="icon-remove"></i>
35 </a> 35 </a>
@@ -46,7 +46,7 @@
46 <div class="navbar-inner"> 46 <div class="navbar-inner">
47 <div class="navbar-search input-append pull-left"> 47 <div class="navbar-search input-append pull-left">
48 48
49 <input class="input-xxlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/> 49 <input class="input-xxlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>
50 <a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1"> 50 <a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
51 <i class="icon-remove"></i> 51 <i class="icon-remove"></i>
52 </a> 52 </a>
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index ec65903080..82650d0a02 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -165,8 +165,8 @@ def _lv_to_dict(prj, x = None):
165 165
166 return {"id": x.pk, 166 return {"id": x.pk,
167 "name": x.layer.name, 167 "name": x.layer.name,
168 "tooltip": x.layer.vcs_url+" | "+x.get_vcs_reference(), 168 "tooltip": "%s | %s" % (x.layer.vcs_url,x.get_vcs_reference()),
169 "detail": "(" + x.layer.vcs_url + (")" if x.up_branch == None else " | "+x.get_vcs_reference()+")"), 169 "detail": "(%s" % x.layer.vcs_url + (")" if x.up_branch == None else " | "+x.get_vcs_reference()+")"),
170 "giturl": x.layer.vcs_url, 170 "giturl": x.layer.vcs_url,
171 "layerdetailurl" : reverse('layerdetails', args=(prj.id,x.pk)), 171 "layerdetailurl" : reverse('layerdetails', args=(prj.id,x.pk)),
172 "revision" : x.get_vcs_reference(), 172 "revision" : x.get_vcs_reference(),
@@ -559,10 +559,10 @@ def task( request, build_id, task_id ):
559 uri_list= [ ] 559 uri_list= [ ]
560 variables = Variable.objects.filter(build=build_id) 560 variables = Variable.objects.filter(build=build_id)
561 v=variables.filter(variable_name='SSTATE_DIR') 561 v=variables.filter(variable_name='SSTATE_DIR')
562 if v.count > 0: 562 if v.count() > 0:
563 uri_list.append(v[0].variable_value) 563 uri_list.append(v[0].variable_value)
564 v=variables.filter(variable_name='SSTATE_MIRRORS') 564 v=variables.filter(variable_name='SSTATE_MIRRORS')
565 if (v.count > 0): 565 if (v.count() > 0):
566 for mirror in v[0].variable_value.split('\\n'): 566 for mirror in v[0].variable_value.split('\\n'):
567 s=re.sub('.* ','',mirror.strip(' \t\n\r')) 567 s=re.sub('.* ','',mirror.strip(' \t\n\r'))
568 if len(s): uri_list.append(s) 568 if len(s): uri_list.append(s)
@@ -2124,9 +2124,10 @@ if True:
2124 login(request, user) 2124 login(request, user)
2125 2125
2126 # save the project 2126 # save the project
2127 release = Release.objects.get(pk = request.POST.get('projectversion', None ))
2128 if ptype == "analysis": 2127 if ptype == "analysis":
2129 release = None 2128 release = None
2129 else:
2130 release = Release.objects.get(pk = request.POST.get('projectversion', None ))
2130 2131
2131 prj = Project.objects.create_project(name = request.POST['projectname'], release = release) 2132 prj = Project.objects.create_project(name = request.POST['projectname'], release = release)
2132 prj.user_id = request.user.pk 2133 prj.user_id = request.user.pk