mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
2e26745a13
commit
ed9fa17467
@@ -79,21 +79,21 @@ function _makeXHRBuildCall(url, data, onsuccess, onfail) {
|
||||
headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
|
||||
success: function (_data) {
|
||||
if (_data.error != "ok") {
|
||||
alert(_data.error);
|
||||
console.warn(_data.error);
|
||||
} else {
|
||||
if (onsuccess != undefined) onsuccess(_data);
|
||||
}
|
||||
},
|
||||
error: function (_data) {
|
||||
alert("Call failed");
|
||||
console.log(_data);
|
||||
console.warn("Call failed");
|
||||
console.warn(_data);
|
||||
if (onfail) onfail(data);
|
||||
} });
|
||||
}
|
||||
|
||||
|
||||
function scheduleBuild(url, projectName, buildlist) {
|
||||
console.log("scheduleBuild");
|
||||
console.warn("scheduleBuild");
|
||||
_makeXHRBuildCall(url, {targets: buildlist.join(" ")}, function (_data) {
|
||||
|
||||
$('#latest-builds').prepend('<div class="alert alert-info" style="padding-top:0px">' + '<span class="label label-info" style="font-weight: normal; margin-bottom: 5px; margin-left:-15px; padding-top:5px;">'+projectName+'</span><div class="row-fluid">' +
|
||||
|
||||
Reference in New Issue
Block a user