ConfHandlerr: Use full path in variable history

When an evaluation was made for a configuration file the path to the
file was saved as a relative one. The change in this commit will save the
location as an absolute path. This way the user will have full information
regarding the location of the file where a variable was changed and the
line withing the file.

[YOCTO #5562]

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
toaster: measure task duration with server-side timestamps

The buildstats and toaster use separate time markers to measure the
duration of task execution. This causes a mismatch in the time
measured by buildstats class and the time measured in toaster.

The solution implemented here is to timestamp the creation of
every TaskBase event on the bitbake server side and calculate
the execution duration as the difference between creation time
of TaskSucceeded and TaskStarted events.

Based on an original patch by Marius Avram.

[YOCTO #5485]

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: Add link to the Toaster manual

The Toaster manual will live at
http://www.yoctoproject.org/documentation/toaster-manual
and should open in a new tab / window.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Remove trailing spaces from 'name'

Those extra spaces were showing in the heading of the
filter modal dialogs.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Change "Package version" to "Version"

We use "Version" everywhere else.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Remove extra space in the breadcrumb

For builds with more than one target, remove the extra
space between the '+' and the number of targets - 1.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Set display of "Cache attempt" column

The "Cache attempt" column should display by default in the
tasks table, but should be hidden by default in the time,
CPU and Disk I/O tables.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Amend failed tasks behaviour

In the builds table, when a build reports more than one
failed task, the number of failed tasks should be a link
to the tasks table with the failed tasks filter applied.
Amend the URL to include the filter.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: filter out setscene tasks in recipe details

Filter out any *_setscene tasks in recipe details page, as
they are not relevant.

[YOCTO #5913]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
toaster: add jquery treetable plugin

This commit includes the critical javascript and css files
downloaded from http://plugins.jquery.com/treetable version 3.1.0.
The following is from the author's README.md included with
the license files in the directory static/jquery-treetable-license.

"jQuery treetable is a plugin for jQuery, the 'Write Less, Do More,
JavaScript Library'. With this plugin you can display a tree in an
HTML table, e.g. a directory structure or a nested list...
Download the latest release from the jQuery Plugin Registry or grab
the source code from Github. Please report issues through Github
issues. This plugin is released under both the MIT and the GPLv2
license by Ludo van den Boom...
See index.html for technical documentation and examples. The most
recent version of this document is also available online at
http://ludo.cubicphuse.nl/jquery-treetable. An AJAX enabled example
built with Ruby on Rails can be found at
https://github.com/ludo/jquery-treetable-ajax-example."

Author: Ludo van den Boom

The relevant files were moved to the static/js and static/css
directories to match the existing javascript and css toaster
deployment model.

The applicable licenses and the README are in
static/jquery-treetable-license.

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
toaster: image information views

[YOCTO # 4346]

When a target image is selected, this commit adds to the toaster
project a two-tabbed page that shows
1) 'packages included' a table of packages included in the image
(see target.html), and
2) 'directory structure', the target image's file system directory
and detailed information showing the source of each file in the
directory table (see dirinfo.html).

The directory structure tab relies on the open source jQuery plugin
jtreetable which provides hierarchical table expansions and contractions
of the directory entry tables as the user drills down into directories.

A file of jtreetable styles that are compatible with other toaster styles
is provided included as css/jquery.treetable.theme.toaster.css. The
complete unaltered jtreetable plugin is added via a separate commit.

This work was developed base on the bugzilla specification number 4346
and the document "Design 1.1 Image information" attached to that report.

Whitespace and typo fixes from Alex Damian.

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: fix task elapsed time calculation

This patch restricts the elapsed calculation to just
the events that have the "time" parameter set.

This fixes an error where data was lost due to an exception
where invalid dictionary lookups were made on the wrong
events.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
fetch2.URI: Coerce urlparse to use netloc for all schemes

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
tests.fetch: Remove debug assert

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2.URI: add support for query parameters

This change introduces the .query property of the URI class. It is a
read/write dict of the parameters supplied in the query string of the
URI. E.g.:

  http://example.com/?foo=bar => .query = {'foo': 'bar'}

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2.URI: Support URIs with both query strings and params

There is a case in meta-intel where a SRC_URI contains both a query string and
URI parameter:

 https://edc.intel.com/Download.aspx?id=6190;downloadfilename=LIN_IEMGD_1_14_GOLD_2443.tgz

Python's urlparse thought the URI parameters were part of the query parameter
value, but in the bitbake context this is obviously not the case. As bitbake's
usage isn't really RFC compliant, we have to extract and remove the URI parameters
*before* urlparse sees the URI.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2.URI: Set username/password should not change the other

When setting the username after already having set the password, the password
was unexpectedly reset. This change fixes this issue and introduces unit tests
to make sure it doesn't happen again.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob: output filenames based on initial recipe name

If a recipe for an image was edited from the hob interface the name
of the files outputed in the <build_dir>/tmp/deploy/images/${MACHINE}/ and the
temporary recipes from <build_dir>/recipes/images/ contained only the
generic name "hob-image". From now on both the temporary recipes and
the output from the deploy/ directory will contain the name of the base
recipe appended by the "-edited" suffix, in the case when a base image recipe was
edited. The base recipe can be a standard recipe (e.g core-image-minimal) or
a custom created and saved by the user.

For example, if core-image-minimal is edited the deploy/ directory will contain
core-image-minimal-edited-20140318-140428-qemux86.ext3 and the recipes/images/
directory will contain the recipe core-image-minimal-edited-20140318-140428.bb.

[YOCTO #5002]

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
toaster: Revert "added file types to the Outputs column in the build page"

This reverts commit d40ac966b22e1fa1956d8f2fe37fd55fa670e88f.

Sloppy review on my part let the original patch in, when it should've
been rejected because the filter tags should have no knowledge of the
object system.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: warn new filter replaces existing filter

If the user pop-ups a filter dialog when another filter is already
active, warn the user that the new filter would replace the
previous filter.

[YOCTO #5960]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>