summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/services/crash_manager.js
AgeCommit message (Collapse)Author
2019-03-06[REF] web: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-03-06[IMP] web: don't swallow errors in async handlersAaron Bohy
This commit adds a 'guardedCatch' function to the Promise API. This function has to be used when we don't want to swallow real errors (crashes), like 'catch' does (i.e. basically all the time in Odoo). When the promise has been rejected because of a real error, the rejected Promises chain bubbles up to the top and triggers the 'unhandledrejection' event (triggered on all browsers thanks to the unhandled-rejection-polyfill lib). We then add a listener on that event to display real errors with the CrashManager. Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-01-11[FIX] web: add exponential backoff strategy for lost connectionGéry Debongnie
Before this commit, the web client had a naive strategy to handle lost connections: it tried to poll the server every 2 seconds until a rpc succeeds. This works quite well from the perspective of the user, but may be a problem from the perspective of the server. If a server is down for a longish period, then each users active tabs will then perform a request every 2 seconds. This means that the server will be progressively hammered by many requests, which will clutter the logs, and make it more difficult to gracefully recover. With this commit, we simply exponentially increase the delay each time, and add a little jitter to give a better distribution. closes odoo/odoo#30136
2018-10-24[FIX] web: copy traceback in firefoxNicolas Lempereur
Same issue as in 902e484f1. In some browser (eg. firefox) the container parameter of ClipboardJS is needed if the focus is inside the modal so the copy work. See information on: https://github.com/zenorocha/clipboard.js/pull/368 opw-1902040 closes #28117
2018-08-07[FIX] Crash Manager - Clipboard JS reference updatedDavid Beguin
The instanciation of the clipboard in the crash manager was not updated in the fix that upgraded the clipboard.js
2018-07-27[REF] web, *: BS4, adapt use of tooltip/popover.jsqsm-odoo
2018-07-13[IMP] web: use builtin crash manager hooks for special handlingXavier Morel
* having a special case for session expiration seems unnecessary when the CM specifically supports hooking on the exception name * and properly implement the special handling of HTTP 504 (Gateway Timeout) from #24854 using that same hook
2018-06-27[MERGE] forward port branch saas-11.2 up to 12ddec3a767Christophe Simonis
2018-06-22[FIX] *: Avoid BlockUI for some rpcAdrien Dieudonne
Before this commit, the point of sale displayed a loading message every 5 secondes if the barcode scanner was configured. This issue is due to the following commit: @1aacc96 After this commit,some calls may block the interface when they did not do it before. It concerns all rpc done with ajax.rpc and all done with a new session. We have now to explicitly set shadow property. opw-1860493
2018-04-10[IMP] web: keyboard navigation in form viewVincent Schippefilt
The goal of this commit is to allow fast entry of the same model using the keyboard for navigating through the form once, by blocking the user from advancing in the form if there is a required field or once they went through the form once to get them to a primary action (button) This commit includes the following changes 1) Enable moving forward from field to field using the TAB key 2) Entering the one to many and many to many using the TAB key a. When entering it, set the focus on the "add new line" link or button b. When adding a new line, set the focus on the field visible editable field of the new line c. Discard adding a new line with ESC key d. If the user leaves the first field empty and uses TAB, we will cancel the adding of a new line and move to the next field of the form 3) When a field is required and not filled in, do not allow the user to move out of the field using the TAB key (the user is still allowed to use the mouse though), mark the field as invalid instead 4) After going though the form once, using the TAB key on the last field will move the focus to the first primary button of the page 5) When the focus is on a primary button (EDIT/SAVE), the user cannot move the focus forward using the TAB key. Hitting TAB again will display a tooltip telling to hit ENTER to activate the button. The mouse is still available to move the focus. 6) When the user saves, the focus is placed on the first primary button of the form renderer (like VALIDATE for a new invoice) 7) On dialogs, primary buttons should stop the users from moving out of them, and showing a popup if the user tries 8) When closing a dialog, the focus will be moved back to the widget that opened it. This commit does not include the following features 1) Navigation with the keyboard on a selection one to man 2) Navigate between tabs in a form using the keyboard 3) Cancelling the adding of a new line in a many to many using the ESC key do not set the focus correctly 4) Enhancing the focusses fields (like blue underline)
2018-02-22[FIX] web: return dialog in web.CrashManager functions Dennis Sluijk
This is more a architecture fix than a bug fix. With this commit, it is easier to modify the behavior of the dialog using the super function. like this: this._super.apply(this, arguments).opened(...) PR #23255
2017-11-16[MERGE] forward port branch saas-16 up to 745d00362abChristophe Simonis
2017-11-15[MERGE] forward port branch saas-15 up to 73e4dacf78aChristophe Simonis
2017-09-18[FIX] *: fix a bunch of incorrectly documented docstringXavier Morel
Fix a bunch of ill-documented/incomplete/incorrect method docs Without this, the automatic doc generation does not work.
2017-08-02[MERGE] forward port branch saas-17 up to a445548f07fChristophe Simonis
2017-07-28[MERGE] forward port branch saas-15 up to c0ec09e9d56Christophe Simonis
2017-07-24[IMP] web, *: lazy load dialog xml templateqsm-odoo
* web_editor, web_planner, website The 'Dialog' class is used in both backend and frontend. Also, lots of actions can be done without the use of any modal. It thus makes sense to lazy load its related xml only when a first modal is opened. This change also allows to get rid of the "base_common.xml" file as the dialog template is the only remaining one in there and, in the future website update, it will allow to not load any static XML file on website page loadings.
2017-04-11[REF] web, *: redesign all JS viewsGéry Debongnie
This commit introduce a full redesign of all JS views. We started basically from scratch. The goal was to unify all the various views under a common framework, to make them testable, to make then usable in different conditions (in studio, or in the frontend), and to make our lives easier. Some important points are: - we introduced new coding guidelines (camelCase, 80 chars width, ...) - we have a brand new testing framework (still QUnit based) - kanban view moved to the web addon - calendar view (formerly web_calender) moved to web as well - the tree view was removed - all new code should be documented We hope that this code is the start of a new era for the Odoo web client, we want to have a high quality codebase, well documented, well tested, well designed. Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2016-05-27[REF] report,web(_editor): services extracted in their own filesGéry Debongnie
session_instance.js moved from framework/ to services/ and renamed into session.js, which required to change the bundles in report and web_editor addons.