toaster: use http proxies to fetch data

Under some network configurations http proxies are used
for Internet access. This patch makes Toaster obey
the http_proxy environment variable when fetching
information from layer indexes.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: base Only show New Build button when there are > 0 projects

Only show new build button if we have defined at least one project as we
can't select a project to build against if there are no projects created
yet.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
toastergui: update layer search criteria

In order to accomodate the designs around imported layer,
we add a "project" field for in the layer versions.

The field must be set if and only if the layer is manually
imported in the project. This will prevent information leakage
between different projects.

The views have been updated to perform relevant layer queries
in a single location.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toastergui: do not show project info in interactive mode

The most recent builds section showed the project name and the Run Again
buttons regardless whenever the Toaster was in interactive or managed
modes. These widgets have no meaning in interactive mode, and this
patch disables the widgets if toaster is not running in Managed mode.

[YOCTO #6776]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: display Toaster exceptions and other fixes

Changing ToasterUI to log toaster exceptions on a different level than
build errors.

Updating the build dashboard to show Toaster exceptions.

We add extra logging to console for exceptions.

Fixed a problem where packages database entries were created instead of
being looked up in the database, conficting with entries created to
satisfy dependency information.

Toaster now checks for invalid states at startup and performs needed
cleanups.

Removed loading reference to jquery-ui.min.css as we do not have this
file.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toasterui: fix layer identification for managed builds

If we have a managed build, we match the layers used for build
with the layers configured for project, as we know where the layers
are coming from

[YOCTO #6962]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: fix loadconf path calculation

Fixing the path calculation for local layer sources, as the
path need to be absolute.

Added tests for pieces of code.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toastergui: new project page

Patch that brings in to new project page according to specifications.

[YOCTO #6596]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: fix errors and warnings display

In the 'Latest builds' section of the project page,
show number of errors and number of warnings as we
show them in the all builds page.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: make 'latest builds' section consistent across pages

Make sure that the 'latest builds' sections in the all builds
page and the project page are identical:

* no icon to represent build outcome
* remove machine name
* show date only when the build is more than 24 hours old
* same date and time format

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: fix padding of build notifications

In managed mode, we show the name of the project in the build
notifications of the all builds page. The way we show the
project requires modifying the default padding of the .alert
class. This patch makes sure the padding modification is
only applied in managed mode, i.e., when the project name
needs to be shown.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toasterui: Compatibility patch for daisy and dizzy

This patch brings in changes that allow a toasterUI coming in
from 'master' branch to record data from a 'daisy' or 'dizzy'
bitbake server.

This is needed to allow Toaster to record builds running
on older branch releases.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: release name consistency

Small changes to the project, new project and all layers
pages to ensure consitency in release naming across the
interface.

The changes are:

* In the new project page, change the label 'release version' to
'release'

* In the new project page, sort the releases in the dropdown menu
in ascending alphabetical order

* In the new project page, remove the release name that was
showing between brackets after the release description in the
dropdown menu

* In the project page, make sure the release information
shows the release description field instead of the release name,
to keep consistency with the new project page

* In the all layers page, provide some help text for the branch 'HEAD'

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
toaster: remove the word 'project' from layers and machine

Remove the word 'project' from the 'Layers' and 'Machine'
sections of the project page, following feedback from the
QA team, who suggested that the word 'project'
raised questions regarding the scope of the configuration,

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
fetch/wget: latest_versionstring create _init_regex method for have one place when regex'es are defined

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch/wget: _init_regexes rename variables to be more consistent and move dirver_regex into it

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch/wget: Improve REGEX_URI handling

Latest version string only try to find latest directory when REGEX_URI
isn't specified to avoid unnecessary processing and makes code easier

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch/wget: latest_versionstring add package_custom_regex_comp

package_custom_regex_comp is built with the current package name and
then used to search upstream version this reduces custom regex'es in
sites that have different packages in the same directory.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch/wget: latest_versionstring improvments in searching

Validate if package contain version string if not return the current
version cases for spectrum-fw and corpus recipes.

_check_latest_version return the latest version available don't
take into account the current version previous this only return
the upstream version if it greater than the current version.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch/wget: latest_versionstring remove unnecessary usage for name in version comparision

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>