From: | Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com> |
---|---|
To: | pgadmin-hackers(at)postgresql(dot)org |
Subject: | pgAdmin 4 commit: Resolved few issues (with some improvements) with exi |
Date: | 2016-02-22 06:23:21 |
Message-ID: | E1aXjtx-0002Kn-Gl@gothos.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Resolved few issues (with some improvements) with existing nodes.
This commit takes care of the following issues/improvements.
* Adding missing imports for unauthorised in database module
* Node under Servers Nodes (i.e. Databases, tablespaces, roles nodes)
need to be inherited from PGChildNodeView (and, not from NodeView) for
adding server version check for their children.
* Adding statistics for database, and tablespaces in its node (not, yet
in UI)
* Renaming the camel case methods with proper name.
(i.e. getSQL -> get_sql, getNewSQL -> get_new_sql, etc.)
* Fixed the functions going beyond the text limit (column: 80) in
Databases, Roles & Tablespaces modules.
* Fixed the node method of Database module, which was not tested ever.
* We do not need separate SQL template for fetching the name (i.e.
get_name.sql), using the 'nodes.sql' for the same.
* Optimise the query for fetching ACLs for the database node, we didn't
require to join certain tables, while fetching only the ACLs.
* Introduced the list of the ACLs (regular and default ACLs for
different type) supported by each version [Databases Module].
* Renamed the templates 'get_nodes.sql' to' nodes.sql' to make it
consistent with other modules.
* Removed the checks for the authentication table use, as we don't need
to expose the password to the users (even the encrypted MD5). Using
the pg_roles view always for fetching roles/users information now.
* Resolved some typos in unreachable (specially the exceptions
catchment area.)
* Logging the exception in the application.
* Using qtLiteral, qtIdent properly in the templates (do not assume
about the types of data.)
* Using tsid as identifier instead of did for the tablespaces.
* Using nodes method of tablespace view for fetching individual node
information.
* Removing the hardcoded node information from the 'parse_priv_to_db'
function, and pass on allowed ACLs by the caller nodes.
* Using 'nodes.sql' to fetch name of the template instead of writing
that in the delete.sql template, which is definitely wrong place to
fetch the name of the object. [Tablespace Module]
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d5da26876bc279d856526b7dfbe6330db46a8cff
Modified Files
--------------
.../server_groups/servers/databases/__init__.py | 302 +++++++++++++++------
.../templates/databases/sql/9.1_plus/acl.sql | 24 +-
.../databases/sql/9.1_plus/allowed_privs.json | 26 ++
.../templates/databases/sql/9.1_plus/get_name.sql | 4 -
.../templates/databases/sql/9.1_plus/get_nodes.sql | 7 -
.../templates/databases/sql/9.1_plus/nodes.sql | 8 +
.../templates/databases/sql/9.1_plus/stats.sql | 13 +
.../templates/databases/sql/9.2_plus/acl.sql | 24 +-
.../databases/sql/9.2_plus/allowed_privs.json | 30 ++
.../templates/databases/sql/9.2_plus/get_name.sql | 4 -
.../templates/databases/sql/9.2_plus/get_nodes.sql | 7 -
.../templates/databases/sql/9.2_plus/nodes.sql | 8 +
.../templates/databases/sql/9.2_plus/stats.sql | 13 +
.../templates/databases/sql/9.3_plus/acl.sql | 24 +-
.../databases/sql/9.3_plus/allowed_privs.json | 30 ++
.../templates/databases/sql/9.3_plus/get_name.sql | 4 -
.../templates/databases/sql/9.3_plus/get_nodes.sql | 7 -
.../templates/databases/sql/9.3_plus/nodes.sql | 8 +
.../templates/databases/sql/9.3_plus/stats.sql | 13 +
.../server_groups/servers/roles/__init__.py | 73 ++---
.../roles/templates/role/sql/post8_4/nodes.sql | 4 +-
.../templates/role/sql/post8_4/properties.sql | 4 +-
.../roles/templates/role/sql/post8_4/sql.sql | 2 +-
.../roles/templates/role/sql/post9_0/nodes.sql | 4 +-
.../templates/role/sql/post9_0/properties.sql | 4 +-
.../roles/templates/role/sql/post9_0/sql.sql | 2 +-
.../roles/templates/role/sql/post9_1/nodes.sql | 4 +-
.../templates/role/sql/post9_1/properties.sql | 4 +-
.../roles/templates/role/sql/post9_1/sql.sql | 2 +-
.../roles/templates/role/sql/post9_4/nodes.sql | 4 +-
.../templates/role/sql/post9_4/properties.sql | 4 +-
.../roles/templates/role/sql/post9_4/sql.sql | 2 +-
.../server_groups/servers/tablespaces/__init__.py | 229 ++++++++++------
.../templates/tablespaces/sql/9.1_plus/acl.sql | 10 +-
.../templates/tablespaces/sql/9.1_plus/alter.sql | 4 +-
.../templates/tablespaces/sql/9.1_plus/delete.sql | 7 -
.../templates/tablespaces/sql/9.1_plus/nodes.sql | 9 +
.../tablespaces/sql/9.1_plus/properties.sql | 15 +-
.../templates/tablespaces/sql/9.1_plus/stats.sql | 6 +-
.../templates/tablespaces/sql/9.2_plus/acl.sql | 10 +-
.../templates/tablespaces/sql/9.2_plus/alter.sql | 4 +-
.../templates/tablespaces/sql/9.2_plus/delete.sql | 7 -
.../templates/tablespaces/sql/9.2_plus/nodes.sql | 9 +
.../tablespaces/sql/9.2_plus/properties.sql | 21 +-
.../templates/tablespaces/sql/9.2_plus/stats.sql | 6 +-
.../templates/tablespaces/sql/pre_9.1/acl.sql | 10 +-
.../templates/tablespaces/sql/pre_9.1/alter.sql | 4 +-
.../templates/tablespaces/sql/pre_9.1/delete.sql | 7 -
.../templates/tablespaces/sql/pre_9.1/nodes.sql | 8 +
.../tablespaces/sql/pre_9.1/properties.sql | 6 +-
.../templates/tablespaces/sql/pre_9.1/stats.sql | 6 +-
web/pgadmin/browser/server_groups/servers/utils.py | 40 +--
web/pgadmin/utils/driver/psycopg2/__init__.py | 5 +-
53 files changed, 706 insertions(+), 386 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Akshay Joshi | 2016-02-22 07:57:28 | Re: [pgAdmin4][Patch]: Dependecies/Dependents functionality |
Previous Message | Neel Patel | 2016-02-22 04:29:52 | Re: [pgAdmin4] [Patch]: Resource Group Module |