aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/static
AgeCommit message (Collapse)Author
2017-09-04toaster: edit column list not sortedDavid Reyna
The list of columns in the many 'Edit Columns' pop-ups became unsorted with the 'Toaster Table' implementation. These entries need to be gathered and sorted in the column processing. [YOCTO #12004] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21toaster: trim build target inputDavid Reyna
Trim the entered built target value so that Toaster is not confused with no real targets nor a ghost second target. [YOCTO #11727] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27toaster: Add distro selection supportDavid Reyna
Add the ability to select a distro in the project page, based on values from the Layer Index. Add a distro selection page with the add layer feature, based on the add machine page. [YOCTO #10632] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27toaster: git clone progress barDavid Reyna
If a project has a lot of additional layers, the build may appear to hang while those layers are checked out. This patch adds a clone progress bar that is visible before the parsing progress appears. [YOCTO #9916] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10toaster: Toaster filters are brokenDavid Reyna
A syntax fix inadvertantly broke the Toaster filter feature. [YOCTO #11317] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-06toaster: toastergui: implement machine name validationBelal, Awais
Valid machine names cannot include spaces anywhere in the name and doing so will result in a build failure. This implements a mechanism to alert the user against such a misconfiguration and does not allow input of such machine names. [YOCTO #8721] Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: js test Update js tests to use correct url for layer RESTMichael Wood
Update js tests so that we use the new Layer REST API. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: Switch front end to use Layer get REST APIMichael Wood
Switch the front end to use the proper REST API for retrieving layer information. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: importlayer Add git revision typeahead to that input fieldMichael Wood
Add the front end mechanism to load the typeahead for the git revision field on importing a layer. Also fix one indentation issue and update the js test. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: importlayer Use new layer add APIMichael Wood
Switch the importlayer.js to use the new REST API for importing a new layer. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-12toaster: tablejs Add visual indicator for table data loadingMichael Wood
Add a visual indicator when the data is changing in the table, for instance if it's being re-ordered, searched or paginated. [YOCTO #10104] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30toaster: tablejs Fix missing close square bracketReyna, David
There is a missing close square bracket. [YOCTO #10631] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30toaster: customrecipejs Consume click event on 'a' link if disabledMichael Wood
Consume the click event on the download recipe link if it's disabled. To prevent the link from sending user to an error page. See http://getbootstrap.com/css/#forms-disabled-fieldsets and a link caveat. [YOCTO #10151] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-06toaster: Delete notification update front end implementation to designMichael Wood
Update the delete notifications to reflect feedback from design review comments. 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-06toaster: importlayer Fix layer dependencies button state toggleMichael Wood
Fix regression introduced by switching typeahead library. Make sure we enable and disable the add button based on whether the selection event has fired or not. [YOCTO #9936] 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-09-28toaster: layerdetails Update implementation of delete imported layerMichael Wood
Update the implementation of delete an imported layer so that it is consistent with the other delete messages and wording. Also use the new libtoaster way of setting a notification that the delete was successful. 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-28toaster: customrecipe Add frontend feature to delete custom image recipeMichael Wood
[YOCTO #8132] 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-28toaster: importlayer Convert success import to new notification systemMichael Wood
Use the simpler libtoaster method of showing a notification about successful import of a layer. Also a number of whitespace clean ups. 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-28toaster: alerts and modals Avoid modals and alerts overlaying each otherMichael Wood
Make sure that when we spawn a modal we clear any notifications and also make sure that old notifications are cleared before showing a new one. 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-28toaster: project page Implement front end feature to delete projectMichael Wood
Add confirm modal and api calls to delete a project from the project dashboard. [YOCTO #6238] 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-28toaster: libtoaster Add a global notification set/show mechanismMichael Wood
We now have a number of places where we show change notifications based on an event in a previous page (imported a layer, deleted a build, deleted a project etc) and we show these notifications on various pages so we add a simple notification utility to libtoaster. 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-28toaster: Clean up and convert to rest api project edit and get callsMichael Wood
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] 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-06toaster: Allow forward slash in variable namesBelen Barros Pena
Add forward slash to the list of special characters allowed in variable names. Also update the list of allowed special characters in the error messages. [YOCTO #9611] 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-09-06toaster: layer details Fix "edit" form interactionBelen Barros Pena
Make sure the layer information disappears when the edit form shows, and that the layer details come back when you click the 'cancel' button in the edit form. 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-09-06toaster: import layer Layout fixesBelen Barros Pena
The layout of the import layer form was looking a bit awkward. This commit tidies things up a bit. 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-09-06toaster: layer details Layout fixesBelen Barros Pena
The layout of the layer details page was looking a bit awkward. This commit tidies things up. 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-09-02toaster: layerdetails clean ups after integrating local layer changesMichael Wood
A few clean ups for the work done to integrate editing imported local layers into the layer detail page. 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>
2016-09-02toaster: layerdetails js changes for switching layersSujith H
This patch helps to implement the switching of layers between directories and git repositories. Specifically selection of git and local directory. Also enabling form to view the selection. [YOCTO #9913] Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-11toaster: improve the display when local dir is addedSujith H
The helper text gets displayed accordingly when mouse is hovered above the layers. If its a local directory then no more branch is mentioned. Only directory path is mentioned. [YOCTO #9911] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-11toaster: update css file for layer importBelen Barros Pena
Update the css file for the layer import. This changes will improve the UI for the task. [YOCO #9911] Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
2016-08-11toaster: control the selection of git and local repoSujith H
Changes made in this patch will help user to select either repo based on git and local. This patch also improves the help provided to user so that user can understand them and take necessary action to proceed. [YOCOT #9911] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-11toaster: reset table to default orderby when orderby column is hiddenElliot Smith
When a ToasterTable is sorted by a column, and that column is hidden from view, the sort doesn't revert to the default for the table. Modify the JS responsible for reloading the table data so that it doesn't rely on clicking a table column heading (as this is inflexible and error-prone). Instead, use a function to apply the sort to the table; and call that function when column headings are clicked. This means that the ordering can be changed programmatically to a specified default ordering when a column is hidden, without having to click on a column heading. Use this function when the current sort column is hidden, to apply the default sort for the table. [YOCTO #9836] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-11toaster: show loading spinner after creating custom imageElliot Smith
Creating a custom image through the "New custom image" dialog can sometimes result in a long pause between pressing the button to create the image, and being transferred to the page showing details of its content. This can make it appear as though pressing the button had no effect. To prevent this from happening, disable the button and text box in the new custom image dialog after the "Create image" button is pressed. Also show a loading spinner and "loading..." text on the button to make it clear that the application is still responding. [YOCTO #9475] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-11toaster: tweak styling and typos in recent builds areaElliot Smith
Help icons need to have the Bootstrap tooltip() method called on them so that the popups are correctly styled. Ensure that the colour of the help/error/warning icons is correct, depending on the build state. Fix pluralisation of errors and warnings shown. Add a div around the build state area so it's easy to pick up where the state is going to display (e.g. in tests). [YOCTO #9631] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-11toaster: show progress of recipe parsing in recent builds areaElliot Smith
Modify buildinfohelper and toasterui so that they record the recipe parse progress (from ParseProgress events in bitbake) on the Build object. Note that because the Build object is now created at the point when ParseStarted occurs, it is necessary to set the build name to the empty string initially (hence the migration). The build name can be set when the build properly starts, i.e. at the BuildStarted event. Then use this additional data to determine whether a Build is in a "Parsing" state, and report this in the JSON API. This enables the most recent builds area to show the recipe parse progress. Add additional logic to update the progress bar if the progress for a build object changes. [YOCTO #9631] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-11toaster: move most recent builds templating to clientElliot Smith
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] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-07-25toaster: Replace references to LayerSource modelsMichael Wood
Replace references to the now deprecated layersource models across Toaster with the new enums for layer source types. 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>
2016-07-08toaster: add Layer delete front end feature to layerdetailsMichael Wood
Add the front end feature to delete a layer from the layer details page. [YOCO #9184] 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>
2016-07-08toaster: layerBtn avoid connecting handler to other build buttonsMichael Wood
Some pages contain other build buttons which may have the same class attached. Make sure that we only select the buttons in the tables where layerBtn is used. [YOCTO #9841] 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>
2016-06-16toaster: remove last css file with bootstrap v2 licensebavery
Remove unused css file that still had the bootstrap v2 license in it. Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-14toaster: js tests Twitter typeahead library object is now ttTypeaheadMichael Wood
Get the ttTypeahead object on the input to see if it's been initialised correctly. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-14toaster-tests: fix tests for latest Selenium versionElliot Smith
Previously, we didn't specify a specific version of Selenium. When upgrading to Python 3 and installing Selenium to work with it, the JS unit test broke, as the report format produced by Selenium had changed. Modify the test so that it works with the latest Selenium report format. Add a note to the README that the given Selenium version should be used to prevent unexpected test failures. Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-06-14toaster: port all build analysis pages to bootstrap 3Belen Barros Pena
Port all the pages in the build analysis area to bootstrap version 3. Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-13toaster: table.js Add the ability to highlight a particular rowMichael Wood
As in the old build tables it's useful to jump and highlight a particular row in the table using the #hash in the URL. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-13toaster: Migrate project configuration from bootstrap 2 to bootstrap 3Belen Barros Pena
Convert all the HTML templates, JS and CSS in the project parts of toaster to use bootstrap 3. Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-13toaster: work-around our lack of a synchronous fetch for typeaheadsElliot Smith
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. Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-13toaster: migrate typeahead libraryElliot Smith
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. Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-13toaster: testsjs Add call back to append elements on completion of testsMichael Wood
When the tests are complete add some marker elements to the test page DOM which can then looked at for a selenium browser test. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-05-16toaster: toastertables: Clean up and fix up a number of itemsMichael Wood
- Remove the unused 'computation' field - Remove the code to try to make the tables behave like an api - Remove custom JSON encoder in favour of DjangoJSONEncoder - Simplify get_data and add comments - Add exception type instead of using generic Exception - Clean up python style warnings 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>
2016-05-13toaster: fix progress bar in MySQL environmentElliot Smith
When using MySQL, the project builds info delivered by MySQL differs from that delivered by SQLite: the former returns text values from the enumeration for Build outcomes, while the latter returns the integer value. This causes the progress bar JS to break, as it is expecting outcome strings. Modify the recent_build() method to include an outcomeText property for each Build object, then use this in the conditionals in the progress bar JS. [YOCTO #9498] 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>