diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/libtoaster.js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/libtoaster.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js index eafe70ddee..a61b10e972 100644 --- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js +++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js | |||
@@ -148,6 +148,21 @@ var libtoaster = (function () { | |||
148 | }); | 148 | }); |
149 | } | 149 | } |
150 | 150 | ||
151 | function _getMostRecentBuilds(url, onsuccess, onfail) { | ||
152 | $.ajax({ | ||
153 | url: url, | ||
154 | type: 'GET', | ||
155 | data : {format: 'json'}, | ||
156 | headers: {'X-CSRFToken': $.cookie('csrftoken')}, | ||
157 | success: function (data) { | ||
158 | onsuccess ? onsuccess(data) : console.log(data); | ||
159 | }, | ||
160 | error: function (data) { | ||
161 | onfail ? onfail(data) : console.error(data); | ||
162 | } | ||
163 | }); | ||
164 | } | ||
165 | |||
151 | /* Get a project's configuration info */ | 166 | /* Get a project's configuration info */ |
152 | function _getProjectInfo(url, onsuccess, onfail){ | 167 | function _getProjectInfo(url, onsuccess, onfail){ |
153 | $.ajax({ | 168 | $.ajax({ |
@@ -426,6 +441,7 @@ var libtoaster = (function () { | |||
426 | reload_params : reload_params, | 441 | reload_params : reload_params, |
427 | startABuild : _startABuild, | 442 | startABuild : _startABuild, |
428 | cancelABuild : _cancelABuild, | 443 | cancelABuild : _cancelABuild, |
444 | getMostRecentBuilds: _getMostRecentBuilds, | ||
429 | makeTypeahead : _makeTypeahead, | 445 | makeTypeahead : _makeTypeahead, |
430 | getProjectInfo: _getProjectInfo, | 446 | getProjectInfo: _getProjectInfo, |
431 | getLayerDepsForProject : _getLayerDepsForProject, | 447 | getLayerDepsForProject : _getLayerDepsForProject, |