pgAdmin 4 commit: Moved the javascripts of the following browser node m

2017-06-22 Thread Ashesh Vashi
Moved the javascripts of the following browser node modules to the
'static' directory from 'templates' in the respective module directory:
- Server Group
- Server
- Database
- Schema
- Cast
- Event trigger
- Extension
- Foreign data wrapper
- Language
- Catalog Object
- Collation
- Domain Constraint
- Domain
- Foreign server
- FTS Configuration
- FTS Dictionary
- FTS Parser
- FTS Template
- Function
- Procedure
- Trigger Function
- Package
- Sequence
- Catalog
- Schema
- Synonym
- Table
- Type
- Materialized View
- View
- pgAgent Modules
  + Job (pga_job)
  + Schedule (pga_schedule)
  + Steps (pga_jobstep)

Added new dynanic modules for listing the supported server types, and
current user information.

NOTE: We've not yet moved the javascripts for the children of the table
module.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/__init__.py|   30 +-
web/pgadmin/browser/collection.py  |   30 +-
web/pgadmin/browser/server_groups/__init__.py  |   12 +-
.../browser/server_groups/servers/__init__.py  |   49 +-
.../server_groups/servers/databases/__init__.py|   23 +-
.../servers/databases/casts/__init__.py|   27 +-
.../servers/databases/casts/static/js/cast.js  |  309 ++
.../databases/casts/templates/cast/js/casts.js |  309 --
.../servers/databases/event_triggers/__init__.py   |   26 +-
.../event_triggers/static/js/event_trigger.js  |  176 
.../templates/event_triggers/js/event_trigger.js   |  176 
.../servers/databases/extensions/__init__.py   |   23 +-
.../databases/extensions/static/js/extension.js|  256 +
.../templates/extensions/js/extensions.js  |  256 -
.../databases/foreign_data_wrappers/__init__.py|   28 +-
.../static/js/foreign_data_wrapper.js  |  188 
.../js/foreign_data_wrappers.js|  188 
.../servers/databases/languages/__init__.py|   27 +-
.../databases/languages/static/js/language.js  |  269 ++
.../languages/templates/languages/js/languages.js  |  269 --
.../servers/databases/schemas/__init__.py  |   17 +-
.../catalog_objects/static/js/catalog_object.js|   59 ++
.../templates/catalog_object/js/catalog_object.js  |   59 --
.../schemas/collations/static/js/collation.js  |  259 +
.../collations/templates/collation/js/collation.js |  259 -
.../schemas/domains/domain_constraints/__init__.py |   29 +-
.../static/js/domain_constraint.js |  146 +++
.../domain_constraints/js/domain_constraints.js|  146 ---
.../databases/schemas/domains/static/js/domain.js  |  346 +++
.../domains/templates/domains/js/domains.js|  346 ---
.../foreign_tables/static/js/foreign-table.js  |  719 ++
.../templates/foreign_tables/js/foreign_tables.js  |  719 --
.../static/js/fts_configuration.js |  613 
.../fts_configuration/js/fts_configuration.js  |  613 
.../fts_dictionaries/static/js/fts_dictionary.js   |  218 +
.../templates/fts_dictionary/js/fts_dictionary.js  |  218 -
.../schemas/fts_parser/static/js/fts_parser.js |  235 +
.../templates/fts_parser/js/fts_parser.js  |  235 -
.../fts_templates/static/js/fts_template.js|  174 
.../templates/fts_template/js/fts_templates.js |  174 
.../schemas/functions/static/js/function.js|  479 ++
.../schemas/functions/static/js/procedure.js   |  188 
.../functions/static/js/trigger_function.js|  400 
.../functions/templates/function/js/functions.js   |  479 --
.../functions/templates/procedure/js/procedures.js |  188 
.../trigger_function/js/trigger_functions.js   |  400 
.../schemas/packages/static/js/package.js  |  183 
.../packages/templates/package/js/package.js   |  183 
.../schemas/sequences/static/js/sequence.js|  313 ++
.../sequences/templates/sequence/js/sequence.js|  313 --
.../servers/databases/schemas/static/js/catalog.js |   82 ++
.../servers/databases/schemas/static/js/schema.js  |  496 ++
.../schemas/synonyms/static/js/synonym.js  |  249 +
.../synonyms/templates/synonym/js/synonym.js   |  249 -
.../databases/schemas/tables/static/js/table.js|  968 +++
.../schemas/tables/templates/table/js/table.js |  968 ---
.../schemas/templates/catalog/js/catalog.js|   82 --
.../schemas/templates/schema/js/schema.js  |  496 --
.../databases/schemas/types/static/js/type.js  |  949 +++
.../schemas/types/templates/type/js/type.js|  949 ---
.../servers/databases/schemas/utils.py |   10 +-
.../databases/schemas/views/static/js/mview.js |  326 +++
...

Re: [pgadmin-hackers] Re: Server side cursor limitations for on demand loading of data in query tool [RM2137] [pgAdmin4]

2017-06-27 Thread Ashesh Vashi
On Tue, Jun 27, 2017 at 6:33 PM, Dave Page  wrote:

> Thanks - patch committed!
>
> Awsome job :-)
>
Woohoo!

-- Thanks & Regards,
Ashesh Vashi

>
> On Tue, Jun 27, 2017 at 3:26 AM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find rebased patch.
>>
>> --
>> *Harshal Dhumal*
>> *Sr. Software Engineer*
>>
>> EnterpriseDB India: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Mon, Jun 26, 2017 at 5:24 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> yes i'm working on that only :)
>>>
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Sr. Software Engineer*
>>>
>>> EnterpriseDB India: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Mon, Jun 26, 2017 at 5:22 PM, Dave Page  wrote:
>>>
>>>> I'm sorry, it needs rebasing again. If you can do it quickly, I'll
>>>> make sure it's the next patch I work on in that area.
>>>>
>>>> Thanks.
>>>>
>>>> On Mon, Jun 26, 2017 at 5:16 AM, Harshal Dhumal
>>>>  wrote:
>>>> > Hi Dave,
>>>> >
>>>> > Please find updated rebased patch for RM2137
>>>> >
>>>> > On Fri, Jun 23, 2017 at 9:00 PM, Dave Page  wrote:
>>>> >>
>>>> >> Hi Harshal,
>>>> >>
>>>> >> When can we expect an updated version of this patch? I think it's
>>>> >> important to get this into the next release.
>>>> >>
>>>> >> Thanks!
>>>> >>
>>>> >> On Fri, Jun 16, 2017 at 10:55 AM, Dave Page 
>>>> wrote:
>>>> >> > Hi,
>>>> >> >
>>>> >> > That's better - the failures are far less random now :-). I got the
>>>> >> > following two though, on both PG and EPAS 9.5:
>>>> >> >
>>>> >> > 
>>>> ==
>>>> >> > ERROR: runTest
>>>> >> > (pgadmin.feature_tests.query_tool_tests.QueryToolFeatureTest)
>>>> >> > Query tool feature test
>>>> >> > 
>>>> --
>>>> >> > Traceback (most recent call last):
>>>> >> >   File
>>>> >> > "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_t
>>>> ool_tests.py",
>>>> >> > line 95, in runTest
>>>> >> > self._query_tool_explain_analyze_buffers()
>>>> >> >   File
>>>> >> > "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_t
>>>> ool_tests.py",
>>>> >> > line 443, in _query_tool_explain_analyze_buffers
>>>> >> > canvas.find_element_by_xpath("//*[contains(string(), 'Shared
>>>> Read
>>>> >> > Blocks')]")
>>>> >> >   File
>>>> >> > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packa
>>>> ges/selenium/webdriver/remote/webelement.py",
>>>> >> > line 260, in find_element_by_xpath
>>>> >> > return self.find_element(by=By.XPATH, value=xpath)
>>>> >> >   File
>>>> >> > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packa
>>>> ges/selenium/webdriver/remote/webelement.py",
>>>> >> > line 508, in find_element
>>>> >> > {"using": by, "value": value})['value']
>>>> >> >   File
>>>> >> > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packa
>>>> ges/selenium/webdriver/remote/webelement.py",
>>>> >> > line 491, in _execute
>>>> >> > return self._parent.execute(command, params)
>>>> >> >   File
>>>> >> > "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packa
>>>> ges/selenium/webdriver/remote/webdriver.py",
>>>> >> > line 238, in execute
>>>> >> > self.error_handler.check_response(response)
>>>> >> >   File
>>>> >> > "/Users/dpage/.virtuale

Re: Tree view icon samples

2017-06-28 Thread Ashesh Vashi
On Jun 28, 2017 22:32, "Robert Eckhardt"  wrote:

I like them as well. The only comment I have is that the red icon on
disconnected DB and corrupted DB are difficult to make out. They are
clearly differentiable but the icon itself is unclear.

A colour blind person may not be able to differentiate the primary &
foreign key icons.

-- Ashesh


-- Rob

On Wed, Jun 28, 2017 at 12:49 PM, Dave Page  wrote:

> Hi
>
> > On 28 Jun 2017, at 12:41, Chethana Kumar  om> wrote:
> >
> > Hi Team,
> >
> > I am coming up with some sample icons for Tree View Control.
> >
> > Thought process behind the concept -
> >
> > 1. Included EDB color brand feel (gray and blue colors)
>
> You mean pgAdmin colour brand :-). EDB is orange & black.
>
> > 2. Eliminated the distraction of too many colors and provided
> consistency through the icons
> > 3. User will recognize the icon shapes rather than recalling it by their
> colors (like in existing icons) so focused more on shapes
> > 4. It also adds value to the brand since it has EDB color tones in it
> >
> >
> > So please feel free to share your views on the same
>
> I like them - they look much more modern and stylish, but still fit with
> what they represent.
>
> Other opinions please?
>
> Good work!
>


Re: Tree view icon samples

2017-06-28 Thread Ashesh Vashi
On Thu, Jun 29, 2017 at 9:09 AM, Chethana Kumar <
chethana.ku...@enterprisedb.com> wrote:

> Hi Ashesh,
>
> I tried to eliminate the colour blind issue which might occur with the
> primary & foregin key icons.
> But still I will use the app to test the colors, just let me know your
> opinion now.
>
Please do.

One more point: :-)
Icons for some nodes are missing here.
i.e. Partition table (introduced in 'Declarative Partition' patch),
Materialized View, etc.

-- Thanks, Ashesh

>
> Regards,
> Chethana kumar
>
> On Wed, Jun 28, 2017 at 11:13 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Jun 28, 2017 22:32, "Robert Eckhardt"  wrote:
>>
>> I like them as well. The only comment I have is that the red icon on
>> disconnected DB and corrupted DB are difficult to make out. They are
>> clearly differentiable but the icon itself is unclear.
>>
>> A colour blind person may not be able to differentiate the primary &
>> foreign key icons.
>>
>> -- Ashesh
>>
>>
>> -- Rob
>>
>> On Wed, Jun 28, 2017 at 12:49 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> > On 28 Jun 2017, at 12:41, Chethana Kumar <
>>> chethana.ku...@enterprisedb.com> wrote:
>>> >
>>> > Hi Team,
>>> >
>>> > I am coming up with some sample icons for Tree View Control.
>>> >
>>> > Thought process behind the concept -
>>> >
>>> > 1. Included EDB color brand feel (gray and blue colors)
>>>
>>> You mean pgAdmin colour brand :-). EDB is orange & black.
>>>
>>> > 2. Eliminated the distraction of too many colors and provided
>>> consistency through the icons
>>> > 3. User will recognize the icon shapes rather than recalling it by
>>> their colors (like in existing icons) so focused more on shapes
>>> > 4. It also adds value to the brand since it has EDB color tones in it
>>> >
>>> >
>>> > So please feel free to share your views on the same
>>>
>>> I like them - they look much more modern and stylish, but still fit with
>>> what they represent.
>>>
>>> Other opinions please?
>>>
>>> Good work!
>>>
>>
>>
>>
>
>
> --
> Chethana Kumar
> Principal UI/UX Designer
> EnterpriseDB Corporation
>
>
> The Postgres Database Company
>
> P: +91 86981 57146
> www.enterprisedb.com
>


Re: pgagent build issue on SLES 12

2017-07-10 Thread Ashesh Vashi
You can find the logs/temporary files in the CMakeFiles directory.

On Jul 10, 2017 17:48, "Dave Page"  wrote:

>
>
> On Mon, Jul 10, 2017 at 12:59 PM, Devrim Gündüz  wrote:
>
>>
>> Hi,
>>
>> I'm trying to RPMify pgagent on SLES 12, but getting an error. Here is the
>> command I'm using (like I did for RHEL)
>>
>> cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr -D 
>> PG_CONFIG_PATH:FILEPATH=/usr/pgsql-9.6/bin/pg_config
>> -D STATIC_BUILD:BOOL=OFF
>>
>> Error is:
>>
>> CMake Error at cmake/FindWX.cmake:271 (MESSAGE):
>>   The selected wxWidgets configuration (version: 2.8, debug: no, static:
>> no,
>>   unicode: yes, modules: base) is not available.
>> Call Stack (most recent call first):
>>   CMakeLists.txt:95 (FIND_PACKAGE)
>>
>> and here is the CMakeOutput.log:
>>
>> https://www.gunduz.org/temp/pgagent-CMakeOutput.log
>>
>> Any hints how can I debug this?
>>
>
> What wxWidgets configs are available on that machine?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: pgAdmin 4 commit: Revert "Ensure dependencies are packaged in the tarba

2017-07-11 Thread Ashesh Vashi
On Tue, Jul 11, 2017 at 1:54 PM, Dave Page  wrote:

> Revert "Ensure dependencies are packaged in the tarball"
>
> This reverts commit 6ad4a623c47154a2e3938805af52776039c23601.
>
> ENOCOFFEE error
>
;-)

>
> Branch
> --
> master
>
> Details
> ---
> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=
> dad6031bd633501069034d438cfc4157ed7c6478
>
> Modified Files
> --
> pkg/src/build.sh | 19 ++-
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
>


Re: Windows testing required: Updated runtime

2017-07-11 Thread Ashesh Vashi
On Tue, Jul 11, 2017 at 9:44 PM, Dave Page  wrote:

>
>
> On Tue, Jul 11, 2017 at 4:56 PM, Mike Surcouf  wrote:
>
>> >No - PostgreSQL builds on Windows dropped GSSAPI in favour of SSPI some
>> years ago. That functionality is provided by the underlying libpq, not
>> pgAdmin - though pgAdmin 1.6 does allow you to specify the host address as
>> >well as hostname/address which many people need with Kerberos for example.
>>
>>
>>
>> Not sure I understand this.
>>
>> Windows works fine with gssapi (the server is on a linux box).
>>
>> I make gssapi connections all the time with npgsql library and the web
>> version of pgadmin and terminal software so I don’t have to use passwords.
>>
>> It just doesn’t seem to work with the desktop version of pgadmin.
>>
>
> We rely entirely on libpq to handle this side of things, which means we're
> reliant on how it was built on a particular platform. On Windows, GSSAPI
> was dropped in favour of SSPI many years ago. I'm not familiar with either
> though, so I can't say what will or won't work - just that if it works with
> libpq on Windows, it should work with pgAdmin.
>
>
>>
>>
>> *>Before Webpack patch:-*
>>
>>
>>
>> >It took ~20 seconds. This 20 seconds includes when user double click on
>> application ( timing of python server start + page load )
>>
>>
>>
>> So Neel also gets 20 second start up (before webpack) .  At least it’s
>> not just me.  I look forward to having those 7 secs.
>>
>
> He is on a virtual machine though.
>
And - running a debug version of pgAdmin 4. :-)

-- Thanks, Ashesh

>
>
>>
>>
>> On a more positive note I do find the browsing of nodes and retrieving
>> table SQL seems to be snappier in 1.6.
>>
>
> Yes, I've found that. As it turns out, we're actually not using the
> ActiveQT port that Neel worked on. It looks like Qt (or the fork of
> QtWebKit we use) fixed the underlying issue.
>
>
>>
>>
>> >Will there be a web install package.
>>
>>
>>
>> What I meant was will there be a pgadmin4-v1-web package update.
>>
>
> Oh, right - yeah, Devrim was working on that earlier today.
>
>
>>
>>
>> Oh and as an aside I think you made the right decision going with a web
>> app.  It’s definitely the future .
>>
>> After these performance problems have been addressed.
>>
>> It’s not easy creating a feature rich web app and I appreciate all the
>> work you guys have done on this.
>>
>
> Thank you.
>
>
>> Just keep an open mind that your end users may have issues you don’t.
>> There are so many environmental factors to consider.
>>
>
> Oh, after over 20 years in IT support and software development, I've
> become painfully aware of that :-).
>
>
>>
>>
>> Mike
>>
>>
>>
>> *From:* Dave Page [mailto:dp...@pgadmin.org]
>> *Sent:* 11 July 2017 16:36
>>
>> *To:* Mike Surcouf
>> *Cc:* McDonaldR; pgadmin-hackers; pgAdmin Support
>> *Subject:* Re: Windows testing required: Updated runtime
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Jul 11, 2017 at 4:14 PM, Mike Surcouf 
>> wrote:
>>
>> > Try pressing Ctrl 0 (Control zero)
>>
>>
>>
>> Yes that did it.
>>
>> I also needed to reset layout for it to stick.
>>
>>
>>
>> OK, good.
>>
>>
>>
>>
>>
>> Start-up time still 25 secs to dash board so still slow for me (sorry but
>> it’s a fact).
>>
>> For comparison Server install start up is 5 seconds to dash board.
>>
>>
>>
>> Hmm, that is still slow. I get about 11 seconds on Windows 10, running on
>> VMware on my MacBook Pro. Any AV software etc. that may be slowing things?
>>
>>
>>
>>
>>
>> 1.   Does the desktop support GSSAPI.  It doesn’t seem to work for
>> me (I get error FATAL: GSSAPI authentication failed for user "postgres").
>> Server install works fine.
>>
>> No - PostgreSQL builds on Windows dropped GSSAPI in favour of SSPI some
>> years ago. That functionality is provided by the underlying libpq, not
>> pgAdmin - though pgAdmin 1.6 does allow you to specify the host address as
>> well as hostname/address which many people need with Kerberos for example.
>>
>>
>>
>> 2.   Did you webpack all the things for 1.6?
>>
>> No, unfortunately the patch wasn't ready. I have a WIP version, and it's
>> looking good; Neel reported the following using the runtime you have:
>>
>>
>>
>> *Before Webpack patch:-*
>>
>>
>>
>> It took ~20 seconds. This 20 seconds includes when user double click on
>> application ( timing of python server start + page load )
>>
>>
>>
>> *After Webpack patch:-*
>>
>>
>>
>> It took ~13 seconds ( timing of python server start + page load ).
>>
>>
>>
>> We got ~7 seconds improvement with webpack on same machine & same Qt
>> configuration and this will be useful in windows performance issue as well
>> :)
>>
>>
>>
>>  I expect this to be in 1.7, which we'll aim to get out fairly quickly
>> (vacations allowing)
>>
>>
>>
>> 3.   Will there be a web install package.
>>
>> There is a source tarball and Python wheel available at
>> http://developer.pgadmin.org/~dpage/1.6/
>>
>>
>>
>>  Thanks!
>>
>>
>>
>> Thanks
>>
>>
>>
>> Mike
>>
>>
>>
>>
>>
>> *From:* Dave Page [mailto:dp.

Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-11 Thread Ashesh Vashi
On Tue, Jul 11, 2017 at 10:29 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Robert,
>
> I have attached two patches:
>
> 1. webpack_bundles.patch
>
> 2. unvendor_files.patch
>
> in this email chain.
>
> If you didn't received those patches possibly due to large size of patch,
> let me know i will send again.
>
Dave,

I don't see these two patches too in the mail-chain.
By any chance, it is stalled.

-- Thanks, Ashesh

>
>
> On Tue, Jul 11, 2017 at 10:24 PM, Robert Eckhardt 
> wrote:
>
>> Surinder,
>>
>> Sorry I'm missing the email can you tell me the name please.
>>
>> -- Rob
>>
>> On Tue, Jul 11, 2017 at 12:51 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> On Tue, Jul 11, 2017 at 10:18 PM, Robert Eckhardt 
>>> wrote:
>>>
 The last email on this chain from Surinder says that it isn't working
 on IE and he will submit another patch. Are we missing that patch? Would
 you like us to look at the previous patch?

>>> ​Yes previous patch includes fix related to IE.​
>>>

 -- Rob


 On Jul 11, 2017 11:37 AM, "Dave Page" 
 wrote:

> Pivotal team; you guys are far more familiar with webpack etc. than we
> are; could you review please?
>
> Thanks!
>
> On Tue, Jul 11, 2017 at 4:24 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi
>>
>> 1) Created a separated patch for Un-vendored libraries and another
>> one related to webpack bundle files so it is easy to review.
>>
>> 2) Removed commented out code and dead code.
>>
>> 3) Feature test cases are fixed. All are running.
>> I have to add `time.sleep` of 1 second in method
>> 'fill_codemirror_area_with' as sometimes it work and sometimes don't.
>>
>> 4. Removed unused libraries from package.json
>>
>> Please find updated patch and review.
>>
>> Thanks,
>> Surinder
>>
>>
>>
>> On Tue, Jul 11, 2017 at 3:11 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> This patch doesn't work in windows IE 11 due to error `'Promise' is
>>> undefined
>>> ​`​.
>>>
>>> The dependency package 'babel-polyfill' is required to run ES6 code
>>> with webpack and has to load before at entry point of app.
>>> related thread 
>>>
>>> Please find updated patch.
>>>
>>> Thanks
>>> Surinder
>>>
>>> On Tue, Jul 11, 2017 at 2:13 PM, Dave Page <
>>> dave.p...@enterprisedb.com> wrote:
>>>
 Nice!

 On Tue, Jul 11, 2017 at 9:42 AM, Neel Patel <
 neel.pa...@enterprisedb.com> wrote:

> Hi Dave,
>
> I have tested Surinder's patch in my local machine with Qt 5.9.1
> Webkit on Windows and we are getting improvements with this patch. :)
>
> Below performance tested with Qt 5.9.1 with annulen webkit v
> 5.212.0 Alpha2.
>
> *Before Webpack patch:-*
>
> It took ~20 seconds. This 20 seconds includes when user double
> click on application ( timing of python server start + page load )
>
> *After Webpack patch:-*
>
> It took ~13 seconds ( timing of python server start + page load ).
>
> We got ~7 seconds improvement with webpack on same machine & same
> Qt configuration and this will be useful in windows performance issue 
> as
> well :)
>
> Thanks,
> Neel  Patel
>
> On Tue, Jul 11, 2017 at 1:27 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi
>>
>> I found this patch won't work on IE, so i have fixed it and will
>> send updated patch.
>>
>> On Tue, Jul 11, 2017 at 1:25 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>>
>>> On Tue, Jul 11, 2017 at 1:22 PM, Dave Page 
>>> wrote:
>>>
 When you say "un-vendorising", do you mean removing them from
 the vendor directory and adding them to packages.json so they're 
 pulled in
 via npm/yarn? (if so, good :-) )

>>> ​Yes.​
>>>

 On Tue, Jul 11, 2017 at 7:34 AM, Surinder Kumar <
 surinder.ku...@enterprisedb.com> wrote:

> Hi
>
> *Detailed changes:*
>
> ​1) Created a file bundle/app.js which loads `browser.js`  and
> then 'tools.datagrid' and its other dependents are configured to 
> load in
> '`imports-loader`
>
> 2) bundle/codemirror.js - it generates a bundled JS which is
> used wherever required in various modules.
>
> 3) file_ut

pgAdmin 4 commit: [PostgreSQL 10] Fixed the Pause/Resume Replay of WAL

2017-07-14 Thread Ashesh Vashi
[PostgreSQL 10] Fixed the Pause/Resume Replay of WAL files for PostgreSQL 10. 
Fixes #2566

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/server_groups/servers/__init__.py | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)



Re: [pgAdmin4][Patch]: Fix RM #2566 Pause/Resume Replay of WAL files are not working with PostgreSQL 10

2017-07-14 Thread Ashesh Vashi
Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

On Fri, Jul 14, 2017 at 6:18 PM, Akshay Joshi  wrote:

> Hi
>
> Attached is the patch file to fix RM #2566 Pause/Resume Replay of WAL
> files are not working with PostgreSQL 10.
>
> Please review it and let me the comments (if any)
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>


pgAdmin 4 commit: Do not dump the session data on the disk on every req

2017-07-25 Thread Ashesh Vashi
Do not dump the session data on the disk on every request.

Session object is updated, everytime a request is being served, and
that was forcing the session object dumped on the dist on every request.

On windows, it was causing issues on slower system on startup. Because -
windows file system locks the file, when it is opened by any
application. And, frequent requests on the pgAdmin main UI rendering
was causing issues, because of that.

In order to resolve the issue, we will not write the session data on
disk for every request, but - only after certain delay (in seconds),
from it was last written. It can be configured using the attribute
'PGADMIN_SESSION_DISK_WRITE_DELAY' in the configuration file,
default vaule for the delay is 10.
(i.e. 10 seconds)

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d339d6b816a28c5947b2312a932c047773d7e350
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/utils/session.py | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)



Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-26 Thread Ashesh Vashi
Hi Surinder,

'delete_template_files.patch' is applied any more.
Please send the rebased patches.

I have also noticed in the 'move_js_files_to_static_directory.patch',
couple of modules have two definitions for 'module_use_template_javascript'
method.


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

On Tue, Jul 25, 2017 at 3:56 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> Please find rebased patches and review.
>
> On Sat, Jul 22, 2017 at 1:03 AM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Following are the changes in patches attached:
>>
>> 1) Move Javascripts from Templates directory to Static for following
>> modules:
>>  - About
>>  - Browser nodes
>>  - Dashboard
>>  - FileManager
>>  - Vendor/snap.svg
>>  - Preferences
>>  - Settings
>>  - Backup
>>  - Datagrid
>>  - Debugger
>>  - Sqleditor
>>  - Grant Wizard
>>  - Import & Export
>>  - Maintenance
>>  - Restore and
>>  - User Management
>>
>> 2) Generate module JS path references dynamically/ Remove manually
>> written paths.
>> Added a new file 'module_paths.json' which will update with absolute
>> paths to module JS defined in every modules > __init__.py > 'def
>> get_own_javascripts'.
>>
>> When Flask service is started, it accesses the all module javascripts
>> using `current_app.javascripts` which is called inside an route.
>> This call to route is made using Flask's `test_client` and thus those
>> paths are written to `module_paths.json`(in javascript_bundler.py) which is
>> used by webpack.shim.js file.
>>
>> Three patches:
>> 1. Move JS files to static directory
>> 2. Deleted template JS
>> 3. Generate JS paths before app starts
>>
>> These patches needs to be committed separately as deleted files includes
>> in the commit that makes difficult to look for changes through `git log
>> `
>>
>> Please review.
>>
>> Thanks,
>> Surinder
>>
>>
>>
>> On Thu, Jul 20, 2017 at 6:08 PM, Dave Page  wrote:
>>
>>> Thanks, applied.
>>>
>>> On Thu, Jul 20, 2017 at 1:35 PM, Surinder Kumar <
>>> surinder.ku...@enterprisedb.com> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> Can you please review this patch please? I guess it was missed as i
>>>> send 2 patches back to back in same email chain.
>>>> Please find inline detailed description of issue.
>>>>
>>>> On Thu, Jul 20, 2017 at 12:37 PM, Surinder Kumar <
>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> The loading icon image is used in FileManager and it is still
>>>>> referenced from vendor `aciTree`(which is removed) so it gives 404 not
>>>>> found when FileManager is opened from Query tool/Backup utility.
>>>>>
>>>>> Please find attached patch and review.
>>>>>
>>>>> Thanks,
>>>>> Surinder Kumar
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>


Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-26 Thread Ashesh Vashi
On Thu, Jul 27, 2017 at 10:22 AM, Ashesh Vashi <
ashesh.va...@enterprisedb.com> wrote:

> Hi Surinder,
>
> 'delete_template_files.patch' is applied any more.
> Please send the rebased patches.
>
> I have also noticed in the 'move_js_files_to_static_directory.patch',
> couple of modules have two definitions for 'module_use_template_javascript'
> method.
>
Also - 'module_paths.json' is auto generated, please don't include that in
the patch.

-- Thanks, Ashesh

>
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> <http://www.enterprisedb.com>
>
>
> *http://www.linkedin.com/in/asheshvashi*
> <http://www.linkedin.com/in/asheshvashi>
>
> On Tue, Jul 25, 2017 at 3:56 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find rebased patches and review.
>>
>> On Sat, Jul 22, 2017 at 1:03 AM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Following are the changes in patches attached:
>>>
>>> 1) Move Javascripts from Templates directory to Static for following
>>> modules:
>>>  - About
>>>  - Browser nodes
>>>  - Dashboard
>>>  - FileManager
>>>  - Vendor/snap.svg
>>>  - Preferences
>>>  - Settings
>>>  - Backup
>>>  - Datagrid
>>>  - Debugger
>>>  - Sqleditor
>>>  - Grant Wizard
>>>  - Import & Export
>>>  - Maintenance
>>>  - Restore and
>>>  - User Management
>>>
>>> 2) Generate module JS path references dynamically/ Remove manually
>>> written paths.
>>> Added a new file 'module_paths.json' which will update with absolute
>>> paths to module JS defined in every modules > __init__.py > 'def
>>> get_own_javascripts'.
>>>
>>> When Flask service is started, it accesses the all module javascripts
>>> using `current_app.javascripts` which is called inside an route.
>>> This call to route is made using Flask's `test_client` and thus those
>>> paths are written to `module_paths.json`(in javascript_bundler.py) which is
>>> used by webpack.shim.js file.
>>>
>>> Three patches:
>>> 1. Move JS files to static directory
>>> 2. Deleted template JS
>>> 3. Generate JS paths before app starts
>>>
>>> These patches needs to be committed separately as deleted files includes
>>> in the commit that makes difficult to look for changes through `git log
>>> `
>>>
>>> Please review.
>>>
>>> Thanks,
>>> Surinder
>>>
>>>
>>>
>>> On Thu, Jul 20, 2017 at 6:08 PM, Dave Page  wrote:
>>>
>>>> Thanks, applied.
>>>>
>>>> On Thu, Jul 20, 2017 at 1:35 PM, Surinder Kumar <
>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>
>>>>> Hi Dave,
>>>>>
>>>>> Can you please review this patch please? I guess it was missed as i
>>>>> send 2 patches back to back in same email chain.
>>>>> Please find inline detailed description of issue.
>>>>>
>>>>> On Thu, Jul 20, 2017 at 12:37 PM, Surinder Kumar <
>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> The loading icon image is used in FileManager and it is still
>>>>>> referenced from vendor `aciTree`(which is removed) so it gives 404 not
>>>>>> found when FileManager is opened from Query tool/Backup utility.
>>>>>>
>>>>>> Please find attached patch and review.
>>>>>>
>>>>>> Thanks,
>>>>>> Surinder Kumar
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>
>>>
>>
>


Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-27 Thread Ashesh Vashi
On Thu, Jul 27, 2017 at 12:57 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi Ashesh,
>
> Please find attached patch 'move_js_files_static_dir' with --binary option.
>
As discussed, this patch should include changes related to moving the file
to static directory only, and not related to the dynamic path generation.

-- Thanks, Ashesh

>
> Thanks,
> Surinder
>
> On Thu, Jul 27, 2017 at 12:09 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi Ashesh,
>>
>> Changes in patch:
>>
>> 1. I have removed duplicate function 'module_use_template_javascript'
>> from modules.
>> 2. This patches only contains changes for moving template/js to
>> static/js. I have excluded changes for making module paths dynamic as we
>> will be using different approach to handle that.
>> 3. Also, changed path references for JS modules to point to static/ dir
>> instead of template/js in webpack.shim.js and webpack.config.js .
>>
>> Please find attached patches
>>
>> Thanks,
>> Surinder
>>
>>
>> On Thu, Jul 27, 2017 at 10:33 AM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Ok. I will send rebased patch.
>>>
>>> On Thu, Jul 27, 2017 at 10:32 AM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
>>>>
>>>>
>>>> On Thu, Jul 27, 2017 at 10:22 AM, Ashesh Vashi <
>>>> ashesh.va...@enterprisedb.com> wrote:
>>>>
>>>>> Hi Surinder,
>>>>>
>>>>> 'delete_template_files.patch' is applied any more.
>>>>> Please send the rebased patches.
>>>>>
>>>>> I have also noticed in the 'move_js_files_to_static_directory.patch',
>>>>> couple of modules have two definitions for 
>>>>> 'module_use_template_javascript'
>>>>> method.
>>>>>
>>>> Also - 'module_paths.json' is auto generated, please don't include that
>>>> in the patch.
>>>>
>>>> -- Thanks, Ashesh
>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Thanks & Regards,
>>>>>
>>>>> Ashesh Vashi
>>>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>>>> <http://www.enterprisedb.com>
>>>>>
>>>>>
>>>>> *http://www.linkedin.com/in/asheshvashi*
>>>>> <http://www.linkedin.com/in/asheshvashi>
>>>>>
>>>>> On Tue, Jul 25, 2017 at 3:56 PM, Surinder Kumar <
>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Please find rebased patches and review.
>>>>>>
>>>>>> On Sat, Jul 22, 2017 at 1:03 AM, Surinder Kumar <
>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Following are the changes in patches attached:
>>>>>>>
>>>>>>> 1) Move Javascripts from Templates directory to Static for following
>>>>>>> modules:
>>>>>>>  - About
>>>>>>>  - Browser nodes
>>>>>>>  - Dashboard
>>>>>>>  - FileManager
>>>>>>>  - Vendor/snap.svg
>>>>>>>  - Preferences
>>>>>>>  - Settings
>>>>>>>  - Backup
>>>>>>>  - Datagrid
>>>>>>>  - Debugger
>>>>>>>  - Sqleditor
>>>>>>>  - Grant Wizard
>>>>>>>  - Import & Export
>>>>>>>  - Maintenance
>>>>>>>  - Restore and
>>>>>>>  - User Management
>>>>>>>
>>>>>>> 2) Generate module JS path references dynamically/ Remove manually
>>>>>>> written paths.
>>>>>>> Added a new file 'module_paths.json' which will update with absolute
>>>>>>> paths to module JS defined in every modules > __init__.py > 'def
>>>>>>> get_own_javascripts'.
>>>>>>>
>>>>>>> When Flask service is started, it accesses the all module
>>>>>>> javascripts using `curre

pgAdmin 4 commit: Moved the javascripts of different modules from 'temp

2017-07-27 Thread Ashesh Vashi
Moved the javascripts of different modules from 'templates' to 'static' 
directory.

Moving the javascripts for the following modules:
 - About
 - Browser nodes
 - Dashboard
 - FileManager
 - Vendor/snap.svg
 - Preferences
 - Settings
 - Backup
 - Datagrid
 - Debugger
 - Sqleditor
 - Grant Wizard
 - Import & Export
 - Maintenance
 - Restore and
 - User Management

Branch
--
master

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

Modified Files
--
web/pgadmin/about/static/js/about.js   |   54 +
web/pgadmin/about/templates/about/about.js |   54 -
web/pgadmin/browser/server_groups/__init__.py  |2 +-
.../foreign_servers/__init__.py|8 +
.../foreign_servers/static/js/foreign_server.js|  184 +
.../foreign_servers/js/foreign_servers.js  |  184 -
.../foreign_servers/user_mapping/__init__.py   |8 +
.../user_mapping/static/js/user_mapping.js |  165 +
.../templates/user_mappings/js/user_mappings.js|  165 -
.../schemas/catalog_objects/columns/__init__.py|8 +
.../columns/static/js/catalog_object_column.js |   71 +
.../js/catalog_object_column.js|   71 -
.../databases/schemas/foreign_tables/__init__.py   |8 +-
.../static/img/coll-foreign_table.png  |  Bin 0 -> 492 bytes
.../foreign_tables/static/img/foreign_table.png|  Bin 0 -> 563 bytes
.../foreign_tables/static/js/foreign_table.js  |  719 ++
.../foreign_tables/tests/test_foreign_table_add.py |2 +-
.../tests/test_foreign_table_delete.py |2 +-
.../foreign_tables/tests/test_foreign_table_get.py |2 +-
.../foreign_tables/tests/test_foreign_table_put.py |2 +-
.../schemas/packages/edbfuncs/__init__.py  |   16 +
.../schemas/packages/edbfuncs/static/js/edbfunc.js |  112 +
.../schemas/packages/edbfuncs/static/js/edbproc.js |   67 +
.../edbfuncs/templates/edbfunc/js/edbfunc.js   |  112 -
.../edbfuncs/templates/edbproc/js/edbproc.js   |   67 -
.../databases/schemas/packages/edbvars/__init__.py |8 +
.../schemas/packages/edbvars/static/js/edbvar.js   |   70 +
.../packages/edbvars/templates/edbvar/js/edbvar.js |   70 -
.../databases/schemas/tables/column/__init__.py|8 +
.../schemas/tables/column/static/js/column.js  |  734 ++
.../tables/column/templates/column/js/column.js|  734 --
.../schemas/tables/constraints/__init__.py |8 +
.../constraints/check_constraint/__init__.py   |   12 +-
.../check_constraint/static/js/check_constraint.js |  235 +
.../check_constraint/js/check_constraint.js|  235 -
.../tests/test_check_constraint_add.py |2 +-
.../tests/test_check_constraint_delete.py  |2 +-
.../tests/test_check_constraint_get.py |2 +-
.../tests/test_check_constraint_put.py |2 +-
.../constraints/exclusion_constraint/__init__.py   |8 +
.../static/js/exclusion_constraint.js  |  951 +++
.../js/exclusion_constraint.js |  949 ---
.../tables/constraints/foreign_key/__init__.py |8 +
.../foreign_key/static/js/foreign_key.js   | 1102 +++
.../templates/foreign_key/js/foreign_key.js| 1100 ---
.../constraints/index_constraint/__init__.py   |8 +
.../index_constraint/js/index_constraint.js|  569 --
.../tables/constraints/static/js/constraints.js|   56 +
.../templates/constraints/js/constraints.js|   56 -
.../databases/schemas/tables/indexes/__init__.py   |8 +
.../schemas/tables/indexes/static/js/index.js  |  515 ++
.../tables/indexes/templates/index/js/index.js |  515 --
.../databases/schemas/tables/rules/__init__.py |8 +
.../schemas/tables/rules/static/js/rule.js |  274 +
.../tables/rules/templates/rules/js/rules.js   |  274 -
.../databases/schemas/tables/triggers/__init__.py  |8 +
.../schemas/tables/triggers/static/js/trigger.js   |  634 ++
.../triggers/templates/trigger/js/trigger.js   |  634 --
.../servers/resource_groups/__init__.py|9 +
.../resource_groups/static/js/resource_group.js|  126 +
.../resource_groups/js/resource_groups.js  |  126 -
.../server_groups/servers/roles/__init__.py|8 +
.../server_groups/servers/roles/static/js/role.js  |  564 ++
.../servers/roles/templates/role/js/role.js|  564 --
.../server_groups/servers/static/js/server.js  |8 +-
.../server_groups/servers/tablespaces/__init__.py  |8 +
.../servers/tablespaces/static/js/tablespace.js|  406 +
.../templates/tablespaces/js/tablespaces.js|  406 -
.../server_groups/static/img/server_group.png  |  Bin 0 -> 504 bytes
.../server_groups/static/js/server-group.js|   82 -
.../server_groups/static/js/server_group.js|   82 +
.../browser/server_groups/tests/test_sg_get.py |2 +-
web/pgadmin/browser/static/js/browser.js

Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-27 Thread Ashesh Vashi
On Thu, Jul 27, 2017 at 1:32 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi Ashesh,
>
> I have removed changes which are not relevant to the moving file to static
> directory.
>
Committed the code for moving the javascript files from 'templates' to
'static' directory for most of the modules now.

I had to remove some redundant javascripts from the template directory
manually.

-- Thanks, Ashesh

>
> Please find updated patch.
>
> Thanks,
> Surinder
>
> On Thu, Jul 27, 2017 at 1:13 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Thu, Jul 27, 2017 at 12:57 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi Ashesh,
>>>
>>> Please find attached patch 'move_js_files_static_dir' with --binary
>>> option.
>>>
>> As discussed, this patch should include changes related to moving the
>> file to static directory only, and not related to the dynamic path
>> generation.
>>
>> -- Thanks, Ashesh
>>
>>>
>>> Thanks,
>>> Surinder
>>>
>>> On Thu, Jul 27, 2017 at 12:09 PM, Surinder Kumar <
>>> surinder.ku...@enterprisedb.com> wrote:
>>>
>>>> Hi Ashesh,
>>>>
>>>> Changes in patch:
>>>>
>>>> 1. I have removed duplicate function 'module_use_template_javascript'
>>>> from modules.
>>>> 2. This patches only contains changes for moving template/js to
>>>> static/js. I have excluded changes for making module paths dynamic as we
>>>> will be using different approach to handle that.
>>>> 3. Also, changed path references for JS modules to point to static/ dir
>>>> instead of template/js in webpack.shim.js and webpack.config.js .
>>>>
>>>> Please find attached patches
>>>>
>>>> Thanks,
>>>> Surinder
>>>>
>>>>
>>>> On Thu, Jul 27, 2017 at 10:33 AM, Surinder Kumar <
>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>
>>>>> Ok. I will send rebased patch.
>>>>>
>>>>> On Thu, Jul 27, 2017 at 10:32 AM, Ashesh Vashi <
>>>>> ashesh.va...@enterprisedb.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 27, 2017 at 10:22 AM, Ashesh Vashi <
>>>>>> ashesh.va...@enterprisedb.com> wrote:
>>>>>>
>>>>>>> Hi Surinder,
>>>>>>>
>>>>>>> 'delete_template_files.patch' is applied any more.
>>>>>>> Please send the rebased patches.
>>>>>>>
>>>>>>> I have also noticed in the 'move_js_files_to_static_directory.patch',
>>>>>>> couple of modules have two definitions for 
>>>>>>> 'module_use_template_javascript'
>>>>>>> method.
>>>>>>>
>>>>>> Also - 'module_paths.json' is auto generated, please don't include
>>>>>> that in the patch.
>>>>>>
>>>>>> -- Thanks, Ashesh
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Thanks & Regards,
>>>>>>>
>>>>>>> Ashesh Vashi
>>>>>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>>>>>> <http://www.enterprisedb.com>
>>>>>>>
>>>>>>>
>>>>>>> *http://www.linkedin.com/in/asheshvashi*
>>>>>>> <http://www.linkedin.com/in/asheshvashi>
>>>>>>>
>>>>>>> On Tue, Jul 25, 2017 at 3:56 PM, Surinder Kumar <
>>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Please find rebased patches and review.
>>>>>>>>
>>>>>>>> On Sat, Jul 22, 2017 at 1:03 AM, Surinder Kumar <
>>>>>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Following are the changes in patches attached:
>>>>>>>>>
>>>>>>>>> 1) Move Javascripts from T

pgAgent commit: Added support two digits version for PostgreSQL/EDB Pos

2017-07-31 Thread Ashesh Vashi
Added support two digits version for PostgreSQL/EDB Postgres Advanced Server >= 
10

Branch
--
master

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

Modified Files
--
CMakeLists.txt | 6 +-
cmake/FindPG.cmake | 6 +++---
2 files changed, 8 insertions(+), 4 deletions(-)



Re: Discussion on improving alertify notifications logic

2017-07-31 Thread Ashesh Vashi
On Mon, Jul 31, 2017 at 2:54 PM, Akshay Joshi  wrote:

> Hi All
>

> On Fri, Jul 28, 2017 at 1:51 PM, Dave Page  wrote:
>
>>
>>
>> On Thu, Jul 27, 2017 at 2:41 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi All
>>>
>>> As in commit "Update alertify alerts to use the styling defined in
>>> the style guide":
>>>
>>> https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=commitdiff
>>> ;h=2a30a86e7d5e562040500f448fbb0d143ff2cff9
>>>
>>> https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=commitdiff
>>> ;h=f2d2075d81718ec02550fb592851aa330d327b24
>>>
>>> We have introduce new wrapper class "AlertifyWrapper" and replace calls
>>> to alertify.success and alertify.error with following two lines in most
>>> of the files
>>>
>>> var alertifyWrapper = new AlertifyWrapper();
>>>
>>> alertifyWrapper.success(message);  or  alertifyWrapper.error(message);
>>>
>>> For each call we are creating dynamic object of AlertifyWrapper and
>>> call the appropriate function. For example there are 20 such calls in a
>>> single js file every time are are creating object and call appropriate
>>> function.
>>>
>>> I have tried to improve the logic here and implemented it as below:
>>>
>>>- Extend alertify and move success, error and info functions from "
>>>alertify_wrapper.js" file to "alertify.pgadmin.defaults.js", there
>>>will be no use of "alertify_wrapper.js"
>>>- Modify only "server.js" as POC, remove 'alertify' and replace
>>>'sources/alerts/alertify_wrapper' with 'pgadmin.alertifyjs' which is
>>>nothing but mapping of "alertify.pgadmin.defaults.js" from defines
>>>and named the reference object to 'alertify' so no need to change any
>>>function call like "alertify.success, alertify.error".
>>>
>>> One more benefit of the above approach is if in future we want to use
>>> the same style for alertify.warning, alertify.info, alertify.message
>>> etc.., we will just have to extend that method in "alertify.pgadmin
>>> .defaults.js" and no need to change the rest of the function call with
>>> AlertifyWrapper.
>>>
>>> Attached is the POC patch, if it looks good then I'll start working on
>>> replacing AlertifyWrapper with the above mentioned approach.
>>>
>>
>> I like the approach - it's definitely cleaner, and saves instantiating a
>> new object every time.
>>
>
>I have modified the logic to improve the usage of alrtify notification.
> Attached is the patch file which contains following:
>
>- Replace 'alertify' with 'pgadmin.alertifyjs' in define[].
>- Remove 'sources/alerts/alertify_wrapper' from define[].
>- Replace calls var alertifyWrapper = new AlertifyWrapper();
>alertifyWrapper.success(message);  or  alertifyWrapper*.error(message);
>*with appropriate (alertify.success/alertify.error..)
>- Modified test case written for alertify wrapper.
>
>
>   Please review it and if it looks good then I'll commit the code.
>
Murtuza,

Please review it.

-- Thanks, Ashesh

>
>> --
>> 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*
>


Re: [pgAdmin4][Patch]: RM_2596 - Query tool not working in Desktop Runtime on Mac OS X

2017-07-31 Thread Ashesh Vashi
On Fri, Jul 28, 2017 at 12:42 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> I inspect the react code and in call stacks, found `process.env.NODE_ENV`
> is undefined due to which 'SyntheticEvent.call' is not callable.
>
> So, to fix this, i add 'definePlugin' to plugins for `dev` environment in
> `webpack.config.js`. Initially it was added only for `production`
> environment. but it is needed for both, because React code is conditional
> based on environment variables set.
>

> Please find attached patch and review.
>
As discussed, you're setting 'production', even in the 'development' mode.

Please understand the code, and share the updated patch.
Also - share the references next time, so that - committer can understand
the reason for these changes.

-- Thanks, Ashesh

>
> Thanks,
> Surinder
>


pgAdmin 4 commit: Requests for statistics were not stopped even when Da

2017-07-31 Thread Ashesh Vashi
Requests for statistics were not stopped even when Dashboard panel is
closed. It is a regression of webpack.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/static/js/browser.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



Re: [pgAdmin4][Patch]: Dashboard requests don't stop even after closing the panel

2017-07-31 Thread Ashesh Vashi
On Fri, Jul 28, 2017 at 4:00 PM, Dave Page  wrote:

> Ashesh, can you deal with this please? Thanks.
>
Hi Khushboo,

I've committed the code.
But - I am not able to reopen the dashboard panel once it is closed, even
not from the docker context menu -> Add Panel > Dashboard.

I have asked Murtuza to look into it.


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> On Thu, Jul 27, 2017 at 6:20 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> If we close the Dashboard tab even then the requests don't stop. This is
>> the regression of web-packing of browser.js file.
>> Please find the attached patch for the same.
>>
>> Thanks,
>> Khushboo
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][PATCH] Refactor and change of implementation of keyboard_shortcuts function dependencies

2017-08-04 Thread Ashesh Vashi
Murtuza,

On Thu, Aug 3, 2017 at 3:38 PM, Sarah McAlear  wrote:

> Hi Hackers!
>
> Attached is a patch that extracts the functions called by the
> keyboard_shortcuts function extracted earlier from sqlEditor. This
> includes
>
>- executeQuery
>- explainAnalyze
>- explain
>- download
>- commentBlockCode
>- commentLineCode
>- uncommentLineCode
>
>
> There is still more work to be done, but this is it for now.
>
> There is also an additional patch that changes the implementation of the
> commentLineCode, uncommentLineCode, and commentBlockCode functions. The
> shortcut
>
>- for commentLineCode is now  cmd + / (ctrl + / for Windows)
>- for uncommentLineCode cmd + . (ctrl + . for Windows)
>- for comment and uncomment blockCode shift + cmd + / (shift + ctrl + /
>for Windows)
>
> This is consistent with other IDEs and the way commenting is implemented.
>
Please review it, and let us know your comments.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> Thanks!
> Hao & Sarah
>


Re: [gpAdmin4][patch] query history updates

2017-08-04 Thread Ashesh Vashi
Khushboo,

On Thu, Aug 3, 2017 at 9:03 AM, Hao Wang  wrote:

> Hi Hackers,
>
> Here is a patch for query tools history UX improvements:
>
>- Add copy button for query text
>- Historical queries are binned by day
>
> Please review it.


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

> Thanks,
> Sarah & Hao
>


Re: Add basic function search

2017-08-04 Thread Ashesh Vashi
Hi José,
On Thu, Aug 3, 2017 at 2:10 AM, jvenegasperu . 
wrote:

> Please add a file finder in the PgAdmin4 query tool
>
> Files are listed but there is no search engine with PgAdmin3 I was used to
> looking there the script I needed I guess more people work that way
>
> Check the option to do the backup I worked the third attempt did not
> create the file I'm using windows 7 with pgadmin4
>
If I understood correct, you have run the "Backup" on a database server.
And, it is supposed to create a file.

But - you can't find them on the file system.
Right?

-- Thanks,
Ashesh Vashi

>
>
> Sorry for the writing I do with google translate
>
> --
> José Mercedes Venegas Acevedo
> cel Mov RPC 964185205
>
> Member of the PHP Documentation Group (Spanish)
>


Re: [pgAdmin4][Patch]: Fixed RM #2603 - Import/Export File issues

2017-08-04 Thread Ashesh Vashi
Harshal,

On Fri, Jul 28, 2017 at 4:00 PM, Dave Page  wrote:

> Ashesh, can you deal with this please? Thanks.
>
> On Thu, Jul 27, 2017 at 5:08 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find the attached patch to fix the RM #2603: Import/Export File
>> issues.
>>
>
>> Fixed Issues:
>>  1. Couldn't click on the File Control once gets an error
>>  2. The encoding is not in alphabetical order
>>
> Please review it.

-- Thanks, Ashesh

>
>> Thanks,
>> Khsuhboo
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][patch] update the alert style in the sub-navigation

2017-08-06 Thread Ashesh Vashi
Surinder,

Please take a look at this patch.

If I recalls correctly, this patch is related to styling of the 'tabs'
shown on the main window.
Wenlin - please correct me if my understanding is wrong.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

On Mon, Aug 7, 2017 at 8:11 AM, Sarah McAlear  wrote:

> Hi hackers,
>
> Could you please review this patch?
>
> Thanks
>
> Wenlin and Sarah
>
> On Wed, Aug 2, 2017 at 2:15 PM, Wenlin Zhang  wrote:
>
>> Hi Hackers,
>>
>> This patch changes the alert style in the sub-navigation to match style
>> guide.
>>
>> Thanks,
>> Wenlin, Shirley & Sarah
>>
>>
>>
>


Re: Unified server/desktop config

2017-08-07 Thread Ashesh Vashi
On Mon, Aug 7, 2017 at 3:59 PM, Dave Page  wrote:

> Anyone?
>
Surinder - please give this one priority.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> On Thu, Jul 20, 2017 at 5:03 PM, Dave Page  wrote:
>
>> All,
>>
>> Attached is a patch that aims to allow us to have a standardised config
>> that will work out of the box for both web and desktop modes. It does this
>> by doing two things:
>>
>> 1) The runtime sets SERVER_MODE in the Python environment before starting
>> the app. If this value is set, then it overrides the default value of
>> SERVER_MODE in the config.
>>
>> 2) The config file then offers default values for the various file
>> locations for both server and desktop mode, setting them appropriately
>> based on the derived SERVER_MODE value.
>>
>> The only downsides I can see from this are:
>>
>> - You cannot run in server mode in the runtime without manually
>> reconfiguring SERVER_MODE and likely a bunch of paths in config_local.py
>>
>> - If you want to override SERVER_MODE, you'll probably also need to
>> redefine the various paths in config_local.py.
>>
>> I don't see either being something 99.9% of users would need though.
>>
>> Can anyone see if the patch breaks anything, or if I missed any side
>> effects?
>>
>> Is it likely to break things during upgrades? I suspect so... so maybe
>> this should prompt v2.0?
>>
>> I'd appreciate multiple reviews of this, as it could break things. Note
>> that I haven't yet updated the docs.
>>
>> --
>> 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
>


Re: [PATCH] Work with newer Flask-Security.

2017-08-07 Thread Ashesh Vashi
Harshal,

Please take a look at it.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

On Mon, Aug 7, 2017 at 6:46 PM, Wouter van Kesteren 
wrote:

> I installed it on my system and i got the following error:
>
> Traceback (most recent call last):
>   File "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask/app.py",
> line 1997, in __call__
> return self.wsgi_app(environ, start_response)
>   File "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask/app.py",
> line 1985, in wsgi_app
> response = self.handle_exception(e)
>   File "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask/app.py",
> line 1540, in handle_exception
> reraise(exc_type, exc_value, tb)
>   File 
> "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask/_compat.py",
> line 33, in reraise
> raise value
>   File "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask/app.py",
> line 1982, in wsgi_app
> response = self.full_dispatch_request()
>   File "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask/app.py",
> line 1614, in full_dispatch_request
> rv = self.handle_user_exception(e)
>   File "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask/app.py",
> line 1517, in handle_user_exception
> reraise(exc_type, exc_value, tb)
>   File 
> "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask/_compat.py",
> line 33, in reraise
> raise value
>   File "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask/app.py",
> line 1610, in full_dispatch_request
> rv = self.preprocess_request()
>   File "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask/app.py",
> line 1831, in preprocess_request
> rv = func()
>   File 
> "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask_principal.py",
> line 477, in _on_before_request
> identity = loader()
>   File 
> "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask_security/core.py",
> line 245, in _identity_loader
> if not isinstance(current_user._get_current_object(),
> AnonymousUserMixin):
>   File 
> "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/werkzeug/local.py",
> line 306, in _get_current_object
> return self.__local()
>   File 
> "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask_login/utils.py",
> line 26, in 
> current_user = LocalProxy(lambda: _get_user())
>   File 
> "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask_login/utils.py",
> line 302, in _get_user
> current_app.login_manager._load_user()
>   File 
> "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask_login/login_manager.py",
> line 316, in _load_user
> return self.reload_user()
>   File 
> "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask_login/login_manager.py",
> line 278, in reload_user
> user = self.user_callback(user_id)
>   File 
> "/usr/x86_64-pc-linux-gnu/lib/python3.4/site-packages/flask_security/core.py",
> line 221, in _user_loader
> return _security.datastore.find_user(id=user_id)
> AttributeError: 'NoneType' object has no attribute 'find_user'
>
> My system has Flask-Security 3.0.0 which contains a patch to
> Security.init_app
>
> -if not self.datastore:
> -self.datastore = datastore
> -datastore = self.datastore
> +self.app = app
> +self.datastore = datastore
>
> https://github.com/mattupstate/flask-security/commit/
> 3701b91d4d3e41036872a3f35db51e44e0681109
>
> To get the old behavior we need to pass the datastore along again else
> it gets overruled by the default None.
> ---
>  web/pgadmin/__init__.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/web/pgadmin/__init__.py b/web/pgadmin/__init__.py
> index cd18b1f8..f4f7e385 100644
> --- a/web/pgadmin/__init__.py
> +++ b/web/pgadmin/__init__.py
> @@ -308,7 +308,7 @@ def create_app(app_name=None):
>  app.config.update(dict(SECRET_KEY=config.SECRET_KEY))
>  app.config.update(dict(SECURITY_PASSWORD_SALT=config.
> SECURITY_PASSWORD_SALT))
>
> -security.init_app(app)
> +security.init_app(app, user_datastore)
>
>  app.session_interface = create_session_interface(app)
>
> --
> 2.13.3
>
>
>


Re: [pgAdmin4][Patch]: Allow user to cancel long running queries from dashboard

2017-08-07 Thread Ashesh Vashi
On Mon, Aug 7, 2017 at 9:06 PM, Dave Page  wrote:

>
>
> On Mon, Aug 7, 2017 at 3:49 PM, Chethana Kumar <
> chethana.ku...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Could you comment on the new design update for subnode control ?
>>
>> Attached designs -
>>
>> 1. subnode_current.png -  The existing view
>> 2. subnode_new.png - The updated view
>> 3. current_new.png - Existing and new design placed together for
>> comparison purpose
>>
>> Below changes done -
>>
>> 1. Reduced number of gray color variations
>> 2. Made more simplified by removing unwanted borders
>> 3. Merged "Arrow Down" background and the body background for more clarity
>>
>> Please feel free to provide your input on the same.
>>
>
> Much nicer in my opinion! Good work.
>
> Anyone else have any comments?
>
It looks much nicer.
I would like to see the effect on another dialogs like 'Table properties',
where we have multiple level of subgrid controls with tabs.

-- Thanks, Ashesh

>
>
>>
>> Regards,
>> Chethana kumar
>>
>>
>>
>> On Fri, Jul 28, 2017 at 4:11 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> I took a quick look at this and have a couple of thoughts:
>>>
>>> - Instead of the "edit" icon to open the subnode, we should use
>>> something more appropriate - a "properties" icon perhaps.
>>>
>>> - There seems to be a lot of different shades of grey on there (maybe a
>>> subnode design in general that just shows up with the disabled controls),
>>> and the subnode control looks a bit messy as a result.
>>>
>>> Can you work with Chethana to improve the look and feel please?
>>>
>>> Input from others welcome of course - screenshot attached.
>>>
>>> Thanks.
>>>
>>> On Fri, Jul 28, 2017 at 11:33 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 ++ Attaching the patch

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

 On Fri, Jul 28, 2017 at 4:02 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> PFA patch to display additional information from pg_stat_activity
> table using subnode control.
> RM#2597
>
> Please review.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Tue, Jul 25, 2017 at 10:56 AM, Shirley Wang 
> wrote:
>
>>
>>> On Mon, Jul 24, 2017 at 8:11 PM, Dave Page 
>>> wrote:
>>>


 On Mon, Jul 24, 2017 at 3:28 PM, Shirley Wang 
 wrote:

> 2-3 days is a lot of valuable engineering time. Is this a 'drop
> everything now' kind of feature or can this wait for some user 
> validation
> on a mock up first?
>

 Most of the time will likely be on the infrastructure to change the
 display to a subnode control. If you have some cycles to mockup 
 potential
 layouts for the subnode view and have them validated, please feel free,
 however, that seems like an awful lot of work to me to display some 
 missing
 SQL using a standard control.

>>> Regarding SQL display: Developing simple control to show codemirror
>>> in disabled state (for now) wont take that much time.
>>>
>>>
>> Part of a product designer's job is to make sure there is a
>> definitive need for a feature and that the interface for the feature is
>> designed in such a way that the user gets all intended value from it. 
>> Time
>> spent validating now will decrease the time spent later on redesigning /
>> reimplementing.
>>
>> If everyone is aware of what that value is and confident that how
>> it'll be displayed is right, there's little risk in starting to develop 
>> it.
>> If we're wrong, it'll add to feature bloat and detract from the 
>> experience.
>>
>> Would Chethana be able to take on some of the design work? It would
>> be valuable for the dev team to also be part of design process.
>>
>
>

>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Chethana Kumar
>> Principal UI/UX Designer
>> EnterpriseDB Corporation
>>
>>
>> The Postgres Database Company
>>
>> P: +91 86981 57146 <+91%2086981%2057146>
>> www.enterprisedb.com
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][Patch][RM_2567] : Default privileges don't show on Properties tab for database.

2017-08-07 Thread Ashesh Vashi
Murtuza,

Please review this one.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

On Tue, Aug 1, 2017 at 3:23 PM, Atul Sharma 
wrote:

> Hi,
>
> PFA patch that fixes Default privileges don't show on Properties tab for
> database
>
> Thanks,
> Atul
>


Re: [pgAdmin4][Patch]: Use the correct resultset type for Type module

2017-08-08 Thread Ashesh Vashi
On Thu, Aug 3, 2017 at 2:41 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch to use fetch dict based data instead of 2d-array based in
> Type module as we are adding keys on the fly.
> There is no RM just a minor enhancement.
>
Harshal,

Please review this one.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

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


pgAdmin 4 commit: On certain linux operating systems, Qt application ex

2017-08-09 Thread Ashesh Vashi
On certain linux operating systems, Qt application exits with an error
message such as 'X Error: BadDrawable'.

In order to resolve the issue, we need to let the Qt know not to load
the MIT-SHM extension.

Reference:
https://iwf1.com/quick-fix-one-kdes-common-xorg-errors-x-error-baddrawable/

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=deb5475b98422920c82c9b6ad8d41c500bd5958c
Author: Neel Patel 

Modified Files
--
runtime/pgAdmin4.cpp | 9 +
1 file changed, 9 insertions(+)



pgAdmin 4 commit: Some cosmetic changes.

2017-08-09 Thread Ashesh Vashi
Some cosmetic changes.

- Loading 'pgadmin' as 'sources/pgadmin', as found under the 'sources'
  reference directory to be consistent with other files.
- Removed the 'pgadmin' reference from the base.html template.
- Renamed 'pgadmin.slickgrid.editors.js', and
  'pgadmin.slickgrid.formatters.js' as 'editors.js', and 'formatters.js'
  respectively, as they're already in the 'pgadmin/static/js/slickgrid'
  directory.
- Removed the duplicate entry of 'translations' from the webpack.shim.js

Branch
--
master

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

Modified Files
--
web/pgadmin/about/static/js/about.js   |   2 +-
.../servers/databases/casts/static/js/cast.js  |   2 +-
.../event_triggers/static/js/event_trigger.js  |   2 +-
.../databases/extensions/static/js/extension.js|   2 +-
.../foreign_servers/static/js/foreign_server.js|   2 +-
.../user_mapping/static/js/user_mapping.js |   2 +-
.../static/js/foreign_data_wrapper.js  |   2 +-
.../databases/languages/static/js/language.js  |   2 +-
.../columns/static/js/catalog_object_column.js |   2 +-
.../catalog_objects/static/js/catalog_object.js|   2 +-
.../schemas/collations/static/js/collation.js  |   2 +-
.../static/js/domain_constraints.js|   2 +-
.../databases/schemas/domains/static/js/domain.js  |   2 +-
.../foreign_tables/static/js/foreign-table.js  |   2 +-
.../foreign_tables/static/js/foreign_table.js  |   2 +-
.../static/js/fts_configuration.js |   2 +-
.../fts_dictionaries/static/js/fts_dictionary.js   |   2 +-
.../schemas/fts_parser/static/js/fts_parser.js |   2 +-
.../fts_templates/static/js/fts_template.js|   2 +-
.../schemas/functions/static/js/function.js|   2 +-
.../schemas/functions/static/js/procedure.js   |   2 +-
.../functions/static/js/trigger_function.js|   2 +-
.../schemas/packages/edbfuncs/static/js/edbfunc.js |   2 +-
.../schemas/packages/edbfuncs/static/js/edbproc.js |   2 +-
.../schemas/packages/edbvars/static/js/edbvar.js   |   2 +-
.../schemas/packages/static/js/package.js  |   2 +-
.../schemas/sequences/static/js/sequence.js|   2 +-
.../servers/databases/schemas/static/js/catalog.js |   2 +-
.../servers/databases/schemas/static/js/schema.js  |   2 +-
.../schemas/synonyms/static/js/synonym.js  |   2 +-
.../schemas/tables/column/static/js/column.js  |   2 +-
.../check_constraint/static/js/check_constraint.js |   2 +-
.../static/js/exclusion_constraint.js  |   2 +-
.../foreign_key/static/js/foreign_key.js   |   2 +-
.../index_constraint/static/js/primary_key.js  |   2 +-
.../static/js/unique_constraint.js |   2 +-
.../tables/constraints/static/js/constraints.js|   2 +-
.../schemas/tables/indexes/static/js/index.js  |   2 +-
.../tables/partitions/static/js/partition.js   |   2 +-
.../schemas/tables/rules/static/js/rule.js |   2 +-
.../databases/schemas/tables/static/js/table.js|   2 +-
.../schemas/tables/triggers/static/js/trigger.js   |   2 +-
.../databases/schemas/types/static/js/type.js  |   2 +-
.../databases/schemas/views/static/js/mview.js |   2 +-
.../databases/schemas/views/static/js/view.js  |   2 +-
.../servers/databases/static/js/database.js|   2 +-
.../pgagent/schedules/static/js/pga_schedule.js|   2 +-
.../servers/pgagent/static/js/pga_job.js   |   2 +-
.../servers/pgagent/steps/static/js/pga_jobstep.js |   2 +-
.../server_groups/servers/roles/static/js/role.js  |   2 +-
.../server_groups/servers/static/js/server.js  |   2 +-
.../server_groups/servers/static/js/variable.js|   2 +-
.../servers/tablespaces/static/js/tablespace.js|   2 +-
.../server_groups/static/js/server_group.js|   2 +-
web/pgadmin/browser/static/js/browser.js   |   5 +-
web/pgadmin/browser/static/js/collection.js|   2 +-
web/pgadmin/browser/static/js/datamodel.js |   2 +-
web/pgadmin/browser/static/js/error.js |   2 +-
web/pgadmin/browser/static/js/frame.js |   2 +-
web/pgadmin/browser/static/js/menu.js  |   2 +-
web/pgadmin/browser/static/js/node.js  |   2 +-
web/pgadmin/browser/static/js/node.ui.js   |   2 +-
web/pgadmin/browser/static/js/panel.js |   2 +-
web/pgadmin/browser/static/js/wizard.js|   2 +-
.../browser/templates/browser/js/messages.js   |   2 +-
web/pgadmin/browser/templates/browser/js/utils.js  |   4 +-
web/pgadmin/dashboard/static/js/dashboard.js   |   2 +-
web/pgadmin/misc/bgprocess/static/js/bgprocess.js  |   2 +-
web/pgadmin/misc/static/explain/js/explain.js  |   2 +-
web/pgadmin/preferences/static/js/preferences.js   |   2 +-
web/pgadmin/settings/static/js/settings.js |   2 +-
web/pgadmin/static/bundle/app.js   |   2 +-
web/pgadmin/

pgAdmin 4 commit: Fixed some UX issue with the Import/Export tool.

2017-08-09 Thread Ashesh Vashi
Fixed some UX issue with the Import/Export tool.

- Couldn't click on the filename control once gets an error.
- Encoding is not in alphabetical order.

Branch
--
master

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

Modified Files
--
.../templates/databases/sql/9.2_plus/get_encodings.sql |  2 +-
.../templates/databases/sql/default/get_encodings.sql  |  2 +-
web/pgadmin/static/js/backform.pgadmin.js  | 10 ++
web/pgadmin/static/scss/_backform.overrides.scss   |  8 +++-
4 files changed, 19 insertions(+), 3 deletions(-)



pgAdmin 4 commit: Enable source maps for debugging purpose in all webpa

2017-08-09 Thread Ashesh Vashi
Enable source maps for debugging purpose in all webpack modules
(except for vendor, and codemirror).

Branch
--
master

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

Modified Files
--
web/webpack.config.js | 10 ++
1 file changed, 10 insertions(+)



pgAdmin 4 commit: UX improvements of the history in the query tool.

2017-08-09 Thread Ashesh Vashi
UX improvements of the history in the query tool.

- Added copy button for query text.
- Historical queries are binned/grouped by day.

Patch By: Hao Wang, Sarah McAlear

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=5141debae7e08d205e813dd9fc52b737a9f18184
Author: Hao Wang 

Modified Files
--
.../feature_tests/query_tool_journey_test.py   |  33 +-
web/pgadmin/static/css/webcabin.overrides.css  |   1 +
.../jsx/history/detail/history_detail_query.jsx|  38 ++
web/pgadmin/static/jsx/history/query_history.jsx   | 152 ++-
.../static/jsx/history/query_history_entries.jsx   | 156 +++
.../static/jsx/history/query_history_entry.jsx |   2 +-
.../jsx/history/query_history_entry_date_group.jsx |  46 ++
web/pgadmin/static/scss/_alert.scss| 178 +++-
web/pgadmin/static/scss/_colorsgrey.scss   |  64 ---
web/pgadmin/static/scss/_othercolors.scss  | 111 +
web/pgadmin/static/scss/_primaryblue.scss  |  38 +-
web/pgadmin/static/scss/_typography.scss   |  53 +--
web/pgadmin/static/scss/sqleditor/_history.scss|  38 +-
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |   2 +-
.../javascript/history/query_history_spec.jsx  | 496 +
web/yarn.lock  |  24 +-
16 files changed, 761 insertions(+), 671 deletions(-)



Re: [gpAdmin4][patch] query history updates

2017-08-09 Thread Ashesh Vashi
On Wed, Aug 9, 2017 at 3:37 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> The patch looks good to me.
> The feature test for the QueryToolJourneyTest still fails on my Ubuntu
> machine with/without this patch
> <https://www.postgresql.org/message-id/flat/CAEawo3JKQFuVeSK-xw9wU4fUSY57KXU5GeXKcdCusQeHkjTykA%40mail.gmail.com>,
> but works on Mac.
>
Committed the history patch.
I've not yet looked at the feature test patch as of now.

Thanks!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi
<http://www.linkedin.com/in/asheshvashi>*

>
> Thanks,
> Khushboo
>
>
> On Wed, Aug 9, 2017 at 9:07 AM, Sarah McAlear  wrote:
>
>> Hi Khushboo!
>>
>> These are 2 separate patches. The failure of the feature test you're
>> describing happens on Master even without this patch. The other patch fixes
>> this, but is unrelated to this patch. Right now it applies cleanly on
>> Master. If we rebase it here, we won't be able to apply it on master.
>>
>> Thanks,
>> Sarah
>>
>> On Tue, Aug 8, 2017 at 6:27 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi Wenlin & Violet,
>>>
>>>
>>> On Tue, Aug 8, 2017 at 12:05 PM, Wenlin Zhang  wrote:
>>>
>>>> Hi Khushboo,
>>>>
>>>>  Thanks for your review.
>>>>
>>>>  About the copy/paste function bug, we just found that this is an
>>>> existing bug in master. Except for the query History tab, this bug also
>>>> exist in the query data output . If you copy the data row in "Data Output"
>>>> tab,  it works fine, but the copy/paste in query tool won't work either. We
>>>> will create a Redmine bug later.
>>>>
>>>>  And the feature test failure, we've already sent a new patch that
>>>> fixed it. See this patch
>>>> <https://www.postgresql.org/message-id/flat/CAEawo3JKQFuVeSK-xw9wU4fUSY57KXU5GeXKcdCusQeHkjTykA%40mail.gmail.com>
>>>>
>>>> I need to test this patch with the history tab update patch. Right now
>>> I can not apply this patch on top of the history update patch.
>>> Can you please re-base that patch?
>>>
>>>> Thanks,
>>>>
>>>> Wenlin & Violet
>>>>
>>>>
>>>> On Mon, Aug 7, 2017 at 1:45 PM, Khushboo Vashi <
>>>> khushboo.va...@enterprisedb.com> wrote:
>>>>
>>>>> Hi Sarah & Hao,
>>>>>
>>>>> The copy/paste functionality through the added copy button is working
>>>>> fine, however once I copy the query text from the History tab through the
>>>>> copy button, I can not perform copy/paste for some another text in the
>>>>> Query tool.
>>>>>
>>>>> Also, the feature test (QueryToolJourneyTest) is failing, please refer
>>>>> the attached screen-shot.
>>>>>
>>>>> Thanks,
>>>>> Khushboo
>>>>>
>>>>> On Thu, Aug 3, 2017 at 9:03 AM, Hao Wang  wrote:
>>>>>
>>>>>> Hi Hackers,
>>>>>>
>>>>>> Here is a patch for query tools history UX improvements:
>>>>>>
>>>>>>- Add copy button for query text
>>>>>>- Historical queries are binned by day
>>>>>>
>>>>>> Thanks,
>>>>>> Sarah & Hao
>>>>>>
>>>>>
>>>>>
>>>>
>>> Thanks,
>>> Khushboo
>>>
>>
>>
>


Re: [pgAdmin4][Patch]: Fixed RM #2603 - Import/Export File issues

2017-08-09 Thread Ashesh Vashi
On Wed, Aug 9, 2017 at 3:32 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

>
> On Fri, Aug 4, 2017 at 6:32 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> Harshal,
>>
>> On Fri, Jul 28, 2017 at 4:00 PM, Dave Page  wrote:
>>
>>> Ashesh, can you deal with this please? Thanks.
>>>
>>> On Thu, Jul 27, 2017 at 5:08 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Please find the attached patch to fix the RM #2603: Import/Export File
>>>> issues.
>>>>
>>>
>>>> Fixed Issues:
>>>>  1. Couldn't click on the File Control once gets an error
>>>>  2. The encoding is not in alphabetical order
>>>>
>>> Please review it.
>>
>
> It looks good to me.
>
Thanks!

Committed the patch!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> thanks,
>
>
>>
>> -- Thanks, Ashesh
>>
>>>
>>>> Thanks,
>>>> Khsuhboo
>>>>
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>


Re: [pgAdmin4[Patch][Webpacking]: Enable source maps in pgAdmin4 for development environment

2017-08-09 Thread Ashesh Vashi
On Wed, Aug 9, 2017 at 8:55 AM, Wenlin Zhang  wrote:

> Hi Surinder,
>
> This is great and useful. Looks good to me. Hope this can be committed
> ASAP.
>
Thanks!
Committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> Thanks,
>
> Wenlin & Violet
>
>
>
> On Wed, Aug 2, 2017 at 9:41 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi All,
>>
>> This patch enables source maps in pgAdmin4 for development environment.
>>
>> On running yarn run bundle It will create source maps(i.e. extract each
>> module js file so that it is available to debug).
>>
>> You can search each module(ie. menu.js to debug) file by filename as
>> follows:
>>
>>1.
>>
>>Start pgAdmin4 server or run separately yarn run bundle in pgadmin/web
>>2.
>>
>>Open pgAdmin4 in browser(I am using chrome). Click sources panel and
>>press CMD+P and search for file menu.js. Click and then add
>>breakpoint to the line where you want to debug codebase. Screenshot
>>attached for reference.
>>
>> I have excluded vendor and codemirror bundle from source map as i
>> believe we don’t debug these files. If someone needs, they can remove
>> vendor.js from source map plugin and rebuild.
>>
>> I didn’t add this for production mode yet.
>>
>> Reference to SourceMapDevToolPlugin
>> <https://webpack.js.org/plugins/source-map-dev-tool-plugin/#components/sidebar/sidebar.jsx>
>>
>> Please find attached patch and review.
>>
>> Thanks,
>> Surinder
>> ​
>>
>
>


Re: [pgAdmin4][patch] extract generate_url function from node.js and collection.js

2017-08-10 Thread Ashesh Vashi
On Thu, Aug 10, 2017 at 1:15 PM, Violet Cheng  wrote:

> Hi hackers,
>
> We tried to extract and refactor generate_url function in node.js and
> collection.js. Please see the patch attached.
>
Khushboo,

Please review this one.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> Thanks,
> Violet & Sarah
>


Re: Code Folding in Code Mirror

2017-08-15 Thread Ashesh Vashi
On Tue, Aug 15, 2017 at 2:33 PM, Sarah McAlear  wrote:

> Ok, it does work for the cases defined. We misunderstood how it works.
>
Still, could we enable this everywhere?
>
Yes.

> What is the reason not to?
>
I don't see any reason not to do it.

-- Thanks, Ashesh

>
> Thanks,
> Bing & Sarah
>
> On Tue, Aug 15, 2017 at 5:00 PM, Sarah McAlear 
> wrote:
>
>> Hi Hackers!
>>
>> We are working on unifying the CodeMirror stuff into one location. While
>> looking at this we noticed that while there is logic for code folding, it
>> doesn't seem to be working. Does it work for everyone else? We also started
>> to wonder if there is a specific reason that code folding should be
>> disabled anywhere? Would it not make more sense to have it look the same
>> throughout pgAdmin? We understand that there are a few things that should
>> be depending on the place in the app where it is used, such as 'editable'.
>> Other than that, would it be acceptable to have the same configuration
>> throughout?
>>
>> Thanks,
>> Bing & Sarah
>>
>
>


pgAdmin 4 commit: Extract the generate_url(..) function from node.js, a

2017-08-17 Thread Ashesh Vashi
Extract the generate_url(..) function from node.js, and collection.js

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d527769bf8251595bf3adfcbd9c2a58e0ab1cc92
Author: Violet Cheng 

Modified Files
--
web/pgadmin/browser/static/js/collection.js| 51 
web/pgadmin/browser/static/js/node.js  | 49 +++
web/pgadmin/static/js/browser/generate_url.js  | 23 ++
.../javascript/browser/generate_url_spec.js| 95 ++
4 files changed, 147 insertions(+), 71 deletions(-)



Re: [pgAdmin4][patch] extract generate_url function from node.js and collection.js

2017-08-17 Thread Ashesh Vashi
On Wed, Aug 16, 2017 at 4:20 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> The patch looks good to me.
>
>> Thanks,
> Khushboo
>
> On Fri, Aug 11, 2017 at 12:08 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Thu, Aug 10, 2017 at 1:15 PM, Violet Cheng  wrote:
>>
>>> Hi hackers,
>>>
>>> We tried to extract and refactor generate_url function in node.js and
>>> collection.js. Please see the patch attached.
>>>
>> Thanks - committed!


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

> Khushboo,
>>
>> Please review this one.
>>
>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> <http://www.enterprisedb.com/>
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> <http://www.linkedin.com/in/asheshvashi>
>>
>>>
>>> Thanks,
>>> Violet & Sarah
>>>
>>
>>
>


pgAdmin 4 commit: Fixes #2567 - Use the proper database connection to f

2017-08-17 Thread Ashesh Vashi
Fixes #2567 - Use the proper database connection to fetch the default
prileges in the properties tab of the database.

Reviewed by: Murtuza Zabuawala

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=e6223c9a490ead577e5c6f3058e6db51d0d2c5b7
Author: Atul Sharma 

Modified Files
--
.../server_groups/servers/databases/__init__.py| 25 ++
1 file changed, 11 insertions(+), 14 deletions(-)



Re: [pgAdmin4][Patch][RM_2567] : Default privileges don't show on Properties tab for database.

2017-08-17 Thread Ashesh Vashi
On Tue, Aug 8, 2017 at 3:46 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Patch looks good to me.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> [image: https://community.postgresrocks.net/]
> <https://community.postgresrocks.net/>
>
> On Tue, Aug 8, 2017 at 3:25 PM, Atul Sharma 
> wrote:
>
>> makes sense. Thanks for the solution.
>>
>> Please find attached revised patch.
>>
> Committed with minor change in existing logic.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
>> Thanks,
>> Atul
>>
>> On Tue, Aug 8, 2017 at 2:12 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Atul,
>>>
>>> Better solution to solve this issue is to use self.conn instead of
>>> creating new conn using did, we already checking for "datallowconn"
>>> flag in check_precondition decorator.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> [image: https://community.postgresrocks.net/]
>>> <https://community.postgresrocks.net/>
>>>
>>> On Tue, Aug 8, 2017 at 12:42 PM, Atul Sharma <
>>> atul.sha...@enterprisedb.com> wrote:
>>>
>>>> ok, Lemme check and I will get back to you.
>>>>
>>>> Thanks,
>>>> Atul
>>>>
>>>> On Tue, Aug 8, 2017 at 12:40 PM, Murtuza Zabuawala <
>>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>>
>>>>> Hi Atul,
>>>>>
>>>>> The given patch breaks RM#1801
>>>>> <https://redmine.postgresql.org/issues/1801>.
>>>>> After applying the patch, Now I'm not able to see the properties of a
>>>>> database of which "datallowconn" is set to False.
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Murtuza Zabuawala
>>>>> EnterpriseDB: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>> [image: https://community.postgresrocks.net/]
>>>>> <https://community.postgresrocks.net/>
>>>>>
>>>>> On Tue, Aug 8, 2017 at 12:08 PM, Ashesh Vashi <
>>>>> ashesh.va...@enterprisedb.com> wrote:
>>>>>
>>>>>> Murtuza,
>>>>>>
>>>>>> Please review this one.
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Thanks & Regards,
>>>>>>
>>>>>> Ashesh Vashi
>>>>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>>>>> <http://www.enterprisedb.com>
>>>>>>
>>>>>>
>>>>>> *http://www.linkedin.com/in/asheshvashi*
>>>>>> <http://www.linkedin.com/in/asheshvashi>
>>>>>>
>>>>>> On Tue, Aug 1, 2017 at 3:23 PM, Atul Sharma <
>>>>>> atul.sha...@enterprisedb.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> PFA patch that fixes Default privileges don't show on Properties tab
>>>>>>> for database
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Atul
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>


Re: pgAdmin4: Random failure of FTS test cases due to improper random string creation

2017-08-17 Thread Ashesh Vashi
On Fri, Aug 11, 2017 at 1:24 PM, Navnath Gadakh <
navnath.gad...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find the attached patch for UUID creation issues with test
> objects for FTS configurations, FTS dictionaries and FTS parsers.
> Previously(refer email with subject "Build failed in Jenkins:
> pgadmin4-master-python27 #279" and "Build failed in Jenkins:
> pgadmin4-master-python33 #207"), test cases were randomly failing due to
> repetitions of the test object names.
>
> In the old code we used some part of the string for creating a UUID
> string, but it seems that at some point that created string gets repeated
> and due to which test cases were failing as this was a random behavior, now
> it is fixed.
>
Navnath,

We're still not removing the temporary objects, created by test-cases, in
the tear-down function.
We should have removed them in the tear-down function to fix the issue in
proper way.

Dave - thoughts?

-- Thanks, Ashesh

>
> Thanks.
>
>
>
>
>
> --
> Regards,
> Navnath Gadakh
>
> EnterpriseDB Corporation
> The Enterprise PostgreSQL Company
>
>


Re: PATCH: pgagent connection string parsing

2017-08-20 Thread Ashesh Vashi
On Aug 20, 2017 22:48, "Thomas Krennwallner" 
wrote:

Hi!

I tried to pass the libpq parameter connect_timeout on the pgagent
command-line without success:

% ./pgagent -f -t60 -l2  dbname=xxx user=tkren connect_timeout=5
Sun Aug 20 18:24:26 2017 : DEBUG: Creating primary connection
Sun Aug 20 18:24:26 2017 : ERROR: Primary connection string is not valid!


connInfo::getConnectionString() misspelled this parameter as
connection_timeout, which subsequently breaks the PQconnectdb() call
in DBconn::Connect():

% ./pgagent -f -t60 -l2  dbname=xxx user=tkren connection_timeout=5
Sun Aug 20 18:24:34 2017 : DEBUG: Creating primary connection
Sun Aug 20 18:24:34 2017 : DEBUG: Connection Information:
Sun Aug 20 18:24:34 2017 : DEBUG:  user : tkren
Sun Aug 20 18:24:34 2017 : DEBUG:  port : 0
Sun Aug 20 18:24:34 2017 : DEBUG:  host :
Sun Aug 20 18:24:34 2017 : DEBUG:  dbname   : xxx
Sun Aug 20 18:24:34 2017 : DEBUG:  password :
Sun Aug 20 18:24:34 2017 : DEBUG:  conn timeout : 5
Sun Aug 20 18:24:34 2017 : DEBUG: Connection Information:
Sun Aug 20 18:24:34 2017 : DEBUG:  user : tkren
Sun Aug 20 18:24:34 2017 : DEBUG:  port : 0
Sun Aug 20 18:24:34 2017 : DEBUG:  host :
Sun Aug 20 18:24:34 2017 : DEBUG:  dbname   : xxx
Sun Aug 20 18:24:34 2017 : DEBUG:  password :
Sun Aug 20 18:24:34 2017 : DEBUG:  conn timeout : 5
Sun Aug 20 18:24:34 2017 : DEBUG: Creating DB connection: user=tkren
connection_timeout=5 dbname=xxx
Sun Aug 20 18:24:34 2017 : WARNING: Couldn't create the primary connection
(attempt 1): invalid connection option "connection_timeout"

This suggests pgAgent is not using the latest version of libpq.
Please use LD_LIBRARY_PATH environment to inform pgAgent to use the libpq,
it is compiled with.

-- Thanks,
Ashesh Vashi

-- Thanks, Ashesh

Sun Aug 20 18:24:34 2017 : DEBUG: Clearing all connections
Sun Aug 20 18:24:34 2017 : DEBUG: Connection stats: total - 1, free - 0,
deleted - 1


During my code inspection, I realized that pgagent does not support
application_name and other parameters from libpq:

% ./pgagent -f -t60 -l2  dbname=xxx user=tkren application_name=abc
Sun Aug 20 18:31:19 2017 : DEBUG: Creating primary connection
Sun Aug 20 18:31:19 2017 : ERROR: Primary connection string is not valid!

See also this thread on pgadmin-support:
https://www.postgresql.org/message-id/559AC825.6010708%40agliodbs.com

Using PGAPPNAME would be an option, but we use pgagent on Windows as
well, and this makes it unnecessarily hard to set environment
variables for services.  It would be also be nice to have support for
application_name on the jobstep level, but PGAPPNAME can only be set
globally.

To fix this issue, I've refactored connInfo and DBconn and use of
PQconninfoParse() for connection string parsing.  With the attached
patch applied, pgagent supports both vanilla keyword/value connection
strings and postgresql:// URIs as command-line options as well as
stored in the jstconnstr column of pgagent.pga_jobstep.  We now
support all parameter keywords from libpq, and fix the aforementioned
misspelled connect_timeout parameter.


In a patched pgagent, we can now do the following.  With the jobsteps
shown below that are part of a job running every minute,

xxx=# select * from pgagent.pga_jobstep;
 jstid | jstjobid | jstname | jstdesc | jstenabled |
jstkind |   jstcode   |   jstconnstr
   | jstdbname | jstonerror | jscnextrun
---+--+-+-+-
---+-+-+
+---++
 2 |1 | pg_sleep(10) local  | | t  | s
 | select pg_sleep(10) ||
xxx   | f  |
 3 |1 | pg_sleep(10) remote uri | | t  | s
 | select pg_sleep(10) | postgresql://tkren@localhost:5432/xxx  |
 | f  |
 1 |1 | pg_sleep(10) remote | | t  | s
 | select pg_sleep(10) | user=tkren host=localhost port=5432 dbname=xxx |
 | f  |
(3 rows)

we can run pgagent and get the following trace.  Note that connection
pooling works as intended with postgresql:// URIs and keyword/value
connection strings.

% ./pgagent -f -t60 -l2  dbname=xxx user=tkren application_name=xyz
Sun Aug 20 19:03:01 2017 : DEBUG: Creating primary connection
Sun Aug 20 19:03:01 2017 : DEBUG: Parsing connection information:
dbname=xxx user=tkren application_name=xyz
Sun Aug 20 19:03:01 2017 : DEBUG: Database-User: tkren
Sun Aug 20 19:03:01 2017 : DEBUG: Database-Name: xxx
Sun Aug 20 19:03:01 2017 : DEBUG: Application-Name: xyz
Sun Aug 20 19:03:01 2017 : DEBUG: Creating DB connection: 'user=tkren
dbname=xxx application_name=xyz'
Sun Aug 20 19:03:01 2017 : DEBUG: D

Re: PATCH: pgagent connection string parsing

2017-08-20 Thread Ashesh Vashi
On Aug 21, 2017 10:52, "Thomas Krennwallner" 
wrote:

On Mon Aug 21, 2017 06:50:03AM +0530, Ashesh Vashi wrote:
>On Aug 20, 2017 22:48, "Thomas Krennwallner" <[1]
tk+pg...@postsubmeta.net>
>wrote:
>
>  % ./pgagent -f -t60 -l2  dbname=xxx user=tkren connection_timeout=5
[...]
>  Sun Aug 20 18:24:34 2017 : DEBUG: Creating DB connection: user=tkren
connection_timeout=5 dbname=xxx
>  Sun Aug 20 18:24:34 2017 : WARNING: Couldn't create the primary
connection (attempt 1): invalid connection option "connection_timeout"
>
>This suggests pgAgent is not using the latest version of libpq.
>Please use LD_LIBRARY_PATH environment to inform pgAgent to use the
libpq,
>it is compiled with.
>-- Thanks,
>Ashesh Vashi
>-- Thanks, Ashesh

Unfortunately, this does not work. On a current Debian sid system,
I've compiled pgagent from source and get

 % ldd ./pgagent
 [...]
libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5
(0x7ff531382000)
 [...]


The system has libpq 9.6.4 installed:

 % apt-cache show libpq5
 Package: libpq5
 Source: postgresql-9.6
 Version: 9.6.4-1
 [...]

You may want set the rpath manually using chrpath utility for testing.

-- Thanks,
Ashesh Vashi



If I run pgagent from the Debian package (same ldd linkage), I get the
same error:

 % /usr/bin/pgagent -f -t60 -l2  dbname=xxx user=tkren connection_timeout=5
 [...]
 Mon Aug 21 06:51:04 2017 : DEBUG: Creating DB connection: user=tkren
connection_timeout=5 dbname=xxx
 Mon Aug 21 06:51:04 2017 : WARNING: Couldn't create the primary connection
(attempt 1): invalid connection option "connection_timeout"
 [...]


But I don't get why connection_timeout should work at all, the
libpq documentation
https://www.postgresql.org/docs/9.6/static/libpq-connect.
html#LIBPQ-CONNECT-CONNECT-TIMEOUT
states that the keyword is

 connect_timeout

 Maximum wait for connection, in seconds (write as a decimal
 integer string). Zero or not specified means wait indefinitely. It
 is not recommended to use a timeout of less than 2 seconds.


libpq.so seems to only mention connect_timeout:

 % strings /usr/lib/x86_64-linux-gnu/libpq.so.5  | egrep
'connect(ion)?_timeout'
 connect_timeout


The libpq source implements it in src/interfaces/libpq/fe-connect.c,
but after a quick check I didn't see a special treatment for
connection_timeout:

{"connect_timeout", "PGCONNECT_TIMEOUT", NULL, NULL,
"Connect-timeout", "", 10,  /* strlen(INT32_MAX) == 10
*/
offsetof(struct pg_conn, connect_timeout)},


And psql dislikes connection_timeout as well:

 % psql 'dbname=xxx user=tkren connection_timeout=5'
 psql: invalid connection option "connection_timeout"

 % psql 'dbname=xxx user=tkren connect_timeout=5'
 psql (9.6.4)
 Type "help" for help.

 xxx=#


TK


Re: [pgadmin4][Patch] Greenplum specific DDL and Dashboard display

2017-08-21 Thread Ashesh Vashi
On Mon, Aug 21, 2017 at 1:23 PM, Dave Page  wrote:

> Ashesh, do you have a recommended way to do this?
>
> I haven't looked at the patch, but I assume it adds a database driver
> module for GPDB?
>
I have not looked at the patch yet.
I will take a look at it.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> On Mon, Aug 21, 2017 at 8:50 AM, Jing Li  wrote:
>
>> Hi Dave,
>>
>> Since we're hoping to get this change working for GPDB we've currently
>> using this method to detect if it's gpdb and show the appropriate graphs.
>> Right now it displays errors on the dashboard if it's connected to a gpdb
>> server.
>> For this patch specifically, the goal is to improve the experience for
>> greenplum users so they can get the same information as someone connected
>> to a postgres server.
>>
>> I do agree that this is a bigger discussion about how we handle behavior
>> change overall if it's regular postgres or something else. Let's talk about
>> how we can restructure this behavior in a wider context. Are you open to
>> meeting about it?
>>
>> Thanks,
>> ~Jing
>>
>>
>>
>> On Fri, Aug 18, 2017 5:37 AM, Dave Cramer davecra...@gmail.com wrote:
>>
>>> Hi Violet.
>>>
>>> I don't really like the way this has been implemented. It adds a
>>> variable which is only used for gpdb.
>>>
>>> There are other places in the code where the behaviour is changed if the
>>> server is ppas or regular postgres.
>>>
>>> Candidly I think all of this needs restructuring.
>>>
>>> Dave Cramer
>>>
>>> On 15 August 2017 at 23:29, Violet Cheng  wrote:
>>>
>>> Hi,
>>>
>>> Any comment on this patch? If no, will it be committed soon?
>>>
>>> Thanks,
>>> Violet
>>>
>>> On Wed, Aug 9, 2017 at 12:05 PM, Sarah McAlear 
>>> wrote:
>>>
>>> Hi Hackers!
>>>
>>> This patch enables Greenplum users to see the same charts on the
>>> dashboard as postgres users. It also adds some additional information to
>>> the DDL that is Greenplum specific and necessary to create a new table.
>>>
>>> Thanks!
>>> Sarah
>>>
>>>
>>>
>>>
>>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: PATCH: pgagent connection string parsing

2017-08-21 Thread Ashesh Vashi
On Mon, Aug 21, 2017 at 1:41 PM, Dave Page  wrote:

>
>
> On Mon, Aug 21, 2017 at 6:24 AM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Aug 21, 2017 10:52, "Thomas Krennwallner" 
>> wrote:
>>
>> On Mon Aug 21, 2017 06:50:03AM +0530, Ashesh Vashi wrote:
>> >On Aug 20, 2017 22:48, "Thomas Krennwallner" <[1]
>> tk+pg...@postsubmeta.net>
>> >wrote:
>> >
>> >  % ./pgagent -f -t60 -l2  dbname=xxx user=tkren connection_timeout=5
>> [...]
>> >  Sun Aug 20 18:24:34 2017 : DEBUG: Creating DB connection:
>> user=tkren connection_timeout=5 dbname=xxx
>> >  Sun Aug 20 18:24:34 2017 : WARNING: Couldn't create the primary
>> connection (attempt 1): invalid connection option "connection_timeout"
>> >
>> >This suggests pgAgent is not using the latest version of libpq.
>> >Please use LD_LIBRARY_PATH environment to inform pgAgent to use the
>> libpq,
>> >it is compiled with.
>> >-- Thanks,
>> >Ashesh Vashi
>> >-- Thanks, Ashesh
>>
>> Unfortunately, this does not work. On a current Debian sid system,
>> I've compiled pgagent from source and get
>>
>>  % ldd ./pgagent
>>  [...]
>> libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5
>> (0x7ff531382000)
>>  [...]
>>
>>
>> The system has libpq 9.6.4 installed:
>>
>>  % apt-cache show libpq5
>>  Package: libpq5
>>  Source: postgresql-9.6
>>  Version: 9.6.4-1
>>  [...]
>>
>> You may want set the rpath manually using chrpath utility for testing.
>>
>>
> Regardless of that, connection.cpp does need to be taught the correct name
> for connect_timeout, as well as the additional appname related parameters
> right?
>
True.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][PATCH] Refactor and change of implementation of keyboard_shortcuts function dependencies

2017-08-21 Thread Ashesh Vashi
On Wed, Aug 16, 2017 at 8:55 AM, Violet Cheng  wrote:

> Hi,
>
> Is there any update on these patches? Will it be committed soon?
>
Dave - would please take care of this?

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> Thanks,
> Violet
>
> On Thu, Aug 10, 2017 at 2:31 PM, Wenlin Zhang  wrote:
>
>> Hi hackers,
>>
>>We have rebased all the three patches and they are ready to be applied.
>>
>> Thanks,
>>
>> Wenlin & Matt
>>
>> On Wed, Aug 9, 2017 at 11:20 AM, Sarah McAlear 
>> wrote:
>>
>>> Oh, great! Thanks Murtuza!
>>>
>>> On Tue, Aug 8, 2017 at 6:16 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
>>>> Hi Wenlin,
>>>>
>>>> Patch looks good to me.
>>>>
>>>> I'm also attaching minor patch to update document for new keyboard
>>>> shortcuts.
>>>>
>>>> --
>>>> Regards,
>>>> Murtuza Zabuawala
>>>> EnterpriseDB: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>> [image: https://community.postgresrocks.net/]
>>>> <https://community.postgresrocks.net/>
>>>>
>>>> On Tue, Aug 8, 2017 at 1:41 PM, Wenlin Zhang  wrote:
>>>>
>>>>> Hi Murtuza,
>>>>>
>>>>>  Thanks for your review.
>>>>>
>>>>>   We have fixed download bug, you can try it with the new patch
>>>>> 1.3_refactor_keyactions.diff, to see if it works.
>>>>>   And we also changed the typo in the patch
>>>>> 2.1_change_keyboard_shortcuts_for_commenting_and_fix_typo.diff, 
>>>>> ('client_plaform'
>>>>> -> 'client_platform').
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Wenlin & Violet
>>>>>
>>>>> On Mon, Aug 7, 2017 at 2:30 PM, Murtuza Zabuawala <
>>>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>>>
>>>>>> Hi Sarah,
>>>>>>
>>>>>> - Download button is not working, getting error on console (attaching
>>>>>> screenshot).
>>>>>> - While testing the patch I also observed another minor issue, If we
>>>>>> click on Explain & Explain analyze buttons, previous messages from 
>>>>>> Message
>>>>>> tab are not getting clear but instead new messages are getting appended 
>>>>>> to
>>>>>> previous ones.
>>>>>>
>>>>>> And could you please correct a typo introduced by Me from file
>>>>>> ../templates/datagrid/index.html, 'client_plaform' ->
>>>>>> 'client_platform' in your next patch as you working on it :)
>>>>>>
>>>>>> Rest of the changes looks good to me.
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Murtuza Zabuawala
>>>>>> EnterpriseDB: http://www.enterprisedb.com
>>>>>> The Enterprise PostgreSQL Company
>>>>>>
>>>>>>
>>>>>> On Mon, Aug 7, 2017 at 8:09 AM, Sarah McAlear 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Murtuza,
>>>>>>>
>>>>>>>  We have rebased and send the new patch.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Wenlin and Sarah
>>>>>>>
>>>>>>> On Fri, Aug 4, 2017 at 8:54 PM, Murtuza Zabuawala <
>>>>>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>>>>>
>>>>>>>> Hi Sarah,
>>>>>>>>
>>>>>>>> Could you please rebase and send the patch again, I am not able to
>>>>>>>> apply any of the patch.
>>>>>>>>
>>>>>>>> murtuza@laptop:~/Documents/projects/pgadmin4$ git apply
>>>>>>>> ~/Downloads/1_refactor_keyactions.diff
>>>>>>>> error: patch failed: web/pgadmin/tools/sqleditor/st
>>>>>>>> atic/js/sqleditor.js:552
>>>>

Re: Next release

2017-08-24 Thread Ashesh Vashi
On Fri, Aug 25, 2017 at 12:16 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi
> On Fri, Aug 25, 2017 at 1:03 AM, Dave Page  wrote:
>
>>
>>
>> On Thu, Aug 24, 2017 at 8:28 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Sr. Software Engineer*
>>>
>>> EnterpriseDB India: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Thu, Aug 24, 2017 at 9:44 PM, Dave Page  wrote:
>>>


 On Thu, Aug 24, 2017 at 10:36 AM, Surinder Kumar <
 surinder.ku...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Thu, Aug 24, 2017 at 2:28 PM, Dave Page  wrote:
>
>> Anyone object to doing a release on 14th September, wrapping the code
>> on Monday 11th? This seems like the best option for our QA folks who will
>> be off for EID somewhen in the two weeks before.
>>
>> Assuming not, should this be 1.7 or 2.0?
>>
>> If we go with 2.0, it'll be for "safety" given the proposed changes
>> to path management to allow both server and desktop modes to work out of
>> the box on Linux.
>>
>> If we do that, we also need to ensure that any changes to the config
>> database are backwards compatible, as a 2.0 release would be a 
>> side-by-side
>> installation. Surinder; was it you that had looked into that?
>>
> ​I had looked into this and here are my findings:
> 1. If we are using newer version of pgAdmin and the go back to older
> version of pgAdmin, then on running `python pgAdmin4.py`. the
> flask-migrate(Alembic) try to perform downgrade by one step only(ie. it 
> can
> switch back to one migration only when we run  `python pgAdmin4.py`). But
> we have multiple database revisions to be migrated. So migration fails 
> here.
>
> 2. When Alebmic downgrade is performed by one step, it looks for
> downgrade function in that specific database revision, but in our code we
> didn't written downgrade function. But if we have written downgrade
> statement, still there is an issue:
> ie. If we add a new column to a table xyz using ALTER statement like:
>
> ​```
> ​
> def upgrade():
> ​​
> verison = get_version()
>
> ​​
> db.engine.execute(
> ​​
> 'ALTER TABLE server ADD COLUMN hostaddr TEXT(1024)'
> ​ ​
> )
>
> def downgrade():
> ​​
> pass
> ​```​
> then on downgrade it executes `downgrade` method, so downgrade should
> have code like
> `ALTER TABLE server DROP COLUMN hostaddr `
> but in sqlite DROP COLUMN statements don't work.
> So, this is a an issue with Sqlite database. However, an alternative
> way is also given. Here is link
> 
>
>
> Still, I didn't find any other solution on upgrading/downgrading
> database revisions without errors.
> It is an issue with Flask-Migrate(Alembic) plugin.
>


 Urgh. So I guess the other option is that we version the DB filename as
 well. The downside of that is that users will want to migrate their
 settings - which may be awkward as we'll have no real way of knowing where
 they are.

 Thoughts?

 Or should we write our own custom backword migrations? For eg. dropping
>>>  column can be achieved by creating another table excluding the columns
>>> which we want to drop then copy data to new table and then drop old table
>>> and rename new table to old name. And also sqlite database schema which we
>>> have in pgAdmin4 is small so writing and maintaining custom migration won
>>> be that hard.
>>>
>>
>> The problem is that we don't want to migrate backwards; we want both
>> versions to be able to run with the same database (for example, because you
>> might have multiple versions installed with the EDB PG installer as I do on
>> my laptop).
>>
>> Previously, we always made sure our changes were backwards compatible
>> (e.g. by only adding new columns, never removing or renaming them), and our
>> home-grown migration code only cared about upgrading the database to the
>> current version; it wouldn't complain if the database was of a newer
>> version.
>>
> ​The code which is responsible to run database migration is
> `db_upgrade(app)` in `pgadmin/__init__.py​` it executes when python server
> runs `python pgAdmin4.py`, It fails with older version of pgAdmin4(say 1.5)
> because it cannot find db revision file (revision id stored in table
> 'alembic_version') in `web/migrations` folder of latest pgAdmin4-1.5
>
> But If we catch this exception like:
> ```
> import alembic
> try:
> db_upgrade(app)
> except alembic.util.exc.CommandError as e: # Handle migration error, I
> expect this exception will be raised in older version of code.
> app.logger.info('Failed to run migrations: %s' % str(e))

Re: [pgadmin4][Patch] Greenplum specific DDL and Dashboard display

2017-08-25 Thread Ashesh Vashi
On Fri, Aug 25, 2017 at 4:53 PM, Dave Cramer  wrote:

> I'm suggesting that it be pushed
>
Akshay is already on to it, and currently reviewing it.
Will push it once get the confirmation.

-- Thanks, Ashesh

>
> Dave Cramer
>
> On 24 August 2017 at 23:00, Teng Zhang  wrote:
>
>> Sure, you can get as much as you like.
>> Thanks
>>
>> -- Forwarded message --
>> From: Dave Cramer 
>> Date: Thu, Aug 24, 2017 at 8:34 PM
>> Subject: Re: [pgadmin4][Patch] Greenplum specific DDL and Dashboard
>> display
>> To: Teng Zhang 
>> Cc: Ashesh Vashi , pgadmin-hackers <
>> pgadmin-hack...@postgresql.org>, Dave Page , Jing Li <
>> jin...@pivotal.io>
>>
>>
>> Can we get some movement on this patch? This seems like a more sane way
>> to go to support different "products"
>>
>> Dave Cramer
>>
>> On 22 August 2017 at 16:56, Dave Cramer  wrote:
>>
>>>
>>> On 22 August 2017 at 16:41, Dave Cramer  wrote:
>>>
>>>> Ok,
>>>>
>>>> Surely this :
>>>>
>>>> self.table_template_path = 'table/sql/' + (
>>>> +'#{0}#{1}#'.format(server_type, ver)
>>>> +if server_type == 'gpdb' else
>>>> +'#{0}#'.format(ver)
>>>> +)
>>>>
>>>> could be written in a more readable manner ??
>>>>
>>>>
>>>>
>>> Apologies, after reading a bit, this is apparently idiomatic python.
>>>
>>> Please ignore
>>>
>>>
>>>> Dave Cramer
>>>>
>>>> On 22 August 2017 at 14:25, Dave Cramer  wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I've been able to get back to this and test it. So far so good. It
>>>>> applies more or less cleanly against 1.6 and everything I've tried so far
>>>>> works
>>>>>
>>>>> I'll update more as I test it.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Dave Cramer
>>>>>
>>>>> On 21 August 2017 at 05:29, Teng Zhang  wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Thanks for the review, here is a fixed patch working for GBDP which
>>>>>> shows the appropriate graphs.
>>>>>> In this fix, we toke out the changes to diver/psycopg2 and
>>>>>> implemented the greenplum version checking process in the ppas way
>>>>>> mentioned by Dave Cramer.
>>>>>>
>>>>>> Regards,
>>>>>> Teng Zhang & Hao Wang
>>>>>>
>>>>>> On Mon, Aug 21, 2017 at 3:55 PM, Ashesh Vashi <
>>>>>> ashesh.va...@enterprisedb.com> wrote:
>>>>>>
>>>>>>> On Mon, Aug 21, 2017 at 1:23 PM, Dave Page 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Ashesh, do you have a recommended way to do this?
>>>>>>>>
>>>>>>>> I haven't looked at the patch, but I assume it adds a database
>>>>>>>> driver module for GPDB?
>>>>>>>>
>>>>>>> I have not looked at the patch yet.
>>>>>>> I will take a look at it.
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Thanks & Regards,
>>>>>>>
>>>>>>> Ashesh Vashi
>>>>>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>>>>>> <http://www.enterprisedb.com/>
>>>>>>>
>>>>>>>
>>>>>>> *http://www.linkedin.com/in/asheshvashi*
>>>>>>> <http://www.linkedin.com/in/asheshvashi>
>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Aug 21, 2017 at 8:50 AM, Jing Li  wrote:
>>>>>>>>
>>>>>>>>> Hi Dave,
>>>>>>>>>
>>>>>>>>> Since we're hoping to get this change working for GPDB we've
>>>>>>>>> currently using this method to detect if it's gpdb and show the 
>>>>>>>>> appropriate
>>>>>>>>> graphs. Right now it displays errors on the dashboard if it's 
>>>>

pgAdmin 4 commit: Fix the feature tests failuers.

2017-08-25 Thread Ashesh Vashi
Fix the feature tests failuers.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=5dd375dd2081c126b7b3b9f0dba21976d2a45a1f
Author: Wenlin Zhang 

Modified Files
--
web/pgadmin/feature_tests/query_tool_journey_test.py |  7 ---
web/pgadmin/feature_tests/query_tool_tests.py| 10 +-
2 files changed, 5 insertions(+), 12 deletions(-)



Re: [pgAdmin4][patch] Fix feature tests failure

2017-08-25 Thread Ashesh Vashi
On Wed, Aug 16, 2017 at 8:54 AM, Violet Cheng  wrote:

> Hi,
>
> Is there any update on this patch? Will it be committed soon?
>
> Hi Violet,

I've committed the patch with some changes.
Removed one more occurrence of '_assert_not_clickable_because_out_of_view'
added later by Hao Wang in commit: 5141debae7e08d205e813dd9fc52b737a9f18184.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

> Thanks,
> Violet
>
> On Thu, Aug 10, 2017 at 11:32 AM, Wenlin Zhang  wrote:
>
>> As Sarah discussed with Khushboo on slack (pgadminhackers.slack.com for
>> those who would like to join) yesterday, these errors seem to occur only on
>> her Ubuntu system. We have not replicated them on Mac. But they exist
>> before this patch, also.
>>
>> We notice that copy/paste functionality is being tested in two feature
>> tests, the query_tool_journey_test.py and 
>> copy_selected_query_results_feature_test.py.
>> Perhaps we only need to test this behavior in one of the tests?
>>
>> We've confirmed that the patch is able to be applied against the current
>> state of master without any changes after yesterday's commits.
>>
>> Thanks,
>>
>> Wenlin and Matt
>>
>
>


pgAdmin 4 commit: Add package run scripts to allow to run the webpack i

2017-08-25 Thread Ashesh Vashi
Add package run scripts to allow to run the webpack in watch mode, also
added '--progress' option to make it more interactive.

Branch
--
master

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

Modified Files
--
web/package.json  | 2 ++
web/webpack.config.js | 9 +
2 files changed, 11 insertions(+)



Re: [pgAdmin4][Patch]: Add command under scripts to run webpack bundle in watch mode

2017-08-25 Thread Ashesh Vashi
Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

On Wed, Aug 9, 2017 at 6:51 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi
>
> Currently, whenever we are making a change in JS file, we have to re-run
> bundle script again to generate all bundles again, which takes time and it
> is pain for developers to watch it till finished.
>
> So Webpack `watch` option lets the Webapck watch for changes in the file
> and compiles only files which are changed after the initial build.
>
> Also added an option `--progress` which updates on terminal about packages
> being built and percentage completed.
>
> So, you can run bundle in watch mode in terminal:
>
> ``` $ yarn run bundle:watch ```
>
> Reference [link](https://webpack.js.org/configuration/watch/#
> components/sidebar/sidebar.jsx)
>
> Please review the patch
>
> Thanks,
> Surinder Kumar
>


pgAdmin 4 commit: Fixes #2560 - View is not fully qualified in Trigger

2017-08-25 Thread Ashesh Vashi
Fixes #2560 - View is not fully qualified in Trigger definition.

Branch
--
master

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

Modified Files
--
.../browser/server_groups/servers/databases/schemas/views/__init__.py   | 2 ++
1 file changed, 2 insertions(+)



Re: [pgAdmin4][PATCH] Fix trigger's reversed engineered SQL for View

2017-08-25 Thread Ashesh Vashi
On Fri, Aug 18, 2017 at 1:18 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch to fix the issue where view is not fully qualified in
> Trigger definition.
> RM#2560
>
Thanks - committed!

-- Thanks, Ashesh

>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> [image: https://community.postgresrocks.net/]
> 
>


Re: pgAdmin 4 commit: Fix the feature tests failuers.

2017-08-25 Thread Ashesh Vashi
On Fri, Aug 25, 2017 at 8:26 PM, Dave Page  wrote:

> QueryToolFeatureTest seems to be failing on both Jenkins and my test mac
> system since this was applied. The other one below seems more intermittent.
>
> ==
> ERROR: runTest (pgadmin.feature_tests.query_tool_tests.
> QueryToolFeatureTest)
> Query tool feature test
> --
> Traceback (most recent call last):
>   File 
> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_tests.py",
> line 84, in runTest
> self._query_tool_explain_cost()
>   File 
> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_tests.py",
> line 361, in _query_tool_explain_cost
> canvas.find_element_by_xpath("//*[contains(string(),'Total Cost')]")
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webelement.py", line 260, in
> find_element_by_xpath
> return self.find_element(by=By.XPATH, value=xpath)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webelement.py", line 510, in
> find_element
> {"using": by, "value": value})['value']
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webelement.py", line 493, in _execute
> return self._parent.execute(command, params)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py", line 249, in execute
> self.error_handler.check_response(response)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/errorhandler.py", line 193, in
> check_response
> raise exception_class(message, screen, stacktrace)
> NoSuchElementException: Message: no such element: Unable to locate
> element: {"method":"xpath","selector":"//*[contains(string(),'Total
> Cost')]"}
>
  (Session info: chrome=60.0.3112.101)
>   (Driver info: chromedriver=2.29.461585 
> (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac
> OS X 10.11.6 x86_64)
>
>
> ==
> ERROR: runTest (pgadmin.feature_tests.view_data_dml_queries.
> CheckForViewDataTest)
> Validate Insert, Update operations in View/Edit data with given test data
> --
> Traceback (most recent call last):
>   File 
> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
> line 107, in runTest
> self._verify_row_data(True)
>   File 
> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
> line 291, in _verify_row_data
> result_row = self.page.find_by_xpath(xpath)
>   File 
> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
> line 148, in find_by_xpath
> return self.wait_for_element(lambda driver:
> driver.find_element_by_xpath(xpath))
>   File 
> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
> line 232, in wait_for_element
> return self._wait_for("element to exist", element_if_it_exists)
>   File 
> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
> line 282, in _wait_for
> "Timed out waiting for " + waiting_for_message)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/support/wait.py", line 71, in until
> value = method(self._driver)
>   File 
> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
> line 227, in element_if_it_exists
> if element.is_displayed() and element.is_enabled():
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webelement.py", line 157, in is_enabled
> return self._execute(Command.IS_ELEMENT_ENABLED)['value']
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webelement.py", line 493, in _execute
> return self._parent.execute(command, params)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/webdriver.py", line 249, in execute
> self.error_handler.check_response(response)
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/selenium/webdriver/remote/errorha

Re: pgAdmin 4 commit: Greenplum specific DDL and Dashboard display changes.

2017-08-25 Thread Ashesh Vashi
On Fri, Aug 25, 2017 at 8:30 PM, Dave Page  wrote:

> I believe this patch has broken my installation. When I try to run now, I
> get:
>
> Exception in thread Thread-1:
> Traceback (most recent call last):
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py",
> line 810, in __bootstrap_inner
> self.run()
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py",
> line 763, in run
> self.__target(*self.__args, **self.__kwargs)
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
> line 602, in process_request_thread
> self.handle_error(request, client_address)
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
> line 599, in process_request_thread
> self.finish_request(request, client_address)
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
> line 334, in finish_request
> self.RequestHandlerClass(request, client_address, self)
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
> line 655, in __init__
> self.handle()
>   File 
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
> line 200, in handle
> rv = BaseHTTPRequestHandler.handle(self)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/li
> b/python2.7/BaseHTTPServer.py", line 340, in handle
> self.handle_one_request()
>   File 
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
> line 235, in handle_one_request
> return self.run_wsgi()
>   File 
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
> line 177, in run_wsgi
> execute(self.server.app)
>   File 
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
> line 165, in execute
> application_iter = app(environ, start_response)
>   File 
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 2000, in __call__
> return self.wsgi_app(environ, start_response)
>   File 
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1991, in wsgi_app
> response = self.make_response(self.handle_exception(e))
>   File 
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1567, in handle_exception
> reraise(exc_type, exc_value, tb)
>   File 
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1988, in wsgi_app
> response = self.full_dispatch_request()
>   File 
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1634, in full_dispatch_request
> self.try_trigger_before_first_request_functions()
>   File 
> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
> line 1660, in try_trigger_before_first_request_functions
> func()
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line
> 43, in create_module_preference
> self.register_preferences()
>   File 
> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
> line 172, in register_preferences
> ServerType.register_preferences()
>   File 
> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/types.py",
> line 57, in register_preferences
> default_path = config.DEFAULT_BINARY_PATHS[st.stype] or ""
> KeyError: 'gpdb'
>
That's because - you must have DEFAULT_BINARY_PATHS definition in the
config_local.py/config_distro.py.

I will modify the code to take of that.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
>
> On Fri, Aug 25, 2017 at 1:25 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Greenplum specific DDL and Dashboard display changes.
>> Initial patch by Sarah McAlear.
>>
>> Branch
>> --
>> master
>>
>> Details
>> ---
>> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdif
>> f;h=46c5df4e7bb7abba6896cfb86eed43914a74850a
>> Author: Teng Zhang 
>>
>> Modified Files
>> --
>> we

pgAdmin 4 commit: Define the utility path lable, and help message for t

2017-08-25 Thread Ashesh Vashi
Define the utility path lable, and help message for the Greenplum
database server, shown in the preferences dialog.

Also, fixed the issue, when server type is not defined in the
DEFAULT_BINARY_PATHS, in the configuration.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/server_groups/servers/gpdb.py  | 6 ++
web/pgadmin/browser/server_groups/servers/types.py | 5 -
2 files changed, 10 insertions(+), 1 deletion(-)



Re: pgAdmin 4 commit: Greenplum specific DDL and Dashboard display changes.

2017-08-25 Thread Ashesh Vashi
On Fri, Aug 25, 2017 at 9:14 PM, Ashesh Vashi  wrote:

> On Fri, Aug 25, 2017 at 8:30 PM, Dave Page  wrote:
>
>> I believe this patch has broken my installation. When I try to run now, I
>> get:
>>
>> Exception in thread Thread-1:
>> Traceback (most recent call last):
>>   File 
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py",
>> line 810, in __bootstrap_inner
>> self.run()
>>   File 
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py",
>> line 763, in run
>> self.__target(*self.__args, **self.__kwargs)
>>   File 
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
>> line 602, in process_request_thread
>> self.handle_error(request, client_address)
>>   File 
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
>> line 599, in process_request_thread
>> self.finish_request(request, client_address)
>>   File 
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
>> line 334, in finish_request
>> self.RequestHandlerClass(request, client_address, self)
>>   File 
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py",
>> line 655, in __init__
>> self.handle()
>>   File 
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
>> line 200, in handle
>> rv = BaseHTTPRequestHandler.handle(self)
>>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/li
>> b/python2.7/BaseHTTPServer.py", line 340, in handle
>> self.handle_one_request()
>>   File 
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
>> line 235, in handle_one_request
>> return self.run_wsgi()
>>   File 
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
>> line 177, in run_wsgi
>> execute(self.server.app)
>>   File 
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py",
>> line 165, in execute
>> application_iter = app(environ, start_response)
>>   File 
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 2000, in __call__
>> return self.wsgi_app(environ, start_response)
>>   File 
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1991, in wsgi_app
>> response = self.make_response(self.handle_exception(e))
>>   File 
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1567, in handle_exception
>> reraise(exc_type, exc_value, tb)
>>   File 
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1988, in wsgi_app
>> response = self.full_dispatch_request()
>>   File 
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1634, in full_dispatch_request
>> self.try_trigger_before_first_request_functions()
>>   File 
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1660, in try_trigger_before_first_request_functions
>> func()
>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line
>> 43, in create_module_preference
>>     self.register_preferences()
>>   File 
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py",
>> line 172, in register_preferences
>> ServerType.register_preferences()
>>   File 
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/types.py",
>> line 57, in register_preferences
>> default_path = config.DEFAULT_BINARY_PATHS[st.stype] or ""
>> KeyError: 'gpdb'
>>
> That's because - you must have DEFAULT_BINARY_PATHS definition in the
> config_local.py/config_distro.py.
>
> I will modify the code to take of that.
>
Checked-in the code for the same.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB IN

pgAdmin 4 commit: Using the proper python syntax to fetch the default b

2017-08-25 Thread Ashesh Vashi
Using the proper python syntax to fetch the default binary path for
different servers types.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=b1ad89fb4a772c0b396cb8907a1a1ce5973bc82e
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/browser/server_groups/servers/types.py | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)



Re: fix keyerror problems

2017-08-25 Thread Ashesh Vashi
On Sat, Aug 26, 2017 at 12:24 AM, Dave Cramer  wrote:

> See attached patch
>
I have already committed a patch for the same.

But - improved the syntax as per Harshal's suggestion.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
>
> Dave Cramer
>


pgAdmin 4 commit: Define the proper NODE_ENV environment during running

2017-08-31 Thread Ashesh Vashi
Define the proper NODE_ENV environment during running the webpack.
Using the webpack.DefinePlugin during the development build too, not
just in production build.

Fixes #2596.

Also - passing option 'warning: false' for UglifyJsPlugin, which will
not show warning messages on the console during the production build.

Branch
--
master

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

Modified Files
--
web/webpack.config.js | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)



Re: [pgAdmin4][Patch]: RM_2596 - Query tool not working in Desktop Runtime on Mac OS X

2017-08-31 Thread Ashesh Vashi
On Tue, Aug 29, 2017 at 5:55 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi Ashesh,
>
> Can you please review this patch please?
>
Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
> Thanks,
> Surinder
>
> On Wed, Aug 16, 2017 at 3:43 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Updated patch contains changes:
>>
>>- Enable definePlugin for development environment as well. Just
>>adding definePlugin in plugins array.
>>The variable process.env.NODE_ENV is useful to write conditional code
>>in pgAdmin4 JS modules.
>>
>> For example:
>>
>> if (process.env.NODE_ENV !== 'production') {
>>   // Write development environment specific code
>> } else {
>>   // Write production only code.
>> }
>>
>> Please review this patch and let me know for changes.
>>
>> Thanks,
>> Surinder
>> ​
>>
>> On Tue, Aug 1, 2017 at 11:32 AM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi Ashesh,
>>>
>>> 1. Now we are using `envType` variable in definePlugin which sets
>>> environment variable NODE_ENV globally which is used by React to create
>>> development or production build.
>>> where:
>>>  envType - determine build type is either `production` or
>>> `development`​ depending on the environment set in package.json > scripts.
>>>
>>> 2. In `UglifyJSPlugin`, i am setting compress > `warnings to false`,
>>> because here warning flag is meant to display warnings on terminal while
>>> creating build in production mode. so it is set to false.
>>>
>>> I didn't created an RM for #2 as it is minor change, if needed, i will
>>> create.
>>>
>>> ​Reference to webpack definePlugin:
>>> https://webpack.js.org/guides/production/#node-environment-variable​
>>>
>>> Please find updated patch with fixed review comments and review.
>>>
>>> Thanks,
>>> Surinder
>>>
>>> On Mon, Jul 31, 2017 at 3:31 PM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
>>>> On Fri, Jul 28, 2017 at 12:42 PM, Surinder Kumar <
>>>> surinder.ku...@enterprisedb.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I inspect the react code and in call stacks, found
>>>>> `process.env.NODE_ENV` is undefined due to which 'SyntheticEvent.call' is
>>>>> not callable.
>>>>>
>>>>> So, to fix this, i add 'definePlugin' to plugins for `dev` environment
>>>>> in `webpack.config.js`. Initially it was added only for `production`
>>>>> environment. but it is needed for both, because React code is conditional
>>>>> based on environment variables set.
>>>>>
>>>>
>>>>> Please find attached patch and review.
>>>>>
>>>> As discussed, you're setting 'production', even in the 'development'
>>>> mode.
>>>>
>>>> Please understand the code, and share the updated patch.
>>>> Also - share the references next time, so that - committer can
>>>> understand the reason for these changes.
>>>>
>>>> -- Thanks, Ashesh
>>>>
>>>>>
>>>>> Thanks,
>>>>> Surinder
>>>>>
>>>>
>>>>
>>>
>>
>


pgAdmin 4 commit: Replacing existing browser tree node png icons with t

2017-09-10 Thread Ashesh Vashi
Replacing existing browser tree node png icons with the svg icons. Made
it compatible with the pgAdmin 4 color combination.

TODO::
Icons for the following nodes are in PNG format.
- Domain Constraint (Only the invalid icon)
- pgAgent Job Steps
- Green Plum database server
- Server (Only server.png, which is used in the create/edit dialog)

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/__init__.py  |   2 +-
.../servers/databases/casts/static/img/cast.png  | Bin 426 -> 0 bytes
.../servers/databases/casts/static/img/cast.svg  |   1 +
.../servers/databases/casts/static/img/coll-cast.png | Bin 402 -> 0 bytes
.../servers/databases/casts/static/img/coll-cast.svg |   1 +
.../event_triggers/static/img/coll-event_trigger.png | Bin 350 -> 0 bytes
.../event_triggers/static/img/coll-event_trigger.svg |   1 +
.../event_triggers/static/img/event_trigger.png  | Bin 324 -> 0 bytes
.../event_triggers/static/img/event_trigger.svg  |   1 +
.../databases/event_triggers/static/img/triggerbad.png   | Bin 610 -> 0 bytes
.../databases/event_triggers/static/img/triggerbad.svg   |   1 +
.../databases/extensions/static/img/coll-extension.png   | Bin 1017 -> 0 bytes
.../databases/extensions/static/img/coll-extension.svg   |   1 +
.../databases/extensions/static/img/extension.png| Bin 996 -> 0 bytes
.../databases/extensions/static/img/extension.svg|   1 +
.../foreign_servers/static/img/coll-foreign_server.png   | Bin 476 -> 0 bytes
.../foreign_servers/static/img/coll-foreign_server.svg   |   1 +
.../foreign_servers/static/img/foreign_server.png| Bin 518 -> 0 bytes
.../foreign_servers/static/img/foreign_server.svg|   1 +
.../user_mapping/static/img/coll-user_mapping.png| Bin 557 -> 0 bytes
.../user_mapping/static/img/coll-user_mapping.svg|   1 +
.../user_mapping/static/img/user_mapping.png | Bin 518 -> 0 bytes
.../user_mapping/static/img/user_mapping.svg |   1 +
.../static/img/coll-foreign_data_wrapper.png | Bin 444 -> 0 bytes
.../static/img/coll-foreign_data_wrapper.svg |   1 +
.../static/img/foreign_data_wrapper.png  | Bin 411 -> 0 bytes
.../static/img/foreign_data_wrapper.svg  |   1 +
.../databases/languages/static/img/coll-language.png | Bin 477 -> 0 bytes
.../databases/languages/static/img/coll-language.svg |   1 +
.../servers/databases/languages/static/img/language.png  | Bin 465 -> 0 bytes
.../servers/databases/languages/static/img/language.svg  |   1 +
.../columns/static/img/catalog_object_column.png | Bin 435 -> 0 bytes
.../columns/static/img/catalog_object_column.svg |   1 +
.../columns/static/img/coll-catalog_object_column.png| Bin 400 -> 0 bytes
.../columns/static/img/coll-catalog_object_column.svg|   1 +
.../catalog_objects/static/img/catalog_object.png| Bin 409 -> 0 bytes
.../catalog_objects/static/img/catalog_object.svg|   1 +
.../catalog_objects/static/img/coll-catalog_object.png   | Bin 419 -> 0 bytes
.../catalog_objects/static/img/coll-catalog_object.svg   |   1 +
.../schemas/collations/static/img/coll-collation.png | Bin 178 -> 0 bytes
.../schemas/collations/static/img/coll-collation.svg |   1 +
.../schemas/collations/static/img/collation.png  | Bin 233 -> 0 bytes
.../schemas/collations/static/img/collation.svg  |   1 +
.../static/img/coll-domain_constraints.png   | Bin 314 -> 0 bytes
.../static/img/coll-domain_constraints.svg   |   1 +
.../domain_constraints/static/img/domain_constraints.png | Bin 406 -> 0 bytes
.../domain_constraints/static/img/domain_constraints.svg |   1 +
.../databases/schemas/domains/static/img/coll-domain.png | Bin 462 -> 0 bytes
.../databases/schemas/domains/static/img/coll-domain.svg |   1 +
.../databases/schemas/domains/static/img/domain-sm.png   | Bin 401 -> 0 bytes
.../databases/schemas/domains/static/img/domain.png  | Bin 424 -> 0 bytes
.../databases/schemas/domains/static/img/domain.svg  |   1 +
.../foreign_tables/static/img/coll-foreign-table.png | Bin 492 -> 0 bytes
.../foreign_tables/static/img/coll-foreign_table.png | Bin 492 -> 0 bytes
.../foreign_tables/static/img/coll-foreign_table.svg |   1 +
.../schemas/foreign_tables/static/img/foreign-table.png  | Bin 563 -> 0 bytes
.../schemas/foreign_tables/static/img/foreign_table.png  | Bin 563 -> 0 bytes
.../schemas/foreign_tables/static/img/foreign_table.svg  |   1 +
.../static/img/coll-fts_configuration.png| Bin 369 -> 0 bytes
.../static/img/coll-fts_configuration.svg|   1 +
.../fts_configurations/static/img/fts_configuration.png  | Bin 346 -> 0 bytes
.../fts_configurations/static/img/fts_configuration.svg  |   1 +
.../fts_di

pgAdmin 4 commit: Changes in the stylesheets to support the svg icons f

2017-09-10 Thread Ashesh Vashi
Changes in the stylesheets to support the svg icons for the browser
tree nodes.

Branch
--
master

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

Modified Files
--
.../templates/domain_constraints/css/domain_constraints.css   | 6 +++---
.../templates/check_constraint/css/check_constraint.css   | 6 +++---
.../foreign_key/templates/foreign_key/css/foreign_key.css | 6 +++---
.../databases/schemas/tables/rules/templates/rules/css/rule.css   | 2 +-
.../schemas/tables/triggers/templates/trigger/css/trigger.css | 6 +++---
.../servers/databases/schemas/views/templates/mview/css/mview.css | 2 +-
.../servers/databases/schemas/views/templates/view/css/view.css   | 2 +-
.../servers/databases/templates/databases/css/database.css| 4 ++--
.../pgagent/schedules/templates/pga_schedule/css/pga_schedule.css | 2 +-
.../servers/pgagent/steps/templates/pga_jobstep/css/pga_step.css  | 8 
.../servers/pgagent/templates/pga_job/css/pga_job.css | 4 ++--
.../server_groups/servers/roles/templates/role/css/role.css   | 8 
.../browser/server_groups/servers/templates/css/server_type.css   | 2 +-
.../browser/server_groups/servers/templates/css/servers.css   | 7 +--
web/pgadmin/browser/templates/browser/css/collection.css  | 4 ++--
web/pgadmin/browser/templates/browser/css/node.css| 4 ++--
16 files changed, 42 insertions(+), 31 deletions(-)



pgAdmin 4 commit: Miscellaneous fixes for icon sizing issue, missing tr

2017-09-11 Thread Ashesh Vashi
Miscellaneous fixes for icon sizing issue, missing tree nodes to be
webpacked, etc.

- Fixed the background-size for the svg icons to 20x20 px such that it
  does not adjust it's size when a context menu height is different due
  to length of the node label, also - it allows us to fix the issue of
  icons sizes in the Grant Wizard.

- Added two missing browser tree nodes in the webpack configuration
  i.e. Foreign Server, and User Mapping
- Removed a redundant javascript file foreign-server.js
- Fixed the missing context menu icons for Foreign Table, and Tablespace
  nodes.

Thanks EDB development team to find the regression added after the icon
changes in quick time.

Branch
--
master

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

Modified Files
--
.../domain_constraints/css/domain_constraints.css  |   3 +
.../foreign_tables/static/js/foreign-table.js  | 719 -
.../foreign_tables/static/js/foreign_table.js  |  10 +-
.../check_constraint/css/check_constraint.css  |   2 +
.../templates/foreign_key/css/foreign_key.css  |   6 +
.../tables/rules/templates/rules/css/rule.css  |   1 +
.../triggers/templates/trigger/css/trigger.css |   3 +
.../schemas/views/templates/mview/css/mview.css|   1 +
.../schemas/views/templates/view/css/view.css  |   2 +-
.../databases/templates/databases/css/database.css |   2 +
.../templates/pga_schedule/css/pga_schedule.css|   1 +
.../servers/pgagent/steps/__init__.py  |  17 +
.../steps/templates/pga_jobstep/css/pga_step.css   |   2 +
.../pgagent/templates/pga_job/css/pga_job.css  |   2 +
.../servers/roles/templates/role/css/role.css  |   4 +
.../servers/tablespaces/static/js/tablespace.js|   4 +-
.../servers/templates/css/server_type.css  |   1 +
.../servers/templates/css/servers.css  |   3 +
.../browser/templates/browser/css/collection.css   |   1 +
web/pgadmin/browser/templates/browser/css/node.css |   2 +
web/webpack.config.js  |   2 +
21 files changed, 61 insertions(+), 727 deletions(-)



pgAdmin 4 commit: Rename the SecurityGroupUnderSchema to SecurityGroupS

2017-09-11 Thread Ashesh Vashi
Rename the SecurityGroupUnderSchema to SecurityGroupSchema, and
redefined in the database (instead of schema) javascript module, as it
is also used by the foreign-server node too.

Reported by: Neel Patel

Branch
--
master

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

Modified Files
--
.../foreign_servers/static/js/foreign_server.js|  2 +-
.../servers/databases/schemas/domains/static/js/domain.js  |  2 +-
.../schemas/foreign_tables/static/js/foreign_table.js  |  2 +-
.../databases/schemas/functions/static/js/function.js  |  2 +-
.../schemas/functions/static/js/trigger_function.js|  2 +-
.../databases/schemas/sequences/static/js/sequence.js  |  2 +-
.../servers/databases/schemas/static/js/schema.js  | 14 --
.../databases/schemas/tables/column/static/js/column.js|  2 +-
.../schemas/tables/partitions/static/js/partition.js   |  2 +-
.../servers/databases/schemas/tables/static/js/table.js|  2 +-
.../servers/databases/schemas/types/static/js/type.js  |  2 +-
.../servers/databases/schemas/views/static/js/mview.js |  2 +-
.../servers/databases/schemas/views/static/js/view.js  |  2 +-
.../server_groups/servers/databases/static/js/database.js  | 14 ++
14 files changed, 26 insertions(+), 26 deletions(-)



Re: pgAdmin4 - Tree view icons for final reveiw

2017-09-11 Thread Ashesh Vashi
On Mon, Sep 11, 2017 at 1:25 PM, Dave Page  wrote:

> Hmm, scrub the revert - it looks like you just fixed a bunch of the issues.
>
K.

>
> The main thing I think that remains as an issue is the colouring on the
> headers and menus - the former of which needs fixing somehow, the latter we
> were going to remove to de-clutter the UI anyway.
>
I can remove the icons from the context menus, and menus in 10 mins (if you
want).

-- Thanks, Ashesh

>
> On Mon, Sep 11, 2017 at 8:50 AM, Dave Page  wrote:
>
>> Agreed - these issues need to be resolved before we can proceed.
>>
>> Ashesh, please revert the patch for now.
>>
>> Chethana, please figure out what we need to change to resolve the various
>> issues raised. Iirc, we'd already decided to remove icons from the menus
>> right?
>>
>> On Mon, Sep 11, 2017 at 8:45 AM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hello,
>>>
>>> I also observed few issues,
>>>
>>> 1) In my opinion, New icons looks dull in main header menu due to dark
>>> background, attaching screenshot for your reference.
>>>
>>> 2) Spacing issue between icons and label are inconsistent, attaching
>>> screenshot for your reference.
>>>
>>> 3) Icons with blue colour in them are not properly visible in context
>>> menu. For example "Trigger" icon is not visible when we hover over it
>>> because of same colour, attaching screenshot for your reference.
>>>
>>> 4) Are we considering different icons for Event triggers & Triggers?
>>> (They were same in pgAdmin3)
>>>
>>> 5) Icons for Casts modules are same, I mean collection icon and node
>>> icon, I think we need different icons to differentiate.
>>>
>>> 6) The width of bad-server-icon is more when compare with other icons,
>>> that makes it looks like a text document icon.
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> [image: https://community.postgresrocks.net/]
>>> 
>>>
>>> On Mon, Sep 11, 2017 at 12:58 PM, Neel Patel <
>>> neel.pa...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 As far as I know, we replaced png icons with svg icons because - it
 should work with all types of resolutions. The svg icon should not blur.
 Here in my Linux system, I am using 1440*900(16:10) resolution and most
 of the svg icons are blurred. Please find attach screenshot.

 Thoughts ?

 Thanks,
 Neel Patel

 On Fri, Aug 25, 2017 at 5:14 PM, Dave Page  wrote:

> Hi
>
> Yes, that's my expectation. Hopefully they'll go in in the next week
> or so.
>
> On Fri, Aug 25, 2017 at 12:40 PM, Anthony DeBarros <
> adebar...@gmail.com> wrote:
>
>> Dave and all,
>>
>> Out of curiosity (because I’m writing a book that includes pgAdmin
>> screen grabs), do you expect these icons to make it into your September
>> release?
>>
>> Thanks,
>> Anthony
>>
>>
>> On August 23, 2017 at 4:03:42 AM, Murtuza Zabuawala (
>> murtuza.zabuaw...@enterprisedb.com) wrote:
>>
>> Hi Chethana,
>>
>>
>> On Wed, Aug 23, 2017 at 12:51 PM, Chethana Kumar <
>> chethana.ku...@enterprisedb.com> wrote:
>>
>>> Hi Murtuza,
>>>
>>> Please see my reply inline along with the updated .svg file for tree
>>> view icons.
>>>
>>>
>>> On Tue, Aug 22, 2017 at 11:17 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Chethana,

 - The icons for Server node is missing, we will need given set of
 icons for server.
 1) Basic Server icon (Disconnect state)
 2) PG (Connected state)
 3) EPAS (Connected state)
 4) GreenPlum (Connected state)
 [Attaching current icons for PG & EPAS, I'm not sure about
 GreenPlum server icon.]

 - I'm not sure where we will use serverbad icon from
 'tree_view_Icons.svg' file as it looks like server-group icon and not
 individual server.

>>>  The icon is there in the pgAdmin's icon folder and it is needed
>>> for the application
>>>
>> ​Yes, we need serverbad icon which indicates the server in disconnect
>> state but what we have on svg is same icon as server-group icon, we need
>> icon for individual server.​
>>
>> [image: Inline image 1]
>>
>> ​Something like this below which will differentiate individual server
>> icon from server-group icon,
>> [image: Inline image 6]​
>>
>>
 - Icon set for Schema & Catalog (both collection and individual)
 looks very similar to each other with minor colour difference, we have 
 to
 look very carefully to identify them each.

>>>  Agree with this point and come up with some updations on it. This
>>> time I have made it pretty differentiable between Schema and
>>>

Re: pgAdmin4 - Tree view icons for final reveiw

2017-09-11 Thread Ashesh Vashi
Hi Dave,

Please find the attached patch for not showing icons for menu items.
I have not completely removed it, but - commented the code (will remove it
in final patch).

Please review, and commit it (if it looks good to you).

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

On Mon, Sep 11, 2017 at 1:30 PM, Dave Page  wrote:

>
>
> On Mon, Sep 11, 2017 at 8:59 AM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Mon, Sep 11, 2017 at 1:25 PM, Dave Page  wrote:
>>
>>> Hmm, scrub the revert - it looks like you just fixed a bunch of the
>>> issues.
>>>
>> K.
>>
>>>
>>> The main thing I think that remains as an issue is the colouring on the
>>> headers and menus - the former of which needs fixing somehow, the latter we
>>> were going to remove to de-clutter the UI anyway.
>>>
>> I can remove the icons from the context menus, and menus in 10 mins (if
>> you want).
>>
>
> Yes please.
>
>
>>
>> -- Thanks, Ashesh
>>
>>>
>>> On Mon, Sep 11, 2017 at 8:50 AM, Dave Page  wrote:
>>>
>>>> Agreed - these issues need to be resolved before we can proceed.
>>>>
>>>> Ashesh, please revert the patch for now.
>>>>
>>>> Chethana, please figure out what we need to change to resolve the
>>>> various issues raised. Iirc, we'd already decided to remove icons from the
>>>> menus right?
>>>>
>>>> On Mon, Sep 11, 2017 at 8:45 AM, Murtuza Zabuawala <
>>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I also observed few issues,
>>>>>
>>>>> 1) In my opinion, New icons looks dull in main header menu due to dark
>>>>> background, attaching screenshot for your reference.
>>>>>
>>>>> 2) Spacing issue between icons and label are inconsistent, attaching
>>>>> screenshot for your reference.
>>>>>
>>>>> 3) Icons with blue colour in them are not properly visible in context
>>>>> menu. For example "Trigger" icon is not visible when we hover over it
>>>>> because of same colour, attaching screenshot for your reference.
>>>>>
>>>>> 4) Are we considering different icons for Event triggers & Triggers?
>>>>> (They were same in pgAdmin3)
>>>>>
>>>>> 5) Icons for Casts modules are same, I mean collection icon and node
>>>>> icon, I think we need different icons to differentiate.
>>>>>
>>>>> 6) The width of bad-server-icon is more when compare with other icons,
>>>>> that makes it looks like a text document icon.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Murtuza Zabuawala
>>>>> EnterpriseDB: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>> [image: https://community.postgresrocks.net/]
>>>>> <https://community.postgresrocks.net/>
>>>>>
>>>>> On Mon, Sep 11, 2017 at 12:58 PM, Neel Patel <
>>>>> neel.pa...@enterprisedb.com> wrote:
>>>>>
>>>>>> Hi Dave,
>>>>>>
>>>>>> As far as I know, we replaced png icons with svg icons because - it
>>>>>> should work with all types of resolutions. The svg icon should not blur.
>>>>>> Here in my Linux system, I am using 1440*900(16:10) resolution and
>>>>>> most of the svg icons are blurred. Please find attach screenshot.
>>>>>>
>>>>>> Thoughts ?
>>>>>>
>>>>>> Thanks,
>>>>>> Neel Patel
>>>>>>
>>>>>> On Fri, Aug 25, 2017 at 5:14 PM, Dave Page  wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> Yes, that's my expectation. Hopefully they'll go in in the next week
>>>>>>> or so.
>>>>>>>
>>>>>>> On Fri, Aug 25, 2017 at 12:40 PM, Anthony DeBarros <
>>>>>>> adebar...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Dave and all,
>>&g

Re: pgAdmin4 - Tree view icons for final reveiw

2017-09-11 Thread Ashesh Vashi
On Mon, Sep 11, 2017 at 1:46 PM, Ashesh Vashi  wrote:

> Hi Dave,
>
> Please find the attached patch for not showing icons for menu items.
> I have not completely removed it, but - commented the code (will remove it
> in final patch).
>
We will need to remove the icons from the individual modules later as final
solution.

-- Thanks, Ashesh

>
> Please review, and commit it (if it looks good to you).
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> <http://www.enterprisedb.com>
>
>
> *http://www.linkedin.com/in/asheshvashi*
> <http://www.linkedin.com/in/asheshvashi>
>
> On Mon, Sep 11, 2017 at 1:30 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, Sep 11, 2017 at 8:59 AM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> On Mon, Sep 11, 2017 at 1:25 PM, Dave Page  wrote:
>>>
>>>> Hmm, scrub the revert - it looks like you just fixed a bunch of the
>>>> issues.
>>>>
>>> K.
>>>
>>>>
>>>> The main thing I think that remains as an issue is the colouring on the
>>>> headers and menus - the former of which needs fixing somehow, the latter we
>>>> were going to remove to de-clutter the UI anyway.
>>>>
>>> I can remove the icons from the context menus, and menus in 10 mins (if
>>> you want).
>>>
>>
>> Yes please.
>>
>>
>>>
>>> -- Thanks, Ashesh
>>>
>>>>
>>>> On Mon, Sep 11, 2017 at 8:50 AM, Dave Page  wrote:
>>>>
>>>>> Agreed - these issues need to be resolved before we can proceed.
>>>>>
>>>>> Ashesh, please revert the patch for now.
>>>>>
>>>>> Chethana, please figure out what we need to change to resolve the
>>>>> various issues raised. Iirc, we'd already decided to remove icons from the
>>>>> menus right?
>>>>>
>>>>> On Mon, Sep 11, 2017 at 8:45 AM, Murtuza Zabuawala <
>>>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I also observed few issues,
>>>>>>
>>>>>> 1) In my opinion, New icons looks dull in main header menu due to
>>>>>> dark background, attaching screenshot for your reference.
>>>>>>
>>>>>> 2) Spacing issue between icons and label are inconsistent, attaching
>>>>>> screenshot for your reference.
>>>>>>
>>>>>> 3) Icons with blue colour in them are not properly visible in context
>>>>>> menu. For example "Trigger" icon is not visible when we hover over it
>>>>>> because of same colour, attaching screenshot for your reference.
>>>>>>
>>>>>> 4) Are we considering different icons for Event triggers & Triggers?
>>>>>> (They were same in pgAdmin3)
>>>>>>
>>>>>> 5) Icons for Casts modules are same, I mean collection icon and node
>>>>>> icon, I think we need different icons to differentiate.
>>>>>>
>>>>>> 6) The width of bad-server-icon is more when compare with other
>>>>>> icons, that makes it looks like a text document icon.
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Murtuza Zabuawala
>>>>>> EnterpriseDB: http://www.enterprisedb.com
>>>>>> The Enterprise PostgreSQL Company
>>>>>>
>>>>>> [image: https://community.postgresrocks.net/]
>>>>>> <https://community.postgresrocks.net/>
>>>>>>
>>>>>> On Mon, Sep 11, 2017 at 12:58 PM, Neel Patel <
>>>>>> neel.pa...@enterprisedb.com> wrote:
>>>>>>
>>>>>>> Hi Dave,
>>>>>>>
>>>>>>> As far as I know, we replaced png icons with svg icons because - it
>>>>>>> should work with all types of resolutions. The svg icon should not blur.
>>>>>>> Here in my Linux system, I am using 1440*900(16:10) resolution and
>>>>>>> most of the svg icons are blurred. Please find attach screenshot.
>>>>>>>
>>>>>>> Thoughts ?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>

pgAdmin 4 commit: Using the svg icons for domain constraint, and server

2017-09-11 Thread Ashesh Vashi
Using the svg icons for domain constraint, and server browser nodes.

Branch
--
master

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

Modified Files
--
.../static/img/domain_constraints-bad.png | Bin 579 -> 0 bytes
.../static/img/domain_constraints-bad.svg |   1 +
.../domain_constraints/css/domain_constraints.css |   2 +-
.../browser/server_groups/servers/static/img/server.png   | Bin 553 -> 0 bytes
.../browser/server_groups/servers/static/img/server.svg   |   1 +
.../server_groups/servers/templates/css/servers.css   |   2 +-
6 files changed, 4 insertions(+), 2 deletions(-)



pgAdmin 4 commit: Handle the executor nodes, which are unknown to the E

2017-09-14 Thread Ashesh Vashi
Handle the executor nodes, which are unknown to the Explain module,
gracefully by showing the 'ex_unknown.png' for such nodes.

Reported by: Murtuza
Refs #2706

Branch
--
master

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

Modified Files
--
web/pgadmin/misc/static/explain/js/explain.js | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)



pgAdmin 4 commit: Enable webpackaging the pgadmin javascript files in d

2017-09-17 Thread Ashesh Vashi
Enable webpackaging the pgadmin javascript files in different small
modules, which can be referred from other modules.

We can have two types of webpack modules.
1. Reference (using the dll plugin of webpack)
   This type of webpack module can be referred from the other webpack
   modules. And, it will export the entry point for the javascript
   files, just like the so/dll (shared object/dynamic link library)
   file, which exports function & class entries. In the process, it
   creates a reference file, which can be referenced by another webpack
   module using the 'dll-reference' plugin. It allows us to share the
   javascript files between different webpack modules, and decrease the
   size of an individual webpack modules, which shares multiple
   javascript modules.

   This type of webpack module does not expose any entry, hence - no
   javascript gets executed directly, when it is loaded. In our case, a
   reference module can refer to file from another reference too. We
   just need to mention the name of the reference in the dependency
   list.

2. Entry (A regular webpack module)
   This type of webpack module exports the entry-point within it, and
   will always executes the javascript code from the entry point. In our
   case, we generally refer to multiple reference webpack modules.

We have created number of modules, based on size, functionalities, and
execution points, etc.

- codemirror (Entry)
  It imports all codemirror functionality used by pgAdmin in a single
  entry, and exports the CodeMirror object to be used directly by other
  javascript modules.

- react (Reference)
  It contains react, and react-dom in the single module to be referred
  by different entry modules.

- vendor (Reference)
  It contains all the vendor specific javascript modules (except for
  codemirror, react, react-dom, & slickgrid). And, will be referred
  almost all the entries, and references (except CodeMirror, & react).

- slickgrid (Entry)
  It contains all the slickgrid specific javascript modules, and some of
  custom formatters, and editors defined by pgAdmin itself, and exports
  the 'Slick' object.

- core (Reference)
  It contains all the core functionality defined by pgAdmin, and should
  be shared among different modules.

- nodes (Reference)
  It refers to all the nodes of pgAdmin.

- tools (Reference)
  It refers to all the tools of pgAdmin.

- app (Entry)
  It is the main app entry.

- tools_nodes (Entry)
  In order to load all the nodes, and tools, we need to load them some
  webpack entry, which is loaded as webpack entry as app at run time.

- sqleditor (Entry)
  As we need to load the sqleditor in a separate HTML page, we need
  separate webpack entry for the same.

- debugger (Entry)
  Same as sqleditor, debugger too loaded in a separate HTML page, we
  need separate webpack entry.

These, webpack modules, are exposed as AMD modules. It allows us to load
dynamically at runtime, and it resolves all our dependency issue without
much effort.

Earlier, all the webpack entries has its own set of images, fonts.
This approach resolves all that problem.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
.gitignore |   5 +-
web/package.json   |  18 +-
web/pgadmin/static/bundle/app.js   |  23 --
web/pgadmin/static/bundle/browser.js   |   5 -
web/pgadmin/static/bundle/codemirror.js|  19 -
web/pgadmin/static/bundle/slickgrid.js |  12 -
web/pgadmin/static/css/style.css   |  25 --
web/pgadmin/static/js/backform.pgadmin.js  |  41 +-
web/pgadmin/static/js/backgrid.pgadmin.js  |  37 +-
web/pgadmin/static/js/gettext.js   |   5 +-
web/pgadmin/static/js/selection/column_selector.js |   2 +-
.../static/js/selection/range_selection_helper.js  |   2 +-
web/pgadmin/static/js/selection/row_selector.js|   2 +-
.../static/js/selection/xcell_selection_model.js   |   3 +-
web/pgadmin/static/js/slickgrid/cell_selector.js   |   4 +-
web/pgadmin/templates/base.html|  33 +-
web/pgadmin/tools/__init__.py  |  20 +-
web/pgadmin/tools/datagrid/static/js/datagrid.js   |   2 +-
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |  53 ++-
.../static/jsx/history/detail/code_mirror.jsx  |   4 +-
.../jsx/history/detail/history_detail_query.jsx|   2 +-
web/pgadmin/utils/__init__.py  |   1 +
web/webpack.config.js  | 439 ++---
web/webpack.test.config.js |  11 +-
web/webpack/SourceMapDevToolPlugin.js  | 241 +++
web/webpack/build.js   | 154 
web/webpack/bundles/app.js |  14 +
web/webpack/bundles/browser.js 

pgAdmin 4 commit: Moving the sqleditor specific javascript/jsx files in

2017-09-17 Thread Ashesh Vashi
Moving the sqleditor specific javascript/jsx files into the
'pgadmin/tools/sqleditor/static' directory.

NOTE:
This has broken the compilation with the current webpack implementation,
which will be fixed in the upcoming commits.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
.../static/js/history/history_collection.js|  38 -
web/pgadmin/static/js/history/index.js |  14 --
.../static/jsx/history/detail/code_mirror.jsx  |  61 
.../jsx/history/detail/history_detail_message.jsx  |  33 -
.../jsx/history/detail/history_detail_metadata.jsx |  42 --
.../jsx/history/detail/history_detail_query.jsx|  71 --
.../jsx/history/detail/history_error_message.jsx   |  30 
web/pgadmin/static/jsx/history/query_history.jsx   | 111 ---
.../static/jsx/history/query_history_detail.jsx|  52 ---
.../static/jsx/history/query_history_entries.jsx   | 156 -
.../static/jsx/history/query_history_entry.jsx |  58 
.../jsx/history/query_history_entry_date_group.jsx |  46 --
web/pgadmin/static/jsx/react_shapes.jsx|  31 
web/pgadmin/tools/sqleditor/__init__.py|   8 --
.../static/js/history/history_collection.js|  38 +
.../tools/sqleditor/static/js/history/index.js |  14 ++
.../static/jsx/history/detail/code_mirror.jsx  |  61 
.../jsx/history/detail/history_detail_message.jsx  |  33 +
.../jsx/history/detail/history_detail_metadata.jsx |  42 ++
.../jsx/history/detail/history_detail_query.jsx|  71 ++
.../jsx/history/detail/history_error_message.jsx   |  30 
.../sqleditor/static/jsx/history/query_history.jsx | 111 +++
.../static/jsx/history/query_history_detail.jsx|  52 +++
.../static/jsx/history/query_history_entries.jsx   | 156 +
.../static/jsx/history/query_history_entry.jsx |  58 
.../jsx/history/query_history_entry_date_group.jsx |  46 ++
.../tools/sqleditor/static/jsx/react_shapes.jsx|  31 
27 files changed, 743 insertions(+), 751 deletions(-)



pgAdmin 4 commit: Moved the webcabin-docker in the 'web/pgadmin/static/

2017-09-17 Thread Ashesh Vashi
Moved the webcabin-docker in the 'web/pgadmin/static/vendor' directory to 
resolve a possible issue, when we created webpack reference for vendor.

webcabin-docker uses the jquery.1.11.1 as hard dependency, and latest jquery 
for 1.11.2 is available as npm, and which is used by us. Webpack reference will 
have two different set of jquery in it. Hence - vendorizing the webcabin-docker 
will allow us to change the package.json of it, and will resolve the possible 
issue.

Also - upgraded some packages in package.json to resolve the deprecation 
message during package installation using yarn.
i.e.
babel-loader -> ^7.1
extract-text-webpack-plugin -> ^3.0
karma-phantomjs-launcher -> ^1.0.4
karma-webpack -> ^2.0.4
phantomjs-prebuilt -> ^2.1.15

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/package.json   |15 +-
.../vendor/webcabin-docker/Build/Docs/base.js.html |   309 +
.../webcabin-docker/Build/Docs/collapser.js.html   |   433 +
.../webcabin-docker/Build/Docs/docker.js.html  |  3070 +++
.../webcabin-docker/Build/Docs/docker.jsdoc.html   |   378 +
.../webcabin-docker/Build/Docs/drawer.js.html  |   535 +
.../webcabin-docker/Build/Docs/ext.jsdoc.html  |   293 +
.../Build/Docs/external-domNode.html   |   338 +
.../Build/Docs/external-jQuery.html|   606 +
.../webcabin-docker/Build/Docs/externals.list.html |   526 +
.../Docs/fonts/glyphicons-halflings-regular.eot|   Bin 0 -> 20127 bytes
.../Docs/fonts/glyphicons-halflings-regular.svg|   288 +
.../Docs/fonts/glyphicons-halflings-regular.ttf|   Bin 0 -> 45404 bytes
.../Docs/fonts/glyphicons-halflings-regular.woff   |   Bin 0 -> 23424 bytes
.../Docs/fonts/glyphicons-halflings-regular.woff2  |   Bin 0 -> 18028 bytes
.../webcabin-docker/Build/Docs/frame.js.html   |  1463 +
.../webcabin-docker/Build/Docs/ghost.js.html   |   488 +
.../webcabin-docker/Build/Docs/iframe.js.html  |   624 +
.../Build/Docs/img/glyphicons-halflings-white.png  |   Bin 0 -> 8777 bytes
.../Build/Docs/img/glyphicons-halflings.png|   Bin 0 -> 12799 bytes
.../vendor/webcabin-docker/Build/Docs/index.html   |   449 +
.../webcabin-docker/Build/Docs/layout.js.html  |   662 +
.../Build/Docs/layoutsimple.js.html|   299 +
.../webcabin-docker/Build/Docs/layouttable.js.html |   611 +
.../webcabin-docker/Build/Docs/module-wcBase.html  |  1025 +
.../Build/Docs/module-wcCollapser.html |  1118 +
.../Build/Docs/module-wcDocker.html| 10028 +++
.../Build/Docs/module-wcDrawer.html|  1067 +
.../webcabin-docker/Build/Docs/module-wcFrame.html |  2566 ++
.../webcabin-docker/Build/Docs/module-wcGhost.html |  1094 +
.../Build/Docs/module-wcIFrame.html|  1678 ++
.../Build/Docs/module-wcLayout.html|   686 +
.../Build/Docs/module-wcLayoutSimple.html  |   564 +
.../Build/Docs/module-wcLayoutTable.html   |  2600 ++
.../webcabin-docker/Build/Docs/module-wcPanel.html |  6499 +
.../Build/Docs/module-wcSplitter.html  |  3068 +++
.../Build/Docs/module-wcTabFrame.html  |  3552 +++
.../webcabin-docker/Build/Docs/modules.list.html   |   526 +
.../webcabin-docker/Build/Docs/panel.js.html   |  1255 +
.../webcabin-docker/Build/Docs/quicksearch.html|31 +
.../Build/Docs/scripts/docstrap.lib.js |11 +
.../Build/Docs/scripts/fulltext-search-ui.js   |89 +
.../Build/Docs/scripts/fulltext-search.js  |36 +
.../webcabin-docker/Build/Docs/scripts/lunr.min.js | 6 +
.../Docs/scripts/prettify/Apache-License-2.0.txt   |   202 +
.../Build/Docs/scripts/prettify/jquery.min.js  | 6 +
.../Build/Docs/scripts/prettify/lang-css.js|21 +
.../Build/Docs/scripts/prettify/prettify.js|   496 +
.../webcabin-docker/Build/Docs/scripts/sunlight.js |  1157 +
.../webcabin-docker/Build/Docs/scripts/toc.js  |   215 +
.../webcabin-docker/Build/Docs/splitter.js.html|  1022 +
.../Build/Docs/styles/darkstrap.css|   960 +
.../Build/Docs/styles/prettify-tomorrow.css|   132 +
.../Build/Docs/styles/site.cerulean.css|  7008 +
.../Build/Docs/styles/site.cosmo.css   |  7061 +
.../Build/Docs/styles/site.cyborg.css  |  7051 +
.../Build/Docs/styles/site.darkly.css  |  7171 +
.../Build/Docs/styles/site.darkstrap.css   |  5638 
.../Build/Docs/styles/site.dibs-bootstrap.css  |  5899 
.../Build/Docs/styles/site.flatly.css  |  7147 +
.../Build/Docs/styles/site.journal.css |  6973 +
.../Build/Docs/styles/site.lumen.css   |  7298 +
.../Build/Docs/styles/site.paper.css   |  7623 ++
.../Build/Docs/styles/site.readable.css|  6997 +
.../Build/Doc

pgAdmin 4 commit: Extending the tools, and miscellaneous javascript mod

2017-09-17 Thread Ashesh Vashi
Extending the tools, and miscellaneous javascript modules from the
browser tools.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/misc/bgprocess/static/js/bgprocess.js  |  2 +-
web/pgadmin/misc/depends/static/js/depends.js  | 13 +-
.../misc/file_manager/static/js/file_manager.js| 10 
web/pgadmin/misc/sql/static/js/sql.js  | 16 ++---
.../misc/statistics/static/js/statistics.js| 18 ++
web/pgadmin/tools/backup/static/js/backup.js   | 28 --
web/pgadmin/tools/datagrid/static/js/datagrid.js   | 22 ++---
.../tools/datagrid/templates/datagrid/index.html   |  2 +-
web/pgadmin/tools/debugger/static/js/debugger.js   | 26 
.../tools/debugger/static/js/debugger_ui.js| 27 -
web/pgadmin/tools/debugger/static/js/direct.js | 13 +-
.../tools/debugger/templates/debugger/direct.html  |  2 +-
.../tools/grant_wizard/static/js/grant_wizard.js   | 19 ---
.../tools/import_export/static/js/import_export.js | 23 ++
.../tools/maintenance/static/js/maintenance.js | 19 +++
web/pgadmin/tools/restore/static/js/restore.js | 18 +++---
.../user_management/static/js/user_management.js   | 18 +++---
17 files changed, 147 insertions(+), 129 deletions(-)



pgAdmin 4 commit: No longer using the 'get_own_javascripts' method for

2017-09-17 Thread Ashesh Vashi
No longer using the 'get_own_javascripts' method for refering the
javascript modules exposed through a module, instead added them in the
webpack (shim) configuration directly.

Instead - exposed a new method - 'get_javascript_entries' to be used
later by the new implementation of the webpack configuration. It will
utilize it to refer it as pluggable javascript module entry for any
particular module. It will allow us to reintroduce the pluggable
architecture.

Introduce a new browser tools javascript module, and will act as base
class for all tools, which needs to be registerd with the browser for
better initialization, and integration.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/__init__.py|  11 ++
web/pgadmin/about/__init__.py  |   9 +-
web/pgadmin/browser/__init__.py| 210 +
web/pgadmin/browser/collection.py  |  32 +---
.../browser/server_groups/servers/__init__.py  |  27 +--
.../servers/databases/schemas/tables/__init__.py   |  13 +-
.../schemas/tables/rules/static/js/rule.js |   7 +-
.../databases/schemas/views/static/js/mview.js |   7 +-
.../databases/schemas/views/static/js/view.js  |  10 +-
.../server_groups/static/js/server_group.js|   3 +-
web/pgadmin/browser/static/js/browser.js   |  48 +++--
web/pgadmin/browser/static/js/frame.js |   3 +-
web/pgadmin/browser/static/js/menu.js  |  12 +-
web/pgadmin/browser/static/js/node.js  |  48 +++--
web/pgadmin/browser/static/js/panel.js |   3 +-
web/pgadmin/browser/static/js/tools.js |  30 +++
web/pgadmin/browser/templates/browser/index.html   |  37 ++--
.../browser/templates/browser/js/messages.js   |   8 +-
web/pgadmin/browser/templates/browser/js/utils.js  |  76 +++-
web/pgadmin/dashboard/__init__.py  |   7 -
web/pgadmin/misc/__init__.py   |  13 --
web/pgadmin/misc/bgprocess/__init__.py |   6 -
web/pgadmin/misc/depends/__init__.py   |  13 +-
web/pgadmin/misc/file_manager/__init__.py  |   9 -
web/pgadmin/misc/sql/__init__.py   |  13 +-
web/pgadmin/misc/statistics/__init__.py|  21 +--
web/pgadmin/preferences/__init__.py|   7 -
web/pgadmin/settings/__init__.py   |   8 +-
web/pgadmin/tools/__init__.py  |  34 +---
web/pgadmin/tools/backup/__init__.py   |  14 +-
web/pgadmin/tools/datagrid/__init__.py |  15 +-
web/pgadmin/tools/debugger/__init__.py |  38 ++--
web/pgadmin/tools/grant_wizard/__init__.py |  17 --
web/pgadmin/tools/import_export/__init__.py|  20 +-
web/pgadmin/tools/maintenance/__init__.py  |  20 +-
web/pgadmin/tools/restore/__init__.py  |  14 +-
web/pgadmin/tools/user_management/__init__.py  |  19 +-
web/pgadmin/utils/__init__.py  |  52 ++---
38 files changed, 254 insertions(+), 680 deletions(-)



pgAdmin 4 commit: Handle the executor nodes, which are unknown to the E

2017-09-17 Thread Ashesh Vashi
Handle the executor nodes, which are unknown to the Explain module,
gracefully by showing the 'ex_unknown.png' for such nodes.

Reported by: Murtuza
Refs #2706

Branches

WEBPACK_DEVEL
master

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

Modified Files
--
web/pgadmin/misc/static/explain/js/explain.js | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)



pgAdmin 4 commit: Do not run javascript bundler, when BUILD_JSMODULES i

2017-09-17 Thread Ashesh Vashi
Do not run javascript bundler, when BUILD_JSMODULES is set to False in
the config file.

In that case - we should run the webpack in wait mode in a separate
console/terminal/command-prompt.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/utils/javascript/javascript_bundler.py | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)



pgAdmin 4 commit: Expose the register_module_initializer, and register_

2017-09-17 Thread Ashesh Vashi
Expose the register_module_initializer, and register_module in the
pgAdmin javascript module to allow to register any javascript modules as
part of any javascript module entry, and initialize them.

Branch
--
WEBPACK_DEVEL

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

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



pgAdmin 4 commit: Updating the packing, and ci test scripts as per chan

2017-09-17 Thread Ashesh Vashi
Updating the packing, and ci test scripts as per changes in the webpack 
implementation.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
Make-MinGW.bat  | 2 +-
Make.bat| 2 +-
Makefile| 2 +-
README  | 2 ++
ci/run_feature_tests.sh | 2 +-
ci/run_python_tests.sh  | 6 ++
pkg/mac/build.sh| 4 +++-
pkg/pip/build.sh| 4 ++--
pkg/src/build.sh| 4 ++--
9 files changed, 19 insertions(+), 9 deletions(-)



pgAdmin 4 commit: Fixed the jasmine tests regression due to changes in

2017-09-17 Thread Ashesh Vashi
Fixed the jasmine tests regression due to changes in the webpacking
implementation.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/karma.conf.js  |  3 +--
web/regression/feature_utils/pgadmin_page.py   | 11 ---
web/regression/javascript/code_mirror_spec.jsx |  4 ++--
.../javascript/history/history_collection_spec.js  |  4 ++--
web/regression/javascript/history/query_history_spec.jsx   | 14 +++---
5 files changed, 20 insertions(+), 16 deletions(-)



pgAdmin 4 commit: Add capability to print the javascript console errors

2017-09-17 Thread Ashesh Vashi
Add capability to print the javascript console errors, and warnings on
stderr (standard error) for the feature tests.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/regression/feature_utils/base_feature_test.py | 10 ++
web/regression/runtests.py|  5 -
2 files changed, 14 insertions(+), 1 deletion(-)



pgAdmin 4 commit: Fix filtering of system schemas so pg_* is hidden but

2017-09-18 Thread Ashesh Vashi
Fix filtering of system schemas so pg_* is hidden but pg* is not. Fixes #2709

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
.../templates/foreign_tables/sql/macros/db_catalogs.macro | 2 +-
.../tables/templates/partition/sql/10_plus/get_attach_tables.sql  | 4 ++--
.../schemas/tables/templates/partition/sql/10_plus/properties.sql | 2 +-
.../schemas/tables/templates/table/sql/10_plus/get_inherits.sql   | 4 ++--
.../schemas/tables/templates/table/sql/10_plus/properties.sql | 2 +-
.../schemas/tables/templates/table/sql/9.1_plus/properties.sql| 2 +-
.../schemas/tables/templates/table/sql/default/get_inherits.sql   | 4 ++--
.../tables/templates/table/sql/default/get_tables_for_constraints.sql | 4 ++--
.../schemas/tables/templates/table/sql/default/properties.sql | 4 ++--
.../schemas/tables/templates/table/sql/gpdb_5.0_plus/properties.sql   | 2 +-
.../schemas/tables/templates/table/sql/macros/db_catalogs.macro   | 4 ++--
.../tables/templates/trigger/sql/default/get_triggerfunctions.sql | 2 +-
.../databases/schemas/templates/schema/gpdb_5.0_plus/sql/nodes.sql| 2 +-
.../databases/schemas/templates/schema/pg/9.2_plus/sql/nodes.sql  | 2 +-
.../databases/schemas/templates/schema/pg/default/sql/nodes.sql   | 2 +-
.../databases/schemas/templates/schema/ppas/9.1_plus/sql/nodes.sql| 2 +-
.../databases/schemas/templates/schema/ppas/9.2_plus/sql/nodes.sql| 2 +-
.../templates/grant_wizard/pg/9.1_plus/sql/get_schemas.sql| 2 +-
.../templates/grant_wizard/ppas/9.1_plus/sql/get_schemas.sql  | 2 +-
19 files changed, 25 insertions(+), 25 deletions(-)



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

2017-09-18 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=4035fab6e7d1bcbd84115a963072b3de5be25485
Author: Surinder Kumar 

Modified Files
--
web/package.json   |  1 +
.../static/jsx/history/query_history_entries.jsx   |  7 +++--
.../static/jsx/history/query_history_entry.jsx |  5 ++--
.../jsx/history/query_history_entry_date_group.jsx |  3 +-
.../tools/sqleditor/static/jsx/react_shapes.jsx| 23 
web/yarn.lock  | 32 --
6 files changed, 40 insertions(+), 31 deletions(-)



pgAdmin 4 commit: Fix menu left-hand margin.

2017-09-18 Thread Ashesh Vashi
Fix menu left-hand margin.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/static/css/bootstrap.overrides.css | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)



pgAdmin 4 commit: Changed array representation and formatting for the d

2017-09-18 Thread Ashesh Vashi
Changed array representation and formatting for the data types in Query Tool 
and View Data. Fixes #2671

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=79e6e11668e7762f1f2759091eb109cbfa9f4932
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/feature_tests/test_data.json   |  13 +-
web/pgadmin/feature_tests/view_data_dml_queries.py |  23 +--
web/pgadmin/static/js/slickgrid/editors.js | 165 +
web/pgadmin/static/js/slickgrid/formatters.js  | 151 ++-
web/pgadmin/tools/sqleditor/command.py |  70 +
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |  72 ++---
.../templates/sqleditor/sql/default/insert.sql |  12 +-
.../templates/sqleditor/sql/default/update.sql |  12 +-
web/pgadmin/utils/driver/psycopg2/__init__.py  |  77 +++---
9 files changed, 424 insertions(+), 171 deletions(-)



pgAdmin 4 commit: Replace the "Roboto" font family with "Open Sans" for

2017-09-18 Thread Ashesh Vashi
Replace the "Roboto" font family with "Open Sans" for alertify dialogs.

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=0b5b684652293ba85138f0d9d02f9cab5d8e37f6
Author: Atul Sharma 

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



pgAdmin 4 commit: Ensure builtins.SERVER_MODE is set in the WSGI wrappe

2017-09-18 Thread Ashesh Vashi
Ensure builtins.SERVER_MODE is set in the WSGI wrapper.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgAdmin4.wsgi | 8 
1 file changed, 8 insertions(+)



pgAdmin 4 commit: Bump version for RC2 release.

2017-09-18 Thread Ashesh Vashi
Bump version for RC2 release.

Branch
--
WEBPACK_DEVEL

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

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



pgAdmin 4 commit: Remove unused import that was causing a hard error on

2017-09-18 Thread Ashesh Vashi
Remove unused import that was causing a hard error on Windows

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/tools/sqleditor/static/jsx/react_shapes.jsx | 1 -
1 file changed, 1 deletion(-)



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

2017-09-18 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=c6c9ae9853ce53c5cbb147f7c319378f3891977d
Author: Murtuza Zabuawala 

Modified Files
--
.../schemas/tables/triggers/static/js/trigger.js   | 24 +++---
1 file changed, 12 insertions(+), 12 deletions(-)



pgAdmin 4 commit: Correct alignment of the X button on dismissable aler

2017-09-18 Thread Ashesh Vashi
Correct alignment of the X button on dismissable alerts.

Branch
--
WEBPACK_DEVEL

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

Modified Files
--
web/pgadmin/static/css/bootstrap.overrides.css | 5 +
1 file changed, 5 insertions(+)



pgAdmin 4 commit: Fix View Data option and column config for Foreign Ta

2017-09-18 Thread Ashesh Vashi
Fix View Data option and column config for Foreign Tables. Fixes #2691

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=c9897d46debb22061a2044954852da9fa8e5eb2e
Author: Akshay Joshi 

Modified Files
--
.../databases/schemas/foreign_tables/static/js/foreign_table.js   | 8 
web/pgadmin/tools/datagrid/static/js/datagrid.js  | 2 +-
web/pgadmin/tools/sqleditor/command.py| 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)



pgAdmin 4 commit: Fix user manager role handling. Fixes #2641

2017-09-18 Thread Ashesh Vashi
Fix user manager role handling. Fixes #2641

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=6fbaaf3d06ec3a8d4fc83fd7691f02aac8e9d78d
Author: Harshal Dhumal 

Modified Files
--
.../user_management/static/js/user_management.js   | 24 --
1 file changed, 18 insertions(+), 6 deletions(-)



pgAdmin 4 commit: Fix for Exception when the server is restarted. Fixes

2017-09-18 Thread Ashesh Vashi
Fix for Exception when the server is restarted. Fixes #2713

This issue was caused because we recently added session_write_delay in session.
So session won't be written/updated to disk from memory until specified seconds 
are elapsed.

However we must forcefully write/update session to disk if user loges in or out 
irrespective of session_write_delay to keep sessions from memory and disk in 
sync as user logged in status is kept in session.

Branch
--
WEBPACK_DEVEL

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=134fde54fe8125889542908c47fffe4e176af6fc
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/__init__.py  | 7 +--
web/pgadmin/utils/session.py | 4 +++-
2 files changed, 8 insertions(+), 3 deletions(-)



  1   2   3   4   5   6   >