Dave Lerner [Sat, 14 Mar 2015 14:00:15 +0000 (09:00 -0500)]
toaster: most-build-targets bug fixes
Fixes for the following for the "Most built targets" section of the
project page:
1) limit the number of most built targets to 5,
2) order the list of most built targets by build count,
3) select only those builds that had build status of 'fail', 'success',
or a BuildRequest of 'failed',
4) if there are no layers in the project then (on refresh) all of the
checkboxes in the 'Most built targets' list are disabled.
Note that per agreement with UI designer, the only sort on the most
target list is build count as described in (3) above; secondary sorting
is random.
[YOCTO #7177]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
In the layer details page, if the background
information about the layer that shows in the
right hand column is completely empty, remove
it altogether.
If only one release has been set up in Toaster,
any project you create defaults to that release,
and we simply don't show the release selection
menu when creating projects.
However, we were still showing the release information
in the project page, which would leave users wondering
what that release thing is since they never were
exposed to it.
This patch hides the release information in the
project page when only one release has been set
up in Toaster.
Dave Lerner [Wed, 18 Mar 2015 15:52:48 +0000 (10:52 -0500)]
toaster: alert fixes for project release change
When a project release changes, if there are layers included with the
project, then show the release branch name in the layer list. If there
aren't any layers in the project, then suppress the statement on the
changed layers.
[YOCTO # 7168]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
The 'Last build' column in the all projects table
was supposed to provide the completion time stamp
of the latest project build. Instead, it is showing
the time stamp of the latest project activity, which
includes:
* when the project was created and
* when the last build started
but not when you make a change to the configuration.
The result is that the column and the sorting are very
misleading. The template is set so that the time stamp
only shows when the project has builds (if 0 builds, no
time stamp is shown). But of course the sorting still
happens according to the value, even if it doesn't
display. The result is that, when you sort by the
'Last build' column, projects with no builds
appear listed between projects with builds, and you
have no idea why.
This patch:
* changes the column label
* its position in the table
* makes sure the time stamp always displays
* and adds help text
to reflect what the data actually means.
It also makes some small changes to other table
headings.
Dave Lerner [Wed, 11 Mar 2015 20:05:08 +0000 (15:05 -0500)]
toaster: layer-relative paths for config files
Change bitbake variables table to show the path to the file in which
the variable was defined using a layer-relative path instead of the
full path to the file.
The layer-relative path is found by matching on the full defining file
path with entries in a list of layer names, sorted in descending order,
and with 'meta' appended as a built-in layer to the end of the list.
Additional filters are used to reduce false matches, although even if
there is a false match, the actual path to the defining file will be
obvious and not misleading.
[YOCTO #7414]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
David Reyna [Thu, 12 Mar 2015 23:56:12 +0000 (16:56 -0700)]
toaster: insure IMAGE_INSTALL_append values have a space prefix
When the IMAGE_INSTALL_append value is not empty, it must have a space prefix
in order for the "append" operator to concatenate the values correctly, so we
enforce it in this variable's submit javascript.
[YOCTO #7394]
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Michael Wood [Fri, 13 Mar 2015 15:22:32 +0000 (15:22 +0000)]
toaster: tasks trigger the select related tables before ordering
In two of the cases the data is changed from a QuerySet to a sorted list
so we aren't able to use the QuerySet api at this point, moving it
before the data type is changed fixes this.
[YOCTO #7404]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Michael Wood [Fri, 13 Mar 2015 14:34:41 +0000 (14:34 +0000)]
toaster: Add cancel build to latest build section
Add this functionality to the common managed_mrb_section
Make sure we are using the correct version of this template in the
projects template and remove now redundant code.
[YOCTO #7351]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Dave Lerner [Thu, 12 Mar 2015 18:55:27 +0000 (13:55 -0500)]
toaster: leave cancel enabled for release change
When you click the 'change' icon to edit the project release, the
"cancel" button, should always be enabled so that the user can
return to the 'not editable' state at any time.
[YOCTO #7151]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Alexandru DAMIAN [Tue, 10 Mar 2015 18:31:45 +0000 (18:31 +0000)]
toastergui: dirinfo needs path separation
In the dirinfo URLs we use the "/" separator for directory
separation which coincides with the "/" separator in HTTP URIs.
This is not a problem, but we must not have consecutive "/"
characters as the web servers will conflate those - we add
a "_" delimitator to separate the Django managed URL from the
dirpath parameter, while maintaining the unique ID of REST urls.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toastergui: improve performance in the all targets page
This patch improves performance in the all targets display
by computing the preffered layer only for displayed targets,
instead of computing for all targets.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
We modify the project page to provide a consistent view of the
build errors. The display is now similar with the
managed_mrb_section and links point to the buildrequest
detail view.
[YOCTO #7188]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Paul Eggleton [Mon, 16 Mar 2015 10:35:10 +0000 (10:35 +0000)]
bitbake-layers: use stdout instead of stderr for logging
We use logger.plain() to produce actual output which needs to go to
stdout. We could use more advanced filtering (and probably should in
future) but for the moment let's just fix the regression.
Fixes [YOCTO #7458].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Tue, 10 Mar 2015 10:29:46 +0000 (10:29 +0000)]
cooker/server: Fix up 100% CPU usage at idle
The recent inotify changes are causing a 100% cpu usage issue in the
idle handlers. To avoid this, we update the idle functions to optionally
report a float value which is the delay before the function needs to be
called again. 1 second is fine for the inotify handler, in reality its
more like 0.1s due to the default idle function sleep.
This reverts performance regressions of 1.5 minutes on a kernel build
and ~5-6 minutes on a image from scratch.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The following workflow (whether accidentally or deliberately) would
previously not result in a checksum error, but would be helpful to do
so:
- Write a recipe with correct checksums
- Fetch the sources for this recipe using bitbake
- Change the checksums
Since the bitbake fetcher writes a done stamp after the initial download
and does not verify the checksums again (even if they are changed in the
recipe afterwards), the change of checksums is silently ignored.
Fix this without the overhead of computing the checksums from scratch on
every do_fetch by storing them in pickled format in the done stamp and
verifying that they still match those in the recipe.
Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Dave Lerner [Thu, 5 Mar 2015 23:01:55 +0000 (17:01 -0600)]
toaster: cached outcome download button
When a task is executed successfully without using saved-state cache,
then a button appears allowing the user to download the log file for
that task. This commit allows the user to download the log file for a
task that is completed by unpacking data from the saved-state cache, a
task with outcome 'Cached'. The same button 'Download task log' is
shown, which when pressed downloads the '_setscene' log file for that
task.
[YOCTO #7379]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Michael Wood [Mon, 2 Mar 2015 15:00:49 +0000 (15:00 +0000)]
toaster: Enforce unique layer names
We had some clever functionality to manage duplicate layer names by
using layer versions and new revisions, unfortunately this was too
opaque to the user.
[YOCTO #7337]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Dave Lerner [Wed, 25 Feb 2015 20:53:22 +0000 (14:53 -0600)]
toaster: commit id format on layers page
On the layers page, when a layer revision is a commit id instead of a
an upstream branch name, then follow the same format for displaying the
commit id as on the recipes page. That format is a button with the
truncated commit SHAID which when pressed expands to the full SHAID.
[YOCTO #7191]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toastergui: bring back base URLs for pages that need them
Some URLs, although invalid on their own, are used in JS to
build valid page pointers. Previous patch removed two of these URLs,
breaking the display of several patches.
This patch re-adds these URLs with different names, and returns
400 Bad Request empty pages on them, which is consistent with the
intended usage of these URLs.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
David Reyna [Fri, 27 Feb 2015 03:46:23 +0000 (19:46 -0800)]
toaster: hide special code for core vars not present, disable add button
Hide the special config variable management sections when the respective
variables are not present. Disable the variable add button after a
variable is added so that blank values cannot be added, and also when a
variable name managed in the project detail page (e.g. BBLAYERS and MACHINE)
is entered.
[YOCTO #7246]
[YOCTO #7371]
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Dave Lerner [Thu, 26 Feb 2015 20:29:23 +0000 (14:29 -0600)]
toaster: layer rev tooltip only if necessary
On the heading for the layer detail page, only show a tool tip on the
heading revision branch/shaid field if the string is too large to fit
in the 13 character field. That is, don't show a hovering tool tip
with exactly the same string that is shown without the tip.
[YOCTO #7312]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Dave Lerner [Tue, 24 Feb 2015 22:14:41 +0000 (16:14 -0600)]
toaster: add sort, search, paging to recipe package page
When selecting the packages tab on a recipe detail page, the page now
includes:
column sort on package name and size columns,
search on the package name, and
pagination.
Column sort is added by splitting the recipe view/html for a recipe's
package list into a new url path, view name and template, so that
the sorting routine, views.reload_params(), interfaces similar to other
views.
Search, sorting, and pagination are implemented for this detail page
using three new templates.
templates/detail_pagination_bottom.html
templates/detail_search_header.html
templates/detail_sorted_header.html
views.recipe() is optimized since the recipe's package list is no
longer needed by the recipe template, only the recipe's package count
is required for the first page.
The recipe view and template also changes to support tabbing to the
right context on the recipe detail page from the recipe-package page.
[YOCTO #6154]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Alexandru DAMIAN [Mon, 23 Feb 2015 19:24:58 +0000 (19:24 +0000)]
cooker: read file watches on server idle
The inotify facility monitoring changes to the config files
could be overwhelmed by massive changes to the watched files
while server is running.
This patch adds verification the notification watches to the
server idle functions, in addition to the cooker updateCache
command which executes only infrequently, thus preventing
overflowing the notification buffer.
[YOCTO #7316]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Alexandru DAMIAN [Thu, 26 Feb 2015 21:41:58 +0000 (21:41 +0000)]
toasterui: do not use transactions if the database autocommits
Some databases, notably the SQLite3 adapter, force autocommits even if
the autocommit is turned off. The behavious is tracked in this bug:
http://bugs.python.org/issue8145#msg109965
Django refuses to work with autocommit off in this case, so we have
to take the same precautions when using manual transaction support.
[YOCTO #7363]
[YOCTO #7365]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alexandru DAMIAN [Thu, 26 Feb 2015 21:41:57 +0000 (21:41 +0000)]
toaster: order layers with same priority
When we have multiple layers with the same priority, we
need to order them by date, newest first. The layer version
ID is a complete ordering by recent-ness, so it is suitable.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alexandru Damian [Tue, 24 Feb 2015 17:20:58 +0000 (17:20 +0000)]
toastergui: performance improvements in task details page
This patch brings better forward and reverse dependency computing in
tasks page (offloading python code to the database), as well as
replacing the recursive depth-first covered-by tree search with
breadth-first search.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
toasterui: improving the latest builds consistency
We have 2 pages where we have a 'latest builds' section:
the 'all builds / all projects' page and the 'project'
page. Unfortunately, we are currently using different
code base in both, which means that some inconsistencies
between the two in behaviour and presentation have sneaked
in.
This patch addresses some of such inconsistencies.
Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The revision label was missing the projec-form class (which
controls the spacing in the form), and the revision text
field was a bit too long, so changed it from span4 to
span3.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Chong Lu [Fri, 20 Feb 2015 17:52:43 +0000 (17:52 +0000)]
bitbake-layers: add ability to fetch layers and their dependencies from layer index
Add a command to query layer dependencies from a layer index such as the
OpenEmbedded Layer Index at http://layers.openembedded.org. Fetches the
layer and its dependencies and adds them into conf/bblayers.conf.
[YOCTO #5348]
Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Eggleton [Fri, 20 Feb 2015 17:52:41 +0000 (17:52 +0000)]
bitbake-layers: refactor to use argparse instead of cmd
This makes help formatting and option handling a lot more standardised
and allows us to drop a bunch of code. We also gain slightly more
straightforward error handling.
One side-effect however is that the old subcommand syntax using
underscores is no longer supported. The dashed form has been supported
(and displayed in the help text) for quite a while now so I wouldn't
imagine that will be much of an issue.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Michael Wood [Wed, 18 Feb 2015 15:18:51 +0000 (15:18 +0000)]
toaster: importlayer Remove description input field
This wasn't required or working due to a typo and adds ambiguity between
the summary and description. The correct method for changing the description
or summary is via the layerdetails page.
[YOCTO #7190]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>