Re: Can someone tell me what this code does ?

2017-08-09 Thread Murtuza Zabuawala
Yes, you are correct, at a moment that's all it does.

On Tue, Aug 8, 2017 at 6:37 PM, Dave Cramer  wrote:

> Hi,
>
> I guess my question was a bit vague. I get that it loads drivers. But note
> it does not actually put them anywhere.
>
> First it creates a dict
> sets the attribute in the app
> loads the drivers dynamically
> and returns an empty dict.
>
> From what I can tell this:
>
> DriverRegistry.load_drivers()
>
> is all it does?
>
>
>
>
>
>
> Dave Cramer
>
> On 7 August 2017 at 23:35, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi,
>>
>> This piece of code allow us to dynamically import all the available
>> driver modules from '../utils/driver/' directory into our application.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> [image: https://community.postgresrocks.net/]
>> 
>>
>> On Tue, Aug 8, 2017 at 4:20 AM, Dave Cramer  wrote:
>>
>>> I'm fairly new to Python so excuse my naiveté.
>>>
>>> This code: in web/pgadmin/utils/driver/__init__.py  does not appear to
>>> load the drivers into the drivers dictionary ? Or am I missing something
>>>
>>> def init_app(app):
>>> drivers = dict()
>>>
>>> setattr(app, '_pgadmin_server_drivers', drivers)
>>> DriverRegistry.load_drivers()
>>>
>>> return drivers
>>>
>>>
>>>
>>> Dave Cramer
>>>
>>
>>
>


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

2017-08-09 Thread Sarah McAlear
Hi Surinder!

I am not able to see anything different from what I see on Master with or
without the patch applied. I tried adjusting the preferences. I did update
the dashboard.js to instantiate a new object, great idea!

Thanks,
Sarah



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

> Hi Wenlin,
>
> On Tue, Aug 8, 2017 at 3:15 PM, Wenlin Zhang  wrote:
>
>> Hi Surinder,
>>
>>Thanks for your review.
>>
>>We have changed the indentation for _dashboard.scss file and also
>> removed the style about icon-postgres:before, like margin-top,etc, but
>> we are not sure if it is perfectly aligned now, you can add further change
>> to it.
>>
>> As the second comment, I'm sorry I'm not sure what's the problem,
>> could you please clarify it? Because we replace css with scss right now,
>> dashboard.css doesn't exist. So maybe you are looking at the css file that
>> are complied by the scss?
>>
> ​Sorry I​ typed 'dashboard.css' instead of 'dashboard.js'.
> ​In dashboard.js can we change `return DashboardAlert;` to `return new
> DashboardAlert();`
> and then we can remove the instances being created(var alertDashboard =
> new AlertDashboard();) from dashboard.js, and simply
> use `AlertDashboard.info('message')`.
>
>
>> For the fourth comment, we tried the steps you suggested on master
>> branch, the error is not shown either. So it should be an existing issue.
>> But if you want to see the error message, navigate to "Servers" at the top
>> of browser, then navigate back to postgresql server, then you will see the
>> error message.
>>
> ​The error in console will appear when you selected a database which is
> connected and stop the backend Python server because the request for graphs
> for database level will fail and there is no response returned from server.
> It might be not reproducible to you If you set the refresh rate to higher
> value (i.e. Preferences > Graphs) in preferences. Just set refresh rate to
> 1 for all dashboard graphs and repeat the steps.
>
>>
>>
>> Thanks,
>>
>> Wenlin &Violet
>>
>>
>>
>> On Mon, Aug 7, 2017 at 2:30 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi
>>> Review comments:
>>>
>>>1.
>>>
>>>For consistency, we use two spaces for indentation in CSS files.
>>>Four spaces are used in _dashboard.scss file. The configurations are
>>>defined in web/.editorconfig file.
>>>2.
>>>
>>>In,dashboard.css Can we return function object in return instead of
>>>function class itself, this will eliminate the need of creating function
>>>object every time we use info and error?
>>>3.
>>>
>>>On Dashboard, I can see Postgres icon is misaligned compared to
>>>other icons in Getting Started section. It is not related to this
>>>patch. adjusting margin top will fix it.
>>>4.
>>>
>>>I tried to test out Error message displayed, but I encounter an
>>>error(screenshot attached).
>>>Steps to reproduce:
>>>   - Open pgAdmin4 in browser
>>>   - Connect to PostgreSQL Server, Keep dashboard tab open.
>>>   - Navigate to the database which is connected.
>>>   - Now disconnect pgAdmin4 python server.
>>>   ​
>>>
>>> ​Here I mean Stop Python server. I​
>
>
>>
>>>1.
>>>   - ​
>>>   - No error message is displayed on Dashboard because it breaks in
>>>   JS as xhr.responseText is empty.
>>>   However, it might be an existing issue.
>>>
>>> Thanks,
>>> Surinder
>>>
>>> On Mon, Aug 7, 2017 at 10:40 AM, Wenlin Zhang  wrote:
>>>
>>> Hi Ashesh,

 That's correct. This patch just changed alert style in the 'tabs',
 such as Dependency and Dependents.

 Thanks

 Wenlin

 On Mon, Aug 7, 2017 at 12:51 PM, Ashesh Vashi <
 ashesh.va...@enterprisedb.com> wrote:

> 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.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
>>>
>>>
>>>
>>
>
 ​
>>>
>>
>>
>
diff --git a/web/pgadmin/browser/static/js/browser.js 
b/web/pgadmin/browser/static/js/browser.js
index 45939b00..23d1d50e 100644
--- a/web/p

[pgadmin4] unable to pull remote

2017-08-09 Thread Sarah McAlear
Hi Hackers!

We noticed that as of some time today (it worked this morning) we are
unable to pull git.postgresql.org/git/pgadmin4.git. Is this a known issue?
Our other repos seem to work fine still.

Thanks,
Sarah


Re: [pgadmin4] unable to pull remote

2017-08-09 Thread Harshal Dhumal
hi

Change below url in your git config
from *git://git.postgresql.org/git/pgadmin4.git
* to
*http://git.postgresql.org/git/pgadmin4.git
*



-- 
*Harshal Dhumal*
*Sr. Software Engineer*

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

On Wed, Aug 9, 2017 at 2:39 PM, Sarah McAlear  wrote:

> Hi Hackers!
>
> We noticed that as of some time today (it worked this morning) we are
> unable to pull git.postgresql.org/git/pgadmin4.git. Is this a known
> issue? Our other repos seem to work fine still.
>
> Thanks,
> Sarah
>


Re: [pgadmin4] unable to pull remote

2017-08-09 Thread Sarah McAlear
Great, thank you!

On Wed, Aug 9, 2017 at 5:26 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> hi
>
> Change below url in your git config
> from *git://git.postgresql.org/git/pgadmin4.git
> * to  
> *http://git.postgresql.org/git/pgadmin4.git
> *
>
>
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Aug 9, 2017 at 2:39 PM, Sarah McAlear  wrote:
>
>> Hi Hackers!
>>
>> We noticed that as of some time today (it worked this morning) we are
>> unable to pull git.postgresql.org/git/pgadmin4.git. Is this a known
>> issue? Our other repos seem to work fine still.
>>
>> Thanks,
>> Sarah
>>
>
>


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

2017-08-09 Thread Harshal Dhumal
On Fri, Aug 4, 2017 at 6:32 PM, Ashesh Vashi 
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,


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


Re: [gpAdmin4][patch] query history updates

2017-08-09 Thread Khushboo Vashi
Hi,

The patch looks good to me.
The feature test for the QueryToolJourneyTest still fails on my Ubuntu
machine with/without this patch
,
but works on Mac.

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
>>> 
>>>
>>> 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] unable to pull remote

2017-08-09 Thread Magnus Hagander
Hi!

Did that actually fix it?

I've noticed a couple of other jobs complaining about the git server, but
so far I was under the impression that it was a specific upstream network
that had issues. BUt if switching to http fixed it, then that's not it, and
I have something else to investigate.

Also as a note -- it should be https and not http. If you use http it will
generate redirects so it will work, but you both miss out on the security
and will get lower performance because it will be more requests.

//Magnus


On Wed, Aug 9, 2017 at 11:30 AM, Sarah McAlear  wrote:

> Great, thank you!
>
> On Wed, Aug 9, 2017 at 5:26 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> hi
>>
>> Change below url in your git config
>> from *git://git.postgresql.org/git/pgadmin4.git
>> * to  
>> *http://git.postgresql.org/git/pgadmin4.git
>> *
>>
>>
>>
>> --
>> *Harshal Dhumal*
>> *Sr. Software Engineer*
>>
>> EnterpriseDB India: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Aug 9, 2017 at 2:39 PM, Sarah McAlear 
>> wrote:
>>
>>> Hi Hackers!
>>>
>>> We noticed that as of some time today (it worked this morning) we are
>>> unable to pull git.postgresql.org/git/pgadmin4.git. Is this a known
>>> issue? Our other repos seem to work fine still.
>>>
>>> Thanks,
>>> Sarah
>>>
>>
>>
>


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


Re: [pgadmin4] unable to pull remote

2017-08-09 Thread Sarah McAlear
Hi!

Yes, this did fix it for us, but we did use https instead.

Thanks!
Matt & Sarah

On Wed, Aug 9, 2017 at 6:19 PM, Magnus Hagander  wrote:

> Hi!
>
> Did that actually fix it?
>
> I've noticed a couple of other jobs complaining about the git server, but
> so far I was under the impression that it was a specific upstream network
> that had issues. BUt if switching to http fixed it, then that's not it, and
> I have something else to investigate.
>
> Also as a note -- it should be https and not http. If you use http it will
> generate redirects so it will work, but you both miss out on the security
> and will get lower performance because it will be more requests.
>
> //Magnus
>
>
> On Wed, Aug 9, 2017 at 11:30 AM, Sarah McAlear 
> wrote:
>
>> Great, thank you!
>>
>> On Wed, Aug 9, 2017 at 5:26 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> hi
>>>
>>> Change below url in your git config
>>> from *git://git.postgresql.org/git/pgadmin4.git
>>> * to  
>>> *http://git.postgresql.org/git/pgadmin4.git
>>> *
>>>
>>>
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Sr. Software Engineer*
>>>
>>> EnterpriseDB India: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Wed, Aug 9, 2017 at 2:39 PM, Sarah McAlear 
>>> wrote:
>>>
 Hi Hackers!

 We noticed that as of some time today (it worked this morning) we are
 unable to pull git.postgresql.org/git/pgadmin4.git. Is this a known
 issue? Our other repos seem to work fine still.

 Thanks,
 Sarah

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


Re: [pgadmin4] unable to pull remote

2017-08-09 Thread Magnus Hagander
Hi!

Thanks for confirming!

I have now also found and fixed the git:// URL issue so anybody else still
using those should be back to working. But there is no reason for you to
switch back.

//Magnus

On Wed, Aug 9, 2017 at 12:37 PM, Sarah McAlear  wrote:

> Hi!
>
> Yes, this did fix it for us, but we did use https instead.
>
> Thanks!
> Matt & Sarah
>
> On Wed, Aug 9, 2017 at 6:19 PM, Magnus Hagander 
> wrote:
>
>> Hi!
>>
>> Did that actually fix it?
>>
>> I've noticed a couple of other jobs complaining about the git server, but
>> so far I was under the impression that it was a specific upstream network
>> that had issues. BUt if switching to http fixed it, then that's not it, and
>> I have something else to investigate.
>>
>> Also as a note -- it should be https and not http. If you use http it
>> will generate redirects so it will work, but you both miss out on the
>> security and will get lower performance because it will be more requests.
>>
>> //Magnus
>>
>>
>> On Wed, Aug 9, 2017 at 11:30 AM, Sarah McAlear 
>> wrote:
>>
>>> Great, thank you!
>>>
>>> On Wed, Aug 9, 2017 at 5:26 PM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 hi

 Change below url in your git config
 from *git://git.postgresql.org/git/pgadmin4.git
 * to  
 *http://git.postgresql.org/git/pgadmin4.git
 *



 --
 *Harshal Dhumal*
 *Sr. Software Engineer*

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

 On Wed, Aug 9, 2017 at 2:39 PM, Sarah McAlear 
 wrote:

> Hi Hackers!
>
> We noticed that as of some time today (it worked this morning) we are
> unable to pull git.postgresql.org/git/pgadmin4.git. Is this a known
> issue? Our other repos seem to work fine still.
>
> Thanks,
> Sarah
>


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


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


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

2017-08-09 Thread Sarah McAlear
As discussed with Surinder, we have created a Redmine ticket for his 4th
comment regarding the error message not showing up when the app can't be
reached. This issue existed prior to this patch and should be prioritized.

https://redmine.postgresql.org/issues/2640

Thanks!
Matt & Sarah

On Wed, Aug 9, 2017 at 4:06 PM, Sarah McAlear  wrote:

> Hi Surinder!
>
> I am not able to see anything different from what I see on Master with or
> without the patch applied. I tried adjusting the preferences. I did update
> the dashboard.js to instantiate a new object, great idea!
>
> Thanks,
> Sarah
>
>
>
> On Wed, Aug 9, 2017 at 1:42 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi Wenlin,
>>
>> On Tue, Aug 8, 2017 at 3:15 PM, Wenlin Zhang  wrote:
>>
>>> Hi Surinder,
>>>
>>>Thanks for your review.
>>>
>>>We have changed the indentation for _dashboard.scss file and also
>>> removed the style about icon-postgres:before, like margin-top,etc, but
>>> we are not sure if it is perfectly aligned now, you can add further change
>>> to it.
>>>
>>> As the second comment, I'm sorry I'm not sure what's the problem,
>>> could you please clarify it? Because we replace css with scss right now,
>>> dashboard.css doesn't exist. So maybe you are looking at the css file that
>>> are complied by the scss?
>>>
>> ​Sorry I​ typed 'dashboard.css' instead of 'dashboard.js'.
>> ​In dashboard.js can we change `return DashboardAlert;` to `return new
>> DashboardAlert();`
>> and then we can remove the instances being created(var alertDashboard =
>> new AlertDashboard();) from dashboard.js, and simply
>> use `AlertDashboard.info('message')`.
>>
>>
>>> For the fourth comment, we tried the steps you suggested on master
>>> branch, the error is not shown either. So it should be an existing issue.
>>> But if you want to see the error message, navigate to "Servers" at the top
>>> of browser, then navigate back to postgresql server, then you will see the
>>> error message.
>>>
>> ​The error in console will appear when you selected a database which is
>> connected and stop the backend Python server because the request for graphs
>> for database level will fail and there is no response returned from server.
>> It might be not reproducible to you If you set the refresh rate to higher
>> value (i.e. Preferences > Graphs) in preferences. Just set refresh rate to
>> 1 for all dashboard graphs and repeat the steps.
>>
>>>
>>>
>>> Thanks,
>>>
>>> Wenlin &Violet
>>>
>>>
>>>
>>> On Mon, Aug 7, 2017 at 2:30 PM, Surinder Kumar <
>>> surinder.ku...@enterprisedb.com> wrote:
>>>
 Hi
 Review comments:

1.

For consistency, we use two spaces for indentation in CSS files.
Four spaces are used in _dashboard.scss file. The configurations
are defined in web/.editorconfig file.
2.

In,dashboard.css Can we return function object in return instead of
function class itself, this will eliminate the need of creating function
object every time we use info and error?
3.

On Dashboard, I can see Postgres icon is misaligned compared to
other icons in Getting Started section. It is not related to this
patch. adjusting margin top will fix it.
4.

I tried to test out Error message displayed, but I encounter an
error(screenshot attached).
Steps to reproduce:
   - Open pgAdmin4 in browser
   - Connect to PostgreSQL Server, Keep dashboard tab open.
   - Navigate to the database which is connected.
   - Now disconnect pgAdmin4 python server.
   ​

 ​Here I mean Stop Python server. I​
>>
>>
>>>
1.
   - ​
   - No error message is displayed on Dashboard because it breaks
   in JS as xhr.responseText is empty.
   However, it might be an existing issue.

 Thanks,
 Surinder

 On Mon, Aug 7, 2017 at 10:40 AM, Wenlin Zhang 
 wrote:

 Hi Ashesh,
>
> That's correct. This patch just changed alert style in the 'tabs',
> such as Dependency and Dependents.
>
> Thanks
>
> Wenlin
>
> On Mon, Aug 7, 2017 at 12:51 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> 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.linkedin.com/in/asheshvashi*
>> 
>>
>> On Mon, Aug 7, 2017 at 8:11 AM, Sarah McAlear 
>> wrote:
>>
>>> Hi hackers,
>>>
>>> Could you please review this patch?
>>>

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

2017-08-09 Thread Harshal Dhumal
On Wed, Aug 9, 2017 at 8:57 AM, Ashesh Vashi 
wrote:

> On Thu, Aug 3, 2017 at 2:41 PM, Murtuza Zabuawala  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.
>
I tested this and it's working fine.



>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


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

2017-08-09 Thread Surinder Kumar
​Hi,

​The updated patch looks good to me.

On Wed, Aug 9, 2017 at 4:15 PM, Sarah McAlear  wrote:

> As discussed with Surinder, we have created a Redmine ticket for his 4th
> comment regarding the error message not showing up when the app can't be
> reached. This issue existed prior to this patch and should be prioritized.
>
> https://redmine.postgresql.org/issues/2640
>
> Thanks!
> Matt & Sarah
>
> On Wed, Aug 9, 2017 at 4:06 PM, Sarah McAlear  wrote:
>
>> Hi Surinder!
>>
>> I am not able to see anything different from what I see on Master with or
>> without the patch applied. I tried adjusting the preferences. I did update
>> the dashboard.js to instantiate a new object, great idea!
>>
>> Thanks,
>> Sarah
>>
>>
>>
>> On Wed, Aug 9, 2017 at 1:42 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi Wenlin,
>>>
>>> On Tue, Aug 8, 2017 at 3:15 PM, Wenlin Zhang  wrote:
>>>
 Hi Surinder,

Thanks for your review.

We have changed the indentation for _dashboard.scss file and also
 removed the style about icon-postgres:before, like margin-top,etc, but
 we are not sure if it is perfectly aligned now, you can add further change
 to it.

 As the second comment, I'm sorry I'm not sure what's the problem,
 could you please clarify it? Because we replace css with scss right now,
 dashboard.css doesn't exist. So maybe you are looking at the css file that
 are complied by the scss?

>>> ​Sorry I​ typed 'dashboard.css' instead of 'dashboard.js'.
>>> ​In dashboard.js can we change `return DashboardAlert;` to `return new
>>> DashboardAlert();`
>>> and then we can remove the instances being created(var alertDashboard =
>>> new AlertDashboard();) from dashboard.js, and simply
>>> use `AlertDashboard.info('message')`.
>>>
>>>
 For the fourth comment, we tried the steps you suggested on master
 branch, the error is not shown either. So it should be an existing issue.
 But if you want to see the error message, navigate to "Servers" at the top
 of browser, then navigate back to postgresql server, then you will see the
 error message.

>>> ​The error in console will appear when you selected a database which is
>>> connected and stop the backend Python server because the request for graphs
>>> for database level will fail and there is no response returned from server.
>>> It might be not reproducible to you If you set the refresh rate to
>>> higher value (i.e. Preferences > Graphs) in preferences. Just set refresh
>>> rate to 1 for all dashboard graphs and repeat the steps.
>>>


 Thanks,

 Wenlin &Violet



 On Mon, Aug 7, 2017 at 2:30 PM, Surinder Kumar <
 surinder.ku...@enterprisedb.com> wrote:

> Hi
> Review comments:
>
>1.
>
>For consistency, we use two spaces for indentation in CSS files.
>Four spaces are used in _dashboard.scss file. The configurations
>are defined in web/.editorconfig file.
>2.
>
>In,dashboard.css Can we return function object in return instead
>of function class itself, this will eliminate the need of creating 
> function
>object every time we use info and error?
>3.
>
>On Dashboard, I can see Postgres icon is misaligned compared to
>other icons in Getting Started section. It is not related to this
>patch. adjusting margin top will fix it.
>4.
>
>I tried to test out Error message displayed, but I encounter an
>error(screenshot attached).
>Steps to reproduce:
>   - Open pgAdmin4 in browser
>   - Connect to PostgreSQL Server, Keep dashboard tab open.
>   - Navigate to the database which is connected.
>   - Now disconnect pgAdmin4 python server.
>   ​
>
> ​Here I mean Stop Python server. I​
>>>
>>>

>1.
>   - ​
>   - No error message is displayed on Dashboard because it breaks
>   in JS as xhr.responseText is empty.
>   However, it might be an existing issue.
>
> Thanks,
> Surinder
>
> On Mon, Aug 7, 2017 at 10:40 AM, Wenlin Zhang 
> wrote:
>
> Hi Ashesh,
>>
>> That's correct. This patch just changed alert style in the
>> 'tabs', such as Dependency and Dependents.
>>
>> Thanks
>>
>> Wenlin
>>
>> On Mon, Aug 7, 2017 at 12:51 PM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> 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
>>> 
>>>
>>>

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

2017-08-09 Thread Murtuza Zabuawala
Hi,

Please find the updated patch with new UI style in dashboard subnode
control based on Chethana's design suggestion.

@Shirley,
Yes, DBA needs to click on the drop down to expand.
- If we make whole row clickable then how are we going to identify if user
is trying to expand the row or trying to cancel the active session? I am
asking this because table row  tag comes before table column tag 
in HTML DOM, so if we have click event listers on both of the tags then how
are we going to differentiate the user operation?
- In my opinion, another reason we can not do that on a dashboard grid
because it will break the subnode control consistency, If user sees that
grid expands on clicking the row they will expect the same behaviour in
other grids as well.

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

[image: https://community.postgresrocks.net/]


On Tue, Aug 8, 2017 at 7:47 PM, Shirley Wang  wrote:

> Nice!
>
> Would a DBA need to click on the drop down to expand? I think that drop
> down icon might be too small. Perhaps the whole row could be a clickable
> area to show further details. This is a good thing to test with some people
>
>
> On Aug 8, 2017, at 12:52, Ashesh Vashi 
> wrote:
>
> 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 

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
> ,
> 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.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
 

 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.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.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
>> 
>>
>> Please find attached patch and review.
>>
>> Thanks,
>> Surinder
>> ​
>>
>
>


Build failed in Jenkins: pgadmin4-master-python27 #279

2017-08-09 Thread pgAdmin 4 Jenkins
See 


Changes:

[Ashesh Vashi] Some cosmetic changes.

[Ashesh Vashi] Enable source maps for debugging purpose in all webpack modules 
(except

[Ashesh Vashi] UX improvements of the history in the query tool.

[Ashesh Vashi] Fixed some UX issue with the Import/Export tool.

[Ashesh Vashi] On certain linux operating systems, Qt application exits with an 
error

--
[...truncated 336.79 KB...]
PackagePutTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
SynonymPutTestCase (Fetch synonym Node URL)
ResourceGroupsPutTestCase (Put resource groups)
TestSSLConnection (Test for SSL connection)
ResourceGroupsDeleteTestCase (Delete resource groups)
SynonymAddTestCase (Default Node URL)
PackageAddTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)

PostgreSQL 9.5:

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

PostgreSQL 9.4:

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

PostgreSQL 9.3:

157 tests passed
0 tests failed
15 tests skipped:
SynonymGetTestCase (Fetch synonym Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
TableUpdateTestCase (Detach partition from existing list 
partitioned table,
Create partitions of existing range 
partitioned table,
Detach partition from existing range 
partitioned table,
  

Re: Unified server/desktop config

2017-08-09 Thread Surinder Kumar
Hi

This patch includes the fix where this patch breaks when feature tests are
run.

Set builtins.SERVER_MODE if it is present in globals()['SERVER_MODE'] else
set to None.

Please find updated patch.
Thanks,
Surinder
​

On Wed, Aug 9, 2017 at 11:57 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Sure, I will update.
>
> On Wed, Aug 9, 2017 at 11:17 AM, Dave Page  wrote:
>
>> Please update the patch :-)
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK:http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On 9 Aug 2017, at 05:53, Surinder Kumar 
>> wrote:
>>
>> Hi,
>>
>> I noticed that test cases don’t run and I got an error:
>>
>> (pgAdmin_27)Laptop195:regression surinder$ python runtests.py --pkg 
>> feature_tests
>> 
>> Traceback (most recent call last):
>>   File "runtests.py", line 45, in 
>> import config
>>   File "/Users/surinder/Documents/Projects/pgadmin4/web/config.py", line 
>> 121, in 
>> if builtins.SERVER_MODE is None:
>> AttributeError: 'module' object has no attribute'
>> SERVER_MODE
>> '
>>
>> I think this is because we are setting​ ​first​ ​builtins.SERVER_MODE​ in​ 
>> ​pgAdmin4.py
>> but in test cases pgAdmin4.py is not being called.​
>>
>>
>> On Tue, Aug 8, 2017 at 4:03 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Tue, Aug 8, 2017 at 11:27 AM, Surinder Kumar <
>>> surinder.ku...@enterprisedb.com> wrote:
>>>
 On Tue, Aug 8, 2017 at 1:47 PM, Dave Page  wrote:


>
> On Tue, Aug 8, 2017 at 7:18 AM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi
>>
>> On Ubuntu-14.04, I got error Application Server couldn't be contacted
>> :
>>
>> *Steps performed:*
>>
>>- I have already installed pgAdmin4-1.4 which come with
>>PostgreSQL-9.6 installer.
>>then I run root@ubuntu:/opt/PostgreSQL/9.6/pgAdmin 4/bin#
>>./pgAdmin4./.
>>- Now took latest git pull from HEAD
>>- Apply unified_config.diff patch.
>>- Then compiled pgAdmin4 in runtime and then run ./pgAdmin.
>>- Got error Application Server couldn't be contacted.
>>
>> But when I ran ./pgAdmin4 for the second time. pgAdmin4 runs without
>> any issue.
>> I didn’t get any error on the terminal and log file.
>> ​ I couldn't find why it gives this error.​
>>
>
> I know Fahar has run into this with existing releases on Ubuntu. If
> you enable debugging, can you see any clues? I assume it's going round the
> retry loop before aborting?
>
>> *Another issue related to Alembic:*
>>
>> If I am running pgAdmin4 already installed on my machine, then I
>> upgrade pgAdmin4 using Python wheel:
>>
>> (test_p27) surinder@ubuntu:~/virtualenvs/test_p27$ python
>> ~/virtualenvs/test_p27/lib/python2.7/site-packages/pgadmin4/
>> pgAdmin4.py
>>
>> *I am getting error:*
>>
>> alembic.util.exc.CommandError: Can't locate revision identified by
>> 'd85a62333272'
>>
>> To fix this, I have to delete existing pgadmin4.db file. I don’t
>> know if it is a valid case or should I log an RM if it is?
>>
> That's an annoying side-effect of the move to Alembic. The previous DB
> code would quite happily (and intentionally) run with a newer version of
> the database, however, the new code does not. You'll see this issue
> whenever you've run a newer version of pgAdmin and then go back to an 
> older
> version that uses an older schema version.
>
> It would be nice to change this so it doesn't complain - but we'd have
> to be cautious to only break compatibility on major releases.
>
>
>
>> Apart for this, I didn’t see any functionality break. It works!!
>> ​
>>
>> I liked the approach to set SEVER_MODE in runtime using built-ins.
>>
> Thanks. Do you think it warrants a 2.0 version number, given the
> potential for breaking existing installations (I do, but would like other
> feedback)? If we do that - and thus allow a parallel installation of 1.x
> and 2.x), how would we resolve the Alembic issue you noted such that both
> versions could be run against the same DB?
>
 To resolve this issue while upgrading to newer version of pgAdmin4, we
 can add a parameter version_table: 'alembic_version-1.6 in
 web/migrations/env.py of upcoming pgAdmin4 source code(reference link
 
 )
 It will create a new version table in pgadmin4.db database and it will
 instruct the Alembic to run migrations for the version stored in
 table(alembic_version-1.6) when new pgAdmin4 will be installed.

 I tried to check if it works or not. But somehow I couldn’t install
 pgAdmin4-1.5 from wheel.

 Alternatively I will try to generate new schema using i

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

2017-08-09 Thread Surinder Kumar
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


Add_watch_mode_in_scripts.patch
Description: Binary data


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

2017-08-09 Thread Harshal Dhumal
Hi,

I tested this change with Flask-Security 3.0.0 and 1.7.5 (we ship pgAdmin4
with 1.7.5) and with 2.7 and 3.0+.
This is working as expected.

Apart from this I also found some other issues with User management.
I have created RM2641  for
these issue and also attached patch from same.


Thanks


-- 
*Harshal Dhumal*
*Sr. Software Engineer*

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

On Mon, Aug 7, 2017 at 7:08 PM, Ashesh Vashi 
wrote:

> Harshal,
>
> Please take a look at it.
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *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/3701b91
>> d4d3e41036872a3f35db51e44e0681109
>>
>> 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.SECURI
>> TY_PASSWORD_SALT))
>>
>> -security.init_app(app)
>> +security.init_app(app, user_datastore)
>>
>>  app.session_interface = create_session_interface(app)
>>
>> --
>> 2.13.3
>>
>>
>>
>
diff --git a

Re: Can someone tell me what this code does ?

2017-08-09 Thread Dave Cramer
So what is the policy of the project? Ideally the cruft should be removed.

Would a patch doing so be committed?

Dave Cramer

On 9 August 2017 at 00:28, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Yes, you are correct, at a moment that's all it does.
>
> On Tue, Aug 8, 2017 at 6:37 PM, Dave Cramer  wrote:
>
>> Hi,
>>
>> I guess my question was a bit vague. I get that it loads drivers. But
>> note it does not actually put them anywhere.
>>
>> First it creates a dict
>> sets the attribute in the app
>> loads the drivers dynamically
>> and returns an empty dict.
>>
>> From what I can tell this:
>>
>> DriverRegistry.load_drivers()
>>
>> is all it does?
>>
>>
>>
>>
>>
>>
>> Dave Cramer
>>
>> On 7 August 2017 at 23:35, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> This piece of code allow us to dynamically import all the available
>>> driver modules from '../utils/driver/' directory into our application.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> [image: https://community.postgresrocks.net/]
>>> 
>>>
>>> On Tue, Aug 8, 2017 at 4:20 AM, Dave Cramer 
>>> wrote:
>>>
 I'm fairly new to Python so excuse my naiveté.

 This code: in web/pgadmin/utils/driver/__init__.py  does not appear to
 load the drivers into the drivers dictionary ? Or am I missing something

 def init_app(app):
 drivers = dict()

 setattr(app, '_pgadmin_server_drivers', drivers)
 DriverRegistry.load_drivers()

 return drivers



 Dave Cramer

>>>
>>>
>>
>


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

2017-08-09 Thread Wenlin Zhang
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


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

2017-08-09 Thread Surinder Kumar
Hi Sarah,

We noticed that due to this patch, the alert style of "Database connected"
message is changed.
Can you please look into this?

Thanks,
Surinder

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

> ​Hi,
>
> ​The updated patch looks good to me.
>
> On Wed, Aug 9, 2017 at 4:15 PM, Sarah McAlear  wrote:
>
>> As discussed with Surinder, we have created a Redmine ticket for his 4th
>> comment regarding the error message not showing up when the app can't be
>> reached. This issue existed prior to this patch and should be prioritized.
>>
>> https://redmine.postgresql.org/issues/2640
>>
>> Thanks!
>> Matt & Sarah
>>
>> On Wed, Aug 9, 2017 at 4:06 PM, Sarah McAlear 
>> wrote:
>>
>>> Hi Surinder!
>>>
>>> I am not able to see anything different from what I see on Master with
>>> or without the patch applied. I tried adjusting the preferences. I did
>>> update the dashboard.js to instantiate a new object, great idea!
>>>
>>> Thanks,
>>> Sarah
>>>
>>>
>>>
>>> On Wed, Aug 9, 2017 at 1:42 PM, Surinder Kumar <
>>> surinder.ku...@enterprisedb.com> wrote:
>>>
 Hi Wenlin,

 On Tue, Aug 8, 2017 at 3:15 PM, Wenlin Zhang  wrote:

> Hi Surinder,
>
>Thanks for your review.
>
>We have changed the indentation for _dashboard.scss file and also
> removed the style about icon-postgres:before, like margin-top,etc,
> but we are not sure if it is perfectly aligned now, you can add further
> change to it.
>
> As the second comment, I'm sorry I'm not sure what's the problem,
> could you please clarify it? Because we replace css with scss right now,
> dashboard.css doesn't exist. So maybe you are looking at the css file that
> are complied by the scss?
>
 ​Sorry I​ typed 'dashboard.css' instead of 'dashboard.js'.
 ​In dashboard.js can we change `return DashboardAlert;` to `return new
 DashboardAlert();`
 and then we can remove the instances being created(var alertDashboard =
 new AlertDashboard();) from dashboard.js, and simply
 use `AlertDashboard.info('message')`.


> For the fourth comment, we tried the steps you suggested on master
> branch, the error is not shown either. So it should be an existing issue.
> But if you want to see the error message, navigate to "Servers" at the top
> of browser, then navigate back to postgresql server, then you will see the
> error message.
>
 ​The error in console will appear when you selected a database which is
 connected and stop the backend Python server because the request for graphs
 for database level will fail and there is no response returned from server.
 It might be not reproducible to you If you set the refresh rate to
 higher value (i.e. Preferences > Graphs) in preferences. Just set refresh
 rate to 1 for all dashboard graphs and repeat the steps.

>
>
> Thanks,
>
> Wenlin &Violet
>
>
>
> On Mon, Aug 7, 2017 at 2:30 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi
>> Review comments:
>>
>>1.
>>
>>For consistency, we use two spaces for indentation in CSS files.
>>Four spaces are used in _dashboard.scss file. The configurations
>>are defined in web/.editorconfig file.
>>2.
>>
>>In,dashboard.css Can we return function object in return instead
>>of function class itself, this will eliminate the need of creating 
>> function
>>object every time we use info and error?
>>3.
>>
>>On Dashboard, I can see Postgres icon is misaligned compared to
>>other icons in Getting Started section. It is not related to this
>>patch. adjusting margin top will fix it.
>>4.
>>
>>I tried to test out Error message displayed, but I encounter an
>>error(screenshot attached).
>>Steps to reproduce:
>>   - Open pgAdmin4 in browser
>>   - Connect to PostgreSQL Server, Keep dashboard tab open.
>>   - Navigate to the database which is connected.
>>   - Now disconnect pgAdmin4 python server.
>>   ​
>>
>> ​Here I mean Stop Python server. I​


>
>>1.
>>   - ​
>>   - No error message is displayed on Dashboard because it breaks
>>   in JS as xhr.responseText is empty.
>>   However, it might be an existing issue.
>>
>> Thanks,
>> Surinder
>>
>> On Mon, Aug 7, 2017 at 10:40 AM, Wenlin Zhang 
>> wrote:
>>
>> Hi Ashesh,
>>>
>>> That's correct. This patch just changed alert style in the
>>> 'tabs', such as Dependency and Dependents.
>>>
>>> Thanks
>>>
>>> Wenlin
>>>
>>> On Mon, Aug 7, 2017 at 12:51 PM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
 Surinder,

 Please take a look 

Re: Can someone tell me what this code does ?

2017-08-09 Thread Murtuza Zabuawala
Hi,

On Wed, Aug 9, 2017 at 8:19 PM, Dave Cramer  wrote:

> So what is the policy of the project? Ideally the cruft should be removed.
>
> Would a patch doing so be committed?
>
​Yes, I guess.​

Dave Cramer
>
> On 9 August 2017 at 00:28, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Yes, you are correct, at a moment that's all it does.
>>
>> On Tue, Aug 8, 2017 at 6:37 PM, Dave Cramer  wrote:
>>
>>> Hi,
>>>
>>> I guess my question was a bit vague. I get that it loads drivers. But
>>> note it does not actually put them anywhere.
>>>
>>> First it creates a dict
>>> sets the attribute in the app
>>> loads the drivers dynamically
>>> and returns an empty dict.
>>>
>>> From what I can tell this:
>>>
>>> DriverRegistry.load_drivers()
>>>
>>> is all it does?
>>>
>>>
>>>
>>>
>>>
>>>
>>> Dave Cramer
>>>
>>> On 7 August 2017 at 23:35, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi,

 This piece of code allow us to dynamically import all the available
 driver modules from '../utils/driver/' directory into our application.

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

 [image: https://community.postgresrocks.net/]
 

 On Tue, Aug 8, 2017 at 4:20 AM, Dave Cramer 
 wrote:

> I'm fairly new to Python so excuse my naiveté.
>
> This code: in web/pgadmin/utils/driver/__init__.py  does not appear
> to load the drivers into the drivers dictionary ? Or am I missing 
> something
>
> def init_app(app):
> drivers = dict()
>
> setattr(app, '_pgadmin_server_drivers', drivers)
> DriverRegistry.load_drivers()
>
> return drivers
>
>
>
> Dave Cramer
>


>>>
>>
>