diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-05-21 18:45:44 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-12 00:01:50 +0100 |
commit | 4f459fca798d8338e6a84fdd5ce73a9d395a67e8 (patch) | |
tree | 9cbea30a012d2ae9f7fc8108a4a92b871dfa9985 /bitbake/lib | |
parent | 0573e2d31c9c608aa984c8f5378e8f0097f4c774 (diff) | |
download | poky-4f459fca798d8338e6a84fdd5ce73a9d395a67e8.tar.gz |
bitbake: toaster: Add global ajaxError handler
If any ajax calls fail and debug is enabled log the error to the console.
(Bitbake rev: 978ab17033ec48ee0a82016b7e4d6a2fe5d21dbb)
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.js | 5 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/table.js | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js index c3798336f2..667aca20ff 100644 --- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js +++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js | |||
@@ -503,6 +503,11 @@ $(document).ready(function() { | |||
503 | $("#loading-notification").fadeOut(); | 503 | $("#loading-notification").fadeOut(); |
504 | }); | 504 | }); |
505 | 505 | ||
506 | $(document).ajaxError(function(event, jqxhr, settings, errMsg){ | ||
507 | console.warn("Problem with xhr call"); | ||
508 | console.warn(errMsg); | ||
509 | console.warn(jqxhr.responseText); | ||
510 | }); | ||
506 | 511 | ||
507 | function check_for_duplicate_ids () { | 512 | function check_for_duplicate_ids () { |
508 | /* warn about duplicate element ids */ | 513 | /* warn about duplicate element ids */ |
diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index 45c61848da..1072c7588d 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js | |||
@@ -53,11 +53,6 @@ function tableInit(ctx){ | |||
53 | tableData: tableData, | 53 | tableData: tableData, |
54 | tableParams: tableParams | 54 | tableParams: tableParams |
55 | }, null, libtoaster.dumpsUrlParams(tableParams)); | 55 | }, null, libtoaster.dumpsUrlParams(tableParams)); |
56 | }, | ||
57 | |||
58 | error: function (_data) { | ||
59 | console.warn("Call failed"); | ||
60 | console.warn(_data); | ||
61 | } | 56 | } |
62 | }); | 57 | }); |
63 | } | 58 | } |