pgAdmin 4 commit: Introduced a PgAdmin class inherited from the Flask,
От | Ashesh Vashi |
---|---|
Тема | pgAdmin 4 commit: Introduced a PgAdmin class inherited from the Flask, |
Дата | |
Msg-id | E1Z9oYM-0004zW-5P@gothos.postgresql.org обсуждение исходный текст |
Список | pgadmin-hackers |
Introduced a PgAdmin class inherited from the Flask, which looks for submodules inherited from the PgAdminModule instead of regular Blueprint. This allows us to load the module automatically from the under the pgadmin directory, and will work to extend the pgAdmin extension module. PgAdminModule is inherited from the Blueprint, and bring several methods: - get_own_stylesheets, which returns the stylesheets used by the module (excluding its submodules stylesheets) - get_own_javascripts - menu_items, which returns a dictionray mapping the old hook names (context_items etc) to a list of MenuItem instances For more specialized modules (as for now, any module that should be part of the browser tree construction), one can define an abstract base class defining additional methods. For example, the BrowserPluginModule abstract base class defines the following methods: - jssnippets - csssnipeets - node_type - get_nodes Branch ------ master Details ------- http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=eb6580b43a25bc0f1ade2e2c0c66c34d3cd87f81 Author: Ronan Dunklau <ronan.dunklau@dalibo.com> Modified Files -------------- web/pgAdmin4.py | 8 +- web/pgadmin/__init__.py | 109 +++++----- web/pgadmin/browser/__init__.py | 159 ++++++++++++++- web/pgadmin/browser/hooks.py | 21 -- web/pgadmin/browser/server_groups/__init__.py | 202 +++++++++++++++++- web/pgadmin/browser/server_groups/hooks.py | 78 ------- .../browser/server_groups/servers/__init__.py | 166 ++++++++++++++- web/pgadmin/browser/server_groups/servers/hooks.py | 72 ------- web/pgadmin/browser/server_groups/servers/views.py | 121 ----------- .../templates/server_groups/server_groups.js | 2 +- web/pgadmin/browser/server_groups/views.py | 129 ------------ .../browser/templates/browser/css/browser.css | 3 + web/pgadmin/browser/templates/browser/css/node.css | 3 + web/pgadmin/browser/templates/browser/index.html | 2 +- .../browser/templates/browser/js/browser.js | 160 +++++++-------- web/pgadmin/browser/views.py | 214 -------------------- web/pgadmin/misc/__init__.py | 25 +++ web/pgadmin/misc/views.py | 27 --- web/pgadmin/redirects/__init__.py | 19 ++ web/pgadmin/redirects/views.py | 29 --- web/pgadmin/settings/__init__.py | 85 +++++++- web/pgadmin/settings/views.py | 83 -------- web/pgadmin/templates/base.html | 16 +- web/pgadmin/utils/__init__.py | 80 ++++++++ web/pgadmin/utils/menu.py | 6 + 25 files changed, 876 insertions(+), 943 deletions(-)
В списке pgadmin-hackers по дате отправления: