pgAdmin 4 commit: Refactor to remove duplicate code for the cancel/term

2017-10-09 Thread Dave Page
Refactor to remove duplicate code for the cancel/terminate buttons in the 
dashboard.

Branch
--
master

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

Modified Files
--
web/pgadmin/dashboard/static/js/dashboard.js | 193 +--
1 file changed, 64 insertions(+), 129 deletions(-)



Re: [pgAdmin4][Patch]: Code refactoring - Dashboard module

2017-10-09 Thread Dave Page
Thanks, applied.

On Mon, Oct 2, 2017 at 2:21 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to refactor dashboard client side code for cancel & terminate
> session button.
>
> --
> 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


Build failed in Jenkins: pgadmin4-master-python26 #473

2017-10-09 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Refactor to remove duplicate code for the cancel/terminate buttons 
in

--
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
[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 f2929046fa84d27bbb49b762307e377db6a0faaa (origin/master)
Commit message: "Refactor to remove duplicate code for the cancel/terminate 
buttons in the dashboard."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f f2929046fa84d27bbb49b762307e377db6a0faaa
 > git rev-list cb25bb0e930a5a6dfcc424d702f773fdf673f7e4 # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=2.6

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python26] $ /bin/sh -xe /tmp/jenkins3625729770391793779.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 2.6 virtual environment...

New python executable in 

Installing setuptools, pip...done.
Running virtualenv with interpreter /usr/local/python-2.6/bin/python
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please 
upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting wheel==0.29.0
:318:
 SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name 
Indication) extension to TLS is not available on this platform. This may cause 
the server to present an incorrect TLS certificate, which can cause validation 
failures. You can upgrade to a newer version of Python to solve this. For more 
information, see 
https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
:122:
 InsecurePlatformWarning: A true SSLContext object is not available. This 
prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
connections to fail. You can upgrade to a newer version of Python to solve 
this. For more information, see 
https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Using cached wheel-0.29.0-py2.py3-none-any.whl
Collecting argparse; python_version == "2.6" (from wheel==0.29.0)
  Using cached argparse-1.4.0-py2.py3-none-any.whl
Installing collected packages: argparse, wheel
Successfully installed argparse-1.4.0 wheel-0.29.0
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please 
upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting Babel==2.3.4 (from -r requirements.txt (line 4))
:318:
 SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name 
Indication) extension to TLS is not available on this platform. This may cause 
the server to present an incorrect TLS certificate, which can cause validation 
failures. You can upgrade to a newer version of Python to solve this. For more 
information, see 
https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
:122:
 InsecurePlatformWarning: A true SSLContext object is not available. This 
prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
connections to fail. You can upgrade to a newer version of Python to solve 
this. For more information, see 
https://urllib3.readthedocs.io/en/latest/security.html#ins

Re: pgAdmin4 never loading

2017-10-09 Thread Surinder Kumar
Hi Pavel,

If you are building pgAdmin4 from the source, then you don't need to
install pgAdmin4 from the wheel.

After taking the pgAdmin4 source from git HEAD, you need to install nodeJS,
Yarn to build JS/CSS modules. the error you are getting is possibly due to
this. For more help, you can follow the steps documented here


It seems QtWekbit compilation went well. so just run pgAdmin4. it should
work.

Also, can you share logs generated at location '/var/log/pgadmin4/pgadmin4.log'
?

Thanks,
Surinder


On Mon, Oct 9, 2017 at 1:10 PM, Dave Page  wrote:

> Surinder, can you help out with this please?
>
> On Fri, Oct 6, 2017 at 9:00 PM, Pavel Klimenko  wrote:
>
>> Hi.
>> I'm get last sources from git.
>> Make runtime application, create virtualenv as  "virtualenv pga4venv"
>> do:
>> source pga4venv/bin/activate
>> pip install -r ../requirements.txt
>> pip install backports.weakref # not run with out it
>> pip install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.0/pip/pga
>> dmin4-2.0-py2.py3-none-any.whl
>> export PYTHONPATH=/pgadmin4/runtime/pga4ven
>> v/lib/python2.7/site-packages/te-packages/
>> make app with QT5:
>> /opt/Qt/5.5/gcc_64/bin/qmake CONFIG+=release
>> do make
>> and run it.
>> App run byt I'm see only "Loading pgAdmin 4 v2.0..."
>> and it's never load.
>> How to fix it?
>>
>> My pip freeze in attachment.
>>
>> $uname -a
>> Linux lptp 4.13.0-12-generic #13-Ubuntu SMP Sat Sep 23 03:40:16 UTC 2017
>> x86_64 x86_64 x86_64 GNU/Linux
>>
>> $cat /etc/os-release
>> NAME="Ubuntu"
>> VERSION="17.10 (Artful Aardvark)"
>> ID=ubuntu
>> ID_LIKE=debian
>> PRETTY_NAME="Ubuntu Artful Aardvark (development branch)"
>> VERSION_ID="17.10"
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


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

2017-10-09 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Refactor to remove duplicate code for the cancel/terminate buttons 
in

--
[...truncated 341.22 KB...]
SynonymGetTestCase (Fetch synonym Node URL)
SynonymPutTestCase (Fetch synonym Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
TableUpdateTestCase (Create partitions of existing range 
partitioned table,
Create partitions of existing list 
partitioned table,
Detach partition from existing range 
partitioned table,
Detach partition from existing list 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table)
ViewsAddTestCase (Add materialized view under schema node)
ViewsDeleteTestCase (Delete materialized view under schema node)
ViewsGetTestCase (Get materialized view under schema node)
ViewsUpdateTestCase (Update materialized view under schema node)
ResourceGroupsAddTestCase (Add resource groups)
ResourceGroupsDeleteTestCase (Delete resource groups)
ResourceGroupsPutTestCase (Put resource groups)
ResourceGroupsGetTestCase (Get resource groups)
TestSSLConnection (Test for SSL connection)

PostgreSQL 9.3:

160 tests passed
0 tests failed
15 tests skipped:
PackageAddTestCase (Fetch Package Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)
PackagePutTestCase (Fetch Package Node URL)
SynonymAddTestCase (Default Node URL)
SynonymDeleteTestCase (Fetch synonym Node URL)
SynonymGetTestCase (Fetch synonym Node URL)
SynonymPutTestCase (Fetch synonym Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
TableUpdateTestCase (Create partitions of existing range 
partitioned table,
Create partitions of existing list 
partitioned table,
Detach partition from existing range 
partitioned table,
Detach partition from existing list 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table)
ResourceGroupsAddTestCase (Add resource groups)
ResourceGroupsDeleteTestCase (Delete resource groups)
ResourceGroupsPutTestCase (Put resource groups)
ResourceGroupsGetTestCase (Get resource groups)
TestSSLConnection (Test for SSL connection)

PostgreSQL 9.4:

160 tests passed
0 tests failed
15 tests skipped:
PackageAddTestCase (Fetch Package Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)
PackagePutTestCase (Fetch Package Node URL)
SynonymAddTestCase (Default Node URL)
SynonymDeleteTestCase (Fetch synonym Node URL)
SynonymGetTestCase (Fetch synonym Node URL)
SynonymPutTestCase (Fetch synonym Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
TableUpdateTestCase (Create partitions of existing range 
partitioned table,
Create partitions of existing list 
partitioned table,
Detach partition from existing range 
partitioned table,
Detach partition from existing list 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table)
ResourceGroupsAddTestCase (Add resource groups)
ResourceGroupsDeleteTestCase (Delete resource groups)
ResourceGroupsPutTestCase (Put resource groups)
ResourceGroupsGetTestCase (Get resource groups)
Te

Re: Array representation and save array data from datagrid [RM2671][pgAdmin4]

2017-10-09 Thread Murtuza Zabuawala
Hi Harshal,

Could you please look at the latest issue reported by user on
https://redmine.postgresql.org/issues/2258#change-8312
It looks like regression of RM#2671 changes.

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


On Mon, Sep 18, 2017 at 12:07 PM, Akshay Joshi <
akshay.jo...@enterprisedb.com> wrote:

> Thanks patch applied.
>
> On Fri, Sep 15, 2017 at 6:16 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi Akshay,
>>
>> It's not issue; Try without quotes. As char data type stores only one
>> character so it's storing only leading quote (') and
>> truncating remaining characters (a').
>> Only exception is when you want to store empty string (char) use two
>> quotes (either single or double)
>> they will translated before sending to server.
>>
>> Apart from this I found that data types "char" and "char"[] (alias to
>> character and character[] respectively)
>> were not taken into consideration in sqleditor.js. I have attached
>> updated patch which fixes this issue.
>>
>>
>>
>>
>>
>> --
>> *Harshal Dhumal*
>> *Sr. Software Engineer*
>>
>> EnterpriseDB India: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Thu, Sep 14, 2017 at 5:31 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Harshal
>>>
>>> I have reviewed your patch it looks good to me. Only one issue I have
>>> found with char[], when I store {'a','b','c'} it gets stored and when I
>>> refreshed it shows {',','}. Please look into this issue.
>>>
>>> On Thu, Sep 14, 2017 at 3:54 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 It works, sorry for the noise.

 On Thu, Sep 14, 2017 at 3:48 PM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Harshal,
>
> Can you please rebase the patch, it's not applied with the latest code.
>
> On Tue, Sep 12, 2017 at 2:37 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>>
>>
>> On Tue, Sep 12, 2017 at 2:34 PM, Dave Page  wrote:
>>
>>> Adding Akshay...
>>>
>>
>> Sure.
>>
>>>
>>> On Tue, Sep 12, 2017 at 10:04 AM, Dave Page 
>>> wrote:
>>>
 Akshay, can you review/commit this please?

 On Mon, Sep 11, 2017 at 3:40 PM, Harshal Dhumal <
 harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch to represent array data in datagrid
> with curly braces and
> also allow user to save array with values like  ,  string>, '*""*' and "*''*"
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: 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

>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>> *Principal Software Engineer *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>



 --
 *Akshay Joshi*
 *Principal Software Engineer *



 *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*

>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>> *Principal Software Engineer *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>
>>
>>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>


[pgAdmin4][Patch]: Remove external links from Panel's context menu

2017-10-09 Thread Murtuza Zabuawala
​Hi,

PFA minor patch to remove external links from Panel's context menu.
RM#2772​

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/help/__init__.py b/web/pgadmin/help/__init__.py
index cab7a03..0840698 100644
--- a/web/pgadmin/help/__init__.py
+++ b/web/pgadmin/help/__init__.py
@@ -43,7 +43,7 @@ class HelpModule(PgAdminModule):
  priority=300,
  target='_blank',
  icon='fa fa-external-link',
- url='http://www.postgresql.org/')]}
+ url='https://www.postgresql.org/')]}
 
 def get_panels(self):
 return [
@@ -55,22 +55,8 @@ class HelpModule(PgAdminModule):
 icon='fa fa-question').__dict__,
 
 Panel(
-name='pnl_pgadmin_website',
-priority=200,
-title=gettext('pgAdmin Website'),
-icon='fa fa-external-link',
-content='https://www.pgadmin.org/').__dict__,
-
-Panel(
-name='pnl_postgresql_website',
-priority=300,
-title=gettext('PostgreSQL Website'),
-icon='fa fa-external-link',
-content='http://www.postgresql.org/').__dict__,
-
-Panel(
 name='pnl_sql_help',
-priority=400,
+priority=200,
 isPrivate=True,
 icon='fa fa-info',
 title=gettext('SQL Help')).__dict__]


Build failed in Jenkins: pgadmin4-master-python26 #474

2017-10-09 Thread pgAdmin 4 Jenkins
See 


--
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 f2929046fa84d27bbb49b762307e377db6a0faaa (origin/master)
Commit message: "Refactor to remove duplicate code for the cancel/terminate 
buttons in the dashboard."
 > git config core.sparsecheckout # timeout=10
 > git checkout -f f2929046fa84d27bbb49b762307e377db6a0faaa
 > git rev-list f2929046fa84d27bbb49b762307e377db6a0faaa # timeout=10
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
PYTHON_VERSION=2.6

[EnvInject] - Variables injected successfully.
[pgadmin4-master-python26] $ /bin/sh -xe /tmp/jenkins912962193109091953.sh
+ 
EXECUTING: Create pgAdmin config

EXECUTING: Python tests

Creating Python 2.6 virtual environment...

New python executable in 

Installing setuptools, pip...done.
Running virtualenv with interpreter /usr/local/python-2.6/bin/python
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please 
upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting wheel==0.29.0
:318:
 SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name 
Indication) extension to TLS is not available on this platform. This may cause 
the server to present an incorrect TLS certificate, which can cause validation 
failures. You can upgrade to a newer version of Python to solve this. For more 
information, see 
https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
:122:
 InsecurePlatformWarning: A true SSLContext object is not available. This 
prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
connections to fail. You can upgrade to a newer version of Python to solve 
this. For more information, see 
https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
Collecting argparse; python_version == "2.6" (from wheel==0.29.0)
  Downloading argparse-1.4.0-py2.py3-none-any.whl
Installing collected packages: argparse, wheel
Successfully installed argparse-1.4.0 wheel-0.29.0
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please 
upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting Babel==2.3.4 (from -r requirements.txt (line 4))
:318:
 SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name 
Indication) extension to TLS is not available on this platform. This may cause 
the server to present an incorrect TLS certificate, which can cause validation 
failures. You can upgrade to a newer version of Python to solve this. For more 
information, see 
https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
:122:
 InsecurePlatformWarning: A true SSLContext object is not available. This 
prevents urllib3 from configuring SSL appropriately and may cause certain SSL 
connections to fail. You can upgrade to a newer version of Python to solve 
this. For more information, see 
https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading Babel-2.3.4-py2.py3-none-any.whl (7.1MB)
Collecting beautifulsoup4==4.4.1 (from -r requirements.txt (line 5))
  Dow

pgAdmin 4 commit: Running eslint on all the static javascripts, and fix

2017-10-09 Thread Ashesh Vashi
Running eslint on all the static javascripts, and fixed the issues found
during that.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/about/static/js/about.js   |  107 +-
.../servers/databases/casts/static/js/cast.js  |  452 ++--
.../event_triggers/static/js/event_trigger.js  |   94 +-
.../databases/extensions/static/js/extension.js|  428 ++--
.../foreign_servers/static/js/foreign_server.js|  170 +-
.../user_mapping/static/js/user_mapping.js |  138 +-
.../static/js/foreign_data_wrapper.js  |  192 +-
.../databases/languages/static/js/language.js  |  104 +-
.../columns/static/js/catalog_object_column.js |   46 +-
.../catalog_objects/static/js/catalog_object.js|   42 +-
.../schemas/collations/static/js/collation.js  |  178 +-
.../static/js/domain_constraints.js|  131 +-
.../databases/schemas/domains/static/js/domain.js  |  266 ++-
.../foreign_tables/static/js/foreign_table.js  |  523 +++--
.../static/js/fts_configuration.js |  671 +++---
.../fts_dictionaries/static/js/fts_dictionary.js   |  197 +-
.../schemas/fts_parser/static/js/fts_parser.js |  154 +-
.../fts_templates/static/js/fts_template.js|4 +-
.../schemas/functions/static/js/function.js|  381 ++-
.../schemas/functions/static/js/procedure.js   |  123 +-
.../functions/static/js/trigger_function.js|  268 +--
.../schemas/packages/edbfuncs/static/js/edbfunc.js |   84 +-
.../schemas/packages/edbfuncs/static/js/edbproc.js |   50 +-
.../schemas/packages/edbvars/static/js/edbvar.js   |   49 +-
.../schemas/packages/static/js/package.js  |  110 +-
.../schemas/sequences/static/js/sequence.js|  227 +-
.../servers/databases/schemas/static/js/catalog.js |   58 +-
.../servers/databases/schemas/static/js/schema.js  |  626 +++--
.../schemas/synonyms/static/js/synonym.js  |  240 +-
.../schemas/tables/column/static/js/column.js  |  687 +++---
.../check_constraint/static/js/check_constraint.js |   99 +-
.../static/js/exclusion_constraint.js  | 1526 ++--
.../foreign_key/static/js/foreign_key.js   |  809 +++
.../index_constraint/static/js/primary_key.js  |  240 +-
.../static/js/unique_constraint.js |  236 +-
.../tables/constraints/static/js/constraints.js|   36 +-
.../schemas/tables/indexes/static/js/index.js  |  563 +++--
.../tables/partitions/static/js/partition.js   |  729 +++---
.../schemas/tables/rules/static/js/rule.js |  142 +-
.../schemas/tables/static/js/partition.utils.js|  329 +--
.../databases/schemas/tables/static/js/table.js|  948 
.../schemas/tables/triggers/static/js/trigger.js   | 1062 -
.../databases/schemas/types/static/js/type.js  |  765 +++---
.../databases/schemas/views/static/js/mview.js |  153 +-
.../databases/schemas/views/static/js/view.js  |   88 +-
.../servers/databases/static/js/database.js|  340 ++-
.../pgagent/schedules/static/js/pga_schedule.js|  166 +-
.../servers/pgagent/static/js/pga_job.js   |  107 +-
.../servers/pgagent/steps/static/js/pga_jobstep.js |  132 +-
.../resource_groups/static/js/resource_group.js|   45 +-
.../server_groups/servers/roles/static/js/role.js  |  790 +++
.../server_groups/servers/static/js/privilege.js   |  717 +++---
.../server_groups/servers/static/js/server.js  | 2090 -
.../server_groups/servers/static/js/variable.js|  639 +++--
.../servers/tablespaces/static/js/tablespace.js|  330 +--
.../server_groups/static/js/server_group.js|   62 +-
web/pgadmin/browser/static/js/browser.js   | 2212 +-
web/pgadmin/browser/static/js/collection.js|  271 +--
web/pgadmin/browser/static/js/datamodel.js | 2169 +
web/pgadmin/browser/static/js/error.js |   17 +-
web/pgadmin/browser/static/js/frame.js |   44 +-
web/pgadmin/browser/static/js/menu.js  |  186 +-
web/pgadmin/browser/static/js/node.js  |  484 ++--
web/pgadmin/browser/static/js/node.ui.js   |  270 ++-
web/pgadmin/browser/static/js/panel.js |   53 +-
web/pgadmin/browser/static/js/wizard.js|  214 +-
web/pgadmin/dashboard/static/js/dashboard.js   | 2460 ++--
web/pgadmin/misc/bgprocess/static/js/bgprocess.js  |  203 +-
web/pgadmin/misc/depends/static/js/depends.js  |  142 +-
.../misc/file_manager/static/js/file_manager.js| 1230 +-
web/pgadmin/misc/file_manager/static/js/utility.js | 1057 -
web/pgadmin/misc/sql/static/js/sql.js  |   52 +-
web/pgadmin/misc/static/explain/js/explain.js  | 1068 +
.../misc/statistics/static/js/statistics.js|  252 +-
web/pgadmin/preferences/static/js/preferences.js   |

pgAdmin 4 commit: Use the correct lexer in the Apache/Windows docs.

2017-10-09 Thread Ashesh Vashi
Use the correct lexer in the Apache/Windows docs.

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=ad1061c344b2fe095ec03634b4f0586a6e2cf286
Author: Dave Page 

Modified Files
--
docs/en_US/server_deployment.rst | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)



pgAdmin 4 commit: Add missing date.

2017-10-09 Thread Ashesh Vashi
Add missing date.

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f86f7304483bfea3ba02cc6986b24c58400e78ad
Author: Dave Page 

Modified Files
--
docs/en_US/release_notes_2_0.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgAdmin 4 commit: Fixed merging issue with the dashboard javascript

2017-10-09 Thread Ashesh Vashi
Fixed merging issue with the dashboard javascript

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/dashboard/static/js/dashboard.js | 864 +--
1 file changed, 403 insertions(+), 461 deletions(-)



pgAdmin 4 commit: Clarify how virtual envs can be used in WSGI mode, an

2017-10-09 Thread Ashesh Vashi
Clarify how virtual envs can be used in WSGI mode, and ensure we ship the 
required bits on Windows.

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=763e161b584d60d3ce8d691c3c001f3b637cac76
Author: Surinder Kumar 

Modified Files
--
docs/en_US/server_deployment.rst | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)



pgAdmin 4 commit: Fix disable trigger menu option. Fixes #2707

2017-10-09 Thread Ashesh Vashi
Fix disable trigger menu option. Fixes #2707

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
.../servers/databases/schemas/tables/triggers/static/js/trigger.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)



pgAdmin 4 commit: Remove the reference of font-mfizz completely.

2017-10-09 Thread Ashesh Vashi
Remove the reference of font-mfizz completely.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/static/css/style.css | 1 -
1 file changed, 1 deletion(-)



pgAdmin 4 commit: Allow to terminate a session from the server, and dat

2017-10-09 Thread Ashesh Vashi
Allow to terminate a session from the server, and database dashboard.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/dashboard/static/js/dashboard.js | 66 
1 file changed, 66 insertions(+)



pgAdmin 4 commit: Support React v15.5 and later where the code fails to

2017-10-09 Thread Ashesh Vashi
Support React v15.5 and later where the code fails to run because React's 
PropTypes is no more part of React Module.

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=0c109dbbb669a58e4e9a8dbf56bccb25e78b1c42
Author: Surinder Kumar 

Modified Files
--
web/yarn.lock | 474 +-
1 file changed, 304 insertions(+), 170 deletions(-)



pgAdmin 4 commit: Bump version number for release.

2017-10-09 Thread Ashesh Vashi
Bump version number for release.

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=0e3b9905801689864ab55dadbddef1d764d80949
Author: Dave Page 

Modified Files
--
web/config.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



pgAdmin 4 commit: Using the correct path for the font-mfizz stylesheet.

2017-10-09 Thread Ashesh Vashi
Using the correct path for the font-mfizz stylesheet.

Reported by: Neel Patel

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=cd459e1ed618175e5bf8953b49b1eb63d1a01215
Author: Surinder Kumar 

Modified Files
--
web/pgadmin/static/css/style.css | 25 +
1 file changed, 25 insertions(+)



pgAdmin 4 commit: Resolved the logo issue.

2017-10-09 Thread Ashesh Vashi
Resolved the logo issue.

For some unknown reason, font-mfizz was showing the slonik icon in
italic. Even after upgrading it to the latest version of font-mfizz, the
problem was not resolved.

So - instead of using the vector font, using the PostgreSQL SVG logo as
the application icon, and documentation link on dashboard now.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/package.json | 1 -
web/yarn.lock| 4 
2 files changed, 5 deletions(-)



pgAdmin 4 commit: Refactor to remove duplicate code for the cancel/term

2017-10-09 Thread Ashesh Vashi
Refactor to remove duplicate code for the cancel/terminate buttons in the 
dashboard.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/dashboard/static/js/dashboard.js | 1020 --
1 file changed, 473 insertions(+), 547 deletions(-)



pgAdmin 4 commit: Changed the wording for 'Terminated session successfu

2017-10-09 Thread Ashesh Vashi
Changed the wording for 'Terminated session successfully'

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/dashboard/static/js/dashboard.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgAdmin 4 commit: Upgraded the font-mfizz to latest version (v:2.4.1) t

2017-10-09 Thread Ashesh Vashi
Upgraded the font-mfizz to latest version (v:2.4.1) to resolve an issue,
about showing the PostgreSQL logo in italic in runtime on windows.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/package.json |   1 +
web/yarn.lock| 392 ---
2 files changed, 139 insertions(+), 254 deletions(-)



pgAdmin 4 commit: Resolved misc issues introduced during the previous c

2017-10-09 Thread Ashesh Vashi
Resolved misc issues introduced during the previous commit, and merging.

Also, fixed the jasmine test framework as per previous commits.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/static/css/style.css   |  24 
.../tools/debugger/static/js/debugger_ui.js|   2 +-
.../javascript/alerts/alertify_wrapper_spec.js |   2 +-
web/webpack.shim.js|   4 +-
web/webpack.test.config.js |   2 +-
web/webpack/bundles/app.js |   2 +-
web/yarn.lock  | 121 ++---
7 files changed, 64 insertions(+), 93 deletions(-)



Re: pgAdmin4 never loading

2017-10-09 Thread Surinder Kumar
Hi

1) Please update the nodeJS to the latest version. v4.2.6 is an older
version.

2) Run following commands from '/pgadmin4/web' directory:

  a) yarn install
  b) yarn run bundle

3) Then run pgAdmin4.

and Let us know If you still get an error.

Thanks,
Surinder

On Tue, Oct 10, 2017 at 1:49 AM, Pavel Klimenko  wrote:

> My pgadmin4.log is empty. It's empty while I'm rum runtime version
> (~/.pgadmin/pgadmin4.log) and in the server (/var/log/pgadmin4/pgadmin4.lo
> g).
> Error in stdout (runtime version):
> "[26404:26874:1009/221031.330527:ERROR:nss_util.cc(808)] After loading
> Root Certs, loaded==false: NSS error code: -8018"
> Documented steps not help in my desktop case.
>
> On my servers old node
> #node -v
> v0.10.29
> on debian and
> node -v
> v4.2.6
> on ubuntu. This is a reason of problem?
>
> 2017-10-09 11:43 GMT+03:00 Surinder Kumar  >:
>
>> Hi Pavel,
>>
>> If you are building pgAdmin4 from the source, then you don't need to
>> install pgAdmin4 from the wheel.
>>
>> After taking the pgAdmin4 source from git HEAD, you need to install
>> nodeJS, Yarn to build JS/CSS modules. the error you are getting is possibly
>> due to this. For more help, you can follow the steps documented here
>> 
>>
>> It seems QtWekbit compilation went well. so just run pgAdmin4. it should
>> work.
>>
>> Also, can you share logs generated at location 
>> '/var/log/pgadmin4/pgadmin4.log'
>> ?
>>
>> Thanks,
>> Surinder
>>
>>
>> On Mon, Oct 9, 2017 at 1:10 PM, Dave Page  wrote:
>>
>>> Surinder, can you help out with this please?
>>>
>>> On Fri, Oct 6, 2017 at 9:00 PM, Pavel Klimenko 
>>> wrote:
>>>
 Hi.
 I'm get last sources from git.
 Make runtime application, create virtualenv as  "virtualenv pga4venv"
 do:
 source pga4venv/bin/activate
 pip install -r ../requirements.txt
 pip install backports.weakref # not run with out it
 pip install https://ftp.postgresql.org/pub
 /pgadmin/pgadmin4/v2.0/pip/pgadmin4-2.0-py2.py3-none-any.whl
 export PYTHONPATH=/pgadmin4/runtime/pga4ven
 v/lib/python2.7/site-packages/te-packages/
 make app with QT5:
 /opt/Qt/5.5/gcc_64/bin/qmake CONFIG+=release
 do make
 and run it.
 App run byt I'm see only "Loading pgAdmin 4 v2.0..."
 and it's never load.
 How to fix it?

 My pip freeze in attachment.

 $uname -a
 Linux lptp 4.13.0-12-generic #13-Ubuntu SMP Sat Sep 23 03:40:16 UTC
 2017 x86_64 x86_64 x86_64 GNU/Linux

 $cat /etc/os-release
 NAME="Ubuntu"
 VERSION="17.10 (Artful Aardvark)"
 ID=ubuntu
 ID_LIKE=debian
 PRETTY_NAME="Ubuntu Artful Aardvark (development branch)"
 VERSION_ID="17.10"


>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>
>
> --
> Спасибо
>


[pgAdmin4][Patch]: Enable/Disable passfile filed based on supported libpq version

2017-10-09 Thread Murtuza Zabuawala
Hi,

PFA patch to enable/disable the passfile filed on Create/Edit Server dialog
based on supported libpq version.
RM#2768

*Issue:*
passfile connection parameter is only available with latest version of
libpq which is libpq10+
Ref: Link 

Please review.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/docs/en_US/server_dialog.rst b/docs/en_US/server_dialog.rst
index a82d462..a1a5193 100644
--- a/docs/en_US/server_dialog.rst
+++ b/docs/en_US/server_dialog.rst
@@ -88,9 +88,11 @@ Use the fields in the *Advanced* tab to configure a 
connection:
 * The DB restriction field allows you to enter an SQL restriction that will be 
used against the pg_database table to
   limit the databases that you see. For example, you might enter: *live_db 
test_db* so that only live_db and test_db are
   shown in the pgAdmin browser. Separate entries with a comma or tab as you 
type.
-* Specify the password file which allow user to login without providing 
password, see Section 31 of the Postgres documentation:
+* Specify the password file which allow user to login without providing 
password, see Section 33.15 of the Postgres documentation:
 
-   https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html
+   https://www.postgresql.org/docs/current/static/libpq-pgpass.html
+
+*NOTE:* password file options is only supported with libpq 10+.
 
 * Click the *Save* button to save work.
 * Click the *Cancel* button to exit without saving work.
diff --git a/web/pgadmin/browser/__init__.py b/web/pgadmin/browser/__init__.py
index e74664f..7778805 100644
--- a/web/pgadmin/browser/__init__.py
+++ b/web/pgadmin/browser/__init__.py
@@ -555,6 +555,15 @@ def utils():
 insert_pair_brackets_perf = prefs.preference('insert_pair_brackets')
 insert_pair_brackets = insert_pair_brackets_perf.get()
 
+# Try to fetch current libpq version from the driver
+try:
+from config import PG_DEFAULT_DRIVER
+from pgadmin.utils.driver import get_driver
+driver = get_driver(PG_DEFAULT_DRIVER)
+pg_libpq_version = driver.libpq_version()
+except:
+pg_libpq_version = 0
+
 for submodule in current_blueprint.submodules:
 snippets.extend(submodule.jssnippets)
 return make_response(
@@ -569,7 +578,8 @@ def utils():
 editor_wrap_code=editor_wrap_code,
 editor_brace_matching=brace_matching,
 editor_insert_pair_brackets=insert_pair_brackets,
-app_name=config.APP_NAME
+app_name=config.APP_NAME,
+pg_libpq_version=pg_libpq_version
 ),
 200, {'Content-Type': 'application/x-javascript'})
 
diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.js 
b/web/pgadmin/browser/server_groups/servers/static/js/server.js
index 02324e4..45c0356 100644
--- a/web/pgadmin/browser/server_groups/servers/static/js/server.js
+++ b/web/pgadmin/browser/server_groups/servers/static/js/server.js
@@ -779,7 +779,7 @@ define('pgadmin.node.server', [
 },{
   id: 'passfile', label: gettext('Password File'), type: 'text',
   group: gettext('Advanced'), mode: ['edit', 'create'],
-  disabled: 'isConnected', control: Backform.FileControl,
+  disabled: 'isConnectedWithValidLib', control: Backform.FileControl,
   dialog_type: 'select_file', supp_types: ['*']
 },{
   id: 'passfile', label: gettext('Password File'), type: 'text',
@@ -888,6 +888,14 @@ define('pgadmin.node.server', [
 return true;
   }
   return _.indexOf(SSL_MODES, ssl_mode) == -1;
+},
+isConnectedWithValidLib: function(model) {
+  if(model.get('connected')) {
+return true;
+  }
+  // older version of libpq do not support 'passfile' parameter in
+  // connect method, valid libpq must have version >= 10
+  return pgBrowser.utils.pg_libpq_version < 10;
 }
   }),
   connection_lost: function(i, resp) {
diff --git a/web/pgadmin/browser/templates/browser/js/utils.js 
b/web/pgadmin/browser/templates/browser/js/utils.js
index 4b6a737..fc475dd 100644
--- a/web/pgadmin/browser/templates/browser/js/utils.js
+++ b/web/pgadmin/browser/templates/browser/js/utils.js
@@ -24,6 +24,7 @@ define('pgadmin.browser.utils',
 insertPairBrackets: '{{ editor_insert_pair_brackets }}' == 'True',
 braceMatching: '{{ editor_brace_matching }}' == 'True',
 app_name: '{{ app_name }}',
+pg_libpq_version: {{pg_libpq_version|e}},
 
 counter: {total: 0, loaded: 0},
 registerScripts: function (ctx) {
diff --git a/web/pgadmin/utils/driver/abstract.py 
b/web/pgadmin/utils/driver/abstract.py
index 7db3e37..2f323f0 100644
--- a/web/pgadmin/utils/driver/abstract.py
+++ b/web/pgadmin/utils/driver/abstract.py
@@ -32,6 +32,9 @@ class BaseDriver(object):
 * Version (string)