aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui
AgeCommit message (Collapse)Author
2016-02-10bitbake: toaster: pkg_dependencies_popover just show direct dependenciesMichael Wood
In the dependencies popover just show direct dependency in the list rather than recommends, conflicts etc (Bitbake rev: e69b00532b011327bc2495a6fb52cfe98f0f897d) 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>
2016-02-10bitbake: toaster: newcustomimage_modal add frontend name validationMichael Wood
Add front end handling of validation response from create new CustomImageRecipe api. (Bitbake rev: eff66b502df8e001cd0abc25bcbd742687169619) 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>
2016-02-10bitbake: toaster: API CustomImageRecipe check the recipe name supplied is validMichael Wood
Check that the name for a new CustomImageRecipe doesn't already exist in the project or in the database of existing recipes (e.g. from the layer index). Also restrict the characters entered for the recipe naming convention. (Bitbake rev: f290d428460a07e73050ff613bc222cc8c04f5ec) 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>
2016-02-10bitbake: toaster: views CustomRecipe API add size information to the package ↵Michael Wood
lists Add the file size of the packages and the total to the JSON response. (Bitbake rev: bbbd304c49b0940a695d15273934edff95d70836) 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>
2016-02-10bitbake: toaster: customrecipe Add dependency tracking to package selectionMichael Wood
Update the states of the packages in the package selection UI to reflect whether it's likely that 1st level dependencies for the package will be also added. (Bitbake rev: 119569d83c3fb1d1bd162624819b3f9c63a791c4) 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>
2016-02-10bitbake: toaster: tables move template logic into the pkg_add_rm_btnMichael Wood
Instead of defining this as a string it's sufficiently large enough to warrant its own file. (Bitbake rev: 6b39423fe5a3ed30289a8b303329a5725f7d273b) 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>
2016-02-10bitbake: toaster: make locale packages uneditable in custom image pageElliot Smith
When the packages associated with a custom image recipe are shown in the customrecipe editing page, locale packages are shown in the same way as all other packages. This gives the false impression that these packages can be removed, when in fact they are automatically added due to the IMAGE_LINGUAS build variable. Modify the customrecipe page so that locale packages cannot be removed, and provide some help text explaining why. [YOCTO #8927] (Bitbake rev: b2208e53c00a67a7d0345e7378e6806b8ae40fb4) 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>
2016-02-10bitbake: toaster: include locale and packagegroup packages in custom imageElliot Smith
The custom image editing page doesn't show locale and packagegroup packages: they are filtered out of the queryset used to populate the ToasterTable. Rather than filtering these packages out, include them in the list of packages which are shown. (Bitbake rev: 38a753e7b2e9ede326856b830b25e13bdd6d0d9b) 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>
2016-02-10bitbake: toaster: update custom image package table filtersElliot Smith
The custom image package selection filters were using the old ToasterTable filter approach, which caused the table filter to fail. Amend the table to use the new ToasterTable filtering API to fix this. (Bitbake rev: 72a4cb30842fd053e46dc56df222729cbe735162) 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>
2016-02-10bitbake: toaster: move recent builds query to modelElliot Smith
The progress updater for the recent builds section makes a JSON call to the project view URL to get progress for each build. However, conversion of the builds pages to ToasterTable broke this, as the JSON response no longer contained the data necessary to populate the progress bars. Move the recent builds query to the Build model, so that it is accessible to the ToasterTables using it ("project builds" and "all builds"), as well as to the "project" view. Modify the code in the recent builds template to use the slightly different objects returned by the recent builds query on Build. (Bitbake rev: 5189252635ddc7b90c9a43aaed9f196c31e1dcad) 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>
2016-02-10bitbake: toaster: project builds Poll the server to get latest progress for ↵Michael Wood
build Poll the server for the project build progress value. This is something that will need to be re-done once we have a proper API for this on the server side. [YOCTO 8328] (Bitbake rev: ec467e43c39eadf02412b89db10c09ed78a5a9f5) 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>
2016-02-10bitbake: toaster: tables Check layer presence in project for customise_btnMichael Wood
Make sure we send the current list of layers to the customise button to be able to know whether it should be set as an add layer button or a customise button on the New custom image page. (Bitbake rev: 5ddb35c98b609d85f97d482b54cabe3a2812afe6) 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>
2016-02-10bitbake: toaster: toastergui tests Add addtional data to the setUp for new ↵Michael Wood
tables Add additional data to the setUp to be able to test all the tables for Image Customisation. Also add the name of the table being tested to the num of rows assertion. (Bitbake rev: dfcbcf789cf3f0733ca26b0601fdf97ce4291674) 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>
2016-02-10bitbake: toaster: tables SelectPackagesTable rename recipe_id to custrecipeidMichael Wood
Rename the recipe_id to custrecipeid to avoid confusion about which type of object we're going to be accessing. This means that in the unit tests for tables we can pass a different kwargs for custom recipes vs normal recipes. (Bitbake rev: ae3301a1047b3efb4b340b50a10d5d585b7333da) 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>
2016-02-10bitbake: toaster: toastergui tests Update package test to use CustomImagePackageMichael Wood
Update test for adding and removing a package from a CustomImageRecipe so that it uses the CustomImagePackage and correct fields for the packages included. Change the test for error condition to use an invalid package id as ManyToMany remove() on package that isn't in the relationship does not throw an error. (Bitbake rev: daccb2978f833a9e7af270160331da3e9a158219) 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>
2016-02-10bitbake: toaster: customrecipe Add further front end features using new APIMichael Wood
This adds some basic package dependency hint modals when you add and remove a package. It also makes sure that if the CustomImageRecipe has no current included packages that we go and check this with the server to see if a relevant build has taken place which will provide this information. [YOCTO #8082] (Bitbake rev: 418f5509e74d46d36a8eb966a245083006e5f4ba) 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>
2016-02-10bitbake: toaster: xhr_customrecipe_packages add GET info for package responseMichael Wood
Add response for GET to the xhr_customrecipe_packages ReST API /xhr_customrecipe/<recipe_id>/packages/<package_id> Thie response includes the id, name, version and dependency information for the package. (Bitbake rev: c45791fc85d26c43b0a3b0a459111d2ff5583540) 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>
2016-02-10bitbake: toaster: xhr_customrecipe_id change to use CustomImagePackageMichael Wood
Instead of doing a shallow copy of the package into the CustomImageRecipe when we add packages we can now use the CustomImagePackage as a M2M field on the Package to CustomImageRecipe. Also switch to using Target_Installed_Package as the method to retrieve the package list from the build. (Bitbake rev: 4ebc81823b3aec6ecf38835acad5263a81eb41c5) 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>
2016-02-10bitbake: toaster: API allow CustomImageRecipe to be updated after creationMichael Wood
When we create a CustomImageRecipe we create a Layer_Version and Recipe for that Recipe to be in, we only need one Layer_Version for our Recipes so if that Layer_Version is updated by building it we need a slightly more custom version of get_or_create to take into account the fields which we expect can change but still mean that the object we want is valid and doesn't need to be created. In the Recipe case this is when we're updating an existing CustomImageRecipe as we allow people to create a recipe even when the based on recipe hasn't been built so we need to update it once a build has happened. (Bitbake rev: 0fe2c72ab82c6de2825a390fbb460b892a7a9cfc) 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>
2016-02-10bitbake: toaster: tables Change SelectPackagesTable to use ProjectPackageMichael Wood
This changes the SelectPackagesTable to use the ProjectPackage table instead of very large expensive queries to retrieve a list of currently available packages for the project. (Bitbake rev: 4b4b7e28d602ac5283659f806d695cc0451d292e) 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>
2016-02-10bitbake: toaster: tables add recipe download link to CustomImagesTableMichael Wood
Add the download recipe link and fix the package count field. (Bitbake rev: 85891e5320014f363dba093ac2db681d55375ee3) 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>
2016-02-10bitbake: toaster: newcustomimage_modal use libtoaster method for new ↵Michael Wood
CustomRecipe Use libtoaster.createCustomRecipe rather than own implementation of this function. (Bitbake rev: 74fa98752b1cf1ad18d35ab6dd25fe7e409133c5) 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>
2016-02-10bitbake: toaster: libtoaster Add createCustomRecipe methodMichael Wood
This adds the function to call the ReSt API to create a custom image recipe. (Bitbake rev: 03e7949f538733f682a05d0c318cf2f4cd64cbf5) 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>
2016-02-10bitbake: toaster: toastergui tests Add unit test for download custom recipeMichael Wood
Add unit test to test downloading end point and the basic content of the custom recipe that is generated. (Bitbake rev: 1e78d1ca2f5b02d80ab037c6f5f81d18195fc817) 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>
2016-02-10bitbake: toaster: toastergui tests Update to reflect changes to ↵Michael Wood
CustomImageRecipe Now that CustomImageRecipe inherits from Recipe make sure that the accessors and the required values for Recipe are now setup correctly. (Bitbake rev: e958921e15a3c3e5a6b7c27ebe37fdf1f551f198) 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>
2016-02-10bitbake: toaster: views xhr_customrecipe_packages clean up APIMichael Wood
- Fix generic variable names such as "object" and "values" when not needed. - Use try catch instead of a queryset filter to return the custom recipe object - Be explicit about the fields returned for the custom recipe info field - Remove redundant new_package field (Bitbake rev: a1a69903a94264377666730b1eb4599e6f3b4398) 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>
2016-02-10bitbake: toaster: toastertable remove title from Show all in tableMichael Wood
Title is often very long so this is not a great property to use here. (Bitbake rev: 541ff2b5e9c6ebec0d0ced59b3f61cbd37bd37c2) 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>
2016-02-10bitbake: toaster: Add recipe details pageMichael Wood
This page provides the details of recipes, showing their packages and additional metadata. It also allows you to build the recipe or customise the recipe if it is an image recipe. [YOCTO #8070] (Bitbake rev: b6023619397f679791b7eff1faac06f4246133ce) 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>
2016-02-10bitbake: toaster: newcustomimage Move modal dialog out of newcustomimage ↵Michael Wood
template Move the modal template and JS out of the newcustomimage page so that it can also be used by the image details page. (Bitbake rev: c310bc6bab1a33124906dd57b3c63462a773ff25) 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>
2016-02-10bitbake: toaster: Continue front end features to custom image recipe page.Michael Wood
Continuation of the work on the custom image recipe page, this brings in: - Basic notification of having added/removed a package. - Connect up Build button - Download recipe feature - No packages states - Project bread crumb - Display additional recipe metadata - Update accessors for recipe object inheritance changes [YOCTO #8082] (Bitbake rev: a656756a9255ec5882686ce9563d17f2eb3136e3) 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>
2016-02-10bitbake: toaster: tables Add table for Packages and update SelectPackagesTableMichael Wood
Create a Packages table for use as the image details page. Change the SelectPackagesTable table to inherit from the Packages table. Remove the need for a separate view by adding the additional template context items to the Table's page context. (Bitbake rev: 336b1d8369d9e86ece78b63cb0e140e653216011) 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>
2016-02-10bitbake: toaster: views Add view to download custom recipeMichael Wood
View to provide the custom recipe download feature. The recipe is generated on-demand to make sure that it is the most current version of the Custom recipe. (Bitbake rev: 2101c854bb2d7ff1e3a4f00ad4d33d77859439ed) 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>
2016-02-10bitbake: toaster: move CustomImageRecipe generation to API entry pointMichael Wood
Use the CustomImageRecipe generate_recipe_file_contents to generate the recipe that we build from. Move creation of the dummy layer and recipe object to the point of recipe creation as we need these objects before the build time. Also update the methods to add and remove packages to account for the CustomImageRecipe inheriting from Recipe. (Bitbake rev: f3322567378d6038a00da0fab6c5641a1a8e5409) 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>
2016-02-10bitbake: toaster: tablejs Add an event handler to manually trigger a data reloadMichael Wood
Allow users of ToasterTable to manually trigger a refresh of the data. This can be useful if an action has happened in-page and the data is now invalid. Such as new data being added or removed from the model. (Bitbake rev: 6e42070d8abc80dacd8094c4f5019577453a9d49) 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>
2016-02-10bitbake: toaster: ToasterTables simplify filter function move common part to ↵Michael Wood
widget Move part of the functionality of the filter functions to the Table widget. We don't need to implement it in each subclass. (Bitbake rev: 16e48829f6fd96c1d21339253871f2a9b2446f87) 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>
2016-02-06bitbake: toaster: reinstate ID on edit columns buttonElliot Smith
The ID was omitted from the "edit columns" button on the "projects", "all builds" and "project builds" tables when they were converted to ToasterTable. This caused the QA tests to fail. Reinstate the ID so the tests can identify the "edit columns" button correctly. [YOCTO #9051] (Bitbake rev: 934b82badcf063c8ff252d806c2fb019f7a2e55f) 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>
2016-01-18bitbake: toastergui: make artifact download more robustElliot Smith
When an artifact download is requested, Toaster goes through a convoluted series of conditions to decide which file to push to the response. In the case of build artifact downloads for command line builds, this caused an ugly exception, as command line builds don't have a build request. To simplify and catch more corner cases, remove the code which fetches files via the build environment (we only support the local build environment anyway). Then push all requests along a single path, catching any missing file errors, missing object errors or poorly-formed URLs in a single except clause which always returns a valid response. Also modify the text on the "unavailable artifact" page so it says that the artifact doesn't exist, rather than it "no longer" exists (exceptions may occur because an invalid artifact was requested, rather than an artifact which was removed). [YOCTO #7603] (Bitbake rev: 24e20db55c2933de5e58ca754b8fd5b624f47820) 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>
2016-01-15bitbake: toastergui: code formatting and clean-upElliot Smith
Minor fixes to code formatting and small improvements from code review. (Bitbake rev: 2c97f3a5c6ae37de910deb90390c5b856a600c5f) 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>
2016-01-15bitbake: toaster tests: fix Django tests for new ToasterTable pagesElliot Smith
The Django command-line tests can no longer test the content of the projects/, builds/ and projectbuilds/ pages, as ToasterTable pages are populated by JavaScript. Fix/remove affected tests by converting them to tests on the JSON returned by the ToasterTable. [YOCTO #8738] (Bitbake rev: 85efa9530fa6181855e051bfd14de1c15db9c3b7) 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>
2016-01-15bitbake: toastergui: remove unused views and template codeElliot Smith
The code in views.py for setting up the template context for old non-ToasterTable views is no longer necessary, as this is now implemented in tables.py. The template files for these views have also been removed. [YOCTO #8738] (Bitbake rev: 2b5a13afb068c85466436914d8d4ac3b31bc5c02) 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>
2016-01-15bitbake: toastergui: fix error and warning counts for buildsElliot Smith
The error and warning counts displayed for builds were counts of the errors and warnings objects associated with a build. Because these values were being derived on the fly, it was not possible to sort by them. Previously, the 3rd party django-aggregate-if library was used to add aggregate fields to Build objects and should then have been used to populate the "all builds" and "project builds" tables. However, at some point the templates had changed so that the error and warning counts were coming from the properties on the Build model and not from these aggregates. This meant that it was not possible to sort by these fields. Django 1.8 supports conditional aggregates in annotation fields on querysets. This means we can remove django-aggregate-if, use the new Django 1.8 feature to derive errors_no and warnings_no fields as annotations, then use those annotation fields in the templates. This makes the "builds" tables sortable again. [YOCTO #8738] (Bitbake rev: 9be7c5c18b325f6ed40bc431ac408db242007eb1) 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>
2016-01-15bitbake: toastergui: make "Apply" button state depend on filter rangeElliot Smith
If a range filter action had an empty from/to field, the range filter could still be applied. This was confusing, as an invalid filter range caused all records to display, even though a filter appeared to have been applied (by the highlighted state of the filter button). Change the state of the "Apply" button, disabling it if the radio button for a range filter action is selected but the range is incomplete (from or to field is empty). When a non-range filter is selected, the "Apply" button always enable the "Apply" button. [YOCTO #8738] (Bitbake rev: 168184b28165d7aa354b9092b5986f91c58d550d) 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>
2016-01-15bitbake: toastergui: mute label for filter actions with no recordsElliot Smith
The radio button for a filter action is disabled if that filter action has no associated records. However, the label retains the normal font styling, so it's unclear that the action is not available. Add the "muted" class to the label for a filter action (and still disable its radio button) if it has no records associated with it. [YOCTO #8738] (Bitbake rev: b7f7ff095c9c4c922e608f776713f17acc1f150d) 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>
2016-01-15bitbake: toastergui: set default visible and hideable columnsElliot Smith
Incorrect columns were shown by default in the "all builds", "project builds" and "all projects" pages. Set the "hidden" property on columns in these tables to hide the correct columns. Add a set_column_hidden() method to ToasterTable so that the "hidden" property can be overridden for the machines column in the project builds page (it shares a superclass with all builds). Make the time column on all builds page hideable. [YOCTO #8738] (Bitbake rev: be3982c71703eaa51e7f3352e0cb5b3af11c9ead) 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>
2016-01-15bitbake: toastergui: serialise decimals correctlyElliot Smith
The conversion of some ToasterTable Build object querysets to JSON caused a serialisation error. This is because one of the fields in the queryset was of type decimal.Decimal, and our serialiser didn't know what to do with it. Add a clause to check for decimal fields and serialise them so that correct JSON can be generated. (Bitbake rev: fa6229d4edf5904ccaa9dc323d0ab2318d1ef314) 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>
2016-01-15bitbake: toastergui: streamline construction of filter objectsElliot Smith
In line with comments from review, remove the QuerysetFilter class (redundant) and convert ProjectFilters into a class with static methods. [YOCTO #8738] (Bitbake rev: 59379bf6467029223045c5ebef868729d8e02c86) 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>
2016-01-15bitbake: toastergui: ensure filter_value updatesElliot Smith
Clicking on the radio button for a date range filter action populates the from and to fields for that action if they are empty. However, because this doesn't fire "change" events, clicking on the radio button doesn't update the filter_value hidden field. This means that the date range action's filter_value parameter isn't set correctly when the filter popup is submitted. Manually call the changeHandler() to set the filter_value whenever the radio for a date range filter is clicked. [YOCTO #8738] (Bitbake rev: 1a3038cf8d9b32532f1fe92cd3472b4473ffc0c4) 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>
2016-01-15bitbake: toastergui: don't hide all elements with .col classElliot Smith
Disabling the "project" column in a ToasterTable for builds causes the recent builds area to be hidden. This is because the column hiding code hides all elements with a class matching ".<column>", regardless of where they occur on the page; and the recent builds area was using the ".project-name" class, which means it is included in the set of elements which are hidden. Scope the element search to the table so that only elements within the table are hidden or shown. [YOCTO #8792] (Bitbake rev: 151bc20daf51e0ab8baf11ea29244b7fec1f8a22) 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>
2016-01-15bitbake: toastergui: convert project builds page to ToasterTableElliot Smith
Use the all builds ToasterTable as the basis for the project builds ToasterTable. [YOCTO #8738] (Bitbake rev: 87bcfb740dd2d9944e35a2a1f71cbf8ff3b266e9) 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>
2016-01-15bitbake: toastergui: implement "today" and "yesterday" filtersElliot Smith
Add the "today" and "yesterday" filters to the started_on and completed_on columns in the builds table. During this work, some minor adjustments were made to the behaviour of the builds table: * Amend filter action variable names so they're more succinct. * Retain order in which actions are added to a filter, as this ordering is used in the UI when displaying the filter actions. * Always show the table chrome, otherwise it's not possible to edit the columns shown until there are 10 or more results. * Because date range searches may return no results, make sure that the search bar and "show all results" link are visible when the query returns no results. [YOCTO #8738] (Bitbake rev: f17cfa009e58833e0e55884fa04de8abd522b6bc) 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>