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/targets.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/targets.html')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/targets.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/targets.html b/bitbake/lib/toaster/toastergui/templates/targets.html index f4313f92b2..cc339fbbb7 100644 --- a/bitbake/lib/toaster/toastergui/templates/targets.html +++ b/bitbake/lib/toaster/toastergui/templates/targets.html | |||
| @@ -119,15 +119,15 @@ function _makeXHREditCall(data, onsuccess, onfail) { | |||
| 119 | headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, | 119 | headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, |
| 120 | success: function (_data) { | 120 | success: function (_data) { |
| 121 | if (_data.error != "ok") { | 121 | if (_data.error != "ok") { |
| 122 | alert(_data.error); | 122 | console.warn(_data.error); |
| 123 | } else { | 123 | } else { |
| 124 | updateButtons(_data.layers.map(function (e) {return e.id})); | 124 | updateButtons(_data.layers.map(function (e) {return e.id})); |
| 125 | if (onsuccess != undefined) onsuccess(_data); | 125 | if (onsuccess != undefined) onsuccess(_data); |
| 126 | } | 126 | } |
| 127 | }, | 127 | }, |
| 128 | error: function (_data) { | 128 | error: function (_data) { |
| 129 | alert("Call failed"); | 129 | console.warn("Call failed"); |
| 130 | console.log(_data); | 130 | console.warn(_data); |
| 131 | } | 131 | } |
| 132 | }); | 132 | }); |
| 133 | } | 133 | } |
| @@ -202,7 +202,7 @@ function layerAdd(layerId, layerName, layerURL, pressedButtonId) { | |||
| 202 | data: {'type': 'layerdeps','value':layerId}, | 202 | data: {'type': 'layerdeps','value':layerId}, |
| 203 | success: function(_data) { | 203 | success: function(_data) { |
| 204 | if (_data.error != "ok") { | 204 | if (_data.error != "ok") { |
| 205 | alert(_data.error); | 205 | console.warn(_data.error); |
| 206 | } else { | 206 | } else { |
| 207 | updateLayerCountLabels(_data.list.length+1); | 207 | updateLayerCountLabels(_data.list.length+1); |
| 208 | 208 | ||
