summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2014-11-26 15:05:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-18 10:24:07 +0000
commitd5fc4f7f131c21768c6f9bc004715e76dc6fbe2a (patch)
tree9f301f83c5787d0333574066ba302a1343498173 /bitbake/lib
parentc058c373f605d4080ff655f0def33ac0ff13eff8 (diff)
downloadpoky-d5fc4f7f131c21768c6f9bc004715e76dc6fbe2a.tar.gz
bitbake: toaster: libtoaster Add a error handler to GET in makeTypehead
If the JSON data comes back from the request with an error set, have a default handler which logs the error to the console. (Bitbake rev: 9e3f2e2d985a575adb5520d8b517eac5ad6a15ed) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/libtoaster.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
index 37fc80e39e..b691a3bee8 100644
--- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
+++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
@@ -20,6 +20,11 @@ var libtoaster = (function (){
20 source: function(query, process){ 20 source: function(query, process){
21 xhrParams.value = query; 21 xhrParams.value = query;
22 $.getJSON(xhrUrl, this.options.xhrParams, function(data){ 22 $.getJSON(xhrUrl, this.options.xhrParams, function(data){
23 if (data.error != "ok") {
24 console.log("Error getting data from server "+data.error);
25 return;
26 }
27
23 return process (data.list); 28 return process (data.list);
24 }); 29 });
25 }, 30 },