diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-01-08 13:15:10 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-08 22:34:36 +0000 |
commit | ed9fa17467ad8f41c654187eb840d4b4e15d262d (patch) | |
tree | 21166f53d96811cc2c31f83c69a026eb2f97d53b /bitbake/lib/toaster/toastergui/templates/mrb_section.html | |
parent | 2e26745a134373dfde3aa2b16fef3df720436e77 (diff) | |
download | poky-ed9fa17467ad8f41c654187eb840d4b4e15d262d.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/mrb_section.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/mrb_section.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index 73031e2d1f..432955ab88 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html | |||
@@ -79,21 +79,21 @@ function _makeXHRBuildCall(url, data, onsuccess, onfail) { | |||
79 | headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, | 79 | headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, |
80 | success: function (_data) { | 80 | success: function (_data) { |
81 | if (_data.error != "ok") { | 81 | if (_data.error != "ok") { |
82 | alert(_data.error); | 82 | console.warn(_data.error); |
83 | } else { | 83 | } else { |
84 | if (onsuccess != undefined) onsuccess(_data); | 84 | if (onsuccess != undefined) onsuccess(_data); |
85 | } | 85 | } |
86 | }, | 86 | }, |
87 | error: function (_data) { | 87 | error: function (_data) { |
88 | alert("Call failed"); | 88 | console.warn("Call failed"); |
89 | console.log(_data); | 89 | console.warn(_data); |
90 | if (onfail) onfail(data); | 90 | if (onfail) onfail(data); |
91 | } }); | 91 | } }); |
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
95 | function scheduleBuild(url, projectName, buildlist) { | 95 | function scheduleBuild(url, projectName, buildlist) { |
96 | console.log("scheduleBuild"); | 96 | console.warn("scheduleBuild"); |
97 | _makeXHRBuildCall(url, {targets: buildlist.join(" ")}, function (_data) { | 97 | _makeXHRBuildCall(url, {targets: buildlist.join(" ")}, function (_data) { |
98 | 98 | ||
99 | $('#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">' + | 99 | $('#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">' + |