pgAdmin 4 commit: Implementation of the client side 'url_for(...)' func

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: pgAdmin 4 commit: Implementation of the client side 'url_for(...)' func
Date: 2017-06-12 07:11:21
Message-ID: E1dKJVR-0006CM-5Z@gothos.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Implementation of the client side 'url_for(...)' function.

Created a url_for function module to be used by different javascript
modules to use the same functionality of flask at client side.

A python module can expose the list of endpoints, used by its
javascripts, by overriding the 'get_exposed_url_endpoints(self)'
function.

In this patch, we have modified all the browser modules to use this
function. It will allow us to move the majority of the javascript
modules of browser nodes from templates directory to the static
directory.

TODO::
- Move these javascripts modules to the static directory.
- Use this function in all the applicable javascript modules.
e.g. tools, miscellaneous modules

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=fd3ddbeafbd30614043330696b8c9996dac2f08c

Modified Files
--------------
web/karma.conf.js | 3 +-
web/pgadmin/__init__.py | 10 ++++++
web/pgadmin/browser/__init__.py | 21 +++++++++--
web/pgadmin/browser/server_groups/__init__.py | 2 +-
.../databases/casts/templates/cast/js/casts.js | 8 ++---
.../templates/event_triggers/js/event_trigger.js | 11 +++---
.../templates/extensions/js/extensions.js | 11 +++---
.../foreign_servers/js/foreign_servers.js | 2 +-
.../templates/user_mappings/js/user_mappings.js | 8 ++---
.../js/foreign_data_wrappers.js | 12 +++----
.../languages/templates/languages/js/languages.js | 12 +++----
.../js/catalog_object_column.js | 2 +-
.../templates/catalog_object/js/catalog_object.js | 2 +-
.../collations/templates/collation/js/collation.js | 11 +++---
.../domain_constraints/js/domain_constraints.js | 11 +++---
.../domains/templates/domains/js/domains.js | 8 ++---
.../templates/foreign_tables/js/foreign_tables.js | 11 +++---
.../fts_configuration/js/fts_configuration.js | 11 +++---
.../templates/fts_dictionary/js/fts_dictionary.js | 11 +++---
.../templates/fts_parser/js/fts_parser.js | 11 +++---
.../templates/fts_template/js/fts_templates.js | 11 +++---
.../functions/templates/function/js/functions.js | 12 +++----
.../functions/templates/procedure/js/procedures.js | 13 +++----
.../trigger_function/js/trigger_functions.js | 12 +++----
.../edbfuncs/templates/edbfunc/js/edbfunc.js | 12 +++----
.../edbfuncs/templates/edbproc/js/edbproc.js | 15 ++++----
.../packages/edbvars/templates/edbvar/js/edbvar.js | 12 +++----
.../packages/templates/package/js/package.js | 11 +++---
.../sequences/templates/sequence/js/sequence.js | 11 +++---
.../synonyms/templates/synonym/js/synonym.js | 11 +++---
.../tables/column/templates/column/js/column.js | 11 +++---
.../check_constraint/js/check_constraint.js | 11 +++---
.../js/exclusion_constraint.js | 11 +++---
.../templates/foreign_key/js/foreign_key.js | 11 +++---
.../index_constraint/js/index_constraint.js | 2 +-
.../templates/constraints/js/constraints.js | 2 +-
.../tables/indexes/templates/index/js/index.js | 11 +++---
.../tables/rules/templates/rules/js/rules.js | 10 +++---
.../schemas/tables/templates/table/js/table.js | 13 +++----
.../triggers/templates/trigger/js/trigger.js | 11 +++---
.../schemas/templates/catalog/js/catalog.js | 2 +-
.../schemas/templates/schema/js/schema.js | 12 +++----
.../schemas/types/templates/type/js/type.js | 12 +++----
.../schemas/views/templates/mview/js/mview.js | 10 +++---
.../schemas/views/templates/view/js/view.js | 11 +++---
.../databases/templates/databases/js/databases.js | 13 +++----
.../templates/pga_schedule/js/pga_schedule.js | 11 +++---
.../steps/templates/pga_jobstep/js/pga_jobstep.js | 11 +++---
.../pgagent/templates/pga_job/js/pga_job.js | 12 +++----
.../resource_groups/js/resource_groups.js | 8 ++---
.../servers/roles/templates/role/js/role.js | 14 ++++----
.../templates/tablespaces/js/tablespaces.js | 15 ++++----
.../servers/templates/servers/servers.js | 10 +++---
.../templates/server_groups/server_groups.js | 10 +++---
web/pgadmin/browser/templates/browser/index.html | 2 +-
.../browser/templates/browser/js/browser.js | 18 ++++++----
.../browser/templates/browser/js/endpoints.js | 11 ++++++
web/pgadmin/help/__init__.py | 6 ++++
web/pgadmin/misc/__init__.py | 9 ++++-
web/pgadmin/preferences/__init__.py | 25 ++++++-------
.../templates/preferences/preferences.js | 33 +++++++++--------
web/pgadmin/settings/__init__.py | 11 ++++--
web/pgadmin/static/js/selection/grid_selector.js | 8 +++--
web/pgadmin/static/js/url_for.js | 41 ++++++++++++++++++++++
web/pgadmin/utils/__init__.py | 16 +++++++++
web/regression/javascript/fake_endpoints.js | 12 +++++++
web/regression/javascript/test-main.js | 1 +
67 files changed, 449 insertions(+), 286 deletions(-)

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-06-12 08:16:36 pgAdmin 4 commit: Stop ignoring yarn.lock, per discussion with Pivotal
Previous Message Khushboo Vashi 2017-06-12 04:33:13 [pgAdmin4][Patch]: Added the shortcut (CTRL + 0) to reset the zoom level in runtime