Commit Graph

820 Commits

Author SHA1 Message Date
Alexandru DAMIAN 6f176d4c7b bitbake: toastergui: fix projectbuilds page
This patch fixes the redirection projectbuilds page and
the template layout in the projectbuilds page.

* The _build_list_helper now returns an empty RedirectException
that is properly customized by the caller and re-raised
to achieve redirection to the original page (poor man's overloading)

* The template for ProjectBuilds is updated as to properly display
Build objects instead of BuildRequest objects.

[YOCTO #7995]

(Bitbake rev: 5982b5df9288a5773c7314234e2e0432f85678f2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:56 +01:00
Alexandru DAMIAN ab13498eb9 bitbake: toastergui: do not show in-progress builds in the table
This patch fixes the all-builds table as not to show
in-progress builds.

(Bitbake rev: 60fdc834d386dbace0a158123afd68df3ffbff90)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:56 +01:00
Alexandru Damian c9455a7484 bitbake: toaster: fix pylint errors
Prompted by issues discovered during running pylint on
the toaster sources, this patch fixes:

* missing import in toaster ui
* improper call of function in toaster ui (logger.debug)
* improper function definitions in bbcontroller
* invalid references to objects in bldcontrol.models
* proper initialization of object fields in ToasterTables

Also inhibiting specific pylint errors in files where
the problems are mis-identified.

(Bitbake rev: 1c71955c416fb68455f7f70669aba4202c411807)

Signed-off-by: Alexandru Damian <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:55 +01:00
Alexandru DAMIAN 07b58c9734 bitbake: toaster: fix updates on failed build requests
The patch to fix the original mistake is wrong, in the sense
that a constant from the BuildRequest class is used on the build
object.

Fixing the patch to bring in the correct constant in.

(Bitbake rev: a740c17efc0ccc9f89a428ead08f9739af3c6de4)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:54 +01:00
Alexandru DAMIAN 242603e9b4 bitbake: toaster: replace raising Exceptions in loadconf
This patch replaces throwing Exceptions in toaster loadconf
command with proper explicit error messages. This allows
the user to properly understand and debug what went wrong when
loading a config file.

Additionally we change a bit the logic around auto-detecting relative
giturl handling so the user gets proper error messages when
trying to load an invalid toasterconf.json file.

[YOCTO #7945]

(Bitbake rev: 3d14cc033a855bf5b20e799438548b6d8f29d9b8)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:54 +01:00
Alexandru DAMIAN c159b3c117 bitbake: toaster: do not stop data import on bad data
The layer data update in Layer source needlessly stops
processing by throwing an Exception when bad layer data cannot
be inserted in the database (e.g. invalid dependencies).

This patch changes the behaviour to ignore bad data, and
continue with data import after detailed logging through the
logging system.

[YOCTO #7955]

(Bitbake rev: e0911e408db4fa07086738fe11121b173b4d1cf5)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:54 +01:00
Alexandru DAMIAN be4636aef2 bitbake: toastergui: rename variables in views.py
Renaming various variables in the views.py file to make
the code more readable, and prevent overshadowing of global
variables with local variables that have a different name.

(Bitbake rev: 5fe0c42ca9d34fa34b65b9fe0ff474200b78efe6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:53 +01:00
Alexandru DAMIAN 12c9cca5b1 bitbake: toaster: use loggers instead of prints
Switching debugging from using print statement to using
loggers, as it uses the logging infrastructure to process
the messages.

The messages are logged with the "toaster" logger which
is defined in the toastermain/settings.py.

(Bitbake rev: adf3bdcbe8b0b0bbe9de2800f2d20a53e8d88543)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:53 +01:00
Alexandru DAMIAN d18e6303a0 bitbake: toaster: models field initialization
As prompted by pylint, the object fields need to be
initialized properly, so this patch fixes that.

Also adds some casts to int, because, sometimes, the IntegerField
is not returning an int, but a string.

(Bitbake rev: cc9ac01d0726203fbe916cec51cc464eaeae9305)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:53 +01:00
Alexandru DAMIAN 504396f6a3 bitbake: toaster: improve exception handling
This patch improves exception handling, fixing issues
as prompted by pylint, including exception renaming.

(Bitbake rev: 652fad64864703cb1bbeede8d5bfc4208974be68)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:52 +01:00
Alexandru DAMIAN 99730d64d4 bitbake: toaster: checksettings: fix TEMPLATECONF detection
Improving the TEMPLATECONF detection by verifying the return
code and dumping extra debug information in case of exception.

(Bitbake rev: bdc00755993aa37e7669c3859ef4ea9b1fc3e680)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:52 +01:00
Alexandru DAMIAN 3a1af07177 bitbake: toaster: checksettings: fix guesspath initialization
Object fields need to be instantiated in the constructor.
Fixed prompted by pylint.

(Bitbake rev: 40db75c6117c3226c27d278d2acf0cd3ba61a167)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:51 +01:00
Alexandru DAMIAN 98dfa27050 bitbake: toaster: pylint fixes
This patch fixes imports, default parameters to functions,
incorrect overloading and exception handling issues
highlighted by pylint. There are no functional changes.

(Bitbake rev: 066e096b80dcb0e93e1a088acf5d914184361769)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:51 +01:00
Mihail Stanciu c8df84777b bitbake: toasteruitest: Updated UI tests cases to use dom IDs and 1.9 UI changes
Updated existing tests to use dom IDs where necessary.
Updated tests to use 1.9 specific UI changes:
    - removed deprecated columns(log and layer directory)
    - changed expected names for table header("Recipe" instead of "Target")
Added tests for TC 942 and 943 which were missing
Removed test for TC 959 which was deprecated under 1.9

(Bitbake rev: d8c37780609571e95edef9a220225927eb94b174)

Signed-off-by: Mihail Stanciu <stanciux.mihail@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:51 +01:00
Michael Wood 55f13d4556 bitbake: toastergui: Call csrf function in all pages to ensure cookie is sent
Not all pages call the csrf token template function so django does not
bother to send the cookike, this meant that all subsequent ajax calls
fail. So add this to the base template.

[YOCTO #8175]

(Bitbake rev: baed115081f888e027f92f37e12dc2dd2b874bf0)

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>
2015-08-19 18:05:50 +01:00
Paul Eggleton 715d857174 bitbake: Fix default function parameter assignment to a list
With python you should not assign a list as the default value of a
function parameter - because a list is mutable, the result will be that
the first time a value is passed it will actually modify the default.
Reference:

http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments

(Bitbake rev: 7859f7388f2e3f675d0e1527cfde18625f36f637)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:44 +01:00
Ed Bartosh c348fa5018 bitbake: toaster: move code from setup_lv_tests to setUp
As ProjectLVSelectionTestCase was removed there is no point
to keep this function. Moved code back to setUp method.

(Bitbake rev: 8e9bd559c8ef0ebc9e8babbada06e710908bae08)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:45 +01:00
Ed Bartosh e5956a6b85 bitbake: toaster: remove ProjectLVSelectionTestCase
Moved code from ProjectLVSelectionTestCase.test_single_layersource to
LayerVersionEquivalenceTestCase.test_compatible_layerversions.

Removed ProjectLVSelectionTestCase.

(Bitbake rev: b322cb6f5fec0b979a646605ed0d7646764c07a7)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:44 +01:00
Ed Bartosh 5638321f03 bitbake: toaster: add header to orm/test.py
Added header and module docstring.

(Bitbake rev: f393d3b8943375d18ebd6bc5e00dec5f288b46ec)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:44 +01:00
Ed Bartosh 50f9e203bb bitbake: toaster: simplify testcase code
Replaced 2 asserts with one in test_single_layersource method
of ProjectLVSelectionTestCase.

(Bitbake rev: 54131366ac2a8fc7866fb1293f5cd0e3da13ea46)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:43 +01:00
Ed Bartosh 552b1feeef bitbake: toaster: remove duplicated code
Removed test_dual_layersource method from ProjectLVSelectionTestCase
as identical method presents in LayerVersionEquivalenceTestCase.

(Bitbake rev: 5611c6b911e8a638f462e80e924ac9265a2199f5)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:43 +01:00
Ed Bartosh 1f7d7bf216 bitbake: toaster: reuse common code
Moved setup code of LayerVersion tests to a function
and call it from setUp methods of 2 classes.

(Bitbake rev: 65121e71078499ba585cc6a42018339d7884322e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:43 +01:00
Ed Bartosh 958696f560 bitbake: toaster: reformat LayerVersionEquivalenceTestCase
Reformatted to increase readability and satisfy pylint.
Added docstings.
Shortened variable names.

(Bitbake rev: 01e6fb74b60b1a66873f33866a35bdf6b2f807bd)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:42 +01:00
Ed Bartosh d637b91639 bitbake: toaster: rewrite LILSUpdateTestCase
Reformatted code. Added docstings.

(Bitbake rev: 0d1a9038b0cface75d3c858543e411f519b4ef5e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:42 +01:00
Ed Bartosh 344ad2e128 bitbake: toaster: rewrite test for LayerSource model
Rewritten LayerSourceVerifyInheritanceSaveLoad class from scratch.

(Bitbake rev: 34ea4c661ee48e1986fe2375b94e5b1c5c16c8ee)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:41 +01:00
Ed Bartosh 11668e24e7 bitbake: toaster: fix test_build_layerversion test case
The reason of test failure is that Django querysets are
different even if they contain the same objects.

Fixed by converting querysets into lists.

(Bitbake rev: c1abc6f0905e4321668a483a3d5be7cef3c25401)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:41 +01:00
Ed Bartosh 77ca551813 bitbake: toaster: remove prints from the test code
Removed prints as they make test output harder to understand.

(Bitbake rev: 922d37bfee7cc75aa7a3fd5b76abc33df57d3704)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:40 +01:00
Mihail Stanciu 645435a645 bitbake: toastergui: Added IDs to elements used in testing
Added static IDs to elements commonly used in the testing process so
that future UI modifications would not break tests as easily.

[YOCTO #7380]

(Bitbake rev: 04e896d7fb170271fb09dae5c2a42acb4b68f513)

Signed-off-by: Mihail Stanciu <stanciux.mihail@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 08:48:28 +01:00
Sujith H 91d8f88bb7 bitbake: toastergui: Add tests for xhr_importlayer
Inorder to make sure if layer name which we import is already
available in toaster database, a test case has been included.
This would help user to identify if layer name which has been
provided in the import layer web page already exists or not.

(Bitbake rev: 26e2b4a997503b82dc5535ce087565a0d6418141)

Signed-off-by: Sujith Haridasan <sujith.h@gmail.com>
Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 08:48:28 +01:00
Alexandru DAMIAN c9d1cb299a bitbake: toaster: fix invalid fields in the package details page
This patch safeguards referencing invalid fields in the
project details template, and fixes errors thrown in the
page.

[YOCTO #7992]

(Bitbake rev: 64b30bc15e87f81eddac79872b2282c435827ad0)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 08:48:27 +01:00
Belen Barros Pena 8ab2101166 bitbake: toaster: Fix typo in set up script output
Removing an spurious 'it' when setting the build directory.
Thanks to Scott Rifenbark for finding the typo!

(Bitbake rev: dd644a2c87e651c3990520759bab55a56ba110d1)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 08:48:27 +01:00
Ed Bartosh a16e0b4014 bitbake: toaster: reduced amount of instance attributes
Used local variables instead of instance attributes in ViewTests.setUp

Fixed pylint warning:
    Too many instance attributes (9/7) (too-many-instance-attributes)

(Bitbake rev: 0c419902e5f58dcee9b7fbe9af1928da37e18399)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:02 -07:00
Ed Bartosh 5fe1c19644 bitbake: toaster: fix pylint warning 'no space allowed'
Fixed pylint warning "No space allowed before/after bracket".

(Bitbake rev: 0b0f360b3660373716189995f3d33ffbc1b21db5)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:02 -07:00
Ed Bartosh 27a483dcb3 bitbake: toaster: fix test_get_json_call_returns_json again
Fixed this test case again after rebase. Improved it
to check for all returned keys. Previously it was checking
only 3 of them.

(Bitbake rev: 2deef2e86a09b6cb907bfeff56774f889cfe30a1)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:02 -07:00
Ed Bartosh 3ba3cf22d6 bitbake: toaster: don't catch json.load exceptions
It doesn't make sense to catch json.load exceptions in the
testing code. If API throws traceback it's better to see
it instead of error message.

(Bitbake rev: 207cb1d16ab089995f23b6070be358870506aa62)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:01 -07:00
Ed Bartosh b3ab9b1211 bitbake: toaster: add header and docstings
Added header and docstrings to toastergui tests module.

(Bitbake rev: d46bc24e95fa27cee686b84fbd8c6407efa2635b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:01 -07:00
Ed Bartosh 8ee14d59ed bitbake: toaster: remove unused import
Fixed pylint warning:
    Unused Build imported from orm.models (unused-import)

(Bitbake rev: 30585f7e37966e827861c25a0cc3bf9e3bd2f667)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:01 -07:00
Ed Bartosh 91fea094ab bitbake: toaster: get rid of class attributes
LAYER_NAME and RECIPE_NAME attributes don't make sense as
they're used only once.

(Bitbake rev: 86936224f49810147daa91ea2a050b0e7a82f106)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:00 -07:00
Ed Bartosh 8af82c207d bitbake: toaster: put all test cases into one class
Moved all functionality (one setup method and one test case) from
ProvisionedLayersProjectTestCase and XHRDataTypeAheadTestCase to
AllProjectsViewTestCase.

Renamed AllProjectsViewTestCase -> ViewTests.

(Bitbake rev: d87dc9a03bb2d1c21551894d611a4312254f46ef)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:00 -07:00
Ed Bartosh 2f8c8e4c31 bitbake: toaster: get rid of AllProjectsViewTestCase
Removed AllProjectsViewTestCase class as it had one method 'setUp'
and used as a parent for another class AllProjectsViewTestCase.

Moved setUp method to AllProjectsViewTestCase.

(Bitbake rev: b68e4d994eb825c1039fd90d197724b77aeebd5d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:00 -07:00
Ed Bartosh 13e04177da bitbake: toaster: wrap long lines
Fixed pylint warning Line too long (line-too-long).

(Bitbake rev: 37f7588df9759481080db56462a271ca808ba9ff)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:57:59 -07:00
Ed Bartosh 9e3c0ee1c5 bitbake: toaster: fix test_get_json_call_returns_json test
This test case used wrong field name.
Fixed by renaming field 'lists' -> 'rows'.

(Bitbake rev: 534a302a413319d2573c894b1c1077ac0578bbb1)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:57:59 -07:00
Michael Wood 58197f345b bitbake: toastergui: layerBtn Fix build trigger mechanism
The new project page is no longer responsible for triggering the build so
add a handler for this in layerBtn which is used in the layerdetails and
layers pages. This also removes the conflicting and  redundant handler
for this in the layerdetails.

(Bitbake rev: b4c389443bdd121121fd1d1a9006a9f1f63f186f)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:50 -05:00
Michael Wood a65099eec3 bitbake: toastergui: Fix typo on layers in project filter condition
Should be & rather than "and" which was returning the truth'd value of
the and condition.

[YOCTO #8114]

(Bitbake rev: 58035667e433f2b77f5cd48240dd051c35476284)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:50 -05:00
Michael Wood 5194f0401e bitbake: toastergui: Move click disabled check after table ready event
We were attaching this handler before the elements were fully ready in
the dom. Which allowed these links although disabled to take users to
the change machine page.

(Bitbake rev: 8245a7d679914ca7d4548ab7e83b5047ff8a1ff5)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:49 -05:00
Michael Wood c1993d08cc bitbake: toastergui: Machine select button url parameters change
Update the url for changing the machine in the project page.

[YOCTO #8113]

(Bitbake rev: 6e46ad4aa404d80fded27db1fb072d35250cfcfb)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:49 -05:00
Michael Wood b12e51c352 bitbake: toastermain: Add a longer default database timeout
When using sqlite we sometimes see Database Locked exceptions when we
fire off database calls asynchronously from the UI. We need sqlite to
wait a bit longer for the lock to be released.
n.b In production setup we hopefully wouldn't be using sqlite.

docs.djangoproject.com/en/1.6/ref/databases/#database-is-locked-errors

(Bitbake rev: 7f3a4e0330f4de3ba8e092bc1c15a53d8c2be073)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:49 -05:00
Michael Wood af72d0fbb2 bitbake: toastergui: Move layerdetails view definition to the views.py
The layerdetails view definition was moved to tables though it isn't
a table. We have a mechanism for the JSON response for this page so use
this instead of a custom class.

(Bitbake rev: b5100bfd4cb32a9b59b0554c6dbc3a4295da7d8e)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:48 -05:00
Michael Wood da4c66385d bitbake: toastergui: Fix toastertable table header reference
A header id was mistakenly added to the table template which was not
also added to the simple version of the toaster template. We don't need
this id so remove it.

(Bitbake rev: daf902e2a6f736b9c8ef6492143fdbf856451559)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:48 -05:00
Michael Wood e616c201a5 bitbake: toastergui: libtoaster typeahead Add in results highlighter
Add a highlighter for the results in the typeahead, this highlights the
part of the results which is currently being matched. This is a modified
version of the bootstrap stock function with added escaping and the
addition of the details information.

(Bitbake rev: 3a6bad55a84d8d374a23f488ce42fed9b927c4f2)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:48 -05:00
Michael Wood aad380028f bitbake: toastergui: libtoaster: typeahead resiliency for slow server
When we have a slow request we don't want to see the typeahead results
changing in the middle of typing the item. To do this we make sure that
requests to the typeahead can only happen sequentially and that if
results have been retrieved but the input is now empty we don't bother
showing the results.

(Bitbake rev: 0b508e8b4a9e25c223c6c11ecd6d0e1aab727e8c)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:47 -05:00
Michael Wood 0494a2769b bitbake: toastergui: tests Fix and more comprehensive typeahead unittest
Fix the currently broken unit test for typeaheads and add some
additional fields to check for in layers, projects, recipes and machines
typeaheads.

(Bitbake rev: 5700cd269e3a4fd517e16a3a19e61a23091df465)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:47 -05:00
Michael Wood 4d7944d6ad bitbake: toastergui: views Standardise the fields project layer response
We need to keep consistent the field names of these objects so that we
can use the object response from different calls. e.g. layer dependences
or listing layers in the project.

(Bitbake rev: 5c7004908f6916c0d279299c47b9dca3237148ec)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:46 -05:00
Michael Wood 951e40dd7d bitbake: toasterui: views Remove unused xhr_typeahead view definition
The one thing left being used in this definition was a response which
contains the list of layers which would be deleted if you change the
project release. This patch moves that to it's own url/endpoint and
updates the frontend reference which is using it.

(Bitbake rev: 1cc19c84ee97182f39eae0338c712f7a2b40a18d)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:46 -05:00
Michael Wood 1e7707b63f bitbake: toastergui: libtoaster Throw an exception no url is specified
At a minimum for this typeahead to work we need a url parameter to call
for a JSON reponse of items to filter on.

(Bitbake rev: 80b214d93c5df63a251b807ca93f81f00c6bfeb2)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:46 -05:00
Michael Wood aff29d2cd8 bitbake: toastergui: Switch to using the new toaster typeahead widget
Switch the existing typeahead inputs to use the new typeahead widget.
This means we have a defined mechanism and end point for typeaheads
which meets the design specification.

(Bitbake rev: 31a8ae7909347f7b6edde5bbdf02b86dc1b32ed0)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:45 -05:00
Michael Wood 73367c2ca8 bitbake: toastergui: Add typeaheads layers, machines, projects, recipes
Implementation of typeahead widgets for layers machines and recipes
typeahead.

[YOCTO #7152]

(Bitbake rev: 913d01758564db2f5fae4451bf0fdca38a1b3d61)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:45 -05:00
Michael Wood f4e51fff4a bitbake: toastergui: widgets Add a typeahead widget
The typeahead behaviour is significantly different from searching in a
table so we need a separate widget to do this.

[YOCTO #7152]

(Bitbake rev: 195c5407a9de29d97f2525b9ae6c827afb934e37)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:45 -05:00
Michael Wood 68128ad2f1 bitbake: toastergui: tables Use util functions for the common querysets
Use the new utils functions on the project object to get the common querysets
that we also use in tables.

(Bitbake rev: 5e013a9bc3deb03bd6bac357b9ecb81c3c77b255)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:44 -05:00
Michael Wood c4e7113dd0 bitbake: toaster: orm Add util functions to return common querysets
We use these querysets when creating tables of results and also when we
want to have a typeahead search. These can also form the basis of future
API endpoints.

(Bitbake rev: 2a10fecd985343802f0e99c6fff25c28980eee20)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:44 -05:00
Michael Wood d3b9927a3c bitbake: toaster: orm Add util function to return the url to layerversion
Save duplicating this call and make a utility function for it on the
Layer_Version object.

(Bitbake rev: 32d382315bad37cebbe67ca3287085f3d856a9ed)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:43 -05:00
Belen Barros Pena c8bc7ee6ed bitbake: toastergui: add action to empty "most built" recipes
It is not very good to just tell people: "this is empty because you
haven't done anything". We should politely invite them to do something
about it. Thus adding a "Choose a recipe to build" link to the all
compatible recipes page whenever the 'most built recipes' section is
empty.

(Bitbake rev: 8d2ed32cd09cf6cb96521fd42789faae99656fad)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:43 -05:00
Belen Barros Pena 1a0fa6cbfb bitbake: toastergui: fix spacing in the import layers page
Adjust the space between the first fieldset and the tabs,
and the help text and the first form field.

(Bitbake rev: 68086d260842c12e5459c719f383b045fb0b3c2d)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:43 -05:00
Belen Barros Pena 0378aadd58 bitbake: toastergui: remove project name from layer change notification
The project name is always a link to the basic
configuration page, which looks quite silly when
you change layers from that page.

Since I guess the idea is reusing those notifications
everywhere, I've replaced the project name with a
generic 'to your project' / 'from your project', so
that they read right no matter where you see them.

(Bitbake rev: 59bcafa712b9a16b647bd26b3bd738ae6fc21eaa)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:42 -05:00
Belen Barros Pena 69c6f1fd13 bitbake: toastergui: change link styles in alert-info
Make them a bit less bold: it was a bit in your face
before.

(Bitbake rev: fd9e6d262aa3fdb2377c30ebac54096453a3b9f9)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:41 -05:00
Belen Barros Pena 569567d3b3 bitbake: toastergui: breadcrumb fixes
Make sure that we use the correct html entity
for the breadcrumb dividers, and remove the
'all builds' item from the history pages: all
breadcrumbs should now have the project name as
their first element, since the 'all builds' page
can be reached using the global naviation in the
top bar.

(Bitbake rev: c97f658f4b2131f280c364c2209efd28878570dc)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:41 -05:00
Belen Barros Pena d47358fc95 bitbake: toastergui: spacing and top nav style change
Remove the margin for the .section class and the
.row-fluid class in the page header div to
reduce the vertical white space a little
bit in the project pages.

Also, change the style of the Toaster manual
link to make it look like the main navigation.

(Bitbake rev: 7b539bbf25786d313fd8092dc96b186388df58aa)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-06 16:04:40 -05:00
Ed Bartosh 7f4eb55d70 bitbake: bitbake: toaster: Add is_image field to the Recipe model
Added new field is_image to the Recipe model.
Made sure is_image is populated when layer sources are imported.
Made sure the change doesn't break loading old style layer sources.

Tested by loading data from layers.pythonanywhere.com and
from layers.openembedded.org.

[YOCTO: #7571]

(Bitbake rev: 3ac0ba73790b8f68567daa2de313c78053411fbb)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:29:35 +01:00
Ed Bartosh 9be8ea632c bitbake: bitbake: toaster: Uncomment logging messages
Uncommented debug and warning messages in _shellcmd method of
LocalhostBEController as they seem to be useful for debugging.

(Bitbake rev: 9446f02520a3bee4417908d8da2ab1848f4759c3)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:29:35 +01:00
Ed Bartosh 79c8ffa5d3 bitbake: bitbake: toaster: get rid of _createdirpath function
Replaced call of recursive _createdirpath method with simpler
call of os.makedirs.

(Bitbake rev: 018442e2645390342d43a95a8685e51b29ea868a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:29:35 +01:00
Ed Bartosh 3b6e5df2aa bitbake: bitbake: toaster: Fix usage of wrong variables
Replaced nonexistent variable 'be' with self in
models.py/BuildEnvironment methods.

Fixed typo: BuildRequest.TYPE_LOCAL -> BuildEnvironment.TYPE_LOCAL

(Bitbake rev: ed6094f78c75aab776a82967101d9c57e38e2c4d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:29:35 +01:00
Ed Bartosh a403ddbbba bitbake: bitbake: toaster: Wait for toaster gui to come
Set logging level for the Toaster logger to get messages
to toaster_ui.log

Reverted previous workaround.

[YOCTO: #7965]

(Bitbake rev: f1d8e0ff7233f17cff3a56db10d2443b392b407d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:29:35 +01:00
Michael Wood e68370cbf1 bitbake: bitbake: toastergui: Toastertables don't replace dash in cache key
The dash character was being stripped from the cache key when we sanitise
it for the memcache backend. This meant that we were getting a false hit
on the cache and returning non descending results which are indicated by
the dash prefix on the field name.

(Bitbake rev: 18743274a94966d2cd8d17d163e4dbab501a8a52)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:29:35 +01:00
Alexandru DAMIAN 6520feb4ab bitbake: toaster: toastergui: run pylint on the toaster files
This patch enables pylint running on the toaster files, showing
only the errors. This enables spotting common mistakes in the
toaster python files.

(Bitbake rev: d2e69721233ab3cbbc3bdd6a1c198fde8a1f287e)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:27:55 +01:00
Alexandru DAMIAN 1da5e0a793 bitbake: toaster: tts: execute tests in numeric order
As the tests are verifying different type of the functionality,
it is usually the case that a failing early test will completely
make the subsequent tests failing, e.g. if the system cannot
start due to a bug, there is little point in testing other
functions.

In order to prevent uneeded test runs, and to generate repeatable
test patterns, the test cases have now a numeric order in the
class name (e.g. Test01XXX). The tests are executed in this order,
and the first test failing will stop the test run.

(Bitbake rev: 639c46a08e524902018e28367fcb4e26362cd3e3)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:27:55 +01:00
Alexandru DAMIAN e6419ccd93 bitbake: toaster: tts: make sure to import data
Importing data from the layer index should be part of the setup
because otherwise we have no reliable database configuration.

This patch selects the first option for importing the database
configuration file.

(Bitbake rev: 86a69d294ace41bd109db97b753554ccc8f3dac0)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:27:54 +01:00
Alexandru DAMIAN ada494d3dd bitbake: toaster: tts: delete the database only if created
To allow the tests to run on different databases (in case of
manual runs), the HTML5 test will only delete the database
file if it was created in the setUp.

(Bitbake rev: 2b04165f6a70fad5beb8e4c7053a2b2053a51cde)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:27:54 +01:00
Alexandru DAMIAN ef70e137b2 bitbake: toaster: tts: delete pyc files before the tests start
There may be leftover *.pyc files from previous code runs in the
current checkout directory, so we delete everything before
starting the tests, to make sure that we actually testing the
current checkout.

(Bitbake rev: db29ef9ab23c9f083e9aa175b28430f122f35a84)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:27:54 +01:00
Alexandru DAMIAN f9eb958a8a bitbake: toaster: tts: fix startup and cleanup for managed mode
This patch fixes the toaster startup and database cleanup
for managed mode. It is needed because the toaster script
thinks it has been called with "source" instead of being
executed as independent script if not called through bash.

(Bitbake rev: f08ce41f1137f268049ef8345462aa58b233e50b)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:27:54 +01:00
Alexandru DAMIAN ba667a0908 bitbake: toaster: tts: improve logging in urlcheck.py
This patch improves logging in the urlcheck.py.
It allows properly running just HTML5 tests outside the
test suite.

(Bitbake rev: 91566d2ea8ca5a696ce742b9e5e3b7b6c10c200c)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:27:54 +01:00
Alexandru DAMIAN faaa5d45d8 bitbake: toaster: tts: improve debugging information
We add debug information, and exception handling as to make
it easy to figure out what is going on when tests fail on
automatic start.

(Bitbake rev: d7c5989b795566f8611208b26851871abccf9578)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:27:54 +01:00
Alexandru DAMIAN f169733738 bitbake: toaster tests: gitignore and use absolute path for log file
gitignore the cache directory created by the http client

the log file for tests is already set up as an absolute path,
so no need to recompute the path

(Bitbake rev: 80f525e5cbe83e0407ecddf84401d68213c6d5cf)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:27:52 +01:00
Alexandru DAMIAN 73f14975c5 bitbake: toaster: tts: clean up HTML5 compatible url list
This patch cleans up the list of URLs that are tested for
HTML5 compatibility using the w3c-validator. It removes
the URLs that are no longer in use, and the AJAX-only URLs
that return JSON content.

(Bitbake rev: c85a35e37150ee8be091bd142cac8a1885f1dff0)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:13 +01:00
Alexandru DAMIAN 1640a65091 bitbake: toaster: tts: fix pylint warnings
This patch brings TTS to the pylint coding standards.
Pylint was run with some disables:

disable=logging-too-many-args,line-too-long,missing-docstring

and achieved

Your code has been rated at 10.00/10

There are no functional changes.

(Bitbake rev: 2b40b412ff6a7e3fd4cc32707bd3cd713bc09ddb)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:13 +01:00
Michael Wood 160d610604 bitbake: toastergui: Remove angularJS and projectapp based on angular
AngularJS proved unsuitable for the new project page implementation.

(Bitbake rev: 6f25846dbcaf007f58f9a32e58dcd564f6430fe9)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:13 +01:00
Michael Wood 829fe32621 bitbake: toastergui: project page Add inline project name change feature
This feature allows the project name to be changed from where ever it is
displayed in the project pages.

[YOCTO #7329]

(Bitbake rev: 81cb1cd1aa900f29a25d14dce93d301cd6b6fdb7)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:13 +01:00
Michael Wood c76137e25b bitbake: toastergui: layerBtn use libtoaster for change notification
Use the common functionality for change notifications.

(Bitbake rev: 79af72e1b80b033a37992095b2e97449de5ebd8b)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:12 +01:00
Michael Wood b90a253fa6 bitbake: toastergui: newbuildbutton Fix removed elements
All the elements for the new build button need to be present for the
build button to work. Now that the template variables all have to have
values we have to make sure that the elements are still added to the dom
for the js to manipulate them.

(Bitbake rev: e2ab67eaf76da9ee2009e8420d5584c3daa97ac1)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:12 +01:00
Michael Wood 11627fc10f bitbake: bitbake: toastergui: newbuildbutton Fix typo on project save function
project.id rather than project.pk.

(Bitbake rev: 047df808203f3779243eb88c069757f7a7b7bbed)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:12 +01:00
Michael Wood c385f1551b bitbake: toastergui: Change build button popover to a build-button
To share the build-button mechanism from the pop over and project
topbar build button we now use a build-button class to reference them
and share the event handlers.

(Bitbake rev: e3c6a00b848a6f147e93c8da46b8a3516499fde8)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:12 +01:00
Michael Wood 10ffe1b8cc bitbake: toastergui: base Use removeAttr / attr
Use removeAttr and attr calls to enable and disable the build button and
build input field.

(Bitbake rev: c3753948bd00c3498ca3e76cb218eb6cf423c3e3)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:12 +01:00
Michael Wood be2b4239f6 bitbake: toastergui: Fix Duplicate layer importlayer api calls
As the JSON response changed the duplicate layer functionality wasn't
wasn't working as the field names in the returned data changed. This
patch brings the field names back in sync with the response.

(Bitbake rev: bdea86ae8720ee5792a5617c6073d51922a224ff)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:12 +01:00
Michael Wood 1a2f12099c bitbake: toastergui: libtoaster: Add guard against missing name property
Add a debug warning if a JSON payload isn't compatible. i.e. without a
name field.

(Bitbake rev: e65de693670203ddcbf5f23ad2a91c523df879d8)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:12 +01:00
Michael Wood a9549e839d bitbake: toastergui: libtoaster Make sure we always pass format=json
The new API for typeahead requires that we pass this parameter in to make
sure we get a JSON response.

(Bitbake rev: 2f8951d6e640d86f605b082aab4a950dab9065ad)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:12 +01:00
Michael Wood 691d547178 bitbake: toastergui: css Remove redundant css rules
The machine change notification animation is no longer required in
favour of the global overlay notification.

(Bitbake rev: aef36f2674d3d82b1757c02ffbf8b72fd4f32a4e)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:12 +01:00
Michael Wood 80c1586bbb bitbake: toastergui: Add new project page and navigation
This brings in the new project page design and improved navigation. As
this also removes the dependency on Angular it also required that the
entry points to the project page such as machine-change notifications
are also updated.

[YOCTO #7329]

(Bitbake rev: 6489e6eb5c3b0d59063b6d60521fc33fe563e707)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:12 +01:00
Michael Wood 258c929973 bitbake: toastergui: css Add new rules for new project page
Add new css rules needed for new project page.

(Bitbake rev: 6457d8fa30ac2b9b7413b8e9a7c5806bace10141)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:11 +01:00
Michael Wood 9af7ce513c bitbake: toastergui: http api Add guard against incomplete change requests
If we get a request to the project change api which either contains the
current configuration (i.e no change) or empty configuration handle this
gracefully.

(Bitbake rev: cc6c606c07baadc849c3290b23c56ad4e719fba2)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:11 +01:00
Michael Wood 7a589c0b20 bitbake: toastergui: tables Add name field to layers table
This field is required by the typeahead in the new project page to do
the name matching on.

(Bitbake rev: dbce3b43094b0a123b0d63aa07cc4f9547630094)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:11 +01:00
Michael Wood 8ff56b0fb3 bitbake: toastergui: libtoaster Add show change notification function
Now that we have a change notification that is global move this
functionality to libtoaster for shared use.

(Bitbake rev: 9d760462de99cb8729b7e0db773e77d4cd508733)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:11 +01:00
Michael Wood 1b13222e1c bitbake: toastergui: Standardise the layer object property layerdetailurl
To be able to use the utility functions in libtoaster  we need to have a
single property name for the value that represents the url for the
layer details in the layer object.

(Bitbake rev: 4d64fd0d1236d342b29537f601a68cd23a8255ea)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:11 +01:00
Michael Wood df999d2ac1 bitbake: toastergui: Remove erroneous CSS property
Remove a CSS property value which is missing a corresponding key.

(Bitbake rev: 770008f8ff3f8aa4f90636621a4162d676a71da7)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:11 +01:00
Michael Wood dd8c78b07a bitbake: toastergui: importlayer Add format type to JSON calls
After API was changed we now need to pass the parameter "format=json" as
a get parameter when requesting a json payload. Otherwise we get the
html version of the page instead of the data we need.

(Bitbake rev: 4545c21b70998bd240c3a21de05e8d4642044119)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:11 +01:00
Michael Wood d826d4e800 bitbake: toastergui: base Fix html indentation
(Bitbake rev: 37364e671ad1897bef818239a8e289b3d4c93925)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:11 +01:00
Michael Wood b06a633f25 bitbake: toastergui: Implement new project navigation
Change the structure of the project page to include a navigation menu
and top tab navigation. Remove old breadcrumb method.

[YOCTO #7329]

(Bitbake rev: 66fa0dd988e01ec79e74be7a5697eaa3b4f017d8)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:11 +01:00
Michael Wood 3d3a2dbf5f bitbake: toastergui: Implement new top navigation design
Additional items for top level navigation. This is part of a wider
navigation redesign.

[YOCTO #7329]

(Bitbake rev: 456a4a6782d3098cc9abb39659a619fdcf52eb01)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:10 +01:00
Belen Barros Pena 9a92500306 bitbake: toastergui: make our tables Chrome-happy
Make sure that Toaster tables adapt nicely to the
viewport width in Chrome without squashing the
buttons in the right column (when they are there).

(Bitbake rev: 61307693a25a4a2eeeab5c450df330229638ddad)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21 15:36:14 +01:00
Brian Avery 0c0ec86110 bitbake: toaster: continue processing layer dependencies despite errors
Sometimes, a layer dependency will not exist,
  or not exist for a particualr branch. In this case
  we need to continue processing and hope for the best.

[YOCTO #7955]

(Bitbake rev: 2961bf2612fce111a7be6cef285595a075200780)

Signed-off-by: Brian Avery <brian.avery@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21 15:36:14 +01:00
Michael Wood c86a0d290f bitbake: toaster: Fix build execution regression
Make sure the error value is initialised and update the string match
that we have to identify bitbake's current startup status.

Patch contribution from Eduard Bartosh

(Bitbake rev: 915ba08a8a3013e9787e564f2ffd8698c948f433)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 22:56:39 +01:00
Michael Wood 56066872ae bitbake: toaster: runbuilds Fix incorrect variable name
The recent refactoring moved this enum value to BuildRequests table
rather than Build.

(Bitbake rev: 4338ab03826df3353e1222f0bd825dfdd04dd933)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 22:56:39 +01:00
Michael Wood 483b21b0cb bitbake: toaster: Remove erroneously committed template include
Partial revert of bb commit 6e46e1e3882b9770872d8a0bb459bc7d5d6bfed3

The non managed mrb_section defined the title 'All builds' which is already
defined correctly for the projects page as 'All projects'

(Bitbake rev: 3500b59cbfd006a83bab9431f434f98c1944a0ac)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 22:56:39 +01:00
Michael Wood cfc4f1b343 bitbake: toaster: Revert the addition of analysis project mode selection
Partial revert of bb commit 2efc338cefd6e6e097af83d7dff63e9ba177d021

This feature was not ready to go live as the surrounding implementation
work to make this usable has not yet been done.

(Bitbake rev: 40c8829369628927944c8a950524d482a663913e)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 22:56:39 +01:00
Michael Wood 3b3ef9cee2 bitbake: toaster: Partial Revert "fixes after html5 compliance testing"
Partial revert of bb commit 7aecb974d44d9bc711ffba5cc65e770811397fba

There were changes in this commit which broke the compatible layers
mechanism meaning that no layers, recipes or machines were showing.

(Bitbake rev: 124157b567469639c6c839233f42049a093ba083)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 22:56:38 +01:00
Michael Wood d93bc4cf48 bitbake: toaster: Add url pattern for backward compatibility
This adds an url to match the old orm application.

(Bitbake rev: 0a8e740e18333da981b24a76db4c891845e5df78)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:33 +01:00
Michael Wood df48243970 bitbake: toaster: split orm app into it's own module and app
The orm application was also the django application to collect the build
information. Splitting this module up into it's functional parts. orm
for the data module and bldcollector for build collection data.

(Bitbake rev: 8ca10764ffd6cfec12cbfeabf240d81213a07845)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:33 +01:00
Michael Wood 62288a6689 bitbake: toaster: bldcontrol Ignore toasterconf files in own directories
If toaster has previously cloned poky or a layer with a toasterconf
file we don't want this to be picked up as a choice as these clones are
"internal" to toaster and may have undesired effects on toaster's setup.

[YOCTO #7741]

(Bitbake rev: 2f74ff59f2873c1cf121f7a385f3ab971c793a9c)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:33 +01:00
Michael Wood 10e35ab742 bitbake: toaster: Restore 'in project' filters to main tables
Restores the previously removed filters from recipes, machines and layers
table. These filters allow filtering down the results to just displaying
the current added layers, machines or recipes in the project.

[YOCTO #7851]

(Bitbake rev: 04a3e4614aae8ba794a3b8ac9083e723de7ca522)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:33 +01:00
Michael Wood 4013784b45 bitbake: toaster: table.js fix filter visual indicator and interaction
- Fix the id of the filter modal dialog.
- Fix the visual indicator toggle button
- Add check to see if the number of items to filter on is !=0 if it is
  then don't allow applying this filter.

(Bitbake rev: a73f08c79077b6ded0c08ea7d36032f4568d12e3)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:33 +01:00
Michael Wood d21e1749c8 bitbake: toaster: toastertable Pass up the kwargs for setup_filter
This allows us to setup_filter in tables using args such as the current
project.

(Bitbake rev: e0d59c32a7cff76d732a90cc6d507c7a9b68cb84)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:33 +01:00
Michael Wood 93c54c2f9d bitbake: toaster: Enable toastertable cache
Enable the cache and fix warning on the toastertable cache which happens
on the memcache backend "CacheKeyWarning: Cache key contains characters that
will cause errors if used with memcached"

(Bitbake rev: 330692e4e2e4dea59f70caa03001905ffff4860a)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:33 +01:00
Alexandru DAMIAN f28116ec10 bitbake: toasterui: fixes after html5 compliance testing
This patch brings fixes for issues highlighted by
HTML5 compliance testing.

(Bitbake rev: 7aecb974d44d9bc711ffba5cc65e770811397fba)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:32 +01:00
Alexandru DAMIAN 8ef5165b5a bitbake: toaster: delete multiple builds
This patch fixes the build deletion on unmigrated databases,
and enhances it to delete multiple builds in a single run.

[YOCTO #7726]

(Bitbake rev: d5468d84c1ef83c780de5974c8e3a11eab762489)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:32 +01:00
Alexandru DAMIAN 5d0abf197a bitbake: toastergui: select project types
This brings in project types in the New Project page.

The "analisys" projects are the projects with no "release"
set, and have read-only properties in the project page.

(Bitbake rev: 2efc338cefd6e6e097af83d7dff63e9ba177d021)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:32 +01:00
Alexandru DAMIAN 70c4eb8d3a bitbake: toaster: refactor build model
We remove the "timespent", "errors_no" and "warnings_no" fields
in favor of computing the needed values at runtime. This prevents
inconsistencies in the UI.

Also removeing all references to BuildRequests from the interface -
all build details now display in the build dashboard.

Minor fixes related to data logging.

(Bitbake rev: 44f37394ed3e4ca02f940be172fe4395b0ee0f7d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:32 +01:00
Alexandru DAMIAN 287b49a35b bitbake: toaster: bring django-aggregate-if into the project
We bring the django-aggregate-if module (with minor changes to import)
into the project.

(Bitbake rev: 4b92add34167304b45c66b9726cbc64bc0f74d9f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:32 +01:00
Alexandru DAMIAN 35fe3117ab bitbake: toaster: add django-aggregate-if
Import library that provides conditional aggregates
in Django. The tests are removed as they conflict
with the Django startup.

The sources are
https://github.com/henriquebastos/django-aggregate-if

Licence is MIT

(Bitbake rev: 016b416fd0eaeab648a588053a2ee1f41bc02a84)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:32 +01:00
Alexandru DAMIAN 335c975650 bitbake: toaster: fixes after replacing BuildRequest with Build
This is a set of fixes that repair the interface after
we switched from displaying BuildRequest data to Build data
in the formerly "managed" mode.

(Bitbake rev: 57f790b0c56297af8c83d5def8461bd5d61fe4af)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:32 +01:00
Alexandru DAMIAN d7c8d9558c bitbake: toaster: fill in build data from buildrequest
This patch adds logic to complete changing the interface
from showing BuildRequests to showing Build data.

The BuildRequest data is now transformed in Build data with
proper Toaster exceptions being recorded instead of listing
problems during startup as build errors.

(Bitbake rev: 51a41172d0b390370f9a38696b1ac65666ada4d2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:32 +01:00
Alexandru DAMIAN 160563532f bitbake: toaster: refactor the builds pages
Taking out the managed mode-specific bits in build-related
pages, as there is always only one mode available.

Also refactors the build pages in order to always display
Build objects instead of BuildRequest objects.

(Bitbake rev: 6e46e1e3882b9770872d8a0bb459bc7d5d6bfed3)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:31 +01:00
Alexandru DAMIAN 2c7ed96b56 bitbake: toaster: remove BuildRequest references
In the toastergui application we should not display
implementation details about how the builds are run.
This patch removes the references to BuildRequest on the
majority of the views (except Builds page itself, as
that is more complicated).

(Bitbake rev: ead45a600813a1d8594e604875803ded781f83d8)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:31 +01:00
Alexandru DAMIAN c362e61ee2 bitbake: toaster: remove MANAGED references
We conflate the managed and analysis modes by
deleting alternative code paths, favouring the MANAGED mode,
always considering the MANAGED variable True.

(Bitbake rev: 0ac02d3775106b485e29496b62f31e91fd3f9387)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:31 +01:00
Alexandru DAMIAN b98a2fcab6 bitbake: toaster: fixing undefined variables
This patchset fixes usage of undefined variables in
the base page.

(Bitbake rev: a9e889af41e1e59c3b426c78ba80e4d49c6c122b)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:31 +01:00
Alexandru DAMIAN 933e4dbb50 bitbake: toastergui: enable strict variable checking
In order to make sure we don't use undefined variables in the
templates, we enforce strict variable checking in the templating
engine.

(Bitbake rev: 3928dc93188880386588fe3f440cd0aaa83d22de)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:31 +01:00
Alexandru DAMIAN 0b2e6442a6 bitbake: toaster: improve the buildenvironment API
We improve the buildenvironment API by reducing it to a single
command: triggerBuild.

This command is specifically implemented in each BE controller
type, so the runbuilds management command is only concerned
with scheduling the next build, and not with the details
of how a build is actually started.

(Bitbake rev: 7ee0f1da0a8fcac37419ffdddbe35a9268a1ded4)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:31 +01:00
Alexandru DAMIAN aad93dd3b7 bitbake: toastergui: fix angular error
Due to invalid identification of builds in the array update
code (by id and status), we could end up with multiple entries
sharing the same primary id, visible in the UI as an angular error.

We modify the code to identify the builds exclusively by id.

[YOCTO #7611]

(Bitbake rev: 77d3f7c6cdc7f06807024896369f8f8ae94263fc)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:31 +01:00
Alexandru DAMIAN 379a030702 bitbake: toastergui: prevent contamination of libtoaster context
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.

(Bitbake rev: 937665bd57dad04dd6bb46d06488b699f5c54d29)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:50 +01:00
Michael Wood 4f459fca79 bitbake: toaster: Add global ajaxError handler
If any ajax calls fail and debug is enabled log the error to the console.

(Bitbake rev: 978ab17033ec48ee0a82016b7e4d6a2fe5d21dbb)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:50 +01:00
Michael Wood 0573e2d31c bitbake: toaster: Add ajax loading spinner
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]

(Bitbake rev: ecb70b0bc996529f1a6e58e5716b31e273395c98)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:49 +01:00
Vlad Fulgeanu eb28534423 bitbake: toaster: tables: Remove obsolete field_name for select column
field_name is no longer used for this kind of column. So no need to specify
it here.

(Bitbake rev: 058e9db05767f2d46d46c02dd5043bb0f6b8e460)

Signed-off-by: Vlad Fulgeanu <andrei-vlad.fulgeanu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:49 +01:00
Alexandru DAMIAN 58cd4a14ea bitbake: toaster: fixes after refactoring
This patch fixes issues brought in by refactoring:

* the New Build button is working with pre-set projects
* the xhr_datatypeahead is exposed for calls that are not
mapable to the REST objects
* a new table returing recipes provided by layers currently
selected in the project is used to provide recipe suggestions
* the field names in json are switched from "list" to "rows" as
to maintain consistency with the ToasterTables
* the "value" field in xhr_ calls is now named "search" to maintain
consistency

(Bitbake rev: a5bc29083d4f85a5695f3f62d5badb783c6f7224)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:49 +01:00
Alexandru DAMIAN 27f5137cd6 bitbake: toastergui: remove xhr_datatypeahaed layerdeps call
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.

(Bitbake rev: 33d2b87aca667d72262a3928deaf35414b46a7c1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:49 +01:00
Alexandru DAMIAN a8be6d4bb1 bitbake: toastergui: remove xhr_datatypeahead and xhr_XXXbuild
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).

(Bitbake rev: 8e7a2c3b125a34fd9d6fa0442ab13290137ecc51)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:49 +01:00
Alexandru DAMIAN 88dca45a70 bitbake: toaster: eliminate duplicate querysets
The Layer_Version.get_equivalents_wpriority performs the same
function as Project.compatible_layerversions, but in memory and
with worse performance.

Replace the code in get_equivalents_wpriority with a call to
the project compatible_layerversions, which also returns a queryset
instead of a list (can be used to further enhance queries)

(Bitbake rev: fb5eb1d7759222573565936a964d602c148df139)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:48 +01:00
Alexandru DAMIAN 7c2b86625b bitbake: toaster: add class template view for single-object pages
Adding ToasterTemplateView as prototype for all class-based
views that display single objects; equivalent to ToasterTable
for object lists.

(Bitbake rev: d3edea773000a663f5883e04f477d853bff64cf6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:48 +01:00
Alexandru DAMIAN 51ae1de5b7 bitbake: toaster: toastertables raise errors
Modifies the widget code to raise the Exceptions to the user
instead of printing then to stdout - making the programming
errors much more visible.

(Bitbake rev: 26dc19284e06a7ae35f75a243b2062f61e30f2ca)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:48 +01:00
Alexandru DAMIAN c941743c9a bitbake: toaster: ToasterTables add computational fields
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.

(Bitbake rev: fb683135348b074412da154585c75865aad1eab0)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:48 +01:00
Alexandru DAMIAN 58600cf8e7 bitbake: toaster: toaster table add raw data
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).

(Bitbake rev: 928ee3fd4b52ea14b7eb704f1f27351362a9d27a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:48 +01:00
Alexandru DAMIAN 4a2a057130 bitbake: toastergui: remove xhr_projectedit and xhr_projectinfo URLs
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.

(Bitbake rev: 6ad3078bd2be1a8cda99040acaa9bb81d77f0013)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:48 +01:00
Alexandru DAMIAN b1c91d06e0 bitbake: toastergui: use defaults on xhr_datatypeahead parameters
This patch prevents crashes when xhr_datatypeahead is called
without proper parameters.

(Bitbake rev: 4528490cf663790a455815dc48fbf3dda264098c)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:48 +01:00
Alexandru DAMIAN d9341d1a77 bitbake: toaster: toastertables REST refactoring
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.

(Bitbake rev: 1778dac9fd39dae75c55bf2cf836cdd488dbc265)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:47 +01:00
Alexandru DAMIAN 751e9182ac bitbake: convert all project-based view to JSON APIs
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.

(Bitbake rev: 7a6eb36b82c5f2e342777e479d9c401ded42453d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:47 +01:00
Alexandru DAMIAN afe06e313e bitbake: toaster: move project data typeahead to the REST API
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.

(Bitbake rev: 15a2274eba13d19b864f337057d61c75ff7849cc)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-12 00:01:47 +01:00
Alexandru DAMIAN 6e23a3deb9 bitbake: toaster: more HTML5 fixes
More HTML5 fixes highlighted by tests on new data.

(Bitbake rev: a52242bb4d928b9abba8a3489e350e4615a9da29)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:47 +01:00
Alexandru DAMIAN 225daf45a4 bitbake: toaster tests: enable url check test
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

(Bitbake rev: 931caab56301876cb8632b289835c2545a096ef6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:46 +01:00
Alexandru DAMIAN 29143915ae bitbake: toaster/tts: Fix tests
(Bitbake rev: f4257f8df3be0627bdc7209fe34d674c42baf8d2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:46 +01:00
Michael Wood b3189f3071 bitbake: orm: Fix all failing unit test
This fixes all the unit tests for the orm. Also added is the ability to
set a custom Layer index if you want to avoid using the public one by
specifying TTS_LAYER_INDEX

(Bitbake rev: dfbcbe116d0b987b850f67056f02f489ac0b8360)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:46 +01:00
Michael Wood 3480be741e bitbake: bldcontrol: Fix all failing unit tests
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.

(Bitbake rev: c17933271cd273a346115c2ee0b6695ff3f981ce)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:46 +01:00
Alexandru DAMIAN 22a0d8aab2 bitbake: toastergui: add tests for xhr_datatypeahead calls
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.

(Bitbake rev: 9a3197fba46b38e5863e7ded11e4bf9530cfcc9b)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:46 +01:00
Alexandru DAMIAN 65c805eb6a bitbake: toastergui: tests for the all-projects API point
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"

(Bitbake rev: 9edd61fe7afaf273ed31d214af9251462182ad4f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:46 +01:00
Alexandru DAMIAN fea4a82a2b bitbake: toasterui: replace cookie-based preferences with session data
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.

(Bitbake rev: 125d0e05805247450be0675e281a21bd6146d108)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:45 +01:00
Alexandru DAMIAN 1b6a50c6b2 bitbake: toaster: refactor checksettings command
This patch refactors the checksetting command to prevent
early return from the handle function.

It also adds a check that marks IN PROGRESS builds at startup time
as FAILED. Minor changes to BuildRequest and Build classes
ensure useful string representation for the objects.

(Bitbake rev: adf67dd79dbf6b585bf8cd54f99c389409b88ecd)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:45 +01:00
Ed Bartosh 52fe880f9e bitbake: toastergui: Consider task name when restarting a build in /builds
Previously the same issue was fixed for project view.
'Run again' button now restarts builds using target:task also in builds view.

[YOCTO #7442]

(Bitbake rev: ae6349a13f11b6fa90fe5603b000bef14ee0f2f0)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:45 +01:00
Ed Bartosh 6fab4cb701 bitbake: toaster-gui: Show task name for the builds in /builds
Task name was only shown for the latest builds in project view.
Now it should be shown also in builds view.

(Bitbake rev: 6492349d50a2048b1cbebab482bfd075bb48dd96)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:45 +01:00
Michael Wood e5aa569d47 bitbake: toaster: Add an invalidate cache method on data update signal
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.

(Bitbake rev: eb0b1450e421cf65b407b1ac0336ac24ffc626e8)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:45 +01:00
Michael Wood 2de01a68eb bitbake: toaster: Port layerdetails to ToasterTables
This ports the layerdetails page to using ToasterTables
Also some whitespace and strict clean ups in the existing layerdetails
js and html template.

(Bitbake rev: 8ce35f81631e31539aeb82f8a85abbb3312e5097)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:45 +01:00
Michael Wood a0ea663b83 bitbake: toaster: Add a simplified ToasterTable template
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.

(Bitbake rev: 4ce35c74d2b1ecd68c494fa9bab3c1133f9679c1)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:44 +01:00
Michael Wood e3a4905d08 bitbake: toaster: Fix toastertable header
Fixes regression introduced by 'tables updates for HTML5 compliance'

(Bitbake rev: 406a7f81420f7baa5cbfc034b573a4d692b98874)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:44 +01:00
Ed Bartosh 6a9efefbba bitbake: toastergui: show relative paths in configvars view
Reworked filtering of config paths.

Stripped clone paths, topdir and its parent directory from the paths
to config files in configvars view.

[YOCTO #7463]

(Bitbake rev: 873087b11653848ec2704d67de5680a265b71eaa)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:44 +01:00
Alexandru DAMIAN 9dcfa32cf1 bitbake: toastergui: table header bring back
This patch brings back the table header, which I mistakenly
took out when fixing HTML5 compliance.

(Bitbake rev: 9855e0b9735ebf0a6c622bee6ec787dfc1d9e474)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:44 +01:00
Alexandru DAMIAN 56c5ff920c bitbake: toaster logger: assign projects to all builds
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.

(Bitbake rev: 5e0bf388f4e5c1cc493ac8264785e631bad2f672)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:44 +01:00
Alexandru DAMIAN e3e85bdf71 bitbake: toaster logger: refactor recipe and layer file paths
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]

(Bitbake rev: ec43dc569e370767c709dec225cbee0c99151c19)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:43 +01:00
Alexandru DAMIAN a5236be47f bitbake: toaster: enable server-side sessions for all usages
In an effort to fix client-side session storage using
cookies, we enable server-side session support for all pages.

(Bitbake rev: ba10b6f89767c0dad8a2b064f42a84956764e9da)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:43 +01:00
Michael Wood 5da543c7b5 bitbake: toaster: Fix build button current project race
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]

(Bitbake rev: e169ed5cf190af62586f3e1c6ed6db6120406e05)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:43 +01:00
Randy Witt 8b8859a8fe bitbake: toaster: Remove dependency on daemon application
The bitbake observer is now started using python subprocess. This should
allow for toaster to run without installing the "daemon" application.

[Yocto #7271]

(Bitbake rev: 1dd599ddfcdb547bee49bd7d86acddf64c675b42)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-19 11:58:45 +01:00
Randy Witt 37c0b9852b bitbake: localhostbecontroller: Fix server search debug message
When the output from the commands ran was redirected to
"toaster_server.log" instead of the console, the debug message stating
the port on which bitbake is running would no longer appear.

This change makes looks at "toaster_server.log" for the port rather than
the _shellcmd output. This makes the debug message useful again.

(Bitbake rev: 9097bae469cb1e005092c11610d92e908b8f19f5)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-19 11:58:45 +01:00
Alexandru DAMIAN e05be1fdd2 bitbake: toastergui: tables updates for HTML5 compliance
This is a patch to bring the generic table code in compliance
with HTML5 specification.

(Bitbake rev: 39e4ce20d1e0bf6c93ca7ef2dcc4019979de3e39)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14 18:04:10 +01:00
Alexandru DAMIAN 80ca4f00f8 bitbake: toaster/contrib: adding TTS squashed patch
In order to move the Toaster Test System in Toaster itself,
we create a contrib directory.

The TTS is added as a squashed patch with no history.

It contains code contributed by Ke Zou <ke.zou@windriver.com>.

(Bitbake rev: 7d24fea2b5dcaac6add738b6fb4700d698824286)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14 18:04:10 +01:00
Michael Wood 23f5b009e0 bitbake: toaster: Port All recipes, layers and machines to ToasterTables
Port of the main tables to the new ToasterTable widget.

(Bitbake rev: 6de539d5953b2dca2a9ed75556a59764337a194c)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14 18:04:09 +01:00
Michael Wood 7f8c44771c bitbake: toaster: Add toaster table widget
This widget provides a common client and backend widget to support
presenting data tables in Toaster.

It provides; data loading, paging, page size, ordering, filtering,
column toggling, caching, column defaults, counts and search.

(Bitbake rev: b3a6fa4861bf4495fbd39e2abb18b3a46c6eac18)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14 18:04:09 +01:00
Michael Wood 2ac26e4294 bitbake: toaster: managedcontextprocessor requires Project imported
Temporarily move this import into the main view so that the context
processor can return a value for projects (albeit an unused one) when in
non managed mode. This will be changed in the near future but this
will fix it until we finish the refactoring.

(Bitbake rev: db61587fdd78af071d8a2a50d494fe159bf169a6)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14 18:04:09 +01:00
Michael Wood ec8bd70b27 bitbake: toaster: Remove old bldviewer application
The SimpleUI is obsolete and not maintained. It should be deleted as
there is no use to it.

[YOCTO #7709]

(Bitbake rev: 10b7c359613629bf6e3465234512990ba4742c48)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14 18:04:09 +01:00
Alexandru DAMIAN c5a16235b8 bitbake: toaster: fix html5 compliance
This patch brings needed changes in all views so that
each view passes the HTML5 compliance test by the
W3C Markup Service.

(Bitbake rev: 6e60ed8ab71e4300ab571f42b7af5011086df697)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14 18:04:09 +01:00
Belen Barros Pena 35d75c8352 bitbake: toastergui: change the import layer action help text
To match the form labels and the order in which the
information is requested. That should make
understanding the text easier.

(Bitbake rev: 3424110d1d95e3cc039e8775324f814e7fdd5470)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14 18:04:08 +01:00
Alexandru DAMIAN 4df4098281 bitbake: toaster: adding art missing from Bootstrap
When Bootstrap 2.3 was imported, we missed a couple of art file.

This patch adds them to complete Bootstrap integrity.

License used is (as previously documented).

GLYPHICONS Halflings released with Bootstrap, CC BY 3.0

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2015-05-13 13:30:49 +01:00
Alexandru DAMIAN 3c4f3775f7 bitbake: toastergui: removing unused views
We remove url entries, views and templates that are not
used in the interface; these are leftovers from the development
process, and are not linked anywhere in the interface nor
mentioned in documentation.

(Bitbake rev: 96bdebaa1aa43a35dc0747eda3081e7cf1a3dbde)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-12 12:14:13 +01:00
Alexandru DAMIAN e7f4d9c8e1 bitbake: toastergui: fix whitespace after URL
This patch fixes whitespace after URLs in the tasks page,
fixing warnings from the linkchecker.

(Bitbake rev: 2f98e6e78845f699777856ee5dec7b26f4c88d08)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-12 12:14:13 +01:00
Alexandru DAMIAN 94d38a4e40 bitbake: toasterui: URL refactoring
This is a URL refactoring needed to remove the inadvertent
usage of server-side user session in a REST-style API.
We move the parameters that were stored in the user session
to the URL, making navigation more robust.

This refactoring allows a clean (no 500 HTTP return codes) crawl
of the website following inside links.

(Bitbake rev: cc251da0f211f3ee881ad07478733e2f4c1b7019)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-12 12:14:13 +01:00
Ed Bartosh a5193d3c7f bitbake: toastergui: Consider task name when restarting a build
'Run again' button now restarts the build using target:task if task
was specified for the build.

[YOCTO #7442]

(Bitbake rev: 420b197227394b341bcc1075bc298ecf2aabec46)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-12 12:14:13 +01:00
Mihail Stanciu 44b7b67154 bitbake: toaster: <Add class id to a few columns>
Added class ids to columns that were missing them in the Packages and Recipes pages. This is required for Toaster UI automation efforts.

[YOCTO #7377]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-12 12:14:13 +01:00
Ed Bartosh 1e625fcc5f bitbake: toaster: fix typo in format string
Fixed TypeError: not all arguments converted during string formatting

[YOCTO #7618]

(Bitbake rev: 308b5529d4e183d550221864bfdbefd31cc23705)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-12 12:14:12 +01:00
Ed Bartosh 3b1bb2dfff bitbake: toastergui: decrease load time for configuration page
Used __in field lookup for QuerySet to get build variables faster.

[YOCTO #6691]

(Bitbake rev: 222e21d2fc3dc67449e582d983e11ea927e3eaef)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-12 12:14:12 +01:00
Michael Wood 1fe445d0b5 bitbake: toaster: filtersnippet remove redefinition of filter type key
This redefinition is not needed and also used Mozilla specific API to
access the data thus breaking the date filter in all other browsers.

[YOCTO #7577]

(Bitbake rev: b64bbc2dd51369b64fae2b1a10502b9dd4ceebfd)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-08 17:42:06 +01:00
Michael Wood 286da989d9 bitbake: toaster: Add links to the layer add notification
Adds links to the layer details for the layer that has just been
removed or added

(Bitbake rev: 3b323af501f7ec81cce34adb4ea86a7d6599e60a)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-08 17:42:06 +01:00
Michael Wood bec5d16471 bitbake: toaster: Refactor and expand layer add remove mechanism
We have multiple pages which have buttons to add and remove layers this
patch adds functionality to libtoaster to abstract this and implements
it in the pages affected. We handle loading and showing the dependencies
dialog here too and generating the notification messages.
Also implemented is using the selectmachine api from the projectapp to
avoid having to handle this in each page that allows selecting machines.
A small number of jshint issues, help text and the machine page name
have also been fixed.

(Bitbake rev: ae7a656ba7fc6f4356b57aa309a9b6d035e51d2e)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-08 17:42:06 +01:00
Michael Wood a4cfca604b bitbake: toaster: projectapp Implement machine select command
Use the project page to select the machine rather than setting it and
then redirecting to the project page. This will also avoid having to have a
special handler in the machines page it's self.

(Bitbake rev: 9847e04d86063e4464afb402cb1352243b51f504)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-08 17:42:06 +01:00
Michael Wood ed26a06a07 bitbake: toaster: Move project context variables to common scope
We have a bunch of context data which are used in multiple pages so it
makes more sense to have this in a single place libtoaster.ctx that's
accessible from each page rather than request it from every page.

(Bitbake rev: 4ef2774a2f683929c700550a9acc7b8f6074195b)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-08 17:42:05 +01:00
Alexandru DAMIAN 7759cd4931 bitbake: toasterui: proper exit code on toaster errors
This patch modifies the toasterui to properly return the exit
code based on the errors found in the toaster itself.

The upload event file API call will not delete event logs for which
toasterui showed an error. This will facilitate debugging.

Minor enhancement in the buildinfohelper to reduce the number
of lookups on unknown layer objects (prevented testing of the patch).

(Bitbake rev: 1ddd6a9e4280a4adf971132ff1fe7ec9b3252905)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-08 17:42:05 +01:00
David Reyna abc7f15960 bitbake: toaster: date range filter for project builds page
Port date range filter initialization code to the project builds page.

[YOCTO #7578]

(Bitbake rev: 294ea99263385525a1434bc6df690b653ee1f81b)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-17 11:53:57 +01:00
David Reyna db254cb513 bitbake: toaster: recipe path broken in recipe detail page
The recipe paths in managed mode are not processed correctly. They need
any prefix tags removed, and then any build path prefix removed only if
present.

[YOCTO #7523]

(Bitbake rev: ee5c569ebe21c065508cd816ae8cb8842baf0b7e)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-17 11:53:57 +01:00
Belen Barros Pena 77cad30d53 bitbake: toasterui: remove 'targets' from project notification
Remove the last remnant of the "targets" wording, which was
lurking in the notification we show you when you create
a project.

(Bitbake rev: ff475c1a6dec883f855dfce7cb0650135da33751)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-17 11:53:57 +01:00