aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/views.py
AgeCommit message (Collapse)Author
2014-09-04toaster: use cookies for count and sorting in templates tablesMarius Avram
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] Signed-off-by: Marius Avram <marius.avram@intel.com>
2014-09-04toaster: do not save objects in sessionAlexandru DAMIAN
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. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-09-01toastergui: added pages for project detailsAlexandru DAMIAN
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] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01toaster: add project pages for machines, targets, layersAlexandru DAMIAN
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] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29toaster: create Build methods for calculating progress and ETAAlexandru DAMIAN
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. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-08-29toatergui: update pages to match project modelsAlexandru DAMIAN
We update pages and queries to match the new project models. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-08-29toaster: add all layers pageAlexandru DAMIAN
We add a page where the user can browse and import layers from all the layers known by Toaster. [YOCTO #6590] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-08-29toaster: create project section navigation structureAlexandru DAMIAN
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. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-23toaster: add project main edit pageAlexandru DAMIAN
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. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-23toaster: improved Project modelsAlexandru DAMIAN
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. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-09toaster: new project page implementationAlexandru DAMIAN
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. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toaster: whitespace fixAlexandru DAMIAN
This patch is just a whitespace (end-of-line) fix. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toaster: add automated login in new project pageAlexandru DAMIAN
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. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toaster: add project pagesAlexandru DAMIAN
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. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-07-04toaster: remove strftime calls in filtersAlexandru DAMIAN
We remove the unneeded strftime calls in filters, as the filters can deal directly with datetime types. [YOCTO #6379] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-06-20toaster: display message if no images are generatedFarrell Wymore
Display message if no images are generated for a target. This commit was amended to have more conditions for displaying the message. [YOCTO #6094] Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-20toaster: refactor the target pageFarrell Wymore
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] Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-12toastergui: fix built ETA calculationAlexandru DAMIAN
We fix the calculation showing the estimated time to build completion. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-05-21toaster: reduce redundant foreign key lookupsDavid Reyna
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] 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>
2014-05-21toaster: sort columns properly after edit columnsFarrell Wymore
If a sorted column is made invisible through the edit columns function, resort the table the its default order. [YOCTO 5919] Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-08toaster: fix span2 headings for packagesDave Lerner
[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. Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
2014-05-08toaster: sort outcome and sstate columns by string valueDavid Reyna
Sort the 'outcome' and 'sstate_result' columns by their description string values and not their numerical values. [YOCTO #5921] Signed-off-by: David Reyna <David.Reyna@windriver.com>
2014-04-21bitbake: toaster: Fix Empty tasks filterBelen Barros Pena
Somehow the counter was set to count tasks with outcome 'not available', instead of outcome 'empty'. This patch fixes the problem. [YOCTO #6146] Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09toaster: add URI search path listDavid Reyna
Display the URI paths from SSTATE_DIR and SSTATE_MIRRORS in the Task page. [YOCTO #5996] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09toaster: sort on size in detail pagesDave Lerner
[YOCTO 5778] Implements the features described in the attachment to bugzilla 5778 - new global changes to the format of size data, and - adding sorts by selected columns to specific detail pages. Although new pagination and row search capabilities are shown on the screen shots for the 5778 attachment, those features are specified in a different bugzilla entry 5777 and are not implemented in this commit. Also, the 5778 spec includes table sorting for the recipe package detail page, but sorting for that page was not implemented in this commit due to complications with sorting then returning to a page that is only one URL fragment in a template. The scope of file changes are described below. Changes to support new 'size' field column formats... default.css - added sizecol class style (right justified) projecttags.py - changed filtered_filesizeformat to allow ".0" suffixes Changes that add class 'sizecol, span2(as spec'd) ' to <th> and/or <td> size columns were made to... dirinfo.py, package_built_dependencies.html, package_included_dependencies.html, recipe.html, bpackage.html, and target.html More significant changes to support detail page table sorting are: - tablesort.html: New created to implement the sort icons, directions, and table headings, and suppress sort handling if 'disable_sort' in context, without search or pagination elements ingrained in basetable_top. Confining the changes to this small file reduces the impact (testing and risk) on the larger set of files that arleady include basetable_top/bottom files. - view.py: Modified the following view functions with - trivial changes for size formatting to the views: target, - changes to package_built_detail, package_included_detail, package_included_reverse_dependencies to handle the sorting implementation as well as moving headings and size formatting for size columns from templates to the views. - Implementation of the detail sorting using above in: package_built_detail.html, package_included_detail.html, and package_included_reverse_dependencies.html to include the tablesort heading setup, format the size column, and iterate over the new sorted objects, suppressing sorts if table row count less than 2. Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09toaster: hide tasks without order or outcomeDavid Reyna
Hide the incomplete tasks, those without order numbers and/or outcomes. [YOCTO #6060] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09toaster: regex alternation filter caused django errorDavid Reyna
The combination of a regex filter specification that uses alternate, plus a search string, plus multiple search_allowed_fields, leads to a Django fatal error. Replace this regex filter for variables in local files with a simpler 'contains' against the project's directory plus a '/conf/' string. Alex rebased this on top of fix for #6048. [YOCTO #5962] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09toaster: fix filtering query for multiple filtersAlexandru DAMIAN
This is a fix for using multiple expressions in filters. Three different issues are touched: * added an explicit error message for incorrect filter usage * changed the value separator to something that will pass through from the browser to the actual code * changed the "and" operator for combining Q from a dubios lambda function to the standard operator.and_ Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09toaster: disable 'size over total' sortDave Lerner
[YOCTO 6061] Disable size-over-total table column sorts in the image installed packages view because that field is a computed field and only model fields are sortable in the current table toaster implementation. Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-05toaster: added covered task listFarrell Wymore
if a task has a 'covered' indication, the list of tasks that covered the task are computed and displayed. amended to add tooltip. [YOCTO #5925] Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com>
2014-04-05toaster: correct package countFarrell Wymore
The package count was incorrect because it was counting anonymous packages. the full path of the image files was shortened to just the filename. [YOCTO 6087] [YOCTO 6091] Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com>
2014-04-05toaster: Make tables happy in ChromeBelen Barros Pena
There is a known layout issue with Bootstrap tables in Chrome. This change applies a css fix for it, and changes the span classes in the variables table to improve formatting. Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2014-04-05toaster: Changes to help textBelen Barros Pena
All help text strings have been reviewed by the technical writer, and some of them by Paul Eggleton. This patch implements their suggested changes. Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2014-04-05toaster: link task order to right tasks pageDavid Reyna
When linking from a task order number to the All Tasks page, automatically display the correct page for that link anchor. [YOCTO #5933] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-04-01toaster: secondary sort key as table's default orderDavid Reyna
Provide for a secondary sort key based on the table's default ordering when doing sort on alternate columns. [YOCTO #5920] Signed-off-by: David Reyna <David.Reyna@windriver.com>
2014-04-01toaster: Remove trailing spaces from 'name'Belen Barros Pena
Remove all trailing spaces from 'name' because they show up in the filter headings, which I find incredibly annoying. Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2014-04-01toaster: disable configvar sorts for value and filesDavid Reyna
Disable the sort on files because it sorts on the file array's first (and invisible) element. Disable the sort on values because the raw ASCII sort looks wrong to the general user, especially for values with leading spaces. [YOCTO #6004] Signed-off-by: David Reyna <David.Reyna@windriver.com>
2014-03-28toaster: filter tasks with cache attempts for all attemptsDavid Reyna
Adjust the filter for task cache attempts to include all attempts except SSTATE_NA. [YOCTO #5923] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-03-28toaster: fix dirinfo empty dir expansionDave Lerner
[YOCTO 6036] In the page that shows the directory layout for an image, if the directory is empty, then the directory folder icon should be black and the table row should not be 'expandable' on a mouse click. That behavior depends on the directory's child entry count calculated in the view function controlling that page. Two images in the database with the same directory path in the target image, but one with path having entries and the other not having any entries caused the path without entries to be clickable; the query for a directory's count of entries, didn't filter on the image id, only on the path. Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
2014-03-28toaster: added file types to the Outputs column in the buildDavid Reyna
The file types are displayed in the Outputs column in the build page. The file types are derived from the target image filenames. [YOCTO #5947] Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-03-28toaster: show installed package nameDave Lerner
[YOCTO #5922] Implement changes that show the installed package name after the official 'recipe-named' package name. If the alias exists and is different than the package name, then the alias is shown as a 'muted' string after the package name in the form 'as some-alias-name'. This formatting appears in the included package pages in the elements: * local breadcrumbs at the top of package included pages, * <h1> title headings along with a help bubble that is not hovering, and * package lists where the help bubble appears when the mouse hovers over the row. The changes in detail in this patch per file are: views.py - added function that tests whether the package object's installed_name should be shown, - added function that appends package name with version and revision to encapsulate package name formatting in one place and referred to as package.fullpackagespec, - changed package_built* and package_included* functions to use both of the above new formatting functions, passing the formatted values to templates, and - adhered to django coding styles by renaming module local 'get_package*' functions with "_" prefix. package_detail_base.html - added display of package aliases for included package page, - refactored to use package.fullpackagespec, formatted by view function, - added javascript function to format package alias with help, and - removed trailing whitespace. package_included_detail.html - used javascript function above to format package alias, and - refactored to use package.fullpackagespec. package_included_dependencies.html - used javascript function above to format package alias, - refactored to use package.fullpackagespec, - forced empty data cells following hover-help to draw borders by appending space, and - removed trailing whitespace. package_included_reverse_dependencies.html - use javascript function above to format package alias, - refactor to use views fullpackagespe, and - force empty data cells following hover-help to draw borders by appending space. package_built_detail.html - refactored to use package.fullpackagespec, and - removed trailing whitespace. package_built_dependencies.html - refactored to use package.fullpackagespec, and - removed trailing whitespace. projecttags.py - removed unused filter to handle installed name - removed extra spaces around "title = " in format_vpackage_namehelp Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
2014-03-28toaster: insure _get_query returns distinct recordsDavid Reyna
The '_get_query' can return duplicate records if a search term appears multiple times in the same row, so the queryset must be made distinct before returning. This commit also removes the initial special case for configvars in favor of this general solution. [YOCTO #6012] Signed-off-by: David Reyna <David.Reyna@windriver.com>
2014-03-28toaster: add Image detail and multiple targets to dashboardDavid Reyna
Filled in the Image section detail information and allow for multiple targets. Each target has a separate section. Added license manifest display. Changed the target of the license manifest link. Added Tasks failed in the build summary. The target lists required filters to create sorted lists. [YOCTO #4258] [YOCTO #5936] Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com>
2014-03-25toaster: format packages with size = -1Dave Lerner
Packages that have a size of -1 are virtual packages with limited information. Such packages should be suppressed from the package list page for an image. On dependency and reverse dependency lists of package, such packages should appear in muted rows, without links, and with help information. The formatting rules are encapsulated into projecttags filters when possible to minimize tests on size==-1 in the templates. Testing the relevant pages with an HTML5 validator found a stray end tag in package_detail_base which has been fixed in this commit. [YOCTO #5966] Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-03-25toaster: Fix help text typosBelen Barros Pena
Fix a couple of typos in the help text of the builds and recipes tables. Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2014-03-25toaster: Remove commented-out code from views.pyBelen Barros Pena
This code in the All tasks view class needed to be removed. [YOCTO #6010] Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2014-03-25toaster: Change placeholder attribute in variables tableBelen Barros Pena
Set placeholder attribute for the search input field in the variables table to "Search BitBake variables" as per the design specification. [YOCTO #5998] Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2014-03-24toaster: replace package dependency tag w/ view queriesAlexandru DAMIAN
This patch moves the queries for package dependencies from the project tags to the views. This is done to bring the code inline with the Django philosophy of making all data queries in views.py This change has no performance implication. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2014-03-24toaster: Update local configuration counterBelen Barros Pena
The counter for the local configuration filter in the variables table was counting only variables set by local.conf. Updating to add in variables set by bblayers.conf Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2014-03-24toaster: Add help text to filtersBelen Barros Pena
The 'Set in file' and 'Description' filters in the configuration page, and the 'Outcome' and 'Cache attempt' filters in the tasks page should include a help tooltip with some explanation about what they do. This change adds the tooltips. Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>