Infrastructure and changes to the Query Tool for realtime preference handling. Refs #3294
Highlights of this patch include:
- Changes will affect SQL Editors in Create dialog boxes, SQL tab of the main screen, Query tool, History entries in
thequery tool, Query tool opened in New Tab/Window
- All the components of SQL editor will refer to single source of preferences which is cached in the Browser object.
Allother redundant ajax get preference calls are removed.
- SQL editor will not refer template JS variables anymore, once all the references are removed the template variables
willalso be removed.
- Code refactoring wherever possible.
- Covered JS test cases wherever possible.
Branch
------
master
Details
-------
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=bdb7e3fde2ff3e3895181469ce24d533e5c7cfbf
Author: Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>
Modified Files
--------------
web/pgadmin/browser/__init__.py | 11 -
web/pgadmin/browser/static/css/browser.css | 7 +
web/pgadmin/browser/static/js/browser.js | 71 +---
web/pgadmin/preferences/static/js/preferences.js | 12 +-
web/pgadmin/static/js/backform.pgadmin.js | 73 +++-
web/pgadmin/static/js/keyboard_shortcuts.js | 66 ++-
.../static/js/sqleditor/query_tool_actions.js | 52 ---
web/pgadmin/static/js/sqleditor_utils.js | 27 +-
.../static/jsx/history/detail/code_mirror.jsx | 5 +
.../jsx/history/detail/history_detail_query.jsx | 2 +
web/pgadmin/static/jsx/history/query_history.jsx | 5 +-
web/pgadmin/static/jsx/react_shapes.jsx | 6 +
web/pgadmin/tools/datagrid/__init__.py | 40 +-
web/pgadmin/tools/datagrid/static/js/datagrid.js | 38 +-
.../tools/datagrid/templates/datagrid/index.html | 93 ++---
.../tools/sqleditor/static/css/sqleditor.css | 16 +
web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 445 +++++++--------------
.../tools/sqleditor/tests/test_pref_utilities.py | 100 -----
.../sqleditor/utils/query_tool_preferences.py | 120 ------
.../javascript/history/query_history_spec.jsx | 15 +-
.../sqleditor/keyboard_shortcuts_spec.js | 141 ++++---
web/regression/javascript/sqleditor_utils_spec.js | 8 +
web/webpack.shim.js | 2 +
web/webpack.test.config.js | 1 +
24 files changed, 517 insertions(+), 839 deletions(-)