summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
Commit message (Collapse)AuthorAgeFilesLines
...
* bitbake: toaster: add Provider modelEd Bartosh2016-01-111-0/+5
| | | | | | | | | | | | | Added new model Provider and a foreign key 'via' to link Recipe_Dependency to it. [YOCTO #6169] (Bitbake rev: e45fff6314741d46e2549b2f72ed380cbbb95593) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: monkey patch QuerysetEd Bartosh2015-12-141-0/+30
| | | | | | | | | | | | | | | | Fixed 'database is locked' issue by monkey patching django QuerySet methods. The actual patching places were found by bisecting Django codebase. This commit should be removed after Django is fixed if it's fixed at all. (Bitbake rev: 175411bf05423b1892c7928c2b928843b39645f0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: work around 'database is locked' errorEd Bartosh2015-12-141-1/+19
| | | | | | | | | | | | | | When sqlite can not cope with a stream of 'insert' queries it throws 'database is locked' exception. Wrapping model.save in transaction.atomic context and repeating the call should solve this issue. (Bitbake rev: eb305308ca8f6228c6f52dac1bd941f29c7e5eb6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fixed format stringsEd Bartosh2015-12-141-3/+3
| | | | | | | | | | | | | | Printing id as a number breaks toaster if object is not saved yet as id/pk is None in this case. Changed format spec to print id as a string in __str__ and __unicode__ methods of Build, Task and LayerVersion models. (Bitbake rev: d5ca2bae623db214764324da5c9e4dac6beef760) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Remove compatible_layerversions() methodElliot Smith2015-12-141-18/+3
| | | | | | | | | | | | | | | | | Remove compatible_layerversions() and replace calls to it with calls to get_all_compatible_layer_versions(). The sorting done in compatible_layerversions() is not relevant, and the code can be simplified by using get_all_compatible_layer_versions(). [YOCTO #8364] (Bitbake rev: 7bca51277314f7c0b6ee0e0d470327dfd60d37fe) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: rename get_query_set -> get_querysetEd Bartosh2015-12-141-4/+4
| | | | | | | | | | | Renamed get_query_set to get_queryset as get_queryset causes deprecation warning in Django 1.7 and is deprecated in Django 1.8 (Bitbake rev: ef8b399dccd413070e32ce05e013337ea01fa64d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Create default project with get_or_create* methodElliot Smith2015-12-141-8/+15
| | | | | | | | | | | | | | | | Rather than maintain data as part of the migrations (as was done for the default project previously), create the default (cli builds) project on demand as a by-product of getting it from the database. [YOCTO #8364] (Bitbake rev: 5fd8e90ab9b81d1bd0d301bc1c91228ecbbea74b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: CustomImageRecipe add search_allowed_fields to this modelMichael Wood2015-12-071-0/+1
| | | | | | | | | | | In order to search the model from the UI some fields must be nominated as searchable. (Bitbake rev: 2558729b4c248a2fa5a11d877bc42cb05a30602e) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Fix get_number_of_builds to count all apart from ↵Michael Wood2015-11-161-5/+4
| | | | | | | | | | | | | IN_PROGRESS The count of a project's builds should not include those which are currently in progress. (Bitbake rev: a981700701c41c7bbb6a9778e95f691278c5c294) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Fix restrictive LogMessage message lengthMichael Wood2015-10-271-1/+1
| | | | | | | | | | | | | | Log messages can be quite long so use a TextField rather than a char field with max length of 240. mySQL is especially picky about field lengths and will cause an exception if the log is too long. [YOCTO #8475] (Bitbake rev: 349119f44cdad240dda7f4db45992e2539e1416f) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Remove Toaster exceptions section of build dashboardElliot Smith2015-10-161-4/+0
| | | | | | | | | | | | | | | | | Fatal build errors were displayed as exceptions, and highlighted with less severity than they deserved. Roll back to treating Toaster exceptions as errors by removing the toaster_exceptions member on Build objects and displaying EXCEPTION events in the errors section on the dashboard. [YOCTO #8320] (Bitbake rev: 59197320bdcefddf06084e871f1b5b21b21cbb63) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Record critical errorsElliot Smith2015-10-161-7/+13
| | | | | | | | | | | | | | | | | | | | Critical errors (where a build failed for reasons of misconfiguration, such as a machine being specified which is not in a project's layers) were being ignored (only log records up to ERROR level were being logged to Toaster's db). This meant that the build would fail but would not correctly report why. Add support for CRITICAL error levels to the LogMessage model, include errors at this level in the errors property for a build, and show errors at this level in the build dashboard. [YOCTO #8320] (Bitbake rev: b6eacbca9cacb607de864ab7d093deb296da8226) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Check whether buildrequest exists before using itElliot Smith2015-10-161-2/+18
| | | | | | | | | | | | | | | | | | | | Builds initiated from the command line don't have a buildrequest associated with them. The build.buildrequest association is only added if a build is triggered from toaster. Some of the code for displaying the status of a build refers to build.buildrequest without checking whether it has been set, which causes an error to be thrown. Add a guard to check whether the buildrequest has been set. [YOCTO #8277] (Bitbake rev: af33409612139ab2347baf6b847b23faea19752d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: exclude recipes with empty namesEd Bartosh2015-10-121-1/+1
| | | | | | | | | | | | | | Modified get_all_compatible_recipes function to exclude recipes with empty names from the result queryset. This should stop UI to show recipes with empty names in compatible recipes page. [YOCTO #7969] (Bitbake rev: f7c1bd49e2e28d12c6604f5ae54bc96e1e7b6946) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: delete recipe if it can't be savedEd Bartosh2015-10-121-0/+1
| | | | | | | | | | | | | | | | Due to Recipe model constraints some recipes can't be saved. However, they still can create incomplete records in the database. This causes all sorts of errors when Toaster operates with those objects. Removing them should fix those issues. [YOCTO #7969] (Bitbake rev: 4d76a9e418fd98a7882aa29f974a7389f9689314) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix NameErrorEd Bartosh2015-10-121-1/+1
| | | | | | | | | | Fixed exception: NameError: global name 'DoesNotExist' is not defined (Bitbake rev: eee5311b867d3c8c33e06d04e103bfd3647146f4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: implement API to get full list of depsEd Bartosh2015-10-121-0/+19
| | | | | | | | | | | | | | | | | | Implemented Layer_Version.get_alldeps API to recursively get full list of dependencies for the layer. Dependencies that are already in the project are filtered out from the result. Result list of Layer_Version objects is sorted by layer name for UI to look consistent. This API is going to be used to show amount and list of dependencies for the layer in the list of compatible layers for the project. (Bitbake rev: 7d853a3054a9ae3d18eb6f5bc13ba27d2795c31a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix typo in returning pk list of layer versions in current ↵Michael Wood2015-10-111-1/+1
| | | | | | | | | | | | | project This was accidentally returning the primary key of the ProjectLayer rather than the ProjectLayer.Layer_Version.pk (Bitbake rev: b20f3626148e89af0e9fcfca911a5a1e4e355a41) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Machines filter don't pass self in as parameterMichael Wood2015-10-111-1/+1
| | | | | | | | | | | | Fix typo don't pass self in as a parameter, this evaluated to true giving the wrong results meaning the machines typeahead did not return valid results. (Bitbake rev: 55ba889ef8900c95447861fa3985ca9cfe06afdf) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm remove the complicated querying on the ORMMichael Wood2015-09-291-19/+30
| | | | | | | | | | | | | We no longer need to compute each layer_version and all the recipes which belong to this. [YOCTO #8147] (Bitbake rev: 505979ab931e3a2a218d7030d6064987e8f9ff14) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: buildinfohelper Create a copy of the built layer and recipeMichael Wood2015-09-291-1/+1
| | | | | | | | | | | | | Create a copy of the built layer and the recipes associated with it. This is so that the user can view the historical information about a build. i.e. a snapshot of the layer version and artifacts produced at that build. (Bitbake rev: 0683d9a2b15e3234a94437aaebac84bfcca1420b) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Prioroitise the layer more generic vcs reference over the shaMichael Wood2015-09-291-2/+2
| | | | | | | | | | | | When we do a build we update the last commit value that the layer was built at However in future builds we do want to use the named reference rather than the commit sha, e.g. master/fido (Bitbake rev: a3d47eb923dd2cb5259f387c79549822807eca49) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Create a relationship between build information and ↵Michael Wood2015-09-291-1/+1
| | | | | | | | | | | | | | toaster layers Previously this layer relationship was done by trying to match path information that came back to the buildinfohelper with trying to query for data in toaster's layers table. This rarely matched due to the lose coupling. (Bitbake rev: 838e77c7c3c4006abd1327343a004590ab652de9) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Special case the openembedded-core layer to avoid duplicatesMichael Wood2015-09-291-0/+21
| | | | | | | | | | | | If the openembedded-core layer is specified in the toasterconf we need to treat it differently because we may also get this layer either from the layerindex source or I can also be provided locally. (Bitbake rev: 8e36b6848c14f2708e1f87d12fb533ca0b596c65) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Add CustomImageRecipe modelMichael Wood2015-09-291-1/+10
| | | | | | | | | | | | | | | | | | | This model lists custom image recipes for the project. It is populated when new custom image is created. It holds reference to the base recipe and list of packages included into custom image. For CustomImageRecipes the packages will be copied in and therefore not associated with a build so Remove the requirement for the package to have a Build. co-author: Ed Bartosh <ed.bartosh@linux.intel.com> (Bitbake rev: 33cbf4cd3b4ca47c4901501f5f1eafdfdfdae023) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: make a workaround for old style indexEd Bartosh2015-09-291-0/+2
| | | | | | | | | | | | | | | For a new style indexes 'inherits' field is used to determine if recipe is an image recipe. As old style indexes don't have 'inherits' field this can be guessed from recipe name. Let's consider recipe an image recipe if recipe name contains '-image-'. (Bitbake rev: d769d3f54faaf1a3091b1eb6ed1d17a8a108210a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: store task name in Target objectsEd Bartosh2015-09-231-1/+1
| | | | | | | | | | | | | | | Information about a task is not stored in Target objects. This makes it impossible to correctly operate with the builds where task is specified. Storing taks name is an enabler for other fixes in UI and backend related to restarting builds. (Bitbake rev: 0a69a8a18075c976ed8681d9d75529f8c2f48514) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Improve how default project is identified and fetchedElliot Smith2015-09-031-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Command line builds are associated with a "default project" (as we currently require a build to have a project). This acts as a container for builds initiated outside Toaster. Currently, this project is marked as the default by its ID being 0. However, this doesn't work with MySQL, as MySQL won't allow 0 in a foreign key which references an autoincrement field. Instead, use an is_default field to track the default Project for builds initiated outside Toaster. Add a method to fetch this default project, rather than fetching a project with a magic ID. Add this default project in a migration, rather than as a side effect of a get_or_create() style method. Also ensure that builds always have a project explicitly assigned to avoid any magic with a build's project foreign key defaulting to 0 (as it no longer does). [YOCTO #7932] (Bitbake rev: 71b709a1bbc26d89d61873763b467d21e625b274) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Support environments which have proxies setBian Naimeng2015-08-291-29/+7
| | | | | | | | | | | | | | | | | | | | | In an environment with a proxy which requires authentication, e.g. with $http_proxy = 'http://user:password@ip:port', the following error occurs when running Toaster: EE: Using proxy http://user:password@ip:port EE: could not connect to 'url', skipping update: 'error message' This prevents Toaster from fetching layer, recipe and machine information from remote repositories. This patch allows Toaster to use the proxy settings from the environment for HTTP/HTTPS requests. (Bitbake rev: e7a85031fd05a46ef60b380883da4cc372acf89b) Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix pylint errorsAlexandru Damian2015-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | Prompted by issues discovered during running pylint on the toaster sources, this patch fixes: * missing import in toaster ui * improper call of function in toaster ui (logger.debug) * improper function definitions in bbcontroller * invalid references to objects in bldcontrol.models * proper initialization of object fields in ToasterTables Also inhibiting specific pylint errors in files where the problems are mis-identified. (Bitbake rev: 1c71955c416fb68455f7f70669aba4202c411807) Signed-off-by: Alexandru Damian <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: do not stop data import on bad dataAlexandru DAMIAN2015-08-191-4/+4
| | | | | | | | | | | | | | | | | | The layer data update in Layer source needlessly stops processing by throwing an Exception when bad layer data cannot be inserted in the database (e.g. invalid dependencies). This patch changes the behaviour to ignore bad data, and continue with data import after detailed logging through the logging system. [YOCTO #7955] (Bitbake rev: e0911e408db4fa07086738fe11121b173b4d1cf5) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: use loggers instead of printsAlexandru DAMIAN2015-08-191-9/+13
| | | | | | | | | | | | | | | Switching debugging from using print statement to using loggers, as it uses the logging infrastructure to process the messages. The messages are logged with the "toaster" logger which is defined in the toastermain/settings.py. (Bitbake rev: adf3bdcbe8b0b0bbe9de2800f2d20a53e8d88543) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: models field initializationAlexandru DAMIAN2015-08-191-17/+21
| | | | | | | | | | | | | | As prompted by pylint, the object fields need to be initialized properly, so this patch fixes that. Also adds some casts to int, because, sometimes, the IntegerField is not returning an int, but a string. (Bitbake rev: cc9ac01d0726203fbe916cec51cc464eaeae9305) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: improve exception handlingAlexandru DAMIAN2015-08-191-9/+6
| | | | | | | | | | | This patch improves exception handling, fixing issues as prompted by pylint, including exception renaming. (Bitbake rev: 652fad64864703cb1bbeede8d5bfc4208974be68) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: pylint fixesAlexandru DAMIAN2015-08-191-1/+0
| | | | | | | | | | | | This patch fixes imports, default parameters to functions, incorrect overloading and exception handling issues highlighted by pylint. There are no functional changes. (Bitbake rev: 066e096b80dcb0e93e1a088acf5d914184361769) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Add util functions to return common querysetsMichael Wood2015-08-061-1/+40
| | | | | | | | | | | | We use these querysets when creating tables of results and also when we want to have a typeahead search. These can also form the basis of future API endpoints. (Bitbake rev: 2a10fecd985343802f0e99c6fff25c28980eee20) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Add util function to return the url to layerversionMichael Wood2015-08-061-0/+4
| | | | | | | | | | | Save duplicating this call and make a utility function for it on the Layer_Version object. (Bitbake rev: 32d382315bad37cebbe67ca3287085f3d856a9ed) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: toaster: Add is_image field to the Recipe modelEd Bartosh2015-08-011-0/+3
| | | | | | | | | | | | | | | | | Added new field is_image to the Recipe model. Made sure is_image is populated when layer sources are imported. Made sure the change doesn't break loading old style layer sources. Tested by loading data from layers.pythonanywhere.com and from layers.openembedded.org. [YOCTO: #7571] (Bitbake rev: 3ac0ba73790b8f68567daa2de313c78053411fbb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: continue processing layer dependencies despite errorsBrian Avery2015-07-211-2/+1
| | | | | | | | | | | | | | Sometimes, a layer dependency will not exist, or not exist for a particualr branch. In this case we need to continue processing and hope for the best. [YOCTO #7955] (Bitbake rev: 2961bf2612fce111a7be6cef285595a075200780) Signed-off-by: Brian Avery <brian.avery@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Partial Revert "fixes after html5 compliance testing"Michael Wood2015-07-021-3/+2
| | | | | | | | | | | | Partial revert of bb commit 7aecb974d44d9bc711ffba5cc65e770811397fba There were changes in this commit which broke the compatible layers mechanism meaning that no layers, recipes or machines were showing. (Bitbake rev: 124157b567469639c6c839233f42049a093ba083) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: fixes after html5 compliance testingAlexandru DAMIAN2015-06-261-1/+3
| | | | | | | | | | This patch brings fixes for issues highlighted by HTML5 compliance testing. (Bitbake rev: 7aecb974d44d9bc711ffba5cc65e770811397fba) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: select project typesAlexandru DAMIAN2015-06-261-1/+7
| | | | | | | | | | | | This brings in project types in the New Project page. The "analisys" projects are the projects with no "release" set, and have read-only properties in the project page. (Bitbake rev: 2efc338cefd6e6e097af83d7dff63e9ba177d021) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: refactor build modelAlexandru DAMIAN2015-06-261-6/+13
| | | | | | | | | | | | | | | | We remove the "timespent", "errors_no" and "warnings_no" fields in favor of computing the needed values at runtime. This prevents inconsistencies in the UI. Also removeing all references to BuildRequests from the interface - all build details now display in the build dashboard. Minor fixes related to data logging. (Bitbake rev: 44f37394ed3e4ca02f940be172fe4395b0ee0f7d) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fixes after replacing BuildRequest with BuildAlexandru DAMIAN2015-06-261-2/+6
| | | | | | | | | | | This is a set of fixes that repair the interface after we switched from displaying BuildRequest data to Build data in the formerly "managed" mode. (Bitbake rev: 57f790b0c56297af8c83d5def8461bd5d61fe4af) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fill in build data from buildrequestAlexandru DAMIAN2015-06-261-3/+25
| | | | | | | | | | | | | | This patch adds logic to complete changing the interface from showing BuildRequests to showing Build data. The BuildRequest data is now transformed in Build data with proper Toaster exceptions being recorded instead of listing problems during startup as build errors. (Bitbake rev: 51a41172d0b390370f9a38696b1ac65666ada4d2) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: remove MANAGED referencesAlexandru DAMIAN2015-06-261-3/+1
| | | | | | | | | | | We conflate the managed and analysis modes by deleting alternative code paths, favouring the MANAGED mode, always considering the MANAGED variable True. (Bitbake rev: 0ac02d3775106b485e29496b62f31e91fd3f9387) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fixes after refactoringAlexandru DAMIAN2015-06-121-3/+2
| | | | | | | | | | | | | | | | | | | This patch fixes issues brought in by refactoring: * the New Build button is working with pre-set projects * the xhr_datatypeahead is exposed for calls that are not mapable to the REST objects * a new table returing recipes provided by layers currently selected in the project is used to provide recipe suggestions * the field names in json are switched from "list" to "rows" as to maintain consistency with the ToasterTables * the "value" field in xhr_ calls is now named "search" to maintain consistency (Bitbake rev: a5bc29083d4f85a5695f3f62d5badb783c6f7224) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: eliminate duplicate querysetsAlexandru DAMIAN2015-06-121-38/+3
| | | | | | | | | | | | | | | The Layer_Version.get_equivalents_wpriority performs the same function as Project.compatible_layerversions, but in memory and with worse performance. Replace the code in get_equivalents_wpriority with a call to the project compatible_layerversions, which also returns a queryset instead of a list (can be used to further enhance queries) (Bitbake rev: fb5eb1d7759222573565936a964d602c148df139) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: orm: Fix all failing unit testMichael Wood2015-05-291-1/+4
| | | | | | | | | | | This fixes all the unit tests for the orm. Also added is the ability to set a custom Layer index if you want to avoid using the public one by specifying TTS_LAYER_INDEX (Bitbake rev: dfbcbe116d0b987b850f67056f02f489ac0b8360) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: refactor checksettings commandAlexandru DAMIAN2015-05-291-0/+3
| | | | | | | | | | | | | | This patch refactors the checksetting command to prevent early return from the handle function. It also adds a check that marks IN PROGRESS builds at startup time as FAILED. Minor changes to BuildRequest and Build classes ensure useful string representation for the objects. (Bitbake rev: adf67dd79dbf6b585bf8cd54f99c389409b88ecd) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>