summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-06-19bitbake: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-19bitbake-user-manual-ref-variables: Added BBLAYERS_FETCH_DIR glossary item.Trevor Woerner
Add BBLAYERS_FETCH_DIR to the Variables Glossary. Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-16bitbake-user-manual-ref-variables.xml: Added BB_ALLOWED_NETWORKS desc.Scott Rifenbark
Added a new variable description for the BB_ALLOWED_NETWORKS variable. Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-10toastergui: prevent contamination of libtoaster contextAlexandru DAMIAN
This patch modifies the New Build button to use a local copy of the default libtoaster project context in order to prevent page contamination when a different project is selected in the drop-down menu. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toaster: Add global ajaxError handlerMichael Wood
If any ajax calls fail and debug is enabled log the error to the console. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-10toaster: Add ajax loading spinnerMichael Wood
This adds an ajax loading spinner to provide feedback when in-page loading is happening. It will show after 1.2 seconds of initial loading. [YOCTO #7790] Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-06-10toaster: tables: Remove obsolete field_name for select columnVlad Fulgeanu
field_name is no longer used for this kind of column. So no need to specify it here. Signed-off-by: Vlad Fulgeanu <andrei-vlad.fulgeanu@intel.com>
2015-06-10toaster: Make toaster script to work in dashEd Bartosh
Made it working in dash. Note, that due to dash limitations script will not work if sourced. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toaster: Code cleanup: bashismsEd Bartosh
Fixed the following bashisms: replaced echo -e -> printf removed 'function' from function definitions replaced $(< ${file}) -> `cat ${file}` Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-10toaster: fixes after refactoringAlexandru DAMIAN
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 Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toastergui: remove xhr_datatypeahaed layerdeps callAlexandru DAMIAN
This patch removes the url-constructing calls to get the layer details in favor of embedding the look-up URL in the JSON data on the layer list page. This allows further removal of the XHR-specific code for layer dependencies in favor of REST calls to layer details data. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toastergui: remove xhr_datatypeahead and xhr_XXXbuildAlexandru DAMIAN
We remove the endpoints for XHR on the toastergui application. The endpoints are now replaced with calls to the respective REST endpoints (i.e. projectlayers, projecttargets, projectmachines). Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toaster: eliminate duplicate querysetsAlexandru DAMIAN
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) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toaster: add class template view for single-object pagesAlexandru DAMIAN
Adding ToasterTemplateView as prototype for all class-based views that display single objects; equivalent to ToasterTable for object lists. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toaster: toastertables raise errorsAlexandru DAMIAN
Modifies the widget code to raise the Exceptions to the user instead of printing then to stdout - making the programming errors much more visible. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toaster: ToasterTables add computational fieldsAlexandru DAMIAN
This patch adds the ability to pass a function to be computed for generating a field value in setting up a column in ToasterTables. Also adding "displayable" property that can be turned False for columns that are present in JSON data but are not part of the UI. Add the "id" column by default for all rows. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toaster: toaster table add raw dataAlexandru DAMIAN
We add in a JSON response both the raw data and the rendered version for display. The rendered fields start with "static:" to mark a different "namespace". The toaster.js is updated to always display the "static:" version of a field, if it exists (and ignore the raw data unless the static rendering is missing). Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toastergui: remove xhr_projectedit and xhr_projectinfo URLsAlexandru DAMIAN
This patch removes the xhr_projectedit and xhr_projectinfo URLs in favour of REST calls to the Project page. The project page takes now the POST requests to modify project settings. All usages of removed URLs are now changed to point to the project page, using the json format. The interface call specs have not modified. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toastergui: use defaults on xhr_datatypeahead parametersAlexandru DAMIAN
This patch prevents crashes when xhr_datatypeahead is called without proper parameters. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toaster: toastertables REST refactoringAlexandru DAMIAN
This patch refactors the ToasterTables to bring them in line with REST principles - - all table pages now support the "format=json" GET parameter that returns the data in JSON format - the tables themselves This cleans up the URL namespace by aleviating the need to have two URLS for each table (one for the template and one for the data loading), and fixes minor things in the ToasterTable implementation. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10convert all project-based view to JSON APIsAlexandru DAMIAN
This patch converts all-project views that are REST-style URLs to support JSON encoding if the "format=json" parameter is supplied. The formatting code is enhanced to prevent following Django foreign keys, to convert enum-values from int to string, and support for timedelta. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-10toaster: move project data typeahead to the REST APIAlexandru DAMIAN
This patch enables JSON requests on the project REST endpoint, and replaces the universal queries "xhr_datatypeahead" with the `project` type to the REST project endpoint. The patch adds a decorator that takes a context returned by a view and either renders the template specified as the decorator argument, or converts the context to JSON. Normal "search", "filter" and "order" options for view work as normal on the JSON API format. To enable the JSON return, set the "format" GET parameter to "json". In order to demonstrate the functionality, the "New build" button is switched from using the xhr_datatypeahead to the project REST API with JSON formatting. Additionally, the XHR APIs that perform actions with the project id passed as parameter are removed, and the needed URLs are populated from the project JSON API returns after the project has been selected. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-06-09bitbake: Bump version to 1.27.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-09cooker/event: Add an event which lists all stamps reachable after parsingRichard Purdie
The metadata can potentially use such an event to clean up any "unreachable" data, solving several problems we currently have where obsolete data may continue to exist in the shared areas. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-05parse/BBHandler: Avoid repeatedly resetting FILERichard Purdie
If we're not going to change the value of FILE, or we know it isn't going to have changed (ext == bbclass), don't set FILE. This avoids messy looking history of the variable as well as optimises parsing speed slightly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29toaster: more HTML5 fixesAlexandru DAMIAN
More HTML5 fixes highlighted by tests on new data. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toaster tests: enable url check testAlexandru DAMIAN
Integrate the HTML5 validation as a test instead of calling a separate script. This enables us to get the HTML5 validation report as part of patch-level testing. gitignore the cache directory created by the http client Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toaster/tts: Fix testsAlexandru DAMIAN
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toaster: enable no browser startAlexandru DAMIAN
We enable a "nobrowser" parameter that inhibits the launch of a browser when toaster starts. This is useful for integration with automated startup scripts and enables headless testing. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29orm: Fix all failing unit testMichael Wood
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 Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-05-29bldcontrol: Fix all failing unit testsMichael Wood
This fixes the unit tests for the bldcontrol it requires the implementation of a new Exception type so that a known Exception can be handled. Also fixed is the path to the toaster conf files so that the test doesn't need to be run from the top level directory and the ability to specify the values of TTS_SOURCE_DIR and TTS_BUILD_DIR and TTS_TEST_ADDRESS used for testing. Edited by Alex Damian to correct the rebasing of the localhostbecontroller.py file. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toastergui: add tests for xhr_datatypeahead callsAlexandru DAMIAN
In order to make sure we replace the xhr_datatypeahead calls with similar APIs, we add tests that validate the data returned by the xhr_datatypeahead. A copy of these tests will be enabled for each type of datatypeahead that will be replaced. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toastergui: tests for the all-projects API pointAlexandru DAMIAN
This patch adds Django tests that verify that the 'all-projects' page returns a valid HTML page when invoked normally, containing the project name; and valid JSON containing API-needed fields if the GET parameter `format` is set to "json" Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toasterui: replace cookie-based preferences with session dataAlexandru DAMIAN
We switch from storing the user preferences using cookies to saving them in the server-side session. Patch for "count/pagesize" and "orderby" fields in the table-based pages. This patch will solve two problems: * the browser-side race between the GET header data and the cookie data * page breakages when field names chances in orderby statements. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toaster: refactor checksettings commandAlexandru DAMIAN
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. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toastergui: Consider task name when restarting a build in /buildsEd Bartosh
Previously the same issue was fixed for project view. 'Run again' button now restarts builds using target:task also in builds view. [YOCTO #7442] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-05-29toaster-gui: Show task name for the builds in /buildsEd Bartosh
Task name was only shown for the latest builds in project view. Now it should be shown also in builds view. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-05-29toaster: Add an invalidate cache method on data update signalMichael Wood
Instead of relying on the cache expiring over an amount of time we can listen to the changed notification on the models to invalidate the cache. Also fixes overlapping cache names. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-05-29toaster: Port layerdetails to ToasterTablesMichael Wood
This ports the layerdetails page to using ToasterTables Also some whitespace and strict clean ups in the existing layerdetails js and html template. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-05-29toaster: Add a simplified ToasterTable templateMichael Wood
This is like the normal ToasterTable template but with a number of features removed such as edit columns and has a lower profile compared to the "main" tables. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-05-29toaster: Fix toastertable headerMichael Wood
Fixes regression introduced by 'tables updates for HTML5 compliance' Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-05-29toastergui: show relative paths in configvars viewEd Bartosh
Reworked filtering of config paths. Stripped clone paths, topdir and its parent directory from the paths to config files in configvars view. [YOCTO #7463] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-05-29toastergui: table header bring backAlexandru DAMIAN
This patch brings back the table header, which I mistakenly took out when fixing HTML5 compliance. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toaster logger: assign projects to all buildsAlexandru DAMIAN
Bitbake logger now sets a default project if the TOASTER_BRBE or TOASTER_PROJECT Bitbake variables are not set. This a necessary step in getting all builds under a project, as to unify the MANAGED and interactive modes. Other small fixes are included, related to the size of the fields in the database. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toaster logger: refactor recipe and layer file pathsAlexandru DAMIAN
This refactoring brings the "local_path" of the layer from the Layer object to the Layer_Version object, which is more appropriate as different checkouts of the same Layer may live in different directories. This enables us to store Recipe file paths relative to a Layer_Version at all times, aleviating the need to store full file paths in the database. We also turn the prefix of the path (e.g. virtual:native path name space) into a pathflag field. In turn, this solves the problem of mis-identification of tasks based on the recipe file paths, since we can also match the namespace of the file paths on the recipe files. [YOCTO #7594] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toaster: enable server-side sessions for all usagesAlexandru DAMIAN
In an effort to fix client-side session storage using cookies, we enable server-side session support for all pages. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-29toaster: Fix build button current project raceMichael Wood
Make sure the current project value is set before we check to see if the project is buildable. Also update the blacklist url patterns where we aren't displaying the button. [YOCTO #7739] Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2015-05-29data: Make expandKeys deterministicRichard Purdie
At least in theory, the order the keys are expanded in can make a difference, particularly if there is key overlap. We also want to ensure that any underlying base key is processed before any overridden version of that variable (FOO before FOO_x) which helps the update_data removal code I've been testing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29ConfHandler: Fix bogus dependency problemsRichard Purdie
Adding a dependency when errors occur accessing a file when calling handle() is not the correct thing to do. THe handle() code calls resolve_file() which can raise an exception without ever touching "fn" itself, it has also already marked all the dependencies correctly. This leads to bogus files being resolved to the local cwd and hence triggers reparses for no good reason. The solution is to simply remove the bogus dependency. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29BBHandler: Drop cwd from search pathRichard Purdie
Whilst bitbake has done this for a long time, the behaviour of resolving class files against cwd is not desirable. This can be seen during base configuration parsing when looking for base.bbclass where a dependency on cwd is added. If cwd then changes, the cache is invalid and triggers a re-parse. The only real option is to drop this entry and if files can't be found, we fix BBPATH in the cases where it needs fixing. I didn't find any in the random selection of layers I tested parsing locally. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>