[pgadmin-hackers] pgAdmin 4 commit: Basic support for viewing tables in Greenplum. Patch

2017-02-13 Thread Dave Page
Basic support for viewing tables in Greenplum. Patch from George & Tira @ 
Pivotal.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=ec9e8b79a3f8bd8ee6bcb685247a54efaa80c5fa
Author: Atira Odhner 

Modified Files
--
.../tables/templates/table/sql/9.1_plus/nodes.sql  |  7 +++
.../tables/templates/table/sql/default/nodes.sql   |  4 +-
.../templates/table/sql/tests/test_tables_node.py  | 60 ++
web/regression/test_utils.py   | 56 
4 files changed, 125 insertions(+), 2 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers][patch] We can see tables in Greenplum!

2017-02-13 Thread Dave Page
Thanks, applied!

On Thu, Feb 9, 2017 at 3:57 PM, Atira Odhner  wrote:
> Great! Here is an updated patch set.
>
> -Tira & George
>
> On Thu, Feb 9, 2017 at 12:33 AM, Murtuza Zabuawala
>  wrote:
>>
>> Hello,
>>
>> Regarding test output,
>>
>>
>> Comment Style-1:  If we comment like
>>
>> """Test Case is used for... """
>>
>> Result:
>>
>> runTest (pgadmin.xxx)
>> Test case to verify server group (Get server list) ... ok
>>
>>
>> Comment Style-2: If we comment like
>>
>> """
>>
>> Test Case is used for 
>> """
>>
>> Result:
>>
>> runTest runTest (pgadmin.xxx) ... ok
>>
>> Unittest framework strip the doc string with "\n" and get the string at
>> 0th index so in case of Comment Style-2 it will be empty, so no description
>> will be displayed.
>>
>> So use Comment Style-1 when you write test cases.
>>
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Feb 8, 2017 at 9:26 PM, George Gelashvili 
>> wrote:
>>>
>>> Hello Hackers!
>>>
>>> We've a fix for displaying table nodes when connected to Greenplum. The
>>> salient bit was leaving off tgisinternal from the default template (but
>>> leaving the template used for postgres 9.1+ unchanged).
>>> We also added a Database helper class in test_utils for setting up and
>>> tearing down a database. It can be used via python's with (see
>>> TestTablesNode).
>>>
>>>
>>> This isn't super important, but does anyone know why our test comment
>>> doesn't show up in test output?
>>>
>>> We see:

 runTest
 (pgadmin.browser.server_groups.servers.databases.schemas.tables.templates.table.sql.tests.test_tables_node.TestTablesNode)
 ... {'oid': 106072, 'has_enable_triggers': '0', 'name': 'test_table',
 'triggercount': '0'}
>>>
>>>
>>> Whereas for other tests we see output like

  This function update the server details (Default Server Node url)
>>>
>>>
>>> Cheers!
>>> Tira & George
>>>
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers][patch] RM2163 emboldened syntax highlighting

2017-02-13 Thread Dave Page
Thanks, patch applied.

On Thu, Feb 9, 2017 at 7:03 PM, Atira Odhner  wrote:
> Here's the updated patch
>
> On Thu, Feb 9, 2017 at 8:52 AM, Atira Odhner  wrote:
>>
>> Good point! I guess I was asleep at the wheel on this one. I didn't notice
>> it was a library.
>>
>>
>> On Thu, Feb 9, 2017, 4:37 AM Dave Page  wrote:
>>>
>>> Hi
>>>
>>> On Thu, Feb 9, 2017 at 7:26 AM, Murtuza Zabuawala
>>>  wrote:
>>> > Hi,
>>> >
>>> > It's not a good idea to directly change in main Library, Lets say if
>>> > newer
>>> > version of CodeMirror available and we want to pull new version then we
>>> > need
>>> > to maintain this change set every time we pull new version.
>>> >
>>> > Instead please use,
>>> >
>>> > web/pgadmin/static/css/overrides.css
>>> >
>>> >
>>> > or more specifically if you are only targeting Syntax highlighting for
>>> > Query
>>> > Tool then,
>>> >
>>> > web/pgadmin/tools/sqleditor/static/css/sqleditor.css
>>> >
>>> >
>>> > to override any CSS related changes specific to pgAdmin4.
>>>
>>> Agreed - we only modify bundled libraries when there is no other
>>> choice, and then we add a README explaining what was changed and why.
>>>
>>> In this case, I think the changes should be in overrides.css which is
>>> intended specifically for overriding styles in the third party
>>> libraries (yes, I know there are a few things in there that should be
>>> in pgadmin.css - we need to clean that up somewhen). They should not
>>> be for the SQL Editor only.
>>>
>>> --
>>> 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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Make syntax highlighting more visible by making keywo

2017-02-13 Thread Dave Page
Make syntax highlighting more visible by making keywords and numbers bolder.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1340c1c2ee3503bedd0dd1d89484afc8216d396b
Author: Atira Odhner 

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fix Python 3 compatibility.

2017-02-13 Thread Dave Page
Fix Python 3 compatibility.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=14f181d2babf908d3963e8b012842287ee6720b7

Modified Files
--
.../schemas/tables/templates/table/sql/tests/test_tables_node.py| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fix Python 2.6 compatibility.

2017-02-13 Thread Dave Page
Fix Python 2.6 compatibility.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=56bd1f6c050cd0414cd61abc6909456ae1301573

Modified Files
--
web/regression/test_utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Another Python 3.x compatibility fix.

2017-02-13 Thread Dave Page
Another Python 3.x compatibility fix.

Branch
--
master

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

Modified Files
--
.../schemas/tables/templates/table/sql/tests/test_tables_node.py | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Update the runtime build to allow users to force buil

2017-02-13 Thread Dave Page
Update the runtime build to allow users to force building with QtWebKit in Qt5, 
instead of QtWebEngine.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=88aac7a4c956f1803d079ade5ab4b6a92f9cb7b3

Modified Files
--
runtime/BrowserWindow.cpp | 34 +-
runtime/BrowserWindow.h   | 14 +++---
runtime/TabWindow.cpp |  2 +-
runtime/WebViewWindow.cpp |  4 ++--
runtime/WebViewWindow.h   |  6 +++---
runtime/pgAdmin4.pro  | 35 +++
6 files changed, 57 insertions(+), 38 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Allow the Python interpreter to be overridden on the

2017-02-13 Thread Dave Page
Allow the Python interpreter to be overridden on the build command line.

Branch
--
master

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

Modified Files
--
docs/en_US/Makefile.sphinx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Add comment to note command line qmake usage.

2017-02-13 Thread Dave Page
Add comment to note command line qmake usage.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=40f2520fa6af69fd9d87278f427e3484afd03a4a

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Acceptance Tests against a browser (WIP)

2017-02-13 Thread Dave Page
Hi,

I've been playing with this for the last couple of hours, and I just
can't get it to work reliably;

- A good percentage of the time the browser opens with a URL of
"data:," and does nothing more. This appears to happen if tests fail,
which still leaves server processes running in the background.

- The connect_to_server test usually seems to work.

- The template_selection_feature test usually does *not* work. I can't
see an obvious reason, but I suspect it's a race condition. What seems
to happen is that the function definition is entered, but not
registered by the UI, so the mSQL panel just ends up saying
"incomplete definition". Manually checking what was input proves that
everything is correct - and indeed, returning the SQL tab shows the
expected SQL.

Other issues I noted:

- The template_selection_feature test should just enter BEGIN/END.
What it currently enters is an entire function definition, when only
the body content is expected. E.g.

self.page.fill_codemirror_area_with(
"""BEGIN

END;
"""
)

- Screenshots are being taken of failed tests:
  1) I've never actually seen any get saved
  2) They should be saved to the same directory as the test log, not /tmp
  3) They should have guaranteed unique names, and be mentioned in the
test output so the user can reference the image to the failure.

The reason the last two items are important is that I've now got a
test server running the test suite with every supported version of
Python, for every supported database (well, almost, pending a couple
of fixes). I have separate workspaces for each Python version, and a
single test run might run every test 10 times, once for each database
server.

- Please wrap the README at < 80 chars.



On Thu, Feb 9, 2017 at 4:17 PM, Atira Odhner  wrote:
> Hi Dave,
>
>>  I think the problem was that the way you phrased it,
>
>
> You're right, we totally messed that up. We were talking about making 3
> patches and ended up making only 2 and forgot to reword that bit.
> Sorry about that.
>
> Here are the two patches for this change that resolves the AttributeError
> you were seeing. The first patch is identical to the patch of the same name
> in the other email thread.
>
>> We're used to
>> dealing with larger patchsets via the mailing list - typically as long
>> as you're clear about any dependencies, it shouldn't be a problem.
>
>
> Great! We'll try sending patchsets from now on and hopefully that resolves
> some of the issues we were seeing.
>
> Tira & George
>
> On Thu, Feb 9, 2017 at 9:28 AM, Dave Page  wrote:
>>
>> Hi
>>
>> On Thu, Feb 9, 2017 at 2:20 PM, Atira Odhner  wrote:
>> > Certainly.  We did mention the dependency in the email. Would it be
>> > better
>> > to mention it in the patch name?
>>
>> I think the problem was that the way you phrased it, it sounded
>> optional ("an updated patch which does not include adding that test
>> helper in case you apply the show-tables patch first"). I think a
>> clear "This patch is dependent on patch Foo" would suffice.
>>
>> > Is there a better way for us to manage
>> > these changes? On other open source projects, I've seen github mirrors
>> > set
>> > up so that changes can be pulled in like branches rather then as patch
>> > applies. That would have avoided this situation since the parent commit
>> > would be pulled in with the same SHA from either pull request branch and
>> > git
>> > would not see it as a conflict.
>> >
>> > I'm rather new to dealing with patch files like this so I would love
>> > some
>> > tips.
>>
>> The Postgres project in general is quite conservative and stuck in
>> it's ways about how things are done (which is usually a good thing
>> considering you trust your data to the resulting code). We're used to
>> dealing with larger patchsets via the mailing list - typically as long
>> as you're clear about any dependencies, it shouldn't be a problem.
>> Some of us use tools like PyCharms for handling patches and helping
>> with reviews etc. which I guess replaces most, if not all of the
>> GitHub functionality over plain git.
>>
>> --
>> 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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Feature Suggestions

2017-02-13 Thread Raffi Holzer
Hi everyone,

For those who don't know, Pivotal Labs is working with Greenplum to make
pgAdmin 4 compatible with Greenplum. In addition to that, we have also been
conducting user research and figuring out ways in which the user experience
of pgAdmin might be improved. Below are a few of the ideas we are thinking
about. Would love to get your feedback.


Select a column in query output

>From our research, we saw that users need to be able to transfer their
query output to a text editor or some other program to share with their
colleagues. This is one feature that would enable them to quickly do so.


Drag and select should work in query results

Because most programs enable users to drag and highlight a selection of
text to copy and paste, they expect to be able to do so here as well.


Output selection modified by Shift+direction keyboard shortcuts

>From our research, we saw that users tend to use keyboard shortcuts when
typing or selecting items. Because this is a feature available in most
other apps, the expectation is that it would be in pgAdmin as well.


-- 
Raffi Holzer
Product Manager
Pivotal Labs


[pgadmin-hackers][patch] Fixes QT build when not signing

2017-02-13 Thread George Gelashvili
Hello Hackers!

We were building the QT app locally with QTDIR, PGDIR, PYTHON_HOME,
and PYTHON_VERSION
set, and by running:
make appbundle

We were seeing the runtime error:

> Could not find QtWebEngineProcess
> Abort trap: 6

after a successful python server start.

We found that the setup before signing in codesign-bundle.sh was necessary
to resolve this, whether or not one is planning on signing the app or dmg.
The fix requires setting variables appropriately in mac/pkg/framework.conf

We've attached a patch with our changes.

Cheers,
Sarah & George


0001-Fixes-QT-build.-requires-mac-pkg-codesign.conf.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Autoformatting

2017-02-13 Thread Raffi Holzer
Hi Hackers,
 We are looking into auto formatting SQL text in the SQL editor. However,
some users have expressed that this can be done in different ways. Are
there preferences in this community fo rhow autoformatting should be done?

-- 
Raffi Holzer
Product Manager
Pivotal Labs


[pgadmin-hackers] SlickGrid

2017-02-13 Thread Sarah McAlear
Hi Hackers,

We saw a story about transferring query results to SlickGrid on Redmine (
https://redmine.postgresql.org/issues/2036). We are considering more
selection options (in addition to by-row) within the results display, which
got us wondering about the use of SlickGrid.

It appears that SlickGrid hasn't been maintained in roughly 3 years. What
is the plan going forward with this library? There does seem to be a fork
https://github.com/6pac/SlickGrid/tree/2.3.4 that is still maintained.

For this and perhaps other js dependencies, would pulling it in via npm be
an option?

Thanks!
Sarah & George