summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: toastergui fix size rendering in dirinfo pageAlexandru DAMIAN2014-09-291-5/+5
| | | | | | | | | | | | | | | | We fix the rendering of the size field in dirinfo-related pages by directly calling filtered_filesizeformat and not rendering it through the template engine. Additionally, we enable error dumping into logs if an Exception happens. [YOCTO #6669] (Bitbake rev: afa2431c21b8271b05dc4cca4265f98d9f338007) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix some code spacing issuesMarius Avram2014-09-052-23/+25
| | | | | | | | | | | Code is related to the basetable templates files. It had mixed tabs and spaces and was miss aligned in various places, making it hard to read. (Bitbake rev: cdaea8951df6b707afd1fefbf22295088256dd6f) Signed-off-by: Marius Avram <marius.avram@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: use cookies for count and sorting in templates tablesMarius Avram2014-09-053-46/+102
| | | | | | | | | | | | | | | | | | | | | | | | Until now cookies were used to save which columns were shown and which were hidden in toaster tables. The tables from the templates also have functionalities like sorting the entries on a certain column and limiting the number of entries displayed on a page. The later however were not saved using cookies. This patch brings this new feature. The cookies are not saved only in the front-end. They are saved both in the frontend in case the user uses the inputs/buttons to change a parameter and also in the backend in case the user specifies manually using GET variables the value of the parameters. When no GET parameters are given the views will redirect the url to one containg the parameters saved as cookies. When no cookies exist, default values will be used. [YOCTO #6126] (Bitbake rev: 880b58c845e3a501fa90d24e1bd89c87ca84b709) Signed-off-by: Marius Avram <marius.avram@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: do not save objects in sessionAlexandru DAMIAN2014-09-051-9/+9
| | | | | | | | | | | | | | | In order to avoid problems when using JSON serializer for saving sessions, we move from storing the objects themselves in the session to storing the object id and reloading the object when retrieved. This allows, for example, to use cookie-storage sessions if the infrastructure owner so desires. (Bitbake rev: 39d0f0c2e87d4b161f1eeaa2657e61b5a6bc9ee2) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: enable SSH-based remote build supportAlexandru DAMIAN2014-09-054-182/+488
| | | | | | | | | | | | | | | | We enable support for starting builds on remote machines through SSH. The support is limited to poky-based distributions. We refactor localhost build support and we update bldcontrol application tests to uniformely test the APIs of localhost and SSH build controllers. [YOCTO #6240] (Bitbake rev: c2ad9c9bb83f61c171434324df8c4d5ee655a556) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: rename bldviewer projecttags custom tagsetAlexandru DAMIAN2014-09-054-3/+3
| | | | | | | | | | | | | | | We rename the projecttags in bldviewer.templatetags to simple_projecttags in order to avoid conflict with the similarly named tagset in toastergui. The conflict leads to an intermittent bug where proper tags are not read correctly since Django uses only the module name as global tag library identificator. (Bitbake rev: a37f2c194d7e59611177cb8755524b7ad702fe91) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: added pages for project detailsAlexandru DAMIAN2014-09-018-38/+564
| | | | | | | | | | | | | | | | | | | | | We add new pages for the layer importing, layer details, showing project builds and project configuration. The pages are in read-only mode, but they're needed as to be able to verify the quality of data in the system. Write capabilities will be added in a subsequent patch. [YOCTO #6595] [YOCTO #6590] [YOCTO #6591] [YOCTO #6588] [YOCTO #6589] (Bitbake rev: eed9ae5c2a2bd7567e12ae9a4f02a5a966a1e1a3) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add project pages for machines, targets, layersAlexandru DAMIAN2014-09-019-115/+559
| | | | | | | | | | | | | | | | | | | | | | We add new pages for the all-machines and all-targets project-related views. We update the existing template structure to create a base project view, similar to a base build view, that includes a breadcrumb. Updating existing all layers view to use the new structure. We update methods in the models to provide corrent information display. [YOCTO #6592] [YOCTO #6593] (Bitbake rev: 973f582a19441c1ec67061160e4c50ce03ed7b68) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: create Build methods for calculating progress and ETAAlexandru DAMIAN2014-08-292-12/+19
| | | | | | | | | | | We move the code to calculate build progress as percent and the ETA of the build to the model, so that they can be reused across different pages. (Bitbake rev: c2ced09e7ea4a1762d2788bb12a761734d20fd8e) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toatergui: update pages to match project modelsAlexandru DAMIAN2014-08-293-11/+10
| | | | | | | | | | We update pages and queries to match the new project models. (Bitbake rev: 8f47ec259106da714260c7388cee75a6c1f4622d) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update the bldcontrol to the new orm modelsAlexandru DAMIAN2014-08-294-12/+158
| | | | | | | | | | | | | | | | We update the build controller application to make proper use of the bitbake specification in project settings. Added heuristic to detect when the meta* layers and bitbake are checked out from Yocto Project poky, and use a single git checkout. Building without a proper oe-init-build-env is not yet supported. (Bitbake rev: 9eafe14956013f5af39b68fc93e1b03e7ea1f5c2) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update checksettings command for auto-detectionAlexandru DAMIAN2014-08-291-8/+182
| | | | | | | | | | | | | | | | | We enhance the checksettings command to try to automatically detect settings for running on localhost. The checksettings will look for a nearby poky layer source, for a nearby build directory, and will try to import settings from "toasterconf.json" files found in the local layer. On new configuration, it will also perform updates from the layer source. (Bitbake rev: 2aab77dfccb538e2b09829841ea6c464d40cafb1) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add all layers pageAlexandru DAMIAN2014-08-292-1/+246
| | | | | | | | | | | | | We add a page where the user can browse and import layers from all the layers known by Toaster. [YOCTO #6590] (Bitbake rev: 59f4a9750a6c4f5360a91e3a4d1c03ceb42da086) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: create project section navigation structureAlexandru DAMIAN2014-08-294-26/+85
| | | | | | | | | | | | | We create the navigation structure for the project section. This includes adding URLs for configuration, builds, all layers, layer details and all targets pages. Changes to existing pages to exemplify navigation links. (Bitbake rev: 6f0cb9d106129eb496a4c009d95b0727378e97c1) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: enable admin interface on select modelsAlexandru DAMIAN2014-08-294-10/+43
| | | | | | | | | | | | | | | | | We enable the admin interface in Toaster. We add admin models for Build Environments (where the sysadmin can configure where the builds take place) and for Layer Sources (marking the upstream provider for layer information). The admin interface and associated data are enabled only for the MANAGED version. (Bitbake rev: 6618613c9210fb44d36d90f5f2404b435f10dfc8) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update orm models for layerindex compatibilityAlexandru DAMIAN2014-08-297-38/+1096
| | | | | | | | | | | | | | | | | | | | | We add a ToasterSettings table that will keep installation-wide settings. We update the models for the layer-related data storage to make them compatible with the layerindex application API. We add a LayerSource class that can update local data from a LayerIndex-like compatible API. Adding a command line option to perform information update from all upstream layer sources. Fair warning - there is no backward migration from 0013. (Bitbake rev: 89e13579e1b44b738f10fadec8454aa0e6f073af) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix application discovery in settings.pyAlexandru DAMIAN2014-08-291-3/+1
| | | | | | | | | | | We fix application discovery, tuples don't have .append(). Other minor fixes. (Bitbake rev: a6f18aac3e6bb448d89a3425a2f756c6514ee595) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: properly set layers when running a buildAlexandru DAMIAN2014-07-234-25/+226
| | | | | | | | | | | | | | | | | | This patch enables the localhost build controller to properly set the layers before the build runs. It creates the checkout directories under BuildEnvironment sourcedir directory, and runs the build in the buildir directory. Build launch errors are tracked in the newly added BRError table. These are different from build errors, in the sense that the build can't start due to these errors. (Bitbake rev: 1868d5635b517e0fe1b874674ea7a78910b26e2e) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add project main edit pageAlexandru DAMIAN2014-07-237-22/+748
| | | | | | | | | | | | | | | | | | | | | This is the first commit on the project main edit page. At this point we have: * the default settings for a newly created project * the ability to add targets * the ability to trigger a build command, and have the build executed Project layers now have an optional field, allowing for removal. Default meta, meta-yocto and meta-yocto-bsp layers cannot be optional. We add XHR calls for interactivity in the main page. (Bitbake rev: 4e438854120cbd10319df1b571ec93e334002325) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: move bldcontrol initial_data fixture to codeAlexandru DAMIAN2014-07-233-1/+109
| | | | | | | | | | | | | | | We move the initial_data fixture to a code migration, in order to make sure that we don't overwrite modified data. The data is inserted only if no data is present, instead of always overwriting the entry. The check settings returns 0 if the check was ok. (Bitbake rev: 525c316ac95c06c52fbcfc836ca5599ee9dbfe8b) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: improved Project modelsAlexandru DAMIAN2014-07-235-2/+364
| | | | | | | | | | | | | | | A layer may live in a subdirectory of a git repository, so we add a field to track this setting in the Project layers. We add the Project schedule_build function, which creates a build request from the current project configuration. We also fix an import problem with Projects in views. (Bitbake rev: 1b5835e5d48cbfb7d38e38437c45d161052dfb37) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add fields for sourcedir and builddir pathsAlexandru DAMIAN2014-07-234-26/+166
| | | | | | | | | | | | | | | | | | We add explicit absolute paths for a directory where the layer sources will be checked out (sourcedir) and where the build activities will take place. Adding minimal checking when starting the application in order to make sure that BuildEnvironment (BE) settings are usable. This check is ran by the toaster script at startup. Modify the localhost bbcontroller to use the BE settings instead of trying to self-configure on checked out sources. (Bitbake rev: d17500d3f73fdeeef5f11fb3773a65e927be3f02) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: new project page implementationAlexandru DAMIAN2014-07-145-20/+338
| | | | | | | | | | | | | We add the logic to create a new project. This page also serves as user registration and silent login for users. Once the project is added, the main project page is displayed. (Bitbake rev: 8855daebe55917c4f5855413d02ae1f3f7f76571) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: whitespace fixAlexandru DAMIAN2014-07-142-16/+16
| | | | | | | | | This patch is just a whitespace (end-of-line) fix. (Bitbake rev: 5f33d1a240faa49bd8259a48eb15ef57a6b4ce55) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add automated login in new project pageAlexandru DAMIAN2014-07-142-18/+46
| | | | | | | | | | | | | | Toaster uses the Django authentication system to assign user accounts to the projects that are being created. In the current implementation, the user accounts are created/authenticated automatically, on the fly, based on the fields specified in the create new project page. (Bitbake rev: a9062d9692525e24e59b5b2bb4dfdef90b41bf2a) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add project pagesAlexandru DAMIAN2014-07-146-4/+118
| | | | | | | | | | | | | | We add the new project and project page skeletons. In the process, we add an identifier in the settings.py to detect whenever Toaster is running in managed mode, and a context processor to make this value available to the template processor. (Bitbake rev: 927a27c68e24cfe13f62ca5f0e60878b04fa4e24) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: automatically enable applicationsAlexandru DAMIAN2014-07-141-0/+9
| | | | | | | | | | | | We automatically enable local applications in INSTALLED_APPS based on detecting a models.py or views.py file. This allows Toaster extensibility by adding applications, without having to edit configuration files. (Bitbake rev: 05b246095d161143ca2ebc126d9e70d198ab8bb8) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: automatically discover urls.py filesAlexandru DAMIAN2014-07-141-4/+12
| | | | | | | | | | | | Added code to automatically discover and add url dispatchers to the urlpattern list. This allows extension of Toaster through adding applications that will be automatically registered with the URL dispatcher. (Bitbake rev: 4000d8224206f404d174a5bc4aa49af55cb44d27) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: remove strftime calls in filtersAlexandru DAMIAN2014-07-141-6/+6
| | | | | | | | | | | | We remove the unneeded strftime calls in filters, as the filters can deal directly with datetime types. [YOCTO #6379] (Bitbake rev: 149693a342fe3a56027943d3ecb8bf2e1d0d652b) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix no newline at end of fileRobert Yang2014-07-0413-13/+13
| | | | | | | | | | | Add a '\n' to the last line of the file to fix: No newline at end of file (Bitbake rev: 5eb65d92c35264087e5d82c35638f3b8805b1b3e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix spacing and layout in no image files notificationBelen Barros2014-06-201-12/+17
| | | | | | | | | | | | Close the definition list before adding the notification, and restrict the notification width to avoid uncomfortable line lenghts. (Bitbake rev: b82f724c271c43218dc28440219adcea968e2a26) Signed-off-by: Belen Barros <belen.barros.pena@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: display message if no images are generatedFarrell Wymore2014-06-202-0/+20
| | | | | | | | | | | | | Display message if no images are generated for a target. This commit was amended to have more conditions for displaying the message. [YOCTO #6094] (Bitbake rev: ac1911eb857f4759ed085c8a4fc4b47cefafcd7a) Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Add performance testing scriptIonut Chisanovici2014-06-201-0/+53
| | | | | | | | | | | | | | | | | | This is implemented as a django management command. For the moment the 'manage.py perf' command will track the toaster 'gui' urls http response code and load time. To use it: 1. do your toaster builds 2. ensure toaster is started 1. cd bitbake/lib/toaster 2. ln -s ../../../build/toaster.sqlite 3. ./manage.py perf (Bitbake rev: 4a1fc6851d21500150715f0e8fa03c0b228ec5f2) Signed-off-by: Ionut Chisanovici <ionutx.chisanovici@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: refactor the target pageFarrell Wymore2014-06-203-115/+158
| | | | | | | | | | | | | | | the target (packages) page had to refactored to allow the displays to differ depending on the caller namely the license manifest link. Amended to make the link from the tag rather than the pathname itself. [YOCTO #6291] [YOCTO #6079] (Bitbake rev: b21a2af9411da17d49521820fa512292e89c856e) Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: build control functionalityAlexandru DAMIAN2014-06-137-5/+396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We add the build control functionality to toaster. * The bldcontrol application gains bbcontroller classes that know how to manage a localhost build environment. * The toaster UI now detects it is running under build environment controller, and update the build controller database and will shut down the bitbake server once the build is complete. * The toaster script can now run in standalone mode, launching the build controller and the web interface instead of just monitoring the build, as in the interactive mode. * A fixture with the default build controller entry for localhost is provided. [YOCTO #5490] [YOCTO #5491] [YOCTO #5492] [YOCTO #5493] [YOCTO #5494] [YOCTO #5537] (Bitbake rev: 10988bd77c8c7cefad3b88744bc5d8a7e3c1f4cf) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: fix built ETA calculationAlexandru DAMIAN2014-06-131-4/+3
| | | | | | | | | | We fix the calculation showing the estimated time to build completion. (Bitbake rev: dc1daae51ef5201475b5c1a69d966ae57b66dcb6) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add function to get the database urlAlexandru DAMIAN2014-06-131-0/+19
| | | | | | | | | | | | | We add a function that returns the DATABASE_URL for the current 'default' database settings. This is useful to be able to start other toaster instances with the same database settigns as the currently running instance. (Bitbake rev: 272a4bba0804bb6b5e0d498d3453321b5ed1dc76) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: create models for bldcontrol and enable itAlexandru DAMIAN2014-06-135-1/+235
| | | | | | | | | | | | | | | | | | | We create the model classes that store information about triggering builds, and the available build environments. We add a fixture with a default build environment for build control, using a "build/" directory under the poky checkout directory. We enable the bldcontrol in toaster starting script and in the toaster settings as to allow the actual database to be kept in sync with the source code. (Bitbake rev: d4bfe9059f765f11244b97e324c0131f32f8e400) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: initial bldcontrol applicationAlexandru DAMIAN2014-06-134-0/+20
| | | | | | | | | | | | | | The build features of Toaster will be contained into a separate application, as to modularize the Toaster project and provide multiple options for deployment. This patch adds the application as a barebone Django application in the Toaster project. (Bitbake rev: 08556b79b7b2af08aaeedf8733b1b8996f387c4e) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add Project class models to ormAlexandru DAMIAN2014-06-112-1/+287
| | | | | | | | | | | This patch adds the Project class models to the toaster GUI data model. There is no specified use, and the link in the Build class is optional. (Bitbake rev: 38f77a43d16e202d1f40632b27cb70dd20d02a5e) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add project related modelsAlexandru DAMIAN2014-06-061-0/+19
| | | | | | | | | | | | | | | | We introduce the notion of a project in Toaster as the item that holds the specification for triggering a build: the set of layers used, the set of configuration variable values, and the set of targets to be build. Builds triggered through Toaster will be associated with a Project, and they will be configured based on the project settings at the moment when the build is ordered. (Bitbake rev: 0bf0251ae05442ae260c6099b389bf765c4fef26) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: read database settings from the environmentAlexandru DAMIAN2014-06-061-1/+34
| | | | | | | | | | | | | | | We add the capability to read the database settings for Toaster from the environment. The DATABASE_URL is intepreted and used to override the default settings. This capability is essential for easy deployment of Toaster in a managed hosted environment, and for creating build environments with custom database settings. (Bitbake rev: d16d19dafb83448fc214fce4fbdc2bcbf4bf9ce3) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: reduce redundant foreign key lookupsDavid Reyna2014-05-212-6/+29
| | | | | | | | | | | | | | | | | | Replace redundant foreign key lookups with "with" to improve all recipes page load time. Do depends pre-lookup in the view class, and use python itertation instead of filter() all to achieve x16 processing speedup. [YOCTO #6137] (Bitbake rev: a68a6dc50c11cc59e7c873414e3e22ac2644dea7) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Conflicts: bitbake/lib/toaster/toastergui/views.py Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: sort columns properly after edit columnsFarrell Wymore2014-05-212-14/+204
| | | | | | | | | | | | If a sorted column is made invisible through the edit columns function, resort the table the its default order. [YOCTO 5919] (Bitbake rev: 64618f7489eb9eb13a97d03cd2d353384f5faa70) Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: modify SQL data type constraintsAlexandru DAMIAN2014-05-082-4/+229
| | | | | | | | | | | | | | | | | | | This patch modifies the data type constraints for the SQL fields. The original constraints have been based on guess worked, and they weren't strictly enforced for sqlite. On MySQL, the constraints are strictly enforced, and need to match the real data that we have. After measuring data on sample builds, the new constraints have been validated to work with MySQL, and this patch updates the database schema with the new field types / constraints. (Bitbake rev: aaefbc0b4e7484d6f4854ce49602821a6e4adc4b) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix migration code for MySQLAlexandru DAMIAN2014-05-082-38/+19
| | | | | | | | | | | | | | | | | | | | This is a patch that fixes the 0004, 0005 migrations of the toaster model to get them to properly work with MySQL. These migrations had a conflict around Build.timespent field. The sqlite3 constraits were not enough to detect the conflict, and the migrations worked as expected. MySQL objected to adding the field twice, so I did regenerate the migrations with the correct model listing. The net effect is the same, so the migrations work the same, but now we can use these two migration on the MySQL and other more advanced SQL engines. (Bitbake rev: 29afc29154b948d270ce52978a1eed4cd8887f92) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix span2 headings for packagesDave Lerner2014-05-082-4/+7
| | | | | | | | | | | | | | | | [YOCTO 6147] Fix bug in views.py that put 'span2' class id in a 'clclass' key instead of the 'dclass' key. This fix exposed another problem in target.html and the target view function that used 'package_size' instead of 'size' as the 'clclass' which is inconsistent with the model field name, causing table data columns to be shown when the header is hidden. (Bitbake rev: 436865ac8520c1d75401dde7df373dba9a386c9d) Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Make sure layer branch only shows when not emptyBelen Barros Pena2014-05-089-32/+35
| | | | | | | | | | | | | | | | | In the recipe details and package details pages, the layer branch definition list elements should only show when the branch field in the database is populated. If the branch field is empty, we don't show them. The patch also removes all unnecessary data-toggle and data-original-title attributes. [YP #6152] (Bitbake rev: 72adcadb931519f803dad7488544767241561fb7) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: sort outcome and sstate columns by string valueDavid Reyna2014-05-082-1/+20
| | | | | | | | | | | | Sort the 'outcome' and 'sstate_result' columns by their description string values and not their numerical values. [YOCTO #5921] (Bitbake rev: eee0abe70e4d85a0753f0b122518d7a9f06181bc) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: toaster: Fix Empty tasks filterBelen Barros Pena2014-04-231-1/+1
| | | | | | | | | | | | | Somehow the counter was set to count tasks with outcome 'not available', instead of outcome 'empty'. This patch fixes the problem. [YOCTO #6146] (Bitbake rev: 1cc2a299c842185ba14074817d5cd2925275610b) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>