Support Greenplum 6.x

2020-10-30 Thread Baby Cobol
Dear All:

I make some improvements to pgadmin4, In order to support Greenplum6, and
fix some incompatibility issues with Greenplum5.

Source code: https://github.com/cobolbaby/pgadmin4
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py
index 69d917d..b90bf88 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py
@@ -11,20 +11,22 @@ import re
 from functools import wraps
 
 import simplejson as json
-from flask import render_template, request, jsonify, current_app
+from flask import current_app, jsonify, render_template, request
 from flask_babelex import gettext
 
 import pgadmin.browser.server_groups.servers as servers
 from config import PG_DEFAULT_DRIVER
 from pgadmin.browser.collection import CollectionNodeModule, PGChildModule
-from pgadmin.browser.server_groups.servers.utils import parse_priv_from_db, \
-parse_priv_to_db
+from pgadmin.browser.server_groups.servers.utils import (parse_priv_from_db,
+ parse_priv_to_db)
 from pgadmin.browser.utils import PGChildNodeView
-from pgadmin.utils.ajax import make_json_response, internal_server_error, \
-make_response as ajax_response, gone, bad_request
-from pgadmin.utils.driver import get_driver
-from pgadmin.tools.schema_diff.node_registry import SchemaDiffRegistry
 from pgadmin.model import Database
+from pgadmin.tools.schema_diff.node_registry import SchemaDiffRegistry
+from pgadmin.utils.ajax import (bad_request, gone, internal_server_error,
+make_json_response)
+from pgadmin.utils.ajax import make_response as ajax_response
+from pgadmin.utils.driver import get_driver
+
 
 """
 This module is responsible for generating two nodes
@@ -266,7 +268,7 @@ class SchemaView(PGChildNodeView):
 """
 Returns the template path for GreenPlum servers.
 """
-return '#gpdb#{0}#'.format(ver)
+return 'gpdb/#gpdb#{0}#'.format(ver)
 
 def format_request_acls(self, data, modified=False, specific=None):
 acls = {}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py
index a05d915..ede5040 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py
@@ -16,23 +16,22 @@ import traceback
 from functools import wraps
 
 import simplejson as json
-from flask import render_template, request, jsonify, \
-current_app
+from flask import current_app, jsonify, render_template, request
 from flask_babelex import gettext
 
 import pgadmin.browser.server_groups.servers.databases as databases
 from config import PG_DEFAULT_DRIVER
-from pgadmin.browser.server_groups.servers.databases.schemas.utils import \
-SchemaChildModule, DataTypeReader
-from pgadmin.browser.server_groups.servers.databases.utils import \
-parse_sec_labels_from_db, parse_variables_from_db
-from pgadmin.browser.server_groups.servers.utils import parse_priv_from_db, \
-parse_priv_to_db
+from pgadmin.browser.server_groups.servers.databases.schemas.utils import (
+DataTypeReader, SchemaChildModule)
+from pgadmin.browser.server_groups.servers.databases.utils import (
+parse_sec_labels_from_db, parse_variables_from_db)
+from pgadmin.browser.server_groups.servers.utils import (parse_priv_from_db,
+ parse_priv_to_db)
 from pgadmin.browser.utils import PGChildNodeView
 from pgadmin.tools.schema_diff.compare import SchemaDiffObjectCompare
 from pgadmin.tools.schema_diff.node_registry import SchemaDiffRegistry
-from pgadmin.utils.ajax import make_json_response, internal_server_error, \
-make_response as ajax_response, gone
+from pgadmin.utils.ajax import gone, internal_server_error, make_json_response
+from pgadmin.utils.ajax import make_response as ajax_response
 from pgadmin.utils.driver import get_driver
 
 
@@ -361,12 +360,11 @@ class FunctionView(PGChildNodeView, DataTypeReader, SchemaDiffObjectCompare):
 template_initial = 'trigger_functions'
 
 # Set the template path for the SQL scripts
-self.sql_template_path = "/".join([
-template_initial,
-self.manager.server_type,
-'sql',
-'#{0}#'
-]).format(self.manager.version)
+self.sql_template_path = template_initial + (
+"/{0}/sql/#{0}#{1}#".format(self.manager.server_type, self.manager.version) if 
+self.manager.server_type == 'gpdb' else
+"/{0}/sql/#{1}#".format(self.manager.server_type, self.manager.version)
+   

pgAdmin 4 commit: Fixed an issue where a mismatch in the value of 'Esti

2020-10-30 Thread Akshay Joshi
Fixed an issue where a mismatch in the value of 'Estimated row' for functions. 
Fixes #5914

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=25fcdab9dbdcf7231174c8057dca873603169a49
Author: Pradip Parkale 

Modified Files
--
docs/en_US/release_notes_4_28.rst|  1 +
.../databases/schemas/functions/static/js/function.js| 12 
2 files changed, 9 insertions(+), 4 deletions(-)



pgAdmin 4 commit: Fixed an issue where the validation error message is

2020-10-30 Thread Akshay Joshi
Fixed an issue where the validation error message is shown twice. Fixes #5736

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=183c83f0d2b2cb8dd33f9e8c41a030bc4cdaa4b2
Author: Rahul Shirsat 

Modified Files
--
docs/en_US/release_notes_4_28.rst  |  1 +
web/pgadmin/browser/static/js/datamodel.js | 75 +-
web/pgadmin/static/js/backform.pgadmin.js  | 24 --
web/pgadmin/static/scss/_alert.scss|  6 +++
4 files changed, 90 insertions(+), 16 deletions(-)



pgAdmin 4 commit: Ensure that non-superuser should be able to debug the

2020-10-30 Thread Akshay Joshi
Ensure that non-superuser should be able to debug the function. Fixes #5760

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=14a5d05b80209a17f7b88bb03eba24254e4f9118
Author: Khushboo Vashi 

Modified Files
--
docs/en_US/release_notes_4_28.rst  |  1 +
web/pgadmin/tools/debugger/__init__.py | 50 ++
2 files changed, 27 insertions(+), 24 deletions(-)



Re: [pgAdmin][RM5914]:Mismatch in 'Estimated row' in properties dialogue on main page & proeties dialogue navigated through context click

2020-10-30 Thread Akshay Joshi
Thanks, patch applied.

On Fri, Oct 30, 2020 at 11:49 AM Pradip Parkale <
pradip.park...@enterprisedb.com> wrote:

> Hi Hackers,
> Please find the attached patch to fix the RM5914.
>
> Mismatch in 'estimated row'  n properties dialogue for a created function
> which is fixed with this patch also disabled the returns to set and window
> option of the function in edit mode.
>
>
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM5736] Validation error msg showing twice on create table- add column.

2020-10-30 Thread Akshay Joshi
Thanks, patch applied.

On Thu, Oct 29, 2020 at 3:47 PM Rahul Shirsat <
rahul.shir...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Please find the below patch which resolves the duplicate error message for
> create table - add column.
>
> The fix made is such that only when Variables, Security tab adds/changes
> any required field, the whole row (of column) will be highlighted and
> prompt the user to fulfill the requirements. Row will not be highlighted
> when the column name and type is added/changed.
>
> --
> *Rahul Shirsat*
> Software Engineer | EnterpriseDB Corporation.
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: [pgAdmin4][Patch] - RM 5760 - Debugger plugin error

2020-10-30 Thread Akshay Joshi
Thanks, patch applied.

On Thu, Oct 29, 2020 at 4:06 PM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix the RM 5760 - v.4.25 debugger plugin
> error.
>
> The non-superuser is not able to debug (direct debugging) the function
> which is fixed with this patch.
>
> Thanks,
> Khushboo
>
>

-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


[pgAdmin]: Feature test failure

2020-10-30 Thread Pradip Parkale
Hi Hackers,
Please find the patch for feature test failure.

-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


feature_test_failure.patch
Description: Binary data