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/layers.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/layers.html')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/layers.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/layers.html b/bitbake/lib/toaster/toastergui/templates/layers.html index ced54c2098..33160e5968 100644 --- a/bitbake/lib/toaster/toastergui/templates/layers.html +++ b/bitbake/lib/toaster/toastergui/templates/layers.html | |||
| @@ -126,15 +126,15 @@ function _makeXHREditCall(data, onsuccess, onfail) { | |||
| 126 | headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, | 126 | headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, |
| 127 | success: function (_data) { | 127 | success: function (_data) { |
| 128 | if (_data.error != "ok") { | 128 | if (_data.error != "ok") { |
| 129 | alert(_data.error); | 129 | console.warn(_data.error); |
| 130 | } else { | 130 | } else { |
| 131 | updateButtons(_data.layers.map(function (e) {return e.id})); | 131 | updateButtons(_data.layers.map(function (e) {return e.id})); |
| 132 | if (onsuccess != undefined) onsuccess(_data); | 132 | if (onsuccess != undefined) onsuccess(_data); |
| 133 | } | 133 | } |
| 134 | }, | 134 | }, |
| 135 | error: function (_data) { | 135 | error: function (_data) { |
| 136 | alert("Call failed"); | 136 | console.warn("Call failed"); |
| 137 | console.log(_data); | 137 | console.warn(_data); |
| 138 | } | 138 | } |
| 139 | }); | 139 | }); |
| 140 | } | 140 | } |
| @@ -215,7 +215,7 @@ function layerAdd(layerId, layerName, layerURL) { | |||
| 215 | data: {'type': 'layerdeps','value':layerId}, | 215 | data: {'type': 'layerdeps','value':layerId}, |
| 216 | success: function(_data) { | 216 | success: function(_data) { |
| 217 | if (_data.error != "ok") { | 217 | if (_data.error != "ok") { |
| 218 | alert(_data.error); | 218 | console.warn(_data.error); |
| 219 | } else { | 219 | } else { |
| 220 | updateLayerCountLabels(_data.list.length+1); | 220 | updateLayerCountLabels(_data.list.length+1); |
| 221 | 221 | ||
