toaster: fix file name collision

When toaster is used by multiple users on the same machine,
it is possible that files in /tmp have a name race.

This patch makes sure that the files have unique names.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
toaster: skip virtualenv when searching for django apps

If we are using a virtualenv in the current search path we end up trying
to add modules to the django apps list which do not have the correct
load path or are internal to other modules. Fix this by skipping the
virtualenv path.

[YOCTO #6896]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
toastergui: layer name correlation

This patch modifies how layers are identified and matched.

Layers were primarely organized by the source of layer information,
and Releases were separated by both layer git branches and originating
source of layer information. This setup prevented mixing layers from
different sources for a certain release, which didn't match the way
people use Yocto Project / bitbake.

This patch brings name-based indentification, where layers with the
same name are assumed to be equivalent, in the sense of being able
to substitute one another. To facilitate this identification to
humans, layers are differentiated by GIT URI instead of layer sources,
which was a rather arbitrary abstraction.

Additional changes include modification to models in order accomodate
for the new data structure, and to config file loading to match
the new toasterconf.json layout.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: Create libtoaster.js with some utility functions

Replace main.js with libtoaster. This can be a place for common
functionality for toaster. Calling it lib... makes it more obvious as
well as helps with code readability due to the namespacing.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: libtoaster: Add getProjectInfo utility function

Add a utility function to return a specified project's info/config
This re-uses the existing server code path for the project edit
except that it allows any project id to be used as a parameter

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: Add New Build Button feature

This adds a quick access dropdown menu feature for running builds on a
selected project.

[YOCTO #6677]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: project page remove additional tooltip for Change pencil

We have a global pencil icon tooltip so avoid two tooltips appearing by
removing them from the project page. This also means it's one less place to
update it.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
toaster: Tiny refinements to the new build button dialog

* Get rid of the display:block attribute for the "View
all projects" link, to stop it from firing when you
click outside (but next to) the link

* Give some margin to the incomplete configuration
alert

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
toaster: add no results state to all layers page

When you search for a layer and your search returns no results,
we should show you an alert and a link to show back all layers,
as we do in all other tables.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
toaster: fix dependencies dialog layout

Remove the bottom margin of forms inside dependencies
modal dialogs.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: do not show target if target name is empty

In the all targets table, all entries should have a target
name. If a target does not have a name, something has not
gone to plan, so don't show it.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>