Commit Graph

70 Commits

Author SHA1 Message Date
David Reyna 15eb02516b bitbake: toaster: Remove prettify
Remove "prettify.js" and "prettify.css" due to license issues with Apache2.
Replace with "highlight.pack.js" with its BSD3 License.

[YOCTO #12206]

(Bitbake rev: 8c86ec28abd406f6d62dee9f917ed1df47f7f301)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Brian Avery <brian.avery@intel.com>
Signed-off-by: David Reyna <david.reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-10 09:42:04 +01:00
David Reyna 1a8d911989 bitbake: toaster: add ID's to navigation links
Add IDs to the navigation bar links "All builds", "All projects",
and "Documentation. This will support test automation.

[YOCTO #11335]

(Bitbake rev: 4734001672cb35789be5a8d5c8b91ca57821bdba)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:45 +01:00
Michael Wood 7f67977518 bitbake: toaster: Delete notification update front end implementation to design
Update the delete notifications to reflect feedback from design
review comments.

(Bitbake rev: e47a1cc160c0f1da060884a8585403b35375fb09)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-06 11:41:48 +01:00
Michael Wood 4d0bc8d521 bitbake: toaster: Clean up and convert to rest api project edit and get calls
Convert the project xhr calls into proper rest api and port the client
side calls to use the new API. Fix all the pyflakes identified issues
and clean up unused fields.

Also remove the api and client side code for changing release on the fly
as this is no longer supported.

[YOCTO #9519]

(Bitbake rev: 8b01767d6e787cdb09789116ebf57dfb70f521bc)

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>
2016-09-30 16:52:21 +01:00
Elliot Smith 952ffb3e1f bitbake: toaster: move most recent builds templating to client
The most recent builds area of the all builds and project builds
table needs to update as a build progresses. It also needs
additional functionality to show other states (e.g. recipe parsing,
queued) which again needs to update on the client side.

Rather than add to the existing mix of server-side templating
with client-side DOM updating, translate all of the server-side
templates to client-side ones (jsrender), and add logic which
updates the most recent builds area as the state of a build changes.

Add a JSON API for mostrecentbuilds, which returns the state of
all "recent" builds. Fetch this via Ajax from the build dashboard
(rather than fetching the ad hoc API as in the previous version).

Then, as new states for builds are fetched via Ajax, determine
whether the build state has changed completely, or whether the progress
has just updated. If the state completely changed, re-render the
template on the client side for that build. If only the progress
changed, just update the progress bar. (NB this fixes the
task progress bar so it works for the project builds and all builds
pages.)

In cases where the builds table needs to update as the result of
a build finishing, reload the whole page.

This work highlighted a variety of other issues, such as
build requests not being able to change state as necessary. This
was one part of the cause of the "cancelling build..." state
being fragile and disappearing entirely when the page refreshed.
The cancelling state now persists between page reloads, as the
logic for determining whether a build is cancelling is now on
the Build object itself.

Note that jsrender is redistributed as part of Toaster, so
a note was added to LICENSE to that effect.

[YOCTO #9631]

(Bitbake rev: c868ea036aa34b387a72ec5116a66b2cd863995b)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-11 00:09:26 +01:00
Belen Barros Pena a7d498dfd3 bitbake: toaster: port all build analysis pages to bootstrap 3
Port all the pages in the build analysis area to bootstrap version 3.

(Bitbake rev: f963b73f0bf32db2df39dd79d8d85184c280cda0)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 08:35:05 +01:00
Belen Barros Pena 443f7b3915 bitbake: toaster: Migrate project configuration from bootstrap 2 to bootstrap 3
Convert all the HTML templates, JS and CSS in the project parts of
toaster to use bootstrap 3.

(Bitbake rev: 69527a731eada699d3f604ff8f3ae9410981ba9b)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 08:35:03 +01:00
Elliot Smith 79e0eb9e52 bitbake: toaster: work-around our lack of a synchronous fetch for typeaheads
The Twitter typeahead.js library expects the developer to use
a source which does a local search for matching suggestions, then
falls back to a remote search if that doesn't return enough
results.

However, in Toaster, we don't do any caching of the suggestions
for a typeahead, so our source only works in asynchronous mode.

Consequently, we see fewer than the expected number of suggestions
if the typeahead has already shown suggestions matching a query.
For example, searching for "meta-n" in the layers typeahead will
show the results for this query; but when the query changes to
"meta-ne", a new set of results is fetched, which mostly overlaps
with the results for "meta-n". The typeahead assumes that the
overlapping items are locally cached and have been delivered
synchronously, and just appends the new results which don't
overlap with the previous query. But because we don't provide any
results synchronously, we just end up with the single
non-overlapping result in the drop-down.

This can be fixed by hacking typeahead.js so that instead of
appending asynchronous results, we always overwrite and redraw
the whole typeahead menu.

This is a temporary fix, and should be properly fixed (when we
have time), perhaps by using typeahead.js's associated Bloodhound
library.

Added a note about the hack to the license file as an explanation
of why the unminified JS file is included in Toaster.

(Bitbake rev: afbaf326e1123c92952fa71e0e820a4ff83488ca)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 08:35:03 +01:00
Elliot Smith cd7b48cd0d bitbake: toaster: migrate typeahead library
Migrate from Bootstrap 2's built-in typeahead to Twitter's
typeahead library.

This is to facilitate moving to Bootstrap 3, which doesn't have
a typeahead.

(Bitbake rev: 0748177b40188a6fb735fe1ba1c17294afa4a3d0)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 08:35:03 +01:00
Elliot Smith 1cf8f215b3 bitbake: toaster: add modal to select custom image for editing
Add functionality to the placeholder button on the build dashboard
to open a modal dialog displaying editable custom images, in cases
where multiple custom images were built by the build. Where there
is only one editable custom image, go direct to its edit page.

The images shown in the modal are custom recipes for the project
which were built during the build shown in the dashboard.

This also affects the new custom image dialog, as that also has
to show custom image recipes as well as image recipes built during
the build. Modify the API on the Build object to support both.

Also modify and rename the queryset_to_list template filter so that
it can deal with lists as well as querysets, as the new custom image
modal has to show a list of image recipes which is an amalgam of two
querysets.

[YOCTO #9123]

(Bitbake rev: 8c2aea3fa8e1071de60390e86e2536904fa9b7c0)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19 21:11:26 +01:00
Michael Wood 0db62c54a4 bitbake: toaster: libtoaster Update implementation of startABuild and cancelABuild
Update the implementation of startABuild and cancelAbuild to reflect
changes to the backend api. We now have a dedicated endpoint to make
calls into so add this url to libtoaster.ctx and allow passing null in
as a url value to indicate that we want to use the current project

Also:
 - Fix some documentation comments
 - Add the convenience of passing in an array of targets to startABuild

(Bitbake rev: 61a21d96abab113cbd13376cdb8b08a426b50538)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 23:10:29 +01:00
Belen Barros Pena 5b8b3993e4 bitbake: toaster: change 'revision' to 'Git revision'
I've received some feedback on the 'Revision' label we use in the import
layer page. It is not quite communicating that what's required is a Git
revision. Changing it to 'Git revision' to make it a bit more specific.

The change applies not only to the import layer page, but to all pages
showing revision information in the project configuration section.

For more on the feedback received, check

https://bugzilla.yoctoproject.org/show_bug.cgi?id=8429#c3

(Bitbake rev: 09392f36a4f115c2432302125e8cac48a9aa304f)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-07 17:23:03 +00:00
Michael Wood 8b1d0438bc bitbake: toaster: libtoaster Add createCustomRecipe method
This adds the function to call the ReSt API to create a custom image
recipe.

(Bitbake rev: 03e7949f538733f682a05d0c318cf2f4cd64cbf5)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10 13:29:18 +00:00
Ed Bartosh dd282d475c bitbake: toaster: return back 'New project' button
The button was removed by mistake in merging modes patchset.

(Bitbake rev: f7b33a95b5d53973bc673373bdd2652f4d32f0c2)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07 17:39:08 +00:00
Ed Bartosh 4c1e5ec29a bitbake: toaster: remove usage of BUILD_MODE variable
As both modes can be used at the same time we can't have any
difference in UI between modes.

Removed all conditional statements that used BUILD_MODE.

(Bitbake rev: 4ce1559c2558bd0fd278ff02a1a93bec03c4156b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07 17:37:10 +00:00
Elliot Smith 9d8e36a6c9 bitbake: toaster: localhostbectrl Pass DATABASE_URL in via the process environment
Instead of putting the DATABASE_URL as part of the command for launching
the bitbake observer process set it as part of environment.

This fixes two issues 1. Where the value isn't quoted and therefore will be
interpreted in the shell and 2. Anyone being able to see the value of
DATABASE_URL in the process tree.

[YOCTO #8669]

(Bitbake rev: 832a8523067606b180c02f0d1544e8a23219bb08)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-16 11:55:07 +00:00
Belen Barros Pena 66d3c353f8 bitbake: toaster: templates Add meaningful title tags
Our title tags are all over the place, and have no relation to the page
content. This commit adds a meaningful title tag to each Toaster page.

(Bitbake rev: 1ab8827d684a19a70f3b788aed2327bf30edffe2)

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-10-29 07:32:10 +00:00
Elliot Smith 78f935df8f bitbake: toaster: Remove all navigation when not in build mode
The user is redirected to the all builds page or all projects
page from the landing page, regardless of mode.

In build mode, this makes sense; but in analysis mode, we are
restricting the view to just the cli builds project. This means
that "all projects" and "all builds" only contains items relating
to this one project.

Modify the landing page so it redirects to the project builds page
for the cli builds project when not in build mode. Also remove
navigation elements which are irrelevant when not in build mode.

[YOCTO #8514]

(Bitbake rev: ae754655fa1bc5168f43e8821773e7b7b9440a5d)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-27 07:24:31 +00:00
Elliot Smith a580479452 bitbake: toaster: Hide top bar buttons in analysis mode
The "new build" and "new project" buttons are irrelevant in
analysis mode, as you can't start a build or a project.

Hide these buttons if not in BUILD_MODE.

[YOCTO #8514]

(Bitbake rev: b1858653c22eb6d51fc23f75ccad69b76523eb41)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-27 07:24:31 +00:00
Elliot Smith 2517987f8d bitbake: toaster: Modify "New build" button behaviour for cli builds project
The "New build" button should only be displayed if there are
user-generated projects, not if there is only the command-line
builds project. (Toaster can't run builds on behalf of the
command-line builds project.)

The "New build" form should also display as if no project has
been set (i.e. show the project and recipe text entries).

Add a variable which tracks the number of non-command-line projects,
then use this to hide the button when appropriate.

Also track whether the current project is the default one, and
use this to add extra conditions to when the "New build" text
entries are shown.

[YOCTO #8231]

(Bitbake rev: 07e7bc29a7d976941eeae997f78a25ed6edddfc8)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-16 14:59:59 +01:00
Elliot Smith da4c6144f1 bitbake: toaster: Make the builds view the project page for "command line builds"
Command line builds don't have configuration or layers which can
be manipulated in Toaster, so these pages shouldn't be visible.
However, the configuration page is the default page for the
project view (/project/X/), which isn't correct for the
command line builds project.

Modify all project page links across the application so that
the command line builds project (aka the "default" project)
always displays the builds tab.

Add a project_url tag for templates which contains the logic
determining where the URL for a project links to, based on
whether it is the default project or not.

[YOCTO #8231]

(Bitbake rev: 3ea10f4c16a557e94781251f6776b13acb8e9eba)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-16 14:59:59 +01:00
Belen Barros Pena 24d6d3fda8 bitbake: toaster: show incomplete configuration warning
In the new build button form, make sure we show a
warning when you select a project with an incomplete
configuration that cannot be built.

(Bitbake rev: 9e970bd7a3e8a7d6ec26265b2e5863624db8a77f)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03 16:52:47 +01:00
Belen Barros Pena ab9644f7ac bitbake: toaster: fix global navigation
The "All builds" item in the global navigation should
only be active when you are in the "all builds" page.

The global navigation should not appear at all in the
landing page and in the new project page.

(Bitbake rev: 120816b133b9c160c68c911a9f4c612ce2f8a9ed)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-29 14:03:52 +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
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
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
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 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 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 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
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
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
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 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 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 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 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
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 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
Belen Barros Pena ddee53e767 bitbake: toasterui: rename 'targets' to 'recipes'
A recent round of informal user feedback has revealed
that the term 'target' is quite problematic. For
all the users we spoke to the word refers to the
target arch. In Toaster, it refers to the software
you build.

This patch replaces the word 'target' with 'recipe'
across the Toaster interface. This is by no means
self-explanatory, but at least it cannot be confused
with target hardware, and it is also consistent with
the terminology we use in the analysis portion of
the interface.

(Bitbake rev: f4a64c2386a534aae9522629afde219d2aa00817)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-31 22:30:05 +01:00
Belen Barros Pena fd4085f380 bitbake: toasterui: update links to Toaster manual
Set the links to the Toaster manual in the base.html
and landing_not_managed.html templates to the URL of
the new Toaster manual.

(Bitbake rev: 88b1201a2f6dec53970b120cc8e13c0eb5ae21e1)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-25 12:39:55 +00:00
Alexandru DAMIAN 4004aebb1b bitbake: toastergui: bring back base URLs for pages that need them
Some URLs, although invalid on their own, are used in JS to
build valid page pointers. Previous patch removed two of these URLs,
breaking the display of several patches.

This patch re-adds these URLs with different names, and returns
400 Bad Request empty pages on them, which is consistent with the
intended usage of these URLs.

(Bitbake rev: 73afee5ddb2e89dcec65854639b19b8860232d89)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-09 14:33:50 +00:00
Belen Barros Pena 1e0e700f4b bitbake: toasterui: style the Toaster version information
When debugging is turned on, we show some Toaster version
information in the top bar. Present it so that it can
be easily copied and pasted.

(Bitbake rev: 5de46fabe9ab1e525048353c2ecd8846ffefc760)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 23:35:44 +00:00
Belen Barros Pena 50f11b9d6d bitbake: toasterui: style the Toaster version information
In debug mode, we show the Toaster version and mode in the
top bar. Display them inside a tooltip that appears when
you hover over a nice info icon to make them less conspicuous.

(Bitbake rev: 8365f19191d0ec5901c79b7afd5005f7a546fe74)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:19 +00:00
Alexandru DAMIAN d81e5141c1 bitbake: toaster: display Toaster mode and version in debug mode
This patch displays the current running mode and checked-out git branch
as Toaster version when running in debug mode.

(Bitbake rev: 93e4f8c44273f4657c5be4c00b61db12aa875e31)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Michael Wood ed9fa17467 bitbake: toaster: Improve client side error handling
Make use of the toastermain.settings.DEBUG flag to toggle the client
side error logging. Make the error logging consistent by using
console.warn/error across the project, this adds traceability to the
warnings. Also handles the case where console is not available by
stubbing it in libtoaster.

(Bitbake rev: c34ebc51a6cbf90c64ef1ac461e475c6341f0f2a)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:36 +00:00
Alexandru DAMIAN aa9816ad79 bitbake: toastergui: implement UI changes to allow file download
This patchset adds download links in the build analisys pages
if toaster runs in managed mode. This allows the user to access
data directly from the web interface.

[YOCTO #6837]

(Bitbake rev: 6000e1ae5c846e51932ecd0dc21e0fa02eb10357)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00