aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster
AgeCommit message (Collapse)Author
2017-10-10toaster/highlight.pack.js: Fix corrupted fileyocto-2.42017-10-rocko1.36.0Richard Purdie
The newly added file in the last commit was corrupted, fix it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-10toaster: Remove prettifyDavid Reyna
Remove "prettify.js" and "prettify.css" due to license issues with Apache2. Replace with "highlight.pack.js" with its BSD3 License. [YOCTO #12206] Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Brian Avery <brian.avery@intel.com> Signed-off-by: David Reyna <david.reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-06toaster: build missing toaster.conf settingsDavid Reyna
The bitbake server changed such that the Toaster custom settings from 'toaster.conf' and 'toaster-bblayers.conf' that were set when the '--server-only' mode was started were lost when the subsequent build request happened, resulting in builds missing all custom changes. This patch asserts those environment settings in both server calls. [YOCTO #12194] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-17toaster: allow dots in user path namesDavid Reyna
The dot '.' character should be allowed in the user paths for local non-git layers, DL_DIR, and SSTATE_DIR. [YOCTO #10650] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-17toaster: reserve HEAD from imported layersDavid Reyna
The HEAD reference in Toaster layers are reserved for the "Local Yocto Project" layers, stored at the top directory. Imported layers are not allowed to use this since they are managed differently - for example the 'remotes' will collide. Fix the add layer handler to not drop the data fields when it is a git repo. Explicitly inform the user when an internal Toaster error is returned via AJAX, so that they know why clicking the layer add button did not do anything. [YOCTO #9924] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11toaster: update pyro to rocko as stable releaseDavid Reyna
Update the Toaster stable release selection to 'Rocko' and the bitbake version to '1.36'. [YOCTO #12037] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11toaster: handle early exceptionsDavid Reyna
Stop the pending build and report to the user if there is an internal exception due to a git error, a bitbake server error, or if the server-only mode halts due to for example a user syntax error in a layer or recipe. These exceptions were not caught because they occure before the normal toastergui processing was started. [YOCTO #12056] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-04toaster: edit column list not sortedDavid Reyna
The list of columns in the many 'Edit Columns' pop-ups became unsorted with the 'Toaster Table' implementation. These entries need to be gathered and sorted in the column processing. [YOCTO #12004] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-04toaster: recipe links broken for default layersDavid Reyna
The default layers are missing the recipe link definitions in the fixture files, and because they are predefined they do not get the updated information from the Layer Index. [YOCTO #12006] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-04toaster: missing ToasterSetting importDavid Reyna
The file "lsupdates.py" is missing the import of 'ToasterSetting', and that breaks setting up and updating Toaster and its database. [YOCTO #12036] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-04toaster: set default pokydirname if no external layersOlaf Mandel
If no external layers are defined, pokydirname is not set. Rectify this by taking the 'be.sourcedir' as the pokydirname. [YOCTO #12015] Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-04toaster: debug message for lists layers missing separatorsOlaf Mandel
One of the debug messages during build contains a list of all layers but without spaces or other separators between them. Use pformat instead. [YOCTO #12014] Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-04toaster: Order column in Tasks selectableAwais Belal
The build page provides tables related to performance that cover build time, CPU time and disk IO. The "Edit columns" drop down does not allow selection of the Order column and makes it hidden as well which is not accurate from user interaction point of view. This patch enables the hideable property for the Order column so it is hidden by default but the user can enable it through the drop down if need be. [YOCTO #11040] Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-04toaster: display error when the fstype select is emptyDavid Reyna
There must be at least one FSTYPE selected in the Toaster bitbake variable editor page. When the user deselects all the "Save" button gets disabled, but the error message is missing. [YOCTO #8126] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-22toaster: support custom Layer Index URL and fixture overrideDavid Reyna
Toaster needs to allow the custom fixture file to specific an alternate Layer Index URL for users that host their own Layer Index Server via the 'CUSTOM_LAYERINDEX_SERVER' in 'custom.xml'. Toaster also needs to allow the ability to completely override the default fixture files, otherwise that content can leak into the custom environment (by default the custom fixture is an overlay that cannot remove existing values from the default fixture) via the 'CUSTOM_XML_ONLY' value in 'setting.xml'. [YOCTO #11938] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-22Toaster: custom start and stop actionsDavid Reyna
Toaster needs the ability to allow custom extensions to execute when Toaster is started and stopped. Toaster will look for a custom extension script in the fixtures directory and execute any applicable hooks. [YOCTO #11938] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-22toaster: custom image updates and original creationDavid Reyna
When Toaster removes a package from a custom image, it must also always remove the advised reverse-dependent recipes. Similarly, when adding a package it must always add its advised the packages it depends on. This code must be un-indented so that it applies to all respective added or removed packages. Toaster normally waits until a new custom image is built before creating the custom layer and the recipe. However, an intermediate different build can fail because the recipe has already been added to the project, so the image's default recipe must be created when the image is created. [YOCTO #11915] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30toaster: move to new bitbake xmlrpc defaultDavid Reyna
The bitbake option "-t SERVERTYPE" was deprecated and can be removed since the desired XMLRPC listener now the default. The bitbake server port cannot be "-1" anymore and must be explicitly passed. There is a race condition for the bblock file to not only be created but to actually be populated, so a delay test loop is required (usually only one pass). The 'xmlrpcclient' is now the class that allows Toaster to for example kill builds. The events for populating the recipe parsing now either show only the final result or are skipped entiredly, so the progress calculator needs to be changed to not block on the parsing phase. [YOCTO #11851] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30toaster: enable remote HTTP API for status aggregationDavid Reyna
Add support for Toaster aggregators with a set of api links that return JSON data for (a) builds in progress, (b) builds completed, (c) specific build data, and (d) an is-alive health ping link. [YOCTO #11794] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21toaster: trim build target inputDavid Reyna
Trim the entered built target value so that Toaster is not confused with no real targets nor a ghost second target. [YOCTO #11727] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21toaster: set clone progress default to offDavid Reyna
Set the clone progress to be off by default for the benefit of command line projects and 'Local Yocto' builds. For Toaster managed projects that do use the clone feature the clone progress status is already explicitly set by the existing code and thus displayed. [YOCTO #11744] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21toaster: include setscene in task progressDavid Reyna
Change the task progress counting from the task order field which excludes setscene to the task completion field which counts all completed tasks regardless of type. [YOCTO #9971] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27toaster: test 'commit' first in get_vcs_referenceDavid Reyna
The 'commit' value should be tested and used first when resolving the ref for a layer, since that is an explicit override in each layer index 'layeritem' record. If should take precedence over more-global 'branch' and 'release' values, instead of being last. [YOCTO #11515] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27toaster: large package set breaks sqlite queryDavid Reyna
If you build a project with a large package set, you will get a crash in "views.py" when the dashboard attempts to fetch the package set to calculate the package count and size. This is a sqlite limitation, and it fails with as few as 1220 packages. [YOCTO #11717] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27toaster: Add distro selection supportDavid Reyna
Add the ability to select a distro in the project page, based on values from the Layer Index. Add a distro selection page with the add layer feature, based on the add machine page. [YOCTO #10632] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27toaster: git clone progress barDavid Reyna
If a project has a lot of additional layers, the build may appear to hang while those layers are checked out. This patch adds a clone progress bar that is visible before the parsing progress appears. [YOCTO #9916] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27toaster: address Django-1.10 API deprecationsDavid Reyna
There are four main API deprecations in Django-1.10: (a) String view arguments to url() must be replaced by the explicit class reference (b) New TEMPLATES stucture in settings.py consolidates TEMPLATE_DIRS, TEMPLATE_CONTEXT_PROCESSORS, TEMPLATE_LOADERS, TEMPLATE_STRING_IF_INVALID, and TEMPLATE_DEBUG (c) patterns() wrapper in url() is removed, with urlpatterns now a simple list (d) NoArgsCommand in commands() must be replace by BaseCommand, and handle_noargs() changed to handle() Also, the Django version checker must be updated to accept two digit sub-version numbers (e.g. "1.8" < "1.10") [YOCTO #11684] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16toaster: get_last_build_id not called correctlyDavid Reyna
The method "get_last_build_id" missing the "()" in several calls. This has been failing silently with Django 1.8 but intermittently crash with Django 1.9. [YOCTO #11570] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16toaster: add ID's to build menu linksDavid Reyna
Add IDs to the build page menu lines, for example "Tasks", "Recipes", "Time", "CPU Time", "Disk I/O", and so forth. This will support test automation. [YOCTO #11337] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16toaster: add ID's to navigation linksDavid Reyna
Add IDs to the navigation bar links "All builds", "All projects", and "Documentation. This will support test automation. [YOCTO #11335] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-20toaster: move release lookup from morty to pyroyocto-2.32017-04-pyro1.34.0David Reyna
Move the release name lookup into the layer index from 'morty' to the 'pyro'. Move the bitbake branch from 1.32 to 1.34. [YOCTO #11377] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10toaster: fix add layer button for MachinesDavid Reyna
Fix a missing close quote in the layer add button, and use the layer index for the xhr_layer call. [YOCTO #11213] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10toaster: Toaster filters are brokenDavid Reyna
A syntax fix inadvertantly broke the Toaster filter feature. [YOCTO #11317] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-06toaster:test:Create selenium tests for project dashboard pageDavid Reyna
Added 7 new testcases that verify the UI interface and elements of the project detail page. This testcases can be found on testopia in the links: Verifies that the project is created and that you get redirected to the configuration page https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1514 Verifies that the left side bar menu, all links are clickable and they show on the UI https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1515 Verifies that after creating a project the default project configuration is created https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1516 Verifies that the default machine is set, once creating the project https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1517 Verifies the built recipes information of the project detail page https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1518 Verifies the default release information of the project https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1519 Verifies that the default layers are assigned to the project https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1520 Verifies that the links to the Configuration, Builds, Import layer and New Custom Image are present and work. [YOCTO #9808] Signed-off-by: Libertad Cruz <libertad.cruz@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-06toaster: toastergui: implement machine name validationBelal, Awais
Valid machine names cannot include spaces anywhere in the name and doing so will result in a build failure. This implements a mechanism to alert the user against such a misconfiguration and does not allow input of such machine names. [YOCTO #8721] Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-13bitbake: toaster: add wic.bmap support to toasterSujith H
Add wic.bmap file extension support for toaster Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-13toaster: move sqlite database to TOASTER_DIRbrian avery
The toaster.sqlite database was located in TOASTER_DIR/build. This meant that if you named your build directory something else (like cow), Toaster would fail to make/find the database. TOASTER_DIR is on the whitelist unlike BUILDDIR and we need to be able to write there anyway given our current layout so this should not disrupt anything. [YOCTO #9992] Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: views Remove old code that converts template context to JSONMichael Wood
Remove the template context to JSON decorator function as this is deprecated by having a proper REST API. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: js test Update js tests to use correct url for layer RESTMichael Wood
Update js tests so that we use the new Layer REST API. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: Switch front end to use Layer get REST APIMichael Wood
Switch the front end to use the proper REST API for retrieving layer information. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: typeaheads Layers add url to layer REST API to the layerMichael Wood
Add the url to the Layer typeahead so that this can be used later on by the front end code to look up layer details. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: api Add GET REST API for Layer informationMichael Wood
Add a get API for returning information about layers. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: importlayer Add git revision typeahead to that input fieldMichael Wood
Add the front end mechanism to load the typeahead for the git revision field on importing a layer. Also fix one indentation issue and update the js test. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: typeaheads Add a git revisions suggestionsMichael Wood
When we're importing a layer it's useful to suggest available git revisions of the layers. This uses git ls-remote to fetch the revisions and then filter on this. Caching is added for this typeahead to avoid having to fetch this information multiple times in a single session. [YOCTO #8429] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: typeaheads widgets Fix flake8 issues and remove redundant codeMichael Wood
Fix flake8 issues and remove redundant __init__ function definitions from typeaheads (likely a copy and paste error). Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: tests Update import layer test to use new Layer add apiMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: importlayer Use new layer add APIMichael Wood
Switch the importlayer.js to use the new REST API for importing a new layer. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: api Add layer Add apiMichael Wood
Add layer adding REST api and remove old views method. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: models Layer_Version get_detailspage_url optional project_idMichael Wood
Allow passing none as the project id, this is convenient for layers which belong to projects already and therefore have their own project field. Add documentation string to function Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: models Layer fix whitespaceMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>