* [PATCH 01/12] toastergui: save cookie for orderby/page size settings
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 02/12] toasterui: save event backlog to build Alex DAMIAN
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
We save the current settings as cookies on the server side
for the layers, targets and machines pages under Project pages.
[YOCTO #6961]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/toaster/toastergui/templates/targets.html | 2 --
lib/toaster/toastergui/views.py | 15 +++++++++++----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/lib/toaster/toastergui/templates/targets.html b/lib/toaster/toastergui/templates/targets.html
index cc339fb..590ecb9 100644
--- a/lib/toaster/toastergui/templates/targets.html
+++ b/lib/toaster/toastergui/templates/targets.html
@@ -39,7 +39,6 @@
{% include "basetable_top.html" %}
{% for o in objects %}
- {% if o.name %}
<tr class="data">
<td class="target">
{{o.name}}
@@ -79,7 +78,6 @@
</a>
</td>
</tr>
- {% endif %}
{% endfor %}
{% include "basetable_bottom.html" %}
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 5fcad63..4d00fbd 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -2560,7 +2560,10 @@ if toastermain.settings.MANAGED:
]
}
- return render(request, template, context)
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
+
+ return response
def layerdetails(request, layerid):
template = "layerdetails.html"
@@ -2626,7 +2629,7 @@ if toastermain.settings.MANAGED:
(filter_string, search_term, ordering_string) = _search_tuple(request, Recipe)
prj = Project.objects.get(pk = request.session['project_id'])
- queryset_all = Recipe.objects.filter(Q(layer_version__up_branch__name= prj.release.name) | Q(layer_version__build__in = prj.build_set.all()))
+ queryset_all = Recipe.objects.filter(Q(layer_version__up_branch__name= prj.release.name) | Q(layer_version__build__in = prj.build_set.all())).filter(name__regex=r'.{1,}.*')
queryset_with_search = _get_queryset(Recipe, queryset_all, None, search_term, ordering_string, '-name')
@@ -2711,8 +2714,10 @@ if toastermain.settings.MANAGED:
}
}, ]
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
- return render(request, template, context)
+ return response
def machines(request):
template = "machines.html"
@@ -2783,8 +2788,10 @@ if toastermain.settings.MANAGED:
]
}
+ response = render(request, template, context)
+ _save_parameters_cookies(response, pagesize, orderby, request)
- return render(request, template, context)
+ return response
def get_project_configvars_context():
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 02/12] toasterui: save event backlog to build
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
2015-01-21 17:01 ` [PATCH 01/12] toastergui: save cookie for orderby/page size settings Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 03/12] toastergui: fix duplicate IDs all builds page Alex DAMIAN
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
We add a call that saves any queued events to the build
[YOCTO #7021]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/bb/ui/buildinfohelper.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 9e801ac..be0de6b 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -1135,6 +1135,7 @@ class BuildInfoHelper(object):
return
if 'build' in self.internal_state and 'backlog' in self.internal_state:
+ # if we have a backlog of events, do our best to save them here
if len(self.internal_state['backlog']):
tempevent = self.internal_state['backlog'].pop()
logger.debug(1, "buildinfohelper: Saving stored event %s " % tempevent)
@@ -1164,5 +1165,11 @@ class BuildInfoHelper(object):
self._store_build_done(errorcode)
if 'backlog' in self.internal_state:
- for event in self.internal_state['backlog']:
- logger.error("Unsaved log: %s", event.msg)
+ if 'build' in self.internal_state:
+ # we save missed events in the database for the current build
+ tempevent = self.internal_state['backlog'].pop()
+ self.store_log_event(tempevent)
+ else:
+ # we have no build, and we still have events; something amazingly wrong happend
+ for event in self.internal_state['backlog']:
+ logger.error("UNSAVED log: %s", event.msg)
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 03/12] toastergui: fix duplicate IDs all builds page
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
2015-01-21 17:01 ` [PATCH 01/12] toastergui: save cookie for orderby/page size settings Alex DAMIAN
2015-01-21 17:01 ` [PATCH 02/12] toasterui: save event backlog to build Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 04/12] toastergui: "Run again" button in build pages Alex DAMIAN
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
This patch fixes the duplicate IDs found in the all builds page,
originating in the "Project" column filter.
Also fix misspell "Log1" instead of "Log".
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/toaster/toastergui/views.py | 37 ++++++++++---------------------------
1 file changed, 10 insertions(+), 27 deletions(-)
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 4d00fbd..7a11bbd 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -1725,10 +1725,10 @@ if toastermain.settings.MANAGED:
return _redirect_parameters( builds, request.GET, e.response)
context['tablecols'].append(
- {'name': 'Project', 'clclass': 'project',
+ {'name': 'Project', 'clclass': 'projectx',
'filter': {'class': 'project',
'label': 'Project:',
- 'options': map(lambda x: (x.name,'',x.build_set.filter(outcome__lt=BuildRequest.REQ_INPROGRESS).count()), Project.objects.all()),
+ 'options': map(lambda x: (x.name,'project:%d' % x.id,x.build_set.filter(outcome__lt=BuildRequest.REQ_INPROGRESS).count()), Project.objects.all()),
}
}
@@ -3152,6 +3152,14 @@ else:
]
}
},
+ {'name': 'Log',
+ 'dclass': "span4",
+ 'qhelp': "Path to the build main log file",
+ 'clclass': 'log', 'hidden': 1,
+ 'orderfield': _get_toggle_order(request, "cooker_log_path"),
+ 'ordericon':_get_toggle_order_icon(request, "cooker_log_path"),
+ 'orderkey' : 'cooker_log_path',
+ },
{'name': 'Time', 'clclass': 'time', 'hidden' : 1,
'qhelp': "How long it took the build to finish",
'orderfield': _get_toggle_order(request, "timespent", True),
@@ -3165,31 +3173,6 @@ else:
]
}
- if not toastermain.settings.MANAGED:
- context['tablecols'].insert(-2,
- {'name': 'Log1',
- 'dclass': "span4",
- 'qhelp': "Path to the build main log file",
- 'clclass': 'log', 'hidden': 1,
- 'orderfield': _get_toggle_order(request, "cooker_log_path"),
- 'ordericon':_get_toggle_order_icon(request, "cooker_log_path"),
- 'orderkey' : 'cooker_log_path',
- }
- )
-
-
- if toastermain.settings.MANAGED:
- context['tablecols'].append(
- {'name': 'Project', 'clclass': 'project',
- 'filter': {'class': 'project',
- 'label': 'Project:',
- 'options': map(lambda x: (x.name,'',x.build_set.filter(outcome__lt=Build.IN_PROGRESS).count()), Project.objects.all()),
-
- }
- }
- )
-
-
response = render(request, template, context)
_save_parameters_cookies(response, pagesize, orderby, request)
return response
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 04/12] toastergui: "Run again" button in build pages
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
` (2 preceding siblings ...)
2015-01-21 17:01 ` [PATCH 03/12] toastergui: fix duplicate IDs all builds page Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 05/12] toaster: newproject default release selection fix Alex DAMIAN
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
This patch fixes the "Run again" button for the completed builds.
[YOCTO #7173]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/toaster/toastergui/static/js/projectapp.js | 2 +-
lib/toaster/toastergui/templates/managed_mrb_section.html | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/toaster/toastergui/static/js/projectapp.js b/lib/toaster/toastergui/static/js/projectapp.js
index 0bdc55a..74471a1 100644
--- a/lib/toaster/toastergui/static/js/projectapp.js
+++ b/lib/toaster/toastergui/static/js/projectapp.js
@@ -339,7 +339,7 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
$scope.buildExistingTarget = function(targets) {
var oldTargetName = $scope.targetName;
$scope.targetName = targets.map(function(v,i,a){return v.target}).join(' ');
- $scope.targetNamedBuild();
+ $scope.buildNamedTarget();
$scope.targetName = oldTargetName;
}
diff --git a/lib/toaster/toastergui/templates/managed_mrb_section.html b/lib/toaster/toastergui/templates/managed_mrb_section.html
index d4959a0..da5a3f7 100644
--- a/lib/toaster/toastergui/templates/managed_mrb_section.html
+++ b/lib/toaster/toastergui/templates/managed_mrb_section.html
@@ -53,8 +53,8 @@
<span class="lead{%if not MANAGED or not build.project%} pull-right{%endif%}">
Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a>
</span>
- {% if MANAGED and build.project %}
- <a class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%elif build.outcome == build.FAILED%}btn-danger{%else%}btn-info{%endif%} pull-right" onclick="scheduleBuild({% url 'xhr_projectbuild' build.project.id as bpi%}{{bpi|json}}, {{build.project.name|json}}, {{build.get_sorted_target_list|mapselect:'target'|json}})">Run again</a>
+ {% if build.project %}
+ <button class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%elif build.outcome == build.FAILED%}btn-danger{%else%}btn-info{%endif%} pull-right" onclick='scheduleBuild({% url 'xhr_projectbuild' build.project.id as bpi%}{{bpi|json}}, {{build.project.name|json}}, {{build.get_sorted_target_list|mapselect:'target'|json}})'>Run again</button>
{% endif %}
</div>
{%endif%}
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 05/12] toaster: newproject default release selection fix
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
` (3 preceding siblings ...)
2015-01-21 17:01 ` [PATCH 04/12] toastergui: "Run again" button in build pages Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 06/12] toastergui: fix all-targets redirect Alex DAMIAN
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
This patch fixes the default project release selection to
obey the DEFAULT_RELEASE name set in ToasterSettings.
[YOCTO #7035]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/toaster/toastergui/templates/newproject.html | 32 ++++++++++++++----------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/lib/toaster/toastergui/templates/newproject.html b/lib/toaster/toastergui/templates/newproject.html
index 512a8fa..0265564 100644
--- a/lib/toaster/toastergui/templates/newproject.html
+++ b/lib/toaster/toastergui/templates/newproject.html
@@ -22,18 +22,24 @@
<i class="icon-question-sign get-help" title="The version of the build system you want to use"></i>
</label>
<select name="projectversion" id="projectversion">
- {% for release in releases %}
- <option value="{{release.id}}"{%if projectversion == release.id %} selected{%endif%}>{{release.description}}</option>
- {% endfor %}
+ {% for release in releases %}
+ <option value="{{release.id}}"
+ {%if defaultbranch == release.name %}
+ selected
+ {%endif%}
+
+ >{{release.description}}</option>
+ {% endfor %}
</select>
- {% for release in releases %}
- <div class="row-fluid helptext" id="description-{{release.id}}" style="display: none">
- <span class="help-block span5">{{release.helptext|safe}}</span>
- </div>
- {% endfor %}
+ {% for release in releases %}
+ <div class="row-fluid helptext" id="description-{{release.id}}" style="display: none">
+ <span class="help-block span5">{{release.helptext|safe}}</span>
+ </div>
+ {% endfor %}
{% else %}
- <input type="hidden" name="projectversion" value="{{releases.0.id}}"/>
+ <input type="hidden" name="projectversion" value="{{releases.0.id}}"/>
{% endif %}
+
</fieldset>
<div class="form-actions">
@@ -82,11 +88,11 @@
$("#description-" + selected_release).show();
- $('select').change(function(){
- var new_release = $('select').val();
+ $('select').change(function(){
+ var new_release = $('select').val();
$(".helptext").hide();
- $('#description-' + new_release).fadeIn();
- });
+ $('#description-' + new_release).fadeIn();
+ });
})
</script>
</div>
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 06/12] toastergui: fix all-targets redirect
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
` (4 preceding siblings ...)
2015-01-21 17:01 ` [PATCH 05/12] toaster: newproject default release selection fix Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 07/12] toastergui: fix all targets page search Alex DAMIAN
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
Fixes the all targets redirect to /api/1.0/targets.
[YOCTO #7147]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/toaster/toastergui/templates/project.html | 2 +-
lib/toaster/toastergui/urls.py | 2 +-
lib/toaster/toastergui/views.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/toaster/toastergui/templates/project.html b/lib/toaster/toastergui/templates/project.html
index 67b2672..815c24c 100644
--- a/lib/toaster/toastergui/templates/project.html
+++ b/lib/toaster/toastergui/templates/project.html
@@ -98,7 +98,7 @@ vim: expandtab tabstop=2
</div>
<i class="icon-question-sign get-help get-help-blue" 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>
<p>
- <a href="{% url 'targets' %}">
+ <a href="{% url 'all-targets' %}">
View all targets
</a>
{% if completedbuilds.count %}
diff --git a/lib/toaster/toastergui/urls.py b/lib/toaster/toastergui/urls.py
index c74c7a6..8c3b5a8 100644
--- a/lib/toaster/toastergui/urls.py
+++ b/lib/toaster/toastergui/urls.py
@@ -77,7 +77,7 @@ urlpatterns = patterns('toastergui.views',
url(r'^layers/$', 'layers', name='layers'),
url(r'^layer/(?P<layerid>\d+)/$', 'layerdetails', name='layerdetails'),
url(r'^layer/$', 'layerdetails', name='layerdetails'),
- url(r'^targets/$', 'targets', name='targets'),
+ url(r'^targets/$', 'targets', name='all-targets'),
url(r'^machines/$', 'machines', name='machines'),
url(r'^projects/$', 'projects', name='all-projects'),
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 7a11bbd..6b4b5d9 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -2625,7 +2625,7 @@ if toastermain.settings.MANAGED:
mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
retval = _verify_parameters( request.GET, mandatory_parameters )
if retval:
- return _redirect_parameters( 'targets', request.GET, mandatory_parameters)
+ return _redirect_parameters( 'all-targets', request.GET, mandatory_parameters)
(filter_string, search_term, ordering_string) = _search_tuple(request, Recipe)
prj = Project.objects.get(pk = request.session['project_id'])
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 07/12] toastergui: fix all targets page search
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
` (5 preceding siblings ...)
2015-01-21 17:01 ` [PATCH 06/12] toastergui: fix all-targets redirect Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 08/12] toastegui: project page build selected targets Alex DAMIAN
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
This fixes the display of layers in all-targets page search/filtering
usage pattern by displaying layer-equivalence class.
The significant impact is the correct display of the list size
for search/filtering actions
[YOCTO #7051]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/toaster/toastergui/views.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 6b4b5d9..616b57c 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -2494,9 +2494,12 @@ if toastermain.settings.MANAGED:
queryset_all = _get_queryset(Layer_Version, queryset_all, filter_string, search_term, ordering_string, '-layer__name')
+ object_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset_all])
+ object_list = list(object_list)
+
# retrieve the objects that will be displayed in the table; layers a paginator and gets a page range to display
- layer_info = _build_page_range(Paginator(queryset_all, request.GET.get('count', 10)),request.GET.get('page', 1))
+ layer_info = _build_page_range(Paginator(object_list, request.GET.get('count', 10)),request.GET.get('page', 1))
context = {
@@ -2504,7 +2507,7 @@ if toastermain.settings.MANAGED:
'objects' : layer_info,
'objectname' : "layers",
'default_orderby' : 'layer__name:+',
- 'total_count': queryset_all.count(),
+ 'total_count': len(object_list),
'tablecols' : [
{ 'name': 'Layer',
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 08/12] toastegui: project page build selected targets
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
` (6 preceding siblings ...)
2015-01-21 17:01 ` [PATCH 07/12] toastergui: fix all targets page search Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 09/12] toastergui: minor fixes Alex DAMIAN
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
Fixing the action on the "Build selected targets" button.
Remove "build-button" duplicate id from the build page.
[YOCTO #7047]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/toaster/toastergui/static/js/projectapp.js | 25 ++++++++++++++++++++++---
lib/toaster/toastergui/templates/project.html | 6 +++---
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/lib/toaster/toastergui/static/js/projectapp.js b/lib/toaster/toastergui/static/js/projectapp.js
index 74471a1..bee3c56 100644
--- a/lib/toaster/toastergui/static/js/projectapp.js
+++ b/lib/toaster/toastergui/static/js/projectapp.js
@@ -337,8 +337,12 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
}
$scope.buildExistingTarget = function(targets) {
+ $scope.buildTargetList(targets.map(function(v,i,a){return v.target}));
+ }
+
+ $scope.buildTargetList = function(targetlist) {
var oldTargetName = $scope.targetName;
- $scope.targetName = targets.map(function(v,i,a){return v.target}).join(' ');
+ $scope.targetName = targetlist.join(' ');
$scope.buildNamedTarget();
$scope.targetName = oldTargetName;
}
@@ -733,12 +737,27 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
angular.element(id+"-opposite").toggle();
}
- $scope.selectedMostBuildTargets = function () {
- keys = Object.keys($scope.mostBuiltTargets);
+ /**
+ * Functionality related to "Most build targets"
+ */
+
+ $scope.enableBuildSelectedTargets = function () {
+ var keys = Object.keys($scope.mostBuiltTargets);
keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e });
return keys.length == 0;
}
+ $scope.buildSelectedTargets = function () {
+ var keys = Object.keys($scope.mostBuiltTargets);
+ keys = keys.filter(function (e) { if ($scope.mostBuiltTargets[e]) return e });
+
+ $scope.buildTargetList(keys);
+ for (var i = 0; i < keys.length; i++)
+ {
+ $scope.mostBuiltTargets[keys[i]] = 0;
+ }
+ }
+
/**
* Helper function to deal with error string recognition and manipulation
*/
diff --git a/lib/toaster/toastergui/templates/project.html b/lib/toaster/toastergui/templates/project.html
index 815c24c..fe3bcf2 100644
--- a/lib/toaster/toastergui/templates/project.html
+++ b/lib/toaster/toastergui/templates/project.html
@@ -92,7 +92,7 @@ vim: expandtab tabstop=2
<form class="build-form" ng-submit="buildNamedTarget()">
<div class="input-append controls">
<input type="text" class="huge span7" placeholder="Type the target(s) you want to build" autocomplete="off" ng-model="targetName" typeahead="e.name for e in getAutocompleteSuggestions('targets', $viewValue)|filter:$viewValue" typeahead-template-url="suggestion_details" ng-disabled="!layers.length"/>
- <button type="submit" id="build-button" class="btn btn-large btn-primary" ng-disabled="!targetName.length">
+ <button type="submit" class="btn btn-large btn-primary" ng-disabled="!targetName.length">
Build
</button>
</div>
@@ -289,7 +289,7 @@ vim: expandtab tabstop=2
<form ng-submit="buildNamedTarget()">
<div class="input-append">
<input type="text" class="input-xlarge" placeholder="Type the target(s) you want to build" autocomplete="off" data-minLength="1" ng-model="targetName1" typeahead="e.name for e in getAutocompleteSuggestions('targets', $viewValue)|filter:$viewValue" typeahead-template-url="suggestion_details" ng-disabled="!layers.length">
- <button type="submit" id="build-button" class="btn btn-primary" ng-disabled="!targetName1.length">
+ <button type="submit" class="btn btn-primary" ng-disabled="!targetName1.length">
Build </button>
</div>
{% csrf_token %}
@@ -306,7 +306,7 @@ vim: expandtab tabstop=2
</label>
</li>
</ul>
- <button class="btn btn-large btn-primary" ng-disabled="selectedMostBuildTargets()">Build selected targets</button>
+ <button class="btn btn-large btn-primary" ng-disabled="enableBuildSelectedTargets()" ng-click="buildSelectedTargets()">Build selected targets</button>
</div>
</div>
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 00/12] Toaster patchset
@ 2015-01-21 17:01 Alex DAMIAN
2015-01-21 17:01 ` [PATCH 01/12] toastergui: save cookie for orderby/page size settings Alex DAMIAN
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
Hello,
This is a Toaster patchset with bugfixes in the UI.
The patches have been reviewed on the toaster mailing list.
Can you please pull at your own convenience ?
Cheers,
Alex
The following changes since commit 909fa19f20e909820aa484967b7fe2a34d89ab49:
toaster: project configuration variables page (2015-01-21 14:20:55 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib adamian/20150121-submission-bb
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=adamian/20150121-submission-bb
Alexandru DAMIAN (11):
toastergui: save cookie for orderby/page size settings
toasterui: save event backlog to build
toastergui: fix duplicate IDs all builds page
toastergui: "Run again" button in build pages
toaster: newproject default release selection fix
toastergui: fix all-targets redirect
toastergui: fix all targets page search
toastegui: project page build selected targets
toastergui: minor fixes
toastergui: all projects column show/hide
toastergui: enable re-ordering when columns are hidden
Belen Barros Pena (1):
toastergui: fix the second 'view all targets' link
lib/bb/ui/buildinfohelper.py | 11 ++-
lib/toaster/toastergui/static/js/projectapp.js | 27 ++++++--
.../toastergui/templates/managed_mrb_section.html | 4 +-
lib/toaster/toastergui/templates/newproject.html | 32 +++++----
lib/toaster/toastergui/templates/project.html | 11 +--
lib/toaster/toastergui/templates/projects.html | 12 ++--
lib/toaster/toastergui/templates/targets.html | 2 -
lib/toaster/toastergui/urls.py | 2 +-
lib/toaster/toastergui/views.py | 80 ++++++++++++----------
9 files changed, 111 insertions(+), 70 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 09/12] toastergui: minor fixes
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
` (7 preceding siblings ...)
2015-01-21 17:01 ` [PATCH 08/12] toastegui: project page build selected targets Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 10/12] toastergui: fix the second 'view all targets' link Alex DAMIAN
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
This is a minor fixes patch.
- legacy sorting by "timespent" does not crash the builds pages
- missing xhr_configvaredit view in observer mode is added
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/toaster/toastergui/views.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 616b57c..f84b120 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -1743,7 +1743,8 @@ if toastermain.settings.MANAGED:
# helper function, to be used on "all builds" and "project builds" pages
def _build_list_helper(request, buildrequests):
# ATTN: we use here the ordering parameters for interactive mode; the translation for BuildRequest fields will happen below
- (pagesize, orderby) = _get_parameters_values(request, 10, 'completed_on:-')
+ default_orderby = 'completed_on:-'
+ (pagesize, orderby) = _get_parameters_values(request, 10, default_orderby)
mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
retval = _verify_parameters( request.GET, mandatory_parameters )
if retval:
@@ -1764,6 +1765,9 @@ if toastermain.settings.MANAGED:
ordering_params[0] = "build__machine"
if ordering_params[0] == "target__target":
ordering_params[0] = "brtarget__target"
+ if ordering_params[0] == "timespent":
+ ordering_params[0] = "id"
+ orderby = default_orderby
request.GET = request.GET.copy() # get a mutable copy of the GET QueryDict
request.GET['orderby'] = ":".join(ordering_params)
@@ -3204,6 +3208,9 @@ else:
def xhr_datatypeahead(request):
raise Exception("page not available in interactive mode")
+ def xhr_configvaredit(request):
+ raise Exception("page not available in interactive mode")
+
def importlayer(request):
raise Exception("page not available in interactive mode")
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 10/12] toastergui: fix the second 'view all targets' link
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
` (8 preceding siblings ...)
2015-01-21 17:01 ` [PATCH 09/12] toastergui: minor fixes Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 11/12] toastergui: all projects column show/hide Alex DAMIAN
2015-01-21 17:01 ` [PATCH 12/12] toastergui: enable re-ordering when columns are hidden Alex DAMIAN
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel
From: Belen Barros Pena <belen.barros.pena@intel.com>
The project page has 2 links to the all targets page.
The one at the top of the page is working, but not
the one further down. This patch sorts that out.
[YOCTO #7147]
Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
---
lib/toaster/toastergui/templates/project.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/toaster/toastergui/templates/project.html b/lib/toaster/toastergui/templates/project.html
index fe3bcf2..b8579e4 100644
--- a/lib/toaster/toastergui/templates/project.html
+++ b/lib/toaster/toastergui/templates/project.html
@@ -294,7 +294,8 @@ vim: expandtab tabstop=2
</div>
{% csrf_token %}
</form>
- <p><a href="{% url 'targets' %}">View all targets</a></p>
+ <p>
+ <a href="{% url 'all-targets' %}">View all targets</a></p>
<div ng-if="frequenttargets.length">
<h4 class="air">
Most built targets
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 11/12] toastergui: all projects column show/hide
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
` (9 preceding siblings ...)
2015-01-21 17:01 ` [PATCH 10/12] toastergui: fix the second 'view all targets' link Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
2015-01-21 17:01 ` [PATCH 12/12] toastergui: enable re-ordering when columns are hidden Alex DAMIAN
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
This patch fixes the show/hide in all projects page.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/toaster/toastergui/templates/projects.html | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/toaster/toastergui/templates/projects.html b/lib/toaster/toastergui/templates/projects.html
index 432f025..0396e25 100644
--- a/lib/toaster/toastergui/templates/projects.html
+++ b/lib/toaster/toastergui/templates/projects.html
@@ -23,12 +23,12 @@
<td><a href="{% url 'project' o.id %}">{{o.release.name}}</a></td>
<td>{{o.get_current_machine_name}}</td>
<td>{{o.get_number_of_builds}}</td>
- <td>{{o.get_last_outcome}}</td>
- <td>{{o.get_last_target}}</td>
- <td>{{o.get_last_errors}}</td>
- <td>{{o.get_last_warnings}}</td>
- <td>{{o.get_last_imgfiles}}</td>
- <td>{{o.updated|date:"d/m/y H:i"}}</td>
+ <td class="loutcome">{{o.get_last_outcome}}</td>
+ <td class="ltarget">{{o.get_last_target}}</td>
+ <td class="lerrors">{{o.get_last_errors}}</td>
+ <td class="lwarnings">{{o.get_last_warnings}}</td>
+ <td class="limagefiles">{{o.get_last_imgfiles}}</td>
+ <td class="updated">{{o.updated|date:"d/m/y H:i"}}</td>
</tr>
{% endfor %}
{% include "basetable_bottom.html" %}
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 12/12] toastergui: enable re-ordering when columns are hidden
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
` (10 preceding siblings ...)
2015-01-21 17:01 ` [PATCH 11/12] toastergui: all projects column show/hide Alex DAMIAN
@ 2015-01-21 17:01 ` Alex DAMIAN
11 siblings, 0 replies; 13+ messages in thread
From: Alex DAMIAN @ 2015-01-21 17:01 UTC (permalink / raw)
To: bitbake-devel; +Cc: Alexandru DAMIAN
From: Alexandru DAMIAN <alexandru.damian@intel.com>
This patch enables table re-ordering when a sorted-by column is hidden.
This is default functionality in toaster table pages, but was not
enabled for all columns in this situation.
[YOCTO #7125]
[YOCTO #7022]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
lib/toaster/toastergui/views.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index f84b120..e718ced 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -513,6 +513,7 @@ eans multiple licenses exist that cover different parts of the source',
'qhelp' : 'The name of the recipe building the package',
'orderfield' : _get_toggle_order( request, "recipe__name" ),
'ordericon' : _get_toggle_order_icon( request, "recipe__name" ),
+ 'orderkey' : "recipe__name",
'clclass' : 'recipe_name',
'hidden' : 0,
}
@@ -527,6 +528,7 @@ eans multiple licenses exist that cover different parts of the source',
'qhelp' : 'The name of the layer providing the recipe that builds the package',
'orderfield' : _get_toggle_order( request, "recipe__layer_version__layer__name" ),
'ordericon' : _get_toggle_order_icon( request, "recipe__layer_version__layer__name" ),
+ 'orderkey' : "recipe__layer_version__layer__name",
'clclass' : 'layer_name',
'hidden' : 1,
}
@@ -535,6 +537,7 @@ eans multiple licenses exist that cover different parts of the source',
'qhelp' : 'The Git branch of the layer providing the recipe that builds the package',
'orderfield' : _get_toggle_order( request, "recipe__layer_version__branch" ),
'ordericon' : _get_toggle_order_icon( request, "recipe__layer_version__branch" ),
+ 'orderkey' : "recipe__layer_version__branch",
'clclass' : 'layer_branch',
'hidden' : 1,
}
@@ -576,6 +579,7 @@ eans multiple licenses exist that cover different parts of the source',
'qhelp':'Location in disk of the layer providing the recipe that builds the package',
'orderfield' : _get_toggle_order( request, "recipe__layer_version__layer__local_path" ),
'ordericon' : _get_toggle_order_icon( request, "recipe__layer_version__layer__local_path" ),
+ 'orderkey' : "recipe__layer_version__layer__local_path",
'clclass' : 'layer_directory',
'hidden' : 1,
}
@@ -2527,6 +2531,7 @@ if toastermain.settings.MANAGED:
'qhelp': "Where the layer is coming from, for example, if it's part of the OpenEmbedded collection of layers or if it's a layer you have imported",
'orderfield': _get_toggle_order(request, "layer_source__name"),
'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
+ 'orderkey' : "layer_source__name",
'filter': {
'class': 'layer',
'label': 'Show:',
@@ -2675,23 +2680,27 @@ if toastermain.settings.MANAGED:
'hidden': 1,
'orderfield': _get_toggle_order(request, "section"),
'ordericon': _get_toggle_order_icon(request, "section"),
+ 'orderkey': "section",
},
{ 'name': 'License',
'clclass': 'license',
'hidden': 1,
'orderfield': _get_toggle_order(request, "license"),
'ordericon': _get_toggle_order_icon(request, "license"),
+ 'orderkey': "license",
},
{ 'name': 'Layer',
'clclass': 'layer',
'orderfield': _get_toggle_order(request, "layer_version__layer__name"),
'ordericon': _get_toggle_order_icon(request, "layer_version__layer__name"),
+ 'orderkey': "layer_version__layer__name",
},
{ 'name': 'Layer source',
'clclass': 'source',
'qhelp': "Where the target is coming from, for example, if it's part of the OpenEmbedded collection of targets or if it's a target you have imported",
'orderfield': _get_toggle_order(request, "layer_source__name"),
'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
+ 'orderkey': "layer_source__name",
'filter': {
'class': 'target',
'label': 'Show:',
@@ -2778,6 +2787,7 @@ if toastermain.settings.MANAGED:
'qhelp': "Where the machine is coming from, for example, if it's part of the OpenEmbedded collection of machines or if it's a machine you have imported",
'orderfield': _get_toggle_order(request, "layer_source__name"),
'ordericon': _get_toggle_order_icon(request, "layer_source__name"),
+ 'orderkey': "layer_source__name",
'filter': {
'class': 'machine',
'label': 'Show:',
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-01-21 18:22 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-21 17:01 [PATCH 00/12] Toaster patchset Alex DAMIAN
2015-01-21 17:01 ` [PATCH 01/12] toastergui: save cookie for orderby/page size settings Alex DAMIAN
2015-01-21 17:01 ` [PATCH 02/12] toasterui: save event backlog to build Alex DAMIAN
2015-01-21 17:01 ` [PATCH 03/12] toastergui: fix duplicate IDs all builds page Alex DAMIAN
2015-01-21 17:01 ` [PATCH 04/12] toastergui: "Run again" button in build pages Alex DAMIAN
2015-01-21 17:01 ` [PATCH 05/12] toaster: newproject default release selection fix Alex DAMIAN
2015-01-21 17:01 ` [PATCH 06/12] toastergui: fix all-targets redirect Alex DAMIAN
2015-01-21 17:01 ` [PATCH 07/12] toastergui: fix all targets page search Alex DAMIAN
2015-01-21 17:01 ` [PATCH 08/12] toastegui: project page build selected targets Alex DAMIAN
2015-01-21 17:01 ` [PATCH 09/12] toastergui: minor fixes Alex DAMIAN
2015-01-21 17:01 ` [PATCH 10/12] toastergui: fix the second 'view all targets' link Alex DAMIAN
2015-01-21 17:01 ` [PATCH 11/12] toastergui: all projects column show/hide Alex DAMIAN
2015-01-21 17:01 ` [PATCH 12/12] toastergui: enable re-ordering when columns are hidden Alex DAMIAN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.