Re: [pgAdmin4][PATCH] Fix handling of real type

2017-06-20 Thread Murtuza Zabuawala
Hi,

Please ignore previous patch, Attach is the updated patch which will cover

RM#2498 -  Handling of  bytea[] type.
RM#2502 -  Handling of  real & real[] type.

including their feature tests.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Mon, Jun 19, 2017 at 9:58 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the handling of  real type.
> RM#2502
>
> Steps to re-produce: Below given query fails to render result in Query
> tool,
> SELECT 'Infinity'::real, '{Infinity}'::real[]
>
> Also updated PG Data type feature test for the same.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/web/pgadmin/feature_tests/pg_datatype_validation_test.py 
b/web/pgadmin/feature_tests/pg_datatype_validation_test.py
index b883aac..dff5c48 100644
--- a/web/pgadmin/feature_tests/pg_datatype_validation_test.py
+++ b/web/pgadmin/feature_tests/pg_datatype_validation_test.py
@@ -80,24 +80,26 @@ class PGDataypeFeatureTest(BaseFeatureTest):
 self.page.toggle_open_tree_item(self.server['name'])
 self.page.toggle_open_tree_item('Databases')
 self.page.toggle_open_tree_item('acceptance_test_db')
-self.page.toggle_open_tree_item('Schemas')
-self.page.toggle_open_tree_item('public')
 
 def _check_datatype(self):
-query = "SELECT -32767::smallint, 32767::smallint," \
-"-2147483647::integer, 2147483647::integer," \
-"9223372036854775807::bigint, 9223372036854775807::bigint," \
-"922337203685.4775807::decimal, 92203685.477::decimal," \
-"922337203685.922337203685::numeric, " \
-"-92233720368547758.08::numeric," \
-"ARRAY[1, 2, 3]::float[], ARRAY['nan', 'nan', 'nan']::float[];"
+query = r"SELECT -32767::smallint, 32767::smallint," \
+r"-2147483647::integer, 2147483647::integer," \
+r"9223372036854775807::bigint, 9223372036854775807::bigint," \
+r"922337203685.4775807::decimal, 92203685.477::decimal," \
+r"922337203685.922337203685::numeric, " \
+r"-92233720368547758.08::numeric," \
+r"ARRAY[1, 2, 3]::float[], ARRAY['nan', 'nan', 
'nan']::float[]," \
+r"'Infinity'::real, '{Infinity}'::real[]," \
+r"E'\\xDEADBEEF'::bytea, ARRAY[E'\\xDEADBEEF', 
E'\\xDEADBEEF']::bytea[];"
 
 expected_output = [
 '-32767', '32767', '-2147483647', '2147483647',
 '9223372036854775807', '9223372036854775807',
 '922337203685.4775807', '92203685.477',
 '922337203685.922337203685', '-92233720368547758.08',
-'{1,2,3}', '{NaN,NaN,NaN}'
+'{1,2,3}', '{NaN,NaN,NaN}',
+'Infinity', '{Infinity}',
+r'\336\255\276\357', 
r'{"\\336\\255\\276\\357","\\336\\255\\276\\357"}'
 ]
 
 self.page.driver.find_element_by_link_text("Tools").click()
@@ -133,10 +135,17 @@ class PGDataypeFeatureTest(BaseFeatureTest):
 cnt = 12
 for val in expected_output[10:]:
 try:
-source_code = self.page.find_by_xpath(
-"//*[@id='0']//*[@id='datagrid']/div[5]/div/div/div["
-+ str(cnt)
+if cnt == 14:
+xpath = 
"//*[@id='0']//*[@id='datagrid']/div[5]/div/div[1]/div[" \
++ str(cnt) \
++ "]/span"
+else:
+xpath = 
"//*[@id='0']//*[@id='datagrid']/div[5]/div/div/div[" \
++ str(cnt) \
 + "]"
+
+source_code = self.page.find_by_xpath(
+ xpath
 ).get_attribute('innerHTML')
 
 PGDataypeFeatureTest.check_result(
diff --git a/web/pgadmin/utils/driver/psycopg2/__init__.py 
b/web/pgadmin/utils/driver/psycopg2/__init__.py
index 92562bc..876b887 100644
--- a/web/pgadmin/utils/driver/psycopg2/__init__.py
+++ b/web/pgadmin/utils/driver/psycopg2/__init__.py
@@ -60,8 +60,8 @@ psycopg2.extensions.register_type(
 psycopg2.extensions.register_type(
 psycopg2.extensions.new_type(
 (
-# To cast bytea and interval type
-17, 1186,
+# To cast bytea, bytea[] and interval type
+17, 1001, 1186,
 
 # to cast int4range, int8range, numrange tsrange, tstzrange,
 # daterange
@@ -70,8 +70,8 @@ psycopg2.extensions.register_type(
 # date, timestamp, timestamptz, bigint, double precision, bigint[]
 1700, 1082, 1114, 1184, 20, 701, 1016,
 
-# double precision[]
-1022
+# double precision[], real, real[]
+1022, 700, 1021
  ),
 'TYPECAST_TO_STRING', psycopg2.STRING)
 )


pgAdmin 4 commit: Properly handle bytea[], and 'infinity'::real/real[].

2017-06-20 Thread Dave Page
Properly handle bytea[], and 'infinity'::real/real[]. Fixes #2498. Fixes #2502.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d2ba57c1abfda02241d969c4caa1ce0bf24cfc09
Author: Murtuza Zabuawala 

Modified Files
--
.../feature_tests/pg_datatype_validation_test.py   | 35 ++
web/pgadmin/utils/driver/psycopg2/__init__.py  |  8 ++---
2 files changed, 26 insertions(+), 17 deletions(-)



Re: [pgAdmin4][PATCH] Fix handling of real type

2017-06-20 Thread Dave Page
Thanks, applied.

On Tue, Jun 20, 2017 at 9:38 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> Please ignore previous patch, Attach is the updated patch which will cover
>
> RM#2498 -  Handling of  bytea[] type.
> RM#2502 -  Handling of  real & real[] type.
>
> including their feature tests.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Mon, Jun 19, 2017 at 9:58 PM, Murtuza Zabuawala
>  wrote:
>>
>> Hi,
>>
>> PFA patch to fix the handling of  real type.
>> RM#2502
>>
>> Steps to re-produce: Below given query fails to render result in Query
>> tool,
>> SELECT 'Infinity'::real, '{Infinity}'::real[]
>>
>> Also updated PG Data type feature test for the same.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: [pgadmin-hackers][patch] Upgrade slickgrid to version 2.3.7

2017-06-20 Thread Dave Page
Hi,

This fails tests:

(pgadmin4)piranha:pgadmin4 dpage$ make check-feature
cd web && yarn run bundle && python regression/runtests.py --pkg feature_tests
yarn run v0.24.6
$ yarn run linter && yarn run webpacker
yarn run v0.24.6
$ yarn run eslint pgadmin/static/jsx/**/*.jsx
pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx
regression/javascript/**/*.js *.js
yarn run v0.24.6
$ "/Users/dpage/git/pgadmin4/web/node_modules/.bin/eslint"
pgadmin/static/jsx/history/query_history.jsx
pgadmin/static/jsx/history/query_history_entry.jsx
pgadmin/static/js/selection/active_cell_capture.js
pgadmin/static/js/selection/clipboard.js
pgadmin/static/js/selection/column_selector.js
pgadmin/static/js/selection/copy_data.js
pgadmin/static/js/selection/grid_selector.js
pgadmin/static/js/selection/range_boundary_navigator.js
pgadmin/static/js/selection/range_selection_helper.js
pgadmin/static/js/selection/row_selector.js
pgadmin/static/js/selection/set_staged_rows.js
pgadmin/static/js/selection/xcell_selection_model.js
regression/javascript/history/query_history_entry_spec.jsx
regression/javascript/history/query_history_spec.jsx
regression/javascript/browser/menu_spec.js
regression/javascript/history/history_collection_spec.js
regression/javascript/selection/active_cell_capture_spec.js
regression/javascript/selection/column_selector_spec.js
regression/javascript/selection/copy_data_spec.js
regression/javascript/selection/grid_selector_spec.js
regression/javascript/selection/range_boundary_navigator_spec.js
regression/javascript/selection/range_selection_helper_spec.js
regression/javascript/selection/row_selector_spec.js
regression/javascript/selection/set_staged_rows_spec.js
regression/javascript/selection/xcell_selection_model_spec.js
regression/javascript/slickgrid/cell_selector_spec.js karma.conf.js
webpack.config.js webpack.test.config.js
✨  Done in 1.17s.
✨  Done in 1.40s.
yarn run v0.24.6
$ yarn run webpack -- --config webpack.config.js
yarn run v0.24.6
$ "/Users/dpage/git/pgadmin4/web/node_modules/.bin/webpack" --config
webpack.config.js
(node:33997) DeprecationWarning: loaderUtils.parseQuery() received a
non-string value which can be problematic, see
https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major
version of loader-utils.
Hash: fe4471bbef0e7c5081ef
Version: webpack 2.3.3
Time: 1552ms
 Asset Size  ChunksChunk Names
reactComponents.js  1.21 MB   0  [emitted]  [big]  reactComponents
history.js  5.37 kB   1  [emitted] history
  slickgrid.js  4.78 kB   2  [emitted] slickgrid
   [5] /Users/dpage/git/pgadmin4/web/~/object-assign/index.js 2.11 kB
{0} [built]
  [20] /Users/dpage/git/pgadmin4/web/~/react/lib/React.js 2.69 kB {0} [built]
  [32] /Users/dpage/git/pgadmin4/web/~/react/react.js 56 bytes {0} [built]
 [196] ./js/history/history_collection.js 1.91 kB {1} [built]
 [197] ./jsx/history/query_history.jsx 3.65 kB {0} [built]
 [198] /Users/dpage/git/pgadmin4/web/~/react-dom/index.js 59 bytes {0} [built]
 [199] ./bundle/components.js 604 bytes {0} [built]
 [200] ./bundle/slickgrid.js 620 bytes {2} [built]
 [201] ./js/history/index.js 690 bytes {1} [built]
 [202] ./jsx/history/query_history_entry.jsx 5.21 kB {0} [built]
 [233] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/ReactDOM.js 5.14
kB {0} [built]
 [282] /Users/dpage/git/pgadmin4/web/~/react-dom/lib/findDOMNode.js
2.46 kB {0} [built]
 [296] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPropTypes.js
15.8 kB {0} [built]
 [297] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactPureComponent.js
1.32 kB {0} [built]
 [298] /Users/dpage/git/pgadmin4/web/~/react/lib/ReactVersion.js 350
bytes {0} [built]
+ 288 hidden modules

ERROR in ./bundle/slickgrid.js
Module not found: Error: Can't resolve 'slickgrid/slick.grid.css' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/bundle'
 @ ./bundle/slickgrid.js 7:0-35

ERROR in ./bundle/slickgrid.js
Module not found: Error: Can't resolve
'slickgrid/slick-default-theme.css' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/bundle'
 @ ./bundle/slickgrid.js 9:0-44

ERROR in ./bundle/slickgrid.js
Module not found: Error: Can't resolve 'slickgrid/slick.core' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/bundle'
 @ ./bundle/slickgrid.js 13:0-31

ERROR in ./bundle/slickgrid.js
Module not found: Error: Can't resolve 'slickgrid/slick.grid' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/bundle'
 @ ./bundle/slickgrid.js 15:0-31

ERROR in ./bundle/slickgrid.js
Module not found: Error: Can't resolve 'slickgrid/slick.editors' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/bundle'
 @ ./bundle/slickgrid.js 17:0-34

ERROR in ./bundle/slickgrid.js
Module not found: Error: Can't resolve 'slickgrid/slick.formatters' in
'/Users/dpage/git/pgadmin4/web/pgadmin/static/bundle'
 @ ./bundle/slickgrid.js 19:0-37

ERROR in ./bundle/slickgrid.js
Module not found: Error: Can't resolve
'slickgrid/plugins/slick.

pgAdmin 4 commit: No need for the menu icon to link to the homepage, as

2017-06-20 Thread Dave Page
No need for the menu icon to link to the homepage, as pgAdmin is a SPA. Fixes 
#2479

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=34518d328e836758c87c40628cf8738e1756962e
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/browser/templates/browser/index.html | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)



Re: [pgAdmin4][PATCH] Fix clicking on the "pgAdmin 4" header logo shows a empty dialog

2017-06-20 Thread Dave Page
Thanks, applied.

On Tue, Jun 20, 2017 at 5:54 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA minor patch to fix the issue, where user will get empty dialog in
> desktop mode if user clicks on pgadmin4 header logo. pgAdmin4 is already a
> SPA so in my opinion we don't require route to to home page.
> RM#2479
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgAdmin 4 commit: Create a runner for the feature tests.

2017-06-20 Thread Dave Page
Create a runner for the feature tests.

Branch
--
master

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

Modified Files
--
ci/run_feature_tests.sh | 37 +
ci/run_python_tests.sh  | 11 ---
2 files changed, 37 insertions(+), 11 deletions(-)



Build failed in Jenkins: pgadmin4-master-python27-feature #1

2017-06-20 Thread pgAdmin 4 Jenkins
See 


--
Started by user Dave Page
[EnvInject] - Loading node environment variables.
Building in workspace 

Cloning the remote Git repository
Cloning repository git://git.postgresql.org/git/pgadmin4.git
 > git init 
 >  # 
 > timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
No valid HEAD. Skipping the resetting
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision bd917f234870a776d0cbe4631360a30445ae6591 (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f bd917f234870a776d0cbe4631360a30445ae6591
First time build. Skipping changelog.
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=2.7

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python27-feature] $ /bin/sh -xe 
/tmp/hudson7724307570415830099.sh
+ 

EXECUTING: Feature tests

Starting virtual frame buffer...

Creating Python 2.7 virtual environment...

New python executable in 

Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/python-2.7/bin/python
Ignoring ordereddict: markers 'python_version < "2.7"' don't match your 
environment
Collecting Babel==2.3.4 (from -r requirements.txt (line 4))
  Using cached Babel-2.3.4-py2.py3-none-any.whl
Collecting beautifulsoup4==4.4.1 (from -r requirements.txt (line 5))
  Using cached beautifulsoup4-4.4.1-py2-none-any.whl
Collecting blinker==1.3 (from -r requirements.txt (line 6))
Collecting click==6.6 (from -r requirements.txt (line 7))
  Using cached click-6.6-py2.py3-none-any.whl
Collecting extras==0.0.3 (from -r requirements.txt (line 8))
Collecting fixtures==2.0.0 (from -r requirements.txt (line 9))
  Using cached fixtures-2.0.0-py2.py3-none-any.whl
Collecting Flask==0.11.1 (from -r requirements.txt (line 10))
  Using cached Flask-0.11.1-py2.py3-none-any.whl
Collecting Flask-Babel==0.11.1 (from -r requirements.txt (line 11))
Collecting Flask-Gravatar==0.4.2 (from -r requirements.txt (line 12))
  Using cached Flask_Gravatar-0.4.2-py2.py3-none-any.whl
Collecting Flask-HTMLmin==1.2 (from -r requirements.txt (line 13))
Collecting Flask-Login==0.3.2 (from -r requirements.txt (line 14))
Collecting Flask-Mail==0.9.1 (from -r requirements.txt (line 15))
Collecting Flask-Migrate==2.0.3 (from -r requirements.txt (line 16))
Collecting Flask-Principal==0.4.0 (from -r requirements.txt (line 17))
Collecting Flask-Security==1.7.5 (from -r requirements.txt (line 18))
Collecting Flask-SQLAlchemy==2.1 (from -r requirements.txt (line 19))
Collecting Flask-WTF==0.12 (from -r requirements.txt (line 20))
  Using cached Flask_WTF-0.12-py2-none-any.whl
Collecting html5lib==1.0b3 (from -r requirements.txt (line 21))
Collecting importlib==1.0.3 (from -r requirements.txt (line 22))
Collecting itsdangerous==0.24 (from -r requirements.txt (line 23))
Collecting Jinja2==2.7.3 (from -r requirements.txt (line 24))
Collecting linecache2==1.0.0 (from -r requirements.txt (line 25))
  Using cached linecache2-1.0.0-py2.py3-none-any.whl
Collecting MarkupSafe==0.23 (from -r requirements.txt (line 26))
Collecting passlib==1.6.2 (from -r requirements.txt (line 28))
Collecting pbr==1.9.1 (from -r requirements.txt (line 29))
  Using cached pbr-1.9.1-py2.py3-none-any.whl
Collecting psycopg2>=2.7.1 (from -r requirements.txt (line 30))
  Using cached psycopg2-2.7.1-cp27-cp27m-manylinux1_x86_64.whl
Collecting pycrypto==2.6.1 (from -r requirements.txt (line 31))
Collecting pyrsistent==0.11.13 (from -r requirements.txt (line 32))
Collecting python-dateutil==2.5.0 (from -r requirements.txt (line 33))
  Using cached python_dateutil-2.5.0-py2.py3-none-any.whl
Collecting python-mimeparse==1.5.1 (from -r requirements.txt (line 34))
Collecting pytz==2014.10 (from -r requireme

pgAdmin 4 commit: Run yarn tasks where required to run the tests.

2017-06-20 Thread Dave Page
Run yarn tasks where required to run the tests.

Branch
--
master

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

Modified Files
--
ci/run_feature_tests.sh | 4 
ci/run_jasmine_tests.sh | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)



Build failed in Jenkins: pgadmin4-master-python36 #184

2017-06-20 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Create a runner for the feature tests.

--
[...truncated 288.54 KB...]
Update materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
Check Databases Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_add.ResourceGroupsAddTestCase)
Add resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_delete.ResourceGroupsDeleteTestCase)
Delete resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_put.ResourceGroupsPutTestCase)
Put resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.tests_resource_groups_get.ResourceGroupsGetTestCase)
Get resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_check_recovery.TestCheckRecovery)
Test for check recovery ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependencies_sql.TestDependenciesSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependents_sql.TestDependentsSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_role_dependencies_sql.TestRoleDependenciesSql)
Test Role Dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_add.ServersAddTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_delete.ServerDeleteTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_get.ServersGetTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase)
Default Server Node url ... ok
runTest (pgadmin.browser.server_groups.tests.test_sg_get.SgNodeTestCase)
Check Server Group Node ... ok
runTest 
(pgadmin.utils.javascript.tests.test_javascript_bundler.JavascriptBundlerTestCase)
scenario name: JavascriptBundlerTestCase ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a template when called ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.1 template when it is present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.2 template when request for a higher version ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render default version when version 9.0 was requested and only 9.1 and 9.2 are 
present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Raise error when version is smaller than available templates ... ok
runTest 
(regression.python_test_utils.sql_template_test_base.SQLTemplateTestBase)
parent test class ... ok

--
Ran 163 tests in 24.147s

OK

==
Test Result Summary
==

PostgreSQL 9.2:

143 tests passed
0 tests failed
20 tests skipped:
EventTriggerAddTestCase (Fetch Event Trigger N

pgAdmin 4 commit: Correct the v10 template path.

2017-06-20 Thread Dave Page
Correct the v10 template path.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/server_groups/servers/tests/test_check_recovery.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Jenkins build is back to normal : pgadmin4-master-python36 #185

2017-06-20 Thread pgAdmin 4 Jenkins
See 





Jenkins build is back to normal : pgadmin4-master-python34 #178

2017-06-20 Thread pgAdmin 4 Jenkins
See 





Build failed in Jenkins: pgadmin4-master-python34 #177

2017-06-20 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Create a runner for the feature tests.

--
[...truncated 289.73 KB...]
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
Check Databases Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_add.ResourceGroupsAddTestCase)
Add resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_delete.ResourceGroupsDeleteTestCase)
Delete resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_put.ResourceGroupsPutTestCase)
Put resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.tests_resource_groups_get.ResourceGroupsGetTestCase)
Get resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_check_recovery.TestCheckRecovery)
Test for check recovery ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependencies_sql.TestDependenciesSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependents_sql.TestDependentsSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_role_dependencies_sql.TestRoleDependenciesSql)
Test Role Dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_add.ServersAddTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_delete.ServerDeleteTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_get.ServersGetTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase)
Default Server Node url ... ok
runTest (pgadmin.browser.server_groups.tests.test_sg_get.SgNodeTestCase)
Check Server Group Node ... ok
runTest 
(pgadmin.utils.javascript.tests.test_javascript_bundler.JavascriptBundlerTestCase)
scenario name: JavascriptBundlerTestCase ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a template when called ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.1 template when it is present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.2 template when request for a higher version ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render default version when version 9.0 was requested and only 9.1 and 9.2 are 
present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Raise error when version is smaller than available templatespgAdmin 4 - 
Application Initialisation
==

NOTE: Configuring authentication for DESKTOP mode.
Please check output in file: 


 ... ok
runTest 
(regression.python_test_utils.sql_template_test_base.SQLTemplateTestBase)
parent test class ... ok

--
Ran 163 tests in 24.753s

OK

==
Test Result Summary
=

Build failed in Jenkins: pgadmin4-master-python27-feature #2

2017-06-20 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Run yarn tasks where required to run the tests.

[Dave Page] Correct the v10 template path.

--
Started by user Dave Page
[EnvInject] - Loading node environment variables.
Building in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.postgresql.org/git/pgadmin4.git # 
 > timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.postgresql.org/git/pgadmin4.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.postgresql.org/git/pgadmin4.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision 9829d74a043e0b24f8d0caac3ea1ba9336680ff6 (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 9829d74a043e0b24f8d0caac3ea1ba9336680ff6
 > git rev-list bd917f234870a776d0cbe4631360a30445ae6591 # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=2.7

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python27-feature] $ /bin/sh -xe 
/tmp/hudson4424701445554004746.sh
+ 

EXECUTING: Create pgAdmin config

[pgadmin4-master-python27-feature] $ /bin/sh -xe 
/tmp/hudson5586763504236427673.sh
+ 

EXECUTING: Feature tests

Starting virtual frame buffer...

Creating Python 2.7 virtual environment...

New python executable in 

Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/python-2.7/bin/python
Ignoring ordereddict: markers 'python_version < "2.7"' don't match your 
environment
Collecting Babel==2.3.4 (from -r requirements.txt (line 4))
  Using cached Babel-2.3.4-py2.py3-none-any.whl
Collecting beautifulsoup4==4.4.1 (from -r requirements.txt (line 5))
  Using cached beautifulsoup4-4.4.1-py2-none-any.whl
Collecting blinker==1.3 (from -r requirements.txt (line 6))
Collecting click==6.6 (from -r requirements.txt (line 7))
  Using cached click-6.6-py2.py3-none-any.whl
Collecting extras==0.0.3 (from -r requirements.txt (line 8))
Collecting fixtures==2.0.0 (from -r requirements.txt (line 9))
  Using cached fixtures-2.0.0-py2.py3-none-any.whl
Collecting Flask==0.11.1 (from -r requirements.txt (line 10))
  Using cached Flask-0.11.1-py2.py3-none-any.whl
Collecting Flask-Babel==0.11.1 (from -r requirements.txt (line 11))
Collecting Flask-Gravatar==0.4.2 (from -r requirements.txt (line 12))
  Using cached Flask_Gravatar-0.4.2-py2.py3-none-any.whl
Collecting Flask-HTMLmin==1.2 (from -r requirements.txt (line 13))
Collecting Flask-Login==0.3.2 (from -r requirements.txt (line 14))
Collecting Flask-Mail==0.9.1 (from -r requirements.txt (line 15))
Collecting Flask-Migrate==2.0.3 (from -r requirements.txt (line 16))
Collecting Flask-Principal==0.4.0 (from -r requirements.txt (line 17))
Collecting Flask-Security==1.7.5 (from -r requirements.txt (line 18))
Collecting Flask-SQLAlchemy==2.1 (from -r requirements.txt (line 19))
Collecting Flask-WTF==0.12 (from -r requirements.txt (line 20))
  Using cached Flask_WTF-0.12-py2-none-any.whl
Collecting html5lib==1.0b3 (from -r requirements.txt (line 21))
Collecting importlib==1.0.3 (from -r requirements.txt (line 22))
Collecting itsdangerous==0.24 (from -r requirements.txt (line 23))
Collecting Jinja2==2.7.3 (from -r requirements.txt (line 24))
Collecting linecache2==1.0.0 (from -r requirements.txt (line 25))
  Using cached linecache2-1.0.0-py2.py3-none-any.whl
Collecting MarkupSafe==0.23 (from -r requirements.txt (line 26))
Collecting passlib==1.6.2 (from -r requirements.txt (line 28))
Collecting pbr==1.9.1 (from -r requirements.txt (line 29))
  Using cached pbr-1.9.1-py2.py3-none-any.whl
Collecting psycopg2>=2.7.1 (from -r requirements.txt (line 30))
  Using cached psycopg2-2.7.1-cp27-cp27m-manylinux1_x86_64.whl
Collecting pycrypto==2.6.1 (from -r requirements.txt (line 31))
Collecting pyrsistent==0.11.13 (from -r requirements.txt (line 32))
Collecting python-dateutil==2.5.0 (from -r requirements.txt (line 33))
  Using cached python_dateutil-2.5.0-py2.py3-none-any.whl
Collecting python-mimeparse==1.5.1 (from -r requirements.txt (line 34))
Collecting pytz==2014.10 (from -r requirements.txt (line 35))
  Using cached pytz-2014.10-py2.py3-none-any.whl
Collecting s

pgAdmin 4 commit: Install the Yarn deps before trying to bundle.

2017-06-20 Thread Dave Page
Install the Yarn deps before trying to bundle.

Branch
--
master

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

Modified Files
--
ci/run_feature_tests.sh | 1 +
1 file changed, 1 insertion(+)



Test mail

2017-06-20 Thread Magnus Hagander
This is a test mail for some new list functionality that accidentally got
broken today.

Apologies, and please ignore this mail.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/ 
 Work: https://www.redpill-linpro.com/ 


[pgAdmin4][PATCH] To increase the size of Grant Wizard dialog

2017-06-20 Thread Murtuza Zabuawala
Hi,

PFA minor patch to make Grant Wizard dialog size larger so that it displays
all the privileges properly when opened in smaller resolution screen.
RM#2013

Tested on 1024 x 768 screen resolution.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git 
a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/js/grant_wizard.js 
b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/js/grant_wizard.js
index f79fb2f..ebba51b 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/js/grant_wizard.js
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/js/grant_wizard.js
@@ -1121,7 +1121,7 @@ define([
 }
 
 // Call Grant Wizard Dialog and set dimensions for wizard
-alertify.wizardDialog(true).resizeTo('40%', '60%');
+alertify.wizardDialog(true).resizeTo('55%', '75%');
   }
 };
 


[pgAdmin4][PATCH] Consolidating Selection Colors

2017-06-20 Thread Shruti B Iyer
Hi Hackers!

Attached is a patch that consolidates selection colors in the drop down
menu and browser tree to match the light blue agreed upon in the styleguide.

Thanks,
Shirley and Shruti


converging-selection-color.patch
Description: Binary data


[pgAdmin4][PATCH] To fix the issue in Synonym node

2017-06-20 Thread Murtuza Zabuawala
Hi,

PFA patch to handle the deleted Synonym node gracefully when user clicks
SQL or Properties Panel.
RM#2503

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py
index 50fd219..e49ab43 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/__init__.py
@@ -334,18 +334,28 @@ class SynonymView(PGChildNodeView):
 except ValueError:
 data[k] = v
 
-sql = render_template("/".join([self.template_path,
-'get_objects.sql']),
-  trgTyp=data['trgTyp'],
-  trgSchema=data['trgSchema'])
-status, rset = self.conn.execute_dict(sql)
+is_valid_request = True
+if 'trgTyp' not in data or data['trgTyp'] is None or \
+data['trgTyp'].strip() == '':
+is_valid_request = False
+
+if 'trgSchema' not in data or data['trgSchema'] is None or \
+data['trgSchema'].strip() == '':
+is_valid_request = False
+
+if is_valid_request:
+sql = render_template("/".join([self.template_path,
+'get_objects.sql']),
+trgTyp=data['trgTyp'],
+trgSchema=data['trgSchema'])
+status, rset = self.conn.execute_dict(sql)
 
-if not status:
-return internal_server_error(errormsg=rset)
+if not status:
+return internal_server_error(errormsg=rset)
 
-for row in rset['rows']:
-res.append({'label': row['name'],
-'value': row['name']})
+for row in rset['rows']:
+res.append({'label': row['name'],
+'value': row['name']})
 
 return make_json_response(
 data=res,
@@ -384,14 +394,8 @@ class SynonymView(PGChildNodeView):
 status=200
 )
 else:
-return make_json_response(
-success=410,
-errormsg=gettext(
-'Error: Object not found.'
-),
-info=gettext(
-'The specified synonym could not be found.\n'
-)
+return gone(
+gettext('The specified synonym could not be found.')
 )
 
 except Exception as e:
@@ -483,14 +487,8 @@ class SynonymView(PGChildNodeView):
 if len(res['rows']) > 0:
 data = res['rows'][0]
 else:
-return make_json_response(
-success=0,
-errormsg=gettext(
-'Error: Object not found.'
-),
-info=gettext(
-'The specified synonym could not be found.\n'
-)
+return gone(
+gettext('The specified synonym could not be found.')
 )
 
 SQL = render_template("/".join([self.template_path,
@@ -646,14 +644,8 @@ class SynonymView(PGChildNodeView):
 if len(res['rows']) > 0:
data = res['rows'][0]
 else:
-return make_json_response(
-success=0,
-errormsg=gettext(
-'Error: Object not found.'
-),
-info=gettext(
-'The specified synonym could not be found.\n'
-)
+return gone(
+gettext('The specified synonym could not be found.')
 )
 
 SQL = render_template("/".join([self.template_path,