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>