[pgAdmin4][Patch]: Stop Flask from initialising service twice in Debug mode

2017-07-21 Thread Surinder Kumar
Hi

When pgAdmin4 runs in DEBUG mode, Flask initialise service twice, while in
non-DEBUG mode, once. It is pain while development because `yarn run
bundle` also runs twice.

It is because the parameter `use_reloader` = True in Debug Mode.

If `os.environ` variable `WERKZEUG_RUN_MAIN` is set to None, i.e. app is
starting for the first time and then its value is changed to True.

Please find attached patch.

Thanks
Surinder


start_flask_service_once_in_debug_mode.patch
Description: Binary data


Re: [pgAdmin4][Patch]: Stop Flask from initialising service twice in Debug mode

2017-07-21 Thread Surinder Kumar
Hi

In this patch, i have added reference to the implementation.
Please find updated patch and review.

Thanks,
Surinder

On Fri, Jul 21, 2017 at 12:32 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi
>
> When pgAdmin4 runs in DEBUG mode, Flask initialise service twice, while in
> non-DEBUG mode, once. It is pain while development because `yarn run
> bundle` also runs twice.
>
> It is because the parameter `use_reloader` = True in Debug Mode.
>
> If `os.environ` variable `WERKZEUG_RUN_MAIN` is set to None, i.e. app is
> starting for the first time and then its value is changed to True.
>
> Please find attached patch.
>
> Thanks
> Surinder
>
>
>
>


start_flask_service_once_in_debug_mode_v1.patch
Description: Binary data


[pgAdmin4][Patch]: Using editorconfig to maintain consistent coding styles between different IDE's

2017-07-21 Thread Surinder Kumar
Hi All,

In pgAdmin4 codebase, the coding styles at many places is inconsistent, in
some files standard coding conventions are followed and in some not.

It is difficult to take care of 'tabs', 'spaces', 'trailing white-spaces',
'max_line_length' while development.

So adding .editorconfig to pgAdmin4 will make development easier and will
help in faster patch review.

Added a `.editorconfig` file where all coding styles followed in pgAdmin4
are added, and most of editors/IDE reads this file and follows the rules
while development.

For PyCharm editor, there is no additional configuration or settings
required. it reads .editorconfig.
For Vim editor - developer has to install plugin available.

List of editors supporting `.editorconfig`
http://editorconfig.org/#download

Also, there is a NPM plugin eclint  available
which fixes files automatically and do other tasks as well, for example:

Running following command on terminal fixes issues related to tabs,
trailing whitespaces in existing files:

./node_modules/eclint/bin/eclint.js fix
pgadmin/static/css/bootstrap.overrides.css

If i missed any rule, please let me know
​ i will add.​


Please find attached patch and review.

Thanks,
Surinder


add_support_for_editorconfig.patch
Description: Binary data


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Murtuza Zabuawala
Hi Dave,

Please find updated patch.

On Thu, Jul 20, 2017 at 10:35 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

>
> On Thu, Jul 20, 2017 at 10:29 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> Please find patch attached, There were two issues,
>>> 1) We removed the default button to clear the editor window, it
>>> broke _clear_query_tool() functionality.
>>> 2) The buttons arrangements, we added new Edit button in between Delete
>>> and Filter button causing the "Explain" -> "Explain Options" sub menu to go
>>> out of browser visibility in feature test, so it was failing.
>>>
>>> I have put Edit button near Clear button for now, until we come up with
>>> new design for our editor for displaying these options.
>>>
>>
>> Hmm, I moved it there intentionally as it's a more traditional position
>> and thus more discoverable.
>>
>> Can we just launch the browser with a wider size, say, 1280? It's on line
>> 43 of app_starter.py...
>>
>>
> Yes, that will work too.
>
>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 I am working on this, will send you patch soon.

 On Thu, Jul 20, 2017 at 5:53 PM, Dave Page  wrote:

> Did you get a chance to look at this yet Murtuza?
>
> On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Sure, Will take a look.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Jul 19, 2017 at 8:00 PM, Dave Page  wrote:
>>
>>> Except I managed to break a couple of tests :-(. Can you take a look
>>> please? I've had some other work come up that I need to deal with.
>>>
>>> 
>>> ==
>>> ERROR: runTest (pgadmin.feature_tests.query_t
>>> ool_journey_test.QueryToolJourneyTest)
>>> Tests the path through the query tool
>>> 
>>> --
>>> Traceback (most recent call last):
>>>   File 
>>> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
>>> line 45, in runTest
>>> self._test_history_tab()
>>>   File 
>>> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
>>> line 71, in _test_history_tab
>>> self.__clear_query_tool()
>>>   File 
>>> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
>>> line 91, in __clear_query_tool
>>> self.page.click_element(self.page.find_by_xpath("//*[@id='bt
>>> n-edit']"))
>>>   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-packa
>>> ges/selenium/webdriver/support/wait.py", line 80, in until
>>> raise TimeoutException(message, screen, stacktrace)
>>> TimeoutException: Message: Timed out waiting for element to exist
>>>
>>>
>>> 
>>> ==
>>> ERROR: runTest (pgadmin.feature_tests.query_t
>>> ool_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 52, in runTest
>>> self._clear_query_tool()
>>>   File 
>>> "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_tests.py",
>>> line 173, in _clear_query_tool
>>> self.page.find_by_id("btn-edit").click()
>>>   File 
>>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",
>>> line 151, in find_by_id
>>> return self.wait_for_element(lambda driver:
>>> driver.find_element_by_id(element_id))
>>>   File 
>>> "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py",

Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-21 Thread Harshal Dhumal
Hi,

Currently if user clicks on empty white area below history entry then arrow
navigation does not work.
Attached patch fixes this issue.

[image: Inline image 1]




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

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

On Fri, Jul 21, 2017 at 1:21 AM, Dave Page  wrote:

> Ah, OK - I was working on them one at a time.
>
> Thanks, patches applied!
>
> On Thu, Jul 20, 2017 at 7:01 PM, Matthew Kleiman 
> wrote:
>
>> Hi Dave,
>>
>> In our previous email, the second patch fixed the linting issue from the
>> first patch.
>> However, we've remade these two patches so they both pass the linting
>> test.
>>
>> Thanks,
>> Matt and João
>>
>>
>> On Thu, Jul 20, 2017 at 12:56 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Thu, Jul 20, 2017 at 2:18 PM, Joao De Almeida Pereira <
>>> jdealmeidapere...@pivotal.io> wrote:
>>>
 Hello Dave,
 Did you use the latest one patch we sent?
 We realised that this was an issue in the second email we sent.

>>> Just checked again, and yes, that was the third and latest version I've
>>> received..
>>>
>>>
>>>
 Thanks
 Joao

 On Thu, Jul 20, 2017, 8:15 AM Dave Page  wrote:

> Hi
>
> On Wed, Jul 19, 2017 at 8:33 PM, Shruti Iyer  wrote:
>
>> Hi again!
>>
>> Attached are the most updated patches. We found an issue with the
>> previous implementation. So we generated the new patches.
>>
>
> The 01 patch fails linting:
>
> /Users/dpage/git/pgadmin4/web/regression/javascript/history/
> query_history_spec.jsx
>   188:9   error  Expected indentation of 10 spaces but found 8   indent
>   196:7   error  Expected indentation of 8 spaces but found 6indent
>   198:7   error  Expected indentation of 8 spaces but found 6indent
>   202:12  error  Expected indentation of 10 spaces but found 11  indent
>   205:11  error  Expected indentation of 8 spaces but found 10   indent
>   212:9   error  Expected indentation of 10 spaces but found 8   indent
>   214:11  error  Expected indentation of 8 spaces but found 10   indent
>   217:11  error  Expected indentation of 12 spaces but found 10  indent
>   219:9   error  Expected indentation of 6 spaces but found 8
>  indent
>
> Can you please fix that up and double-check the tests pass?
>
> Thanks.
>
> --
> 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
>>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/web/pgadmin/static/jsx/history/query_history.jsx b/web/pgadmin/static/jsx/history/query_history.jsx
index a276e53..940731c 100644
--- a/web/pgadmin/static/jsx/history/query_history.jsx
+++ b/web/pgadmin/static/jsx/history/query_history.jsx
@@ -172,13 +172,14 @@ export default class QueryHistory extends React.Component {
   
 
+ className="query-history"
+ onKeyDown={this.navigateUpAndDown}
+ tabIndex='0'>
   
 {this.retrieveOrderedHistory()
   .map((entry, index) =>
-
+
   
diff --git a/web/pgadmin/static/scss/sqleditor/_history.scss b/web/pgadmin/static/scss/sqleditor/_history.scss
index ed0c10f..942af03 100644
--- a/web/pgadmin/static/scss/sqleditor/_history.scss
+++ b/web/pgadmin/static/scss/sqleditor/_history.scss
@@ -1,4 +1,5 @@
 .query-history {
+  height: 100%;
   .list-item {
 border-bottom: 1px solid $color-gray-3;
   }


pgAdmin 4 commit: Add an editorconfig file to help maintain coding stan

2017-07-21 Thread Dave Page
Add an editorconfig file to help maintain coding standards.

Branch
--
master

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

Modified Files
--
web/.editorconfig | 30 ++
web/package.json  |  1 +
2 files changed, 31 insertions(+)



Re: [pgAdmin4][Patch]: Using editorconfig to maintain consistent coding styles between different IDE's

2017-07-21 Thread Dave Page
Thanks, applied.

On Fri, Jul 21, 2017 at 8:43 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi All,
>
> In pgAdmin4 codebase, the coding styles at many places is inconsistent, in
> some files standard coding conventions are followed and in some not.
>
> It is difficult to take care of 'tabs', 'spaces', 'trailing white-spaces',
> 'max_line_length' while development.
>
> So adding .editorconfig to pgAdmin4 will make development easier and will
> help in faster patch review.
>
> Added a `.editorconfig` file where all coding styles followed in pgAdmin4
> are added, and most of editors/IDE reads this file and follows the rules
> while development.
>
> For PyCharm editor, there is no additional configuration or settings
> required. it reads .editorconfig.
> For Vim editor - developer has to install plugin available.
>
> List of editors supporting `.editorconfig`
> http://editorconfig.org/#download
>
> Also, there is a NPM plugin eclint  
> available
> which fixes files automatically and do other tasks as well, for example:
>
> Running following command on terminal fixes issues related to tabs,
> trailing whitespaces in existing files:
>
> ./node_modules/eclint/bin/eclint.js fix pgadmin/static/css/bootstrap.
> overrides.css
>
> If i missed any rule, please let me know
> ​ i will add.​
>
>
> Please find attached patch and review.
>
> Thanks,
> Surinder
>
>
>
>
>
>
>
>


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

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


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Murtuza Zabuawala
Hi Robert,

Just to make shortcut keys uniform across all the platforms.

On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt 
wrote:

> Murtuza,
>
> Is there a particular reason you choose the keyboard shortcuts that you
> choose. When we were looking at this earlier to see what was being used
> elsewhere we discovered:
>
> jetbrains  cmd+/
> pycharmcmd+/
> SublimeCtrl+/ Toggle line comment
>Ctrl+Shift+/ Toggle block comment
> EclipseCTRL + /
> Notepad++  CTRL+Q   Toggle line comment
>CTRL+SHIFT+Q Toggle block comment
> TextWrangler   Ctrl+/
>
> -- Rob
>
>
> On Thu, Jul 20, 2017 at 1:05 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>>
>> On Thu, Jul 20, 2017 at 10:29 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 Please find patch attached, There were two issues,
 1) We removed the default button to clear the editor window, it
 broke _clear_query_tool() functionality.
 2) The buttons arrangements, we added new Edit button in between Delete
 and Filter button causing the "Explain" -> "Explain Options" sub menu to go
 out of browser visibility in feature test, so it was failing.

 I have put Edit button near Clear button for now, until we come up with
 new design for our editor for displaying these options.

>>>
>>> Hmm, I moved it there intentionally as it's a more traditional position
>>> and thus more discoverable.
>>>
>>> Can we just launch the browser with a wider size, say, 1280? It's on
>>> line 43 of app_starter.py...
>>>
>>>
>> Yes, that will work too.
>>
>>>

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

 On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> I am working on this, will send you patch soon.
>
> On Thu, Jul 20, 2017 at 5:53 PM, Dave Page  wrote:
>
>> Did you get a chance to look at this yet Murtuza?
>>
>> On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Sure, Will take a look.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Wed, Jul 19, 2017 at 8:00 PM, Dave Page 
>>> wrote:
>>>
 Except I managed to break a couple of tests :-(. Can you take a
 look please? I've had some other work come up that I need to deal with.

 
 ==
 ERROR: runTest (pgadmin.feature_tests.query_t
 ool_journey_test.QueryToolJourneyTest)
 Tests the path through the query tool
 
 --
 Traceback (most recent call last):
   File 
 "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
 line 45, in runTest
 self._test_history_tab()
   File 
 "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
 line 71, in _test_history_tab
 self.__clear_query_tool()
   File 
 "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
 line 91, in __clear_query_tool
 self.page.click_element(self.page.find_by_xpath("//*[@id='bt
 n-edit']"))
   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-packa
 ges/selenium/webdriver/support/wait.py", line 80, in until
 raise TimeoutException(message, screen, stacktrace)
 TimeoutException: Message: Timed out waiting for element to exist


 
 ==
 ERROR: runTest (pgadmin.feature_tests.query_t
 ool_tests.QueryToolFeatureTest)
 Query tool feature test
 
 --
 Traceback (most recent call last)

pgAdmin 4 commit: Prevent the Werkzeug reloader from causing a "double

2017-07-21 Thread Dave Page
Prevent the Werkzeug reloader from causing a "double start" at init time.

Branch
--
master

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

Modified Files
--
web/pgAdmin4.py | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)



Re: [pgAdmin4][Patch]: Stop Flask from initialising service twice in Debug mode

2017-07-21 Thread Dave Page
Thanks, applied. The reloader has always been a little temperamental for
me, so I couldn't prove this doesn't break it. If someone finds it does,
please yelp.

On Fri, Jul 21, 2017 at 8:27 AM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi
>
> In this patch, i have added reference to the implementation.
> Please find updated patch and review.
>
> Thanks,
> Surinder
>
> On Fri, Jul 21, 2017 at 12:32 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi
>>
>> When pgAdmin4 runs in DEBUG mode, Flask initialise service twice, while
>> in non-DEBUG mode, once. It is pain while development because `yarn run
>> bundle` also runs twice.
>>
>> It is because the parameter `use_reloader` = True in Debug Mode.
>>
>> If `os.environ` variable `WERKZEUG_RUN_MAIN` is set to None, i.e. app is
>> starting for the first time and then its value is changed to True.
>>
>> Please find attached patch.
>>
>> Thanks
>> Surinder
>>
>>
>>
>>
>


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

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


Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-21 Thread Dave Page
Hi

On Fri, Jul 21, 2017 at 9:38 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Currently if user clicks on empty white area below history entry then
> arrow navigation does not work.
> Attached patch fixes this issue.
>

This fixes that problem, but stops it working if I *don't* click on the
white area first. We need both I think :-)

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

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


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

2017-07-21 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Add an editorconfig file to help maintain coding standards.

[Dave Page] Prevent the Werkzeug reloader from causing a "double start" at init

--
[...truncated 336.58 KB...]
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.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,
Attach partition to existing range 
partitioned table,
Attach partition to exis

[pgAdmin4][Patch]: To fix database disconnect option

2017-07-21 Thread Murtuza Zabuawala
Hi,

PFA minor patch to fix the issue where database disconnect option is not
working.

*Steps to re-produce:*
1) Create a "test" database
2) Connect to "test" database
3) Right click on "test" database and try to disconnect it, you will get an
error on console.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js 
b/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js
index d2d4c48..2b9f052 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js
@@ -173,11 +173,11 @@ define('pgadmin.node.database', [
 },
 /* Disconnect the database */
 disconnect_database: function(args) {
-  var input = args || {};
-  obj = this,
-  t = pgBrowser.tree,
-  i = input.item || t.selected(),
-  d = i && i.length == 1 ? t.itemData(i) : undefined;
+  var input = args || {},
+obj = this,
+t = pgBrowser.tree,
+i = input.item || t.selected(),
+d = i && i.length == 1 ? t.itemData(i) : undefined;
 
   if (!d)
 return false;
@@ -192,8 +192,8 @@ define('pgadmin.node.database', [
 type:'DELETE',
 success: function(res) {
   if (res.success == 1) {
-var prv_i = t.parent(i);
-var alertifyWrapper = new AlertifyWrapper();
+var prv_i = t.parent(i),
+  alertifyWrapper = new AlertifyWrapper();
 alertifyWrapper.success(res.info);
 t.removeIcon(i);
 data.connected = false;


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
Thanks, applied.

On Fri, Jul 21, 2017 at 8:50 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find updated patch.
>
> On Thu, Jul 20, 2017 at 10:35 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>>
>> On Thu, Jul 20, 2017 at 10:29 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 Please find patch attached, There were two issues,
 1) We removed the default button to clear the editor window, it
 broke _clear_query_tool() functionality.
 2) The buttons arrangements, we added new Edit button in between Delete
 and Filter button causing the "Explain" -> "Explain Options" sub menu to go
 out of browser visibility in feature test, so it was failing.

 I have put Edit button near Clear button for now, until we come up with
 new design for our editor for displaying these options.

>>>
>>> Hmm, I moved it there intentionally as it's a more traditional position
>>> and thus more discoverable.
>>>
>>> Can we just launch the browser with a wider size, say, 1280? It's on
>>> line 43 of app_starter.py...
>>>
>>>
>> Yes, that will work too.
>>
>>>

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

 On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> I am working on this, will send you patch soon.
>
> On Thu, Jul 20, 2017 at 5:53 PM, Dave Page  wrote:
>
>> Did you get a chance to look at this yet Murtuza?
>>
>> On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Sure, Will take a look.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Wed, Jul 19, 2017 at 8:00 PM, Dave Page 
>>> wrote:
>>>
 Except I managed to break a couple of tests :-(. Can you take a
 look please? I've had some other work come up that I need to deal with.

 
 ==
 ERROR: runTest (pgadmin.feature_tests.query_t
 ool_journey_test.QueryToolJourneyTest)
 Tests the path through the query tool
 
 --
 Traceback (most recent call last):
   File 
 "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
 line 45, in runTest
 self._test_history_tab()
   File 
 "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
 line 71, in _test_history_tab
 self.__clear_query_tool()
   File 
 "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
 line 91, in __clear_query_tool
 self.page.click_element(self.page.find_by_xpath("//*[@id='bt
 n-edit']"))
   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-packa
 ges/selenium/webdriver/support/wait.py", line 80, in until
 raise TimeoutException(message, screen, stacktrace)
 TimeoutException: Message: Timed out waiting for element to exist


 
 ==
 ERROR: runTest (pgadmin.feature_tests.query_t
 ool_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 52, in runTest
 self._clear_query_tool()
   File 
 "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_tests.py",
 line 173, in _clear_query_tool
 self.page.find_by_id("btn-edit").click()
   File 
 "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.p

pgAdmin 4 commit: Fix regression tests after Dave broke them.

2017-07-21 Thread Dave Page
Fix regression tests after Dave broke them.

Branch
--
master

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

Modified Files
--
.../feature_tests/pg_datatype_validation_test.py   |  2 +-
.../feature_tests/query_tool_journey_test.py   | 33 +++---
web/pgadmin/feature_tests/query_tool_tests.py  | 26 +++--
.../tools/datagrid/templates/datagrid/index.html   |  2 +-
web/regression/feature_utils/app_starter.py|  2 +-
5 files changed, 30 insertions(+), 35 deletions(-)



Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-21 Thread Harshal Dhumal
Hi,

On Fri, Jul 21, 2017 at 2:24 PM, Dave Page  wrote:

> Hi
>
> On Fri, Jul 21, 2017 at 9:38 AM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Currently if user clicks on empty white area below history entry then
>> arrow navigation does not work.
>> Attached patch fixes this issue.
>>
>
> This fixes that problem, but stops it working if I *don't* click on the
> white area first. We need both I think :-)
>
Yes we need both. Please find updated patch


>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/web/pgadmin/static/jsx/history/query_history.jsx b/web/pgadmin/static/jsx/history/query_history.jsx
index a276e53..8efe08b 100644
--- a/web/pgadmin/static/jsx/history/query_history.jsx
+++ b/web/pgadmin/static/jsx/history/query_history.jsx
@@ -57,13 +57,13 @@ export default class QueryHistory extends React.Component {
 
   refocus() {
 if (this.state.history.length > 0) {
-  this.retrieveSelectedQuery().parentElement.focus();
+  this.retrieveQueryListPane().focus();
 }
   }
 
-  retrieveSelectedQuery() {
+  retrieveQueryListPane() {
 return ReactDOM.findDOMNode(this)
-  .getElementsByClassName('selected')[0];
+  .getElementsByClassName('query-history')[0];
   }
 
   getCurrentHistoryDetail() {
@@ -172,13 +172,14 @@ export default class QueryHistory extends React.Component {
   
 
+ className="query-history"
+ onKeyDown={this.navigateUpAndDown}
+ tabIndex='0'>
   
 {this.retrieveOrderedHistory()
   .map((entry, index) =>
-
+
   
@@ -198,4 +199,4 @@ QueryHistory.propTypes = {
 
 export {
   QueryHistory,
-};
\ No newline at end of file
+};
diff --git a/web/pgadmin/static/scss/sqleditor/_history.scss b/web/pgadmin/static/scss/sqleditor/_history.scss
index ed0c10f..942af03 100644
--- a/web/pgadmin/static/scss/sqleditor/_history.scss
+++ b/web/pgadmin/static/scss/sqleditor/_history.scss
@@ -1,4 +1,5 @@
 .query-history {
+  height: 100%;
   .list-item {
 border-bottom: 1px solid $color-gray-3;
   }
diff --git a/web/regression/javascript/history/query_history_spec.jsx b/web/regression/javascript/history/query_history_spec.jsx
index 2fa6a7d..c3b09ba 100644
--- a/web/regression/javascript/history/query_history_spec.jsx
+++ b/web/regression/javascript/history/query_history_spec.jsx
@@ -36,11 +36,11 @@ describe('QueryHistory', () => {
 describe('when we switch to the query history tab', () => {
   beforeEach(() => {
 historyWrapper.node.refocus();
-spyOn(historyWrapper.node, 'retrieveSelectedQuery');
+spyOn(historyWrapper.node, 'retrieveQueryListPane');
   });
 
   it('does not try to focus on any element', () => {
-expect(historyWrapper.node.retrieveSelectedQuery).not.toHaveBeenCalled();
+expect(historyWrapper.node.retrieveQueryListPane).not.toHaveBeenCalled();
   });
 });
 
@@ -49,7 +49,7 @@ describe('QueryHistory', () => {
   expect(foundChildren.length).toBe(0);
   done();
 });
-
+
 it('nothing is displayed on right panel', (done) => {
   let foundChildren = historyWrapper.find(QueryHistoryDetail);
   expect(foundChildren.length).toBe(1);
@@ -264,7 +264,7 @@ describe('QueryHistory', () => {
 
   beforeEach(() => {
 selectedListItem = ReactDOM.findDOMNode(historyWrapper.node)
-  .getElementsByClassName('selected')[0].parentElement;
+  .getElementsByClassName('query-history')[0];
 
 spyOn(selectedListItem, 'focus');
 historyWrapper.node.refocus();


pgAdmin 4 commit: Fix disconnection of new databases. Fixes #2594

2017-07-21 Thread Dave Page
Fix disconnection of new databases. Fixes #2594

Branch
--
master

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

Modified Files
--
.../server_groups/servers/databases/static/js/database.js  | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)



Re: [pgAdmin4][Patch]: To fix database disconnect option

2017-07-21 Thread Dave Page
Thanks, applied.

On Fri, Jul 21, 2017 at 10:08 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch to fix the issue where database disconnect option is not
> working.
>
> *Steps to re-produce:*
> 1) Create a "test" database
> 2) Connect to "test" database
> 3) Right click on "test" database and try to disconnect it, you will get
> an error on console.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



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

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


Re: [pgAdmin4][Patch]: To fix database disconnect option

2017-07-21 Thread Surinder Kumar
Hi

As discussed the disconnect option is not working due to javascript error:
"obj is undefined" and which is after web packing. so in some files global
variables needs to convert into local var.

We need to run eslint on each file to find out such issues and fix all at
once. So i am writing a new entry "yarn run eslint /path/to/module/" in
package.json > scripts as Ashesh suggested, so that everytime before
submitting/commiting a patch, running eslint can prompt such errors.

Thanks Murtuza for fix.

Thanks,
Surinder

On Fri, Jul 21, 2017 at 3:41 PM, Dave Page  wrote:

> Thanks, applied.
>
> On Fri, Jul 21, 2017 at 10:08 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA minor patch to fix the issue where database disconnect option is not
>> working.
>>
>> *Steps to re-produce:*
>> 1) Create a "test" database
>> 2) Connect to "test" database
>> 3) Right click on "test" database and try to disconnect it, you will get
>> an error on console.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Jenkins build is back to normal : pgadmin4-master-python27 #259

2017-07-21 Thread pgAdmin 4 Jenkins
See 





Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 11:05 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> On Fri, Jul 21, 2017 at 2:24 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Fri, Jul 21, 2017 at 9:38 AM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Currently if user clicks on empty white area below history entry then
>>> arrow navigation does not work.
>>> Attached patch fixes this issue.
>>>
>>
>> This fixes that problem, but stops it working if I *don't* click on the
>> white area first. We need both I think :-)
>>
> Yes we need both. Please find updated patch
>

Why all the changes to yarn.lock?

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

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


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Robert Eckhardt
I'm not sure what you mean by across platforms.  Do you mean that those are
the keyboard shortcuts in pgAdmin 3?

Rob

On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala" <
murtuza.zabuaw...@enterprisedb.com> wrote:

Hi Robert,

Just to make shortcut keys uniform across all the platforms.

On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt 
wrote:

> Murtuza,
>
> Is there a particular reason you choose the keyboard shortcuts that you
> choose. When we were looking at this earlier to see what was being used
> elsewhere we discovered:
>
> jetbrains  cmd+/
> pycharmcmd+/
> SublimeCtrl+/ Toggle line comment
>Ctrl+Shift+/ Toggle block comment
> EclipseCTRL + /
> Notepad++  CTRL+Q   Toggle line comment
>CTRL+SHIFT+Q Toggle block comment
> TextWrangler   Ctrl+/
>
> -- Rob
>
>
> On Thu, Jul 20, 2017 at 1:05 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>>
>> On Thu, Jul 20, 2017 at 10:29 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 Please find patch attached, There were two issues,
 1) We removed the default button to clear the editor window, it
 broke _clear_query_tool() functionality.
 2) The buttons arrangements, we added new Edit button in between Delete
 and Filter button causing the "Explain" -> "Explain Options" sub menu to go
 out of browser visibility in feature test, so it was failing.

 I have put Edit button near Clear button for now, until we come up with
 new design for our editor for displaying these options.

>>>
>>> Hmm, I moved it there intentionally as it's a more traditional position
>>> and thus more discoverable.
>>>
>>> Can we just launch the browser with a wider size, say, 1280? It's on
>>> line 43 of app_starter.py...
>>>
>>>
>> Yes, that will work too.
>>
>>>

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

 On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> I am working on this, will send you patch soon.
>
> On Thu, Jul 20, 2017 at 5:53 PM, Dave Page  wrote:
>
>> Did you get a chance to look at this yet Murtuza?
>>
>> On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Sure, Will take a look.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Wed, Jul 19, 2017 at 8:00 PM, Dave Page 
>>> wrote:
>>>
 Except I managed to break a couple of tests :-(. Can you take a
 look please? I've had some other work come up that I need to deal with.

 
 ==
 ERROR: runTest (pgadmin.feature_tests.query_t
 ool_journey_test.QueryToolJourneyTest)
 Tests the path through the query tool
 
 --
 Traceback (most recent call last):
   File 
 "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
 line 45, in runTest
 self._test_history_tab()
   File 
 "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
 line 71, in _test_history_tab
 self.__clear_query_tool()
   File 
 "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
 line 91, in __clear_query_tool
 self.page.click_element(self.page.find_by_xpath("//*[@id='bt
 n-edit']"))
   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-packa
 ges/selenium/webdriver/support/wait.py", line 80, in until
 raise TimeoutException(message, screen, stacktrace)
 TimeoutException: Message: Timed out waiting for element to exist


 
 ==
 ERROR: runTest (pgadm

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Murtuza Zabuawala
Hi Robert,

I mean rather than using cmd key for Mac and CTRL key for Windows/Linux, I
used "CTRL" key for all the platforms.
And regarding choosing comma & period keys, they all are near each to each
other so user can remember them easily.

Let me know If my thinking was wrong for shortcut keys, I'll change them
accordingly and send new patch.

On Fri, Jul 21, 2017 at 4:25 PM, Robert Eckhardt 
wrote:

> I'm not sure what you mean by across platforms.  Do you mean that those
> are the keyboard shortcuts in pgAdmin 3?
>
> Rob
>
> On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala"  enterprisedb.com> wrote:
>
> Hi Robert,
>
> Just to make shortcut keys uniform across all the platforms.
>
> On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt 
> wrote:
>
>> Murtuza,
>>
>> Is there a particular reason you choose the keyboard shortcuts that you
>> choose. When we were looking at this earlier to see what was being used
>> elsewhere we discovered:
>>
>> jetbrains  cmd+/
>> pycharmcmd+/
>> SublimeCtrl+/ Toggle line comment
>>Ctrl+Shift+/ Toggle block comment
>> EclipseCTRL + /
>> Notepad++  CTRL+Q   Toggle line comment
>>CTRL+SHIFT+Q Toggle block comment
>> TextWrangler   Ctrl+/
>>
>> -- Rob
>>
>>
>> On Thu, Jul 20, 2017 at 1:05 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>>
>>> On Thu, Jul 20, 2017 at 10:29 PM, Dave Page  wrote:
>>>
 Hi

 On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find patch attached, There were two issues,
> 1) We removed the default button to clear the editor window, it
> broke _clear_query_tool() functionality.
> 2) The buttons arrangements, we added new Edit button in between
> Delete and Filter button causing the "Explain" -> "Explain Options" sub
> menu to go out of browser visibility in feature test, so it was failing.
>
> I have put Edit button near Clear button for now, until we come up
> with new design for our editor for displaying these options.
>

 Hmm, I moved it there intentionally as it's a more traditional position
 and thus more discoverable.

 Can we just launch the browser with a wider size, say, 1280? It's on
 line 43 of app_starter.py...


>>> Yes, that will work too.
>>>

>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> I am working on this, will send you patch soon.
>>
>> On Thu, Jul 20, 2017 at 5:53 PM, Dave Page  wrote:
>>
>>> Did you get a chance to look at this yet Murtuza?
>>>
>>> On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Sure, Will take a look.

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

 On Wed, Jul 19, 2017 at 8:00 PM, Dave Page 
 wrote:

> Except I managed to break a couple of tests :-(. Can you take a
> look please? I've had some other work come up that I need to deal 
> with.
>
> 
> ==
> ERROR: runTest (pgadmin.feature_tests.query_t
> ool_journey_test.QueryToolJourneyTest)
> Tests the path through the query tool
> 
> --
> Traceback (most recent call last):
>   File "/Users/dpage/git/pgadmin4/web
> /pgadmin/feature_tests/query_tool_journey_test.py", line 45, in
> runTest
> self._test_history_tab()
>   File "/Users/dpage/git/pgadmin4/web
> /pgadmin/feature_tests/query_tool_journey_test.py", line 71, in
> _test_history_tab
> self.__clear_query_tool()
>   File "/Users/dpage/git/pgadmin4/web
> /pgadmin/feature_tests/query_tool_journey_test.py", line 91, in
> __clear_query_tool
> self.page.click_element(self.page.find_by_xpath("//*[@id='bt
> n-edit']"))
>   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_u

Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-21 Thread Harshal Dhumal
On Jul 21, 2017 4:23 PM, "Dave Page"  wrote:



On Fri, Jul 21, 2017 at 11:05 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> On Fri, Jul 21, 2017 at 2:24 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Fri, Jul 21, 2017 at 9:38 AM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Currently if user clicks on empty white area below history entry then
>>> arrow navigation does not work.
>>> Attached patch fixes this issue.
>>>
>>
>> This fixes that problem, but stops it working if I *don't* click on the
>> white area first. We need both I think :-)
>>
> Yes we need both. Please find updated patch
>

Why all the changes to yarn.lock?

Are there? I can't see any changes.

Sent from my mobile


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

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


pgAdmin 4 commit: Add a field to the Server Dialogue allowing users to

2017-07-21 Thread Dave Page
Add a field to the Server Dialogue allowing users to specify a subset of 
databases they'd like to see in the treeview. Fixes #1918

Branch
--
master

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

Modified Files
--
docs/en_US/images/server_advanced.png  | Bin 41923 -> 86133 bytes
docs/en_US/server_dialog.rst   |   3 +-
web/migrations/versions/d85a62333272_.py   |  28 ++
.../browser/server_groups/servers/__init__.py  |  14 +--
.../server_groups/servers/databases/__init__.py|  41 -
.../databases/sql/9.2_plus/properties.sql  |   5 +++
.../templates/databases/sql/9.2_plus/stats.sql |   5 +++
.../templates/databases/sql/default/nodes.sql  |   5 +++
.../templates/databases/sql/default/properties.sql |   5 +++
.../templates/databases/sql/default/stats.sql  |   5 +++
.../server_groups/servers/static/js/server.js  |   7 +++-
web/pgadmin/model/__init__.py  |   2 +
web/pgadmin/static/js/backform.pgadmin.js  |  27 +-
web/pgadmin/utils/driver/psycopg2/__init__.py  |   1 +
14 files changed, 130 insertions(+), 18 deletions(-)



Re: [pgAdmin4][Patch][RM_1918] : Implement the DB restriction field from pgAdmin III

2017-07-21 Thread Dave Page
Thanks, patch applied!

A couple of tips for the future:

- Please ensure screenshots are of a comparable size to the ones around
them or that they replace. We sometimes see extra-large screenshots where
they've been taken on hi-res screens, often in an VM.

- Please be more generous with spaces, e.g.

func_name(a,b) should be func_name(a, b)

or

if (dave.isHungry()){
dave.feed('Sammich')
}

should be

if (dave.isHungry()) {
dave.feed('Sammich')
}

It makes it all a little more readable :-)

Thanks again.

On Fri, Jul 21, 2017 at 11:01 AM, Atul Sharma 
wrote:

> Hi,
>
> Please find attached patch for RM#1918 : Implement the DB restriction
> field from pgAdmin III
>
> Thanks,
> Atul
>



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

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


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

2017-07-21 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Add a field to the Server Dialogue allowing users to specify a 
subset of

--
[...truncated 336.11 KB...]
Attach partition to existing list 
partitioned table,
Detach partition from existing list 
partitioned table)
SynonymAddTestCase (Default Node URL)
ResourceGroupsAddTestCase (Add resource groups)
TestSSLConnection (Test for SSL connection)
PackageGetTestCase (Fetch Package Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
PackagePutTestCase (Fetch Package Node URL)
ResourceGroupsDeleteTestCase (Delete resource groups)

PostgreSQL 9.2:

149 tests passed
0 tests failed
23 tests skipped:
SynonymGetTestCase (Fetch synonym Node URL)
EventTriggerPutTestCase (Fetch Event Trigger Node URL)
ResourceGroupsGetTestCase (Get resource groups)
ViewsUpdateTestCase (Update materialized view under schema node)
SynonymAddTestCase (Default Node URL)
ResourceGroupsAddTestCase (Add resource groups)
TestSSLConnection (Test for SSL connection)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
ResourceGroupsDeleteTestCase (Delete resource groups)
ViewsGetTestCase (Get materialized view under schema node)
PackageAddTestCase (Fetch Package Node URL)
SynonymPutTestCase (Fetch synonym Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
ViewsAddTestCase (Add materialized view under schema node)
ResourceGroupsPutTestCase (Put resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
EventTriggerDeleteTestCase (Fetch Event Trigger Node URL)
EventTriggerGetTestCase (Fetch Event Trigger Node URL)
PackageGetTestCase (Fetch Package Node URL)
TableUpdateTestCase (Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Create partitions of existing range 
partitioned table,
Create partitions of existing list 
partitioned table,
Attach partition to existing list 
partitioned table,
Detach partition from existing list 
partitioned table)
ViewsDeleteTestCase (Delete materialized view under schema node)
PackagePutTestCase (Fetch Package Node URL)
EventTriggerAddTestCase (Fetch Event Trigger Node URL)

PostgreSQL 10:

159 tests passed
0 tests failed
13 tests skipped:
SynonymGetTestCase (Fetch synonym Node URL)
PackageAddTestCase (Fetch Package Node URL)
ResourceGroupsGetTestCase (Get resource groups)
SynonymPutTestCase (Fetch synonym Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
ResourceGroupsPutTestCase (Put resource groups)
SynonymDeleteTestCase (Fetch synonym Node URL)
SynonymAddTestCase (Default Node URL)
ResourceGroupsAddTestCase (Add resource groups)
TestSSLConnection (Test for SSL connection)
PackageGetTestCase (Fetch Package Node URL)
PackagePutTestCase (Fetch Package Node URL)
ResourceGroupsDeleteTestCase (Delete resource groups)

EDB Postgres AS 9.3:

165 tests passed
0 tests failed
7 tests skipped:
TableUpdateTestCase (Detach partition from existing range 
partitioned table,
Attach partition to existing range 
partitioned table,
Create partitions of existing range 
partitioned table,
Create partitions of existing list 
partitioned table,
Attach partition to existing list 
partitioned table,
Detach partition from existing list 
partitioned table)
ResourceGroupsAddTestCase (Add resource groups)
ResourceGroupsGetTestCase (Get resource groups)
ResourceGroupsDeleteTestCase (Delete resource groups)

Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 12:34 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

>
>
> On Jul 21, 2017 4:23 PM, "Dave Page"  wrote:
>
>
>
> On Fri, Jul 21, 2017 at 11:05 AM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> On Fri, Jul 21, 2017 at 2:24 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Fri, Jul 21, 2017 at 9:38 AM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 Hi,

 Currently if user clicks on empty white area below history entry then
 arrow navigation does not work.
 Attached patch fixes this issue.

>>>
>>> This fixes that problem, but stops it working if I *don't* click on the
>>> white area first. We need both I think :-)
>>>
>> Yes we need both. Please find updated patch
>>
>
> Why all the changes to yarn.lock?
>
> Are there? I can't see any changes.
>

Huh, no, you're right. Looks like my machine is rewriting it for some
reason. I'll dig deeper.

Sorry for the noise.

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

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


pgAdmin 4 commit: Ensure arrow keys work correctly when the pane is foc

2017-07-21 Thread Dave Page
Ensure arrow keys work correctly when the pane is focused instead of the tab in 
the query tool history.

Branch
--
master

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

Modified Files
--
web/pgadmin/static/jsx/history/query_history.jsx| 17 +
web/pgadmin/static/scss/sqleditor/_history.scss |  1 +
.../javascript/history/query_history_spec.jsx   |  8 
3 files changed, 14 insertions(+), 12 deletions(-)



Re: [pgadmin4][PATCH] Query History Arrow Navigation and Styling

2017-07-21 Thread Dave Page
And... applied. Thanks.

On Fri, Jul 21, 2017 at 1:28 PM, Dave Page  wrote:

>
>
> On Fri, Jul 21, 2017 at 12:34 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>>
>>
>> On Jul 21, 2017 4:23 PM, "Dave Page"  wrote:
>>
>>
>>
>> On Fri, Jul 21, 2017 at 11:05 AM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> On Fri, Jul 21, 2017 at 2:24 PM, Dave Page  wrote:
>>>
 Hi

 On Fri, Jul 21, 2017 at 9:38 AM, Harshal Dhumal <
 harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Currently if user clicks on empty white area below history entry then
> arrow navigation does not work.
> Attached patch fixes this issue.
>

 This fixes that problem, but stops it working if I *don't* click on the
 white area first. We need both I think :-)

>>> Yes we need both. Please find updated patch
>>>
>>
>> Why all the changes to yarn.lock?
>>
>> Are there? I can't see any changes.
>>
>
> Huh, no, you're right. Looks like my machine is rewriting it for some
> reason. I'll dig deeper.
>
> Sorry for the noise.
>
> --
> 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


[pgAdmin4][patch][RM#2593]: Query Tool/ Debugger won't load with Qt-5.1 with webkit

2017-07-21 Thread Surinder Kumar
Hi

When an instance of query tool and debugger is opened, it fails to load and
gives following error in console:
`Promise is undefined.`

The reason is: These instances are loaded in an iframe and their bundles
don't include `babel-polyfill` library. Babel-polyfill must be loaded first.

Please find attached patch and review it. Thanks to Khushboo for reporting
it.

Thanks,
Surinder


qt_webkit_add_Promise_support.patch
Description: Binary data


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

2017-07-21 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Add controls and shortcuts for commenting/uncommenting code in the 
SQL

[Dave Page] Fix typo in filename.

[Dave Page] Webpacking cleanups

[Dave Page] Fix regressions introduced by PG10's partitioning code. Fixes #2043.

[Dave Page] More webpack cleanup - add comments liberally and rename lib.css to

[Dave Page] Don't attempt to render binary data in the query tool result grid. 
Fixes

[Dave Page] Fix webpacking of loading icon.

[Dave Page] Remove debug logging of the URL map which is extremely long now, 
and not

[Dave Page] Add the Flask-Paranoid module for a little extra, well, paranoia in 
web

[Dave Page] Allow navigation of query history using the arrow keys. Fixes #2590

[Dave Page] Improve the history UI.

[Dave Page] Move Query Tool keyboard shortcut code into a new module and add 
tests.

[Dave Page] Add an editorconfig file to help maintain coding standards.

[Dave Page] Prevent the Werkzeug reloader from causing a "double start" at init

[Dave Page] Fix regression tests after Dave broke them.

[Dave Page] Fix disconnection of new databases. Fixes #2594

[Dave Page] Add a field to the Server Dialogue allowing users to specify a 
subset of

[Dave Page] Ensure arrow keys work correctly when the pane is focused instead 
of the

--
[...truncated 142.24 KB...]
--
Traceback (most recent call last):
  File 
"
 line 38, in setUp
self.page.reset_layout()
  File 
"
 line 37, in reset_layout
self.wait_for_reloading_indicator_to_disappear()
  File 
"
 line 242, in wait_for_reloading_indicator_to_disappear
self._wait_for("reloading indicator to disappear", 
reloading_indicator_has_disappeared)
  File 
"
 line 282, in _wait_for
"Timed out waiting for " + waiting_for_message)
  File 
"
 line 80, in until
raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for reloading indicator to 
disappear


==
ERROR: runTest (pgadmin.feature_tests.query_tool_tests.QueryToolFeatureTest)
Query tool feature test
--
Traceback (most recent call last):
  File 
"
 line 38, in setUp
self.page.reset_layout()
  File 
"
 line 37, in reset_layout
self.wait_for_reloading_indicator_to_disappear()
  File 
"
 line 242, in wait_for_reloading_indicator_to_disappear
self._wait_for("reloading indicator to disappear", 
reloading_indicator_has_disappeared)
  File 
"
 line 282, in _wait_for
"Timed out waiting for " + waiting_for_message)
  File 
"
 line 80, in until
raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for reloading indicator to 
disappear


==
ERROR: runTest 
(pgadmin.feature_tests.table_ddl_feature_test.TableDdlFeatureTest)
Test table DDL generation
--
Traceback (most recent call last):
  File 
"
 line 38, in setUp
self.page.reset_layout()
  File 
"
 line 37, in reset_layout
self.wait_for_reloading_indicator_to_disappear()
  File 
"

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

2017-07-21 Thread pgAdmin 4 Jenkins
See 





Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Sarah McAlear
Hi!

We looked at the patch and realized that the function to check if an
element is not clickable because it's out of view was using an incorrect
assertion. We changed it and created a small patch. We also realized that
on the current master the yarn.lock is causing changes when running the
app. It looks like maybe eclint was added to package.json and it and its
corresponding dependencies were not added to the checked in yarn.lock file.

Thanks,
Shruti & Sarah



On Fri, Jul 21, 2017 at 4:09 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Robert,
>
> I mean rather than using cmd key for Mac and CTRL key for Windows/Linux, I
> used "CTRL" key for all the platforms.
> And regarding choosing comma & period keys, they all are near each to each
> other so user can remember them easily.
>
> Let me know If my thinking was wrong for shortcut keys, I'll change them
> accordingly and send new patch.
>
> On Fri, Jul 21, 2017 at 4:25 PM, Robert Eckhardt 
> wrote:
>
>> I'm not sure what you mean by across platforms.  Do you mean that those
>> are the keyboard shortcuts in pgAdmin 3?
>>
>> Rob
>>
>> On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala" <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>> Hi Robert,
>>
>> Just to make shortcut keys uniform across all the platforms.
>>
>> On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt 
>> wrote:
>>
>>> Murtuza,
>>>
>>> Is there a particular reason you choose the keyboard shortcuts that you
>>> choose. When we were looking at this earlier to see what was being used
>>> elsewhere we discovered:
>>>
>>> jetbrains  cmd+/
>>> pycharmcmd+/
>>> SublimeCtrl+/ Toggle line comment
>>>Ctrl+Shift+/ Toggle block comment
>>> EclipseCTRL + /
>>> Notepad++  CTRL+Q   Toggle line comment
>>>CTRL+SHIFT+Q Toggle block comment
>>> TextWrangler   Ctrl+/
>>>
>>> -- Rob
>>>
>>>
>>> On Thu, Jul 20, 2017 at 1:05 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>

 On Thu, Jul 20, 2017 at 10:29 PM, Dave Page  wrote:

> Hi
>
> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find patch attached, There were two issues,
>> 1) We removed the default button to clear the editor window, it
>> broke _clear_query_tool() functionality.
>> 2) The buttons arrangements, we added new Edit button in between
>> Delete and Filter button causing the "Explain" -> "Explain Options" sub
>> menu to go out of browser visibility in feature test, so it was failing.
>>
>> I have put Edit button near Clear button for now, until we come up
>> with new design for our editor for displaying these options.
>>
>
> Hmm, I moved it there intentionally as it's a more traditional
> position and thus more discoverable.
>
> Can we just launch the browser with a wider size, say, 1280? It's on
> line 43 of app_starter.py...
>
>
 Yes, that will work too.

>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> I am working on this, will send you patch soon.
>>>
>>> On Thu, Jul 20, 2017 at 5:53 PM, Dave Page 
>>> wrote:
>>>
 Did you get a chance to look at this yet Murtuza?

 On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Sure, Will take a look.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Jul 19, 2017 at 8:00 PM, Dave Page 
> wrote:
>
>> Except I managed to break a couple of tests :-(. Can you take a
>> look please? I've had some other work come up that I need to deal 
>> with.
>>
>> 
>> ==
>> ERROR: runTest (pgadmin.feature_tests.query_t
>> ool_journey_test.QueryToolJourneyTest)
>> Tests the path through the query tool
>> 
>> --
>> Traceback (most recent call last):
>>   File "/Users/dpage/git/pgadmin4/web
>> /pgadmin/feature_tests/query_tool_journey_test.py", line 45, in
>> runTest
>> self._test_history_tab()
>>   File "/Users/dpage/git/pgadmin4/web
>> /pgadmin/feature_tests/query_tool_journey_test.py", line 71, in
>> _test_history_tab
>> self.__clear_query_tool()
>>   File "/Users/dpage/git/pgadmin4/web
>>

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Robert Eckhardt
I wouldn't say wrong, it just wasn't what I was expecting.

I guess I'd like to hear what others are expecting. If I had my way we
would use

Ctrl+/   single line comment and uncomment (prepend with --)
Ctrl+Shift+/ block comment and uncomment (bracket with /* and */)


where Ctrl == command on Mac.

-- Rob

On Fri, Jul 21, 2017 at 7:09 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Robert,
>
> I mean rather than using cmd key for Mac and CTRL key for Windows/Linux, I
> used "CTRL" key for all the platforms.
> And regarding choosing comma & period keys, they all are near each to each
> other so user can remember them easily.
>
> Let me know If my thinking was wrong for shortcut keys, I'll change them
> accordingly and send new patch.
>
> On Fri, Jul 21, 2017 at 4:25 PM, Robert Eckhardt 
> wrote:
>
>> I'm not sure what you mean by across platforms.  Do you mean that those
>> are the keyboard shortcuts in pgAdmin 3?
>>
>> Rob
>>
>> On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala" <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>> Hi Robert,
>>
>> Just to make shortcut keys uniform across all the platforms.
>>
>> On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt 
>> wrote:
>>
>>> Murtuza,
>>>
>>> Is there a particular reason you choose the keyboard shortcuts that you
>>> choose. When we were looking at this earlier to see what was being used
>>> elsewhere we discovered:
>>>
>>> jetbrains  cmd+/
>>> pycharmcmd+/
>>> SublimeCtrl+/ Toggle line comment
>>>Ctrl+Shift+/ Toggle block comment
>>> EclipseCTRL + /
>>> Notepad++  CTRL+Q   Toggle line comment
>>>CTRL+SHIFT+Q Toggle block comment
>>> TextWrangler   Ctrl+/
>>>
>>> -- Rob
>>>
>>>
>>> On Thu, Jul 20, 2017 at 1:05 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>

 On Thu, Jul 20, 2017 at 10:29 PM, Dave Page  wrote:

> Hi
>
> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find patch attached, There were two issues,
>> 1) We removed the default button to clear the editor window, it
>> broke _clear_query_tool() functionality.
>> 2) The buttons arrangements, we added new Edit button in between
>> Delete and Filter button causing the "Explain" -> "Explain Options" sub
>> menu to go out of browser visibility in feature test, so it was failing.
>>
>> I have put Edit button near Clear button for now, until we come up
>> with new design for our editor for displaying these options.
>>
>
> Hmm, I moved it there intentionally as it's a more traditional
> position and thus more discoverable.
>
> Can we just launch the browser with a wider size, say, 1280? It's on
> line 43 of app_starter.py...
>
>
 Yes, that will work too.

>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> I am working on this, will send you patch soon.
>>>
>>> On Thu, Jul 20, 2017 at 5:53 PM, Dave Page 
>>> wrote:
>>>
 Did you get a chance to look at this yet Murtuza?

 On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Sure, Will take a look.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Jul 19, 2017 at 8:00 PM, Dave Page 
> wrote:
>
>> Except I managed to break a couple of tests :-(. Can you take a
>> look please? I've had some other work come up that I need to deal 
>> with.
>>
>> 
>> ==
>> ERROR: runTest (pgadmin.feature_tests.query_t
>> ool_journey_test.QueryToolJourneyTest)
>> Tests the path through the query tool
>> 
>> --
>> Traceback (most recent call last):
>>   File "/Users/dpage/git/pgadmin4/web
>> /pgadmin/feature_tests/query_tool_journey_test.py", line 45, in
>> runTest
>> self._test_history_tab()
>>   File "/Users/dpage/git/pgadmin4/web
>> /pgadmin/feature_tests/query_tool_journey_test.py", line 71, in
>> _test_history_tab
>> self.__clear_query_tool()
>>   File "/Users/dpage/git/pgadmin4/web
>> /pgadmin/feature_tests/query_tool_journey_test.py", line 91, in
>> __clear_query_tool
>> self.page.click_element(self.page.find_by

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 4:08 PM, Robert Eckhardt 
wrote:

> I wouldn't say wrong, it just wasn't what I was expecting.
>
> I guess I'd like to hear what others are expecting. If I had my way we
> would use
>
> Ctrl+/   single line comment and uncomment (prepend with --)
> Ctrl+Shift+/ block comment and uncomment (bracket with /* and */)
>
>
> where Ctrl == command on Mac.
>

I think those might be easier to remember than the current keys.

I'm not sure it makes sense to have a single key for line commenting and
uncommenting though. Whilst it's certainly cleaner, what should the
behaviour be for a block such as:

CREATE TABLE foo (
  id serial,
  data text
);

-- Index required on data for finding Wumpus' quickly
CREATE INDEX foo_idx ON foo (data);

Is that likely to be a problem, or am I overthinking it?


>
> -- Rob
>
> On Fri, Jul 21, 2017 at 7:09 AM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Robert,
>>
>> I mean rather than using cmd key for Mac and CTRL key for Windows/Linux,
>> I used "CTRL" key for all the platforms.
>> And regarding choosing comma & period keys, they all are near each to
>> each other so user can remember them easily.
>>
>> Let me know If my thinking was wrong for shortcut keys, I'll change them
>> accordingly and send new patch.
>>
>> On Fri, Jul 21, 2017 at 4:25 PM, Robert Eckhardt 
>> wrote:
>>
>>> I'm not sure what you mean by across platforms.  Do you mean that those
>>> are the keyboard shortcuts in pgAdmin 3?
>>>
>>> Rob
>>>
>>> On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala" <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
>>> Hi Robert,
>>>
>>> Just to make shortcut keys uniform across all the platforms.
>>>
>>> On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt 
>>> wrote:
>>>
 Murtuza,

 Is there a particular reason you choose the keyboard shortcuts that you
 choose. When we were looking at this earlier to see what was being used
 elsewhere we discovered:

 jetbrains  cmd+/
 pycharmcmd+/
 SublimeCtrl+/ Toggle line comment
Ctrl+Shift+/ Toggle block comment
 EclipseCTRL + /
 Notepad++  CTRL+Q   Toggle line comment
CTRL+SHIFT+Q Toggle block comment
 TextWrangler   Ctrl+/

 -- Rob


 On Thu, Jul 20, 2017 at 1:05 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

>
> On Thu, Jul 20, 2017 at 10:29 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> Please find patch attached, There were two issues,
>>> 1) We removed the default button to clear the editor window, it
>>> broke _clear_query_tool() functionality.
>>> 2) The buttons arrangements, we added new Edit button in between
>>> Delete and Filter button causing the "Explain" -> "Explain Options" sub
>>> menu to go out of browser visibility in feature test, so it was failing.
>>>
>>> I have put Edit button near Clear button for now, until we come up
>>> with new design for our editor for displaying these options.
>>>
>>
>> Hmm, I moved it there intentionally as it's a more traditional
>> position and thus more discoverable.
>>
>> Can we just launch the browser with a wider size, say, 1280? It's on
>> line 43 of app_starter.py...
>>
>>
> Yes, that will work too.
>
>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 I am working on this, will send you patch soon.

 On Thu, Jul 20, 2017 at 5:53 PM, Dave Page 
 wrote:

> Did you get a chance to look at this yet Murtuza?
>
> On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Sure, Will take a look.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Jul 19, 2017 at 8:00 PM, Dave Page 
>> wrote:
>>
>>> Except I managed to break a couple of tests :-(. Can you take a
>>> look please? I've had some other work come up that I need to deal 
>>> with.
>>>
>>> 
>>> ==
>>> ERROR: runTest (pgadmin.feature_tests.query_t
>>> ool_journey_test.QueryToolJourneyTest)
>>> Tests the path through the query tool
>>> 
>>> --

Re: [pgAdmin4][patch][RM#2593]: Query Tool/ Debugger won't load with Qt-5.1 with webkit

2017-07-21 Thread Dave Page
Thanks, applied.

On Fri, Jul 21, 2017 at 2:06 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi
>
> When an instance of query tool and debugger is opened, it fails to load
> and gives following error in console:
> `Promise is undefined.`
>
> The reason is: These instances are loaded in an iframe and their bundles
> don't include `babel-polyfill` library. Babel-polyfill must be loaded first.
>
> Please find attached patch and review it. Thanks to Khushboo for reporting
> it.
>
> Thanks,
> Surinder
>
>
>


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

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


pgAdmin 4 commit: Ensure babel-polyfill is loaded in older qWebKits. Fi

2017-07-21 Thread Dave Page
Ensure babel-polyfill is loaded in older qWebKits. Fixes #2593

Branch
--
master

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

Modified Files
--
web/pgadmin/tools/debugger/templates/debugger/js/direct.js  | 4 ++--
web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)



pgAdmin 4 commit: Fix test assertion.

2017-07-21 Thread Dave Page
Fix test assertion.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=2ebb40819534d79376a577a149a8a5db124b
Author: Sarah McAlear 

Modified Files
--
web/pgadmin/feature_tests/query_tool_journey_test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgAdmin 4 commit: Update yarn.lock

2017-07-21 Thread Dave Page
Update yarn.lock

Branch
--
master

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

Modified Files
--
web/yarn.lock | 449 --
1 file changed, 439 insertions(+), 10 deletions(-)



Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
Thanks, patch applied and yarn.lock updated.

On Fri, Jul 21, 2017 at 3:52 PM, Sarah McAlear  wrote:

> Hi!
>
> We looked at the patch and realized that the function to check if an
> element is not clickable because it's out of view was using an incorrect
> assertion. We changed it and created a small patch. We also realized that
> on the current master the yarn.lock is causing changes when running the
> app. It looks like maybe eclint was added to package.json and it and its
> corresponding dependencies were not added to the checked in yarn.lock
> file.
>
> Thanks,
> Shruti & Sarah
>
>
>
> On Fri, Jul 21, 2017 at 4:09 AM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Robert,
>>
>> I mean rather than using cmd key for Mac and CTRL key for Windows/Linux,
>> I used "CTRL" key for all the platforms.
>> And regarding choosing comma & period keys, they all are near each to
>> each other so user can remember them easily.
>>
>> Let me know If my thinking was wrong for shortcut keys, I'll change them
>> accordingly and send new patch.
>>
>> On Fri, Jul 21, 2017 at 4:25 PM, Robert Eckhardt 
>> wrote:
>>
>>> I'm not sure what you mean by across platforms.  Do you mean that those
>>> are the keyboard shortcuts in pgAdmin 3?
>>>
>>> Rob
>>>
>>> On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala" <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
>>> Hi Robert,
>>>
>>> Just to make shortcut keys uniform across all the platforms.
>>>
>>> On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt 
>>> wrote:
>>>
 Murtuza,

 Is there a particular reason you choose the keyboard shortcuts that you
 choose. When we were looking at this earlier to see what was being used
 elsewhere we discovered:

 jetbrains  cmd+/
 pycharmcmd+/
 SublimeCtrl+/ Toggle line comment
Ctrl+Shift+/ Toggle block comment
 EclipseCTRL + /
 Notepad++  CTRL+Q   Toggle line comment
CTRL+SHIFT+Q Toggle block comment
 TextWrangler   Ctrl+/

 -- Rob


 On Thu, Jul 20, 2017 at 1:05 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

>
> On Thu, Jul 20, 2017 at 10:29 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> Please find patch attached, There were two issues,
>>> 1) We removed the default button to clear the editor window, it
>>> broke _clear_query_tool() functionality.
>>> 2) The buttons arrangements, we added new Edit button in between
>>> Delete and Filter button causing the "Explain" -> "Explain Options" sub
>>> menu to go out of browser visibility in feature test, so it was failing.
>>>
>>> I have put Edit button near Clear button for now, until we come up
>>> with new design for our editor for displaying these options.
>>>
>>
>> Hmm, I moved it there intentionally as it's a more traditional
>> position and thus more discoverable.
>>
>> Can we just launch the browser with a wider size, say, 1280? It's on
>> line 43 of app_starter.py...
>>
>>
> Yes, that will work too.
>
>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 I am working on this, will send you patch soon.

 On Thu, Jul 20, 2017 at 5:53 PM, Dave Page 
 wrote:

> Did you get a chance to look at this yet Murtuza?
>
> On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Sure, Will take a look.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Jul 19, 2017 at 8:00 PM, Dave Page 
>> wrote:
>>
>>> Except I managed to break a couple of tests :-(. Can you take a
>>> look please? I've had some other work come up that I need to deal 
>>> with.
>>>
>>> 
>>> ==
>>> ERROR: runTest (pgadmin.feature_tests.query_t
>>> ool_journey_test.QueryToolJourneyTest)
>>> Tests the path through the query tool
>>> 
>>> --
>>> Traceback (most recent call last):
>>>   File "/Users/dpage/git/pgadmin4/web
>>> /pgadmin/feature_tests/query_tool_journey_test.py", line 45, in
>>> runTest
>>> self._test_history_tab()
>

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Robert Eckhardt
I hope you're overthinking. Having not implemented it yet I'm not sure.

Block commenting will look like the below

/*
CREATE TABLE foo (
  id serial,
  data text
);

-- Index required on data for finding Wumpus' quickly
CREATE INDEX foo_idx ON foo (data);
*/

-- Rob

On Fri, Jul 21, 2017 at 11:13 AM, Dave Page  wrote:

>
>
> On Fri, Jul 21, 2017 at 4:08 PM, Robert Eckhardt 
> wrote:
>
>> I wouldn't say wrong, it just wasn't what I was expecting.
>>
>> I guess I'd like to hear what others are expecting. If I had my way we
>> would use
>>
>> Ctrl+/   single line comment and uncomment (prepend with --)
>> Ctrl+Shift+/ block comment and uncomment (bracket with /* and */)
>>
>>
>> where Ctrl == command on Mac.
>>
>
> I think those might be easier to remember than the current keys.
>
> I'm not sure it makes sense to have a single key for line commenting and
> uncommenting though. Whilst it's certainly cleaner, what should the
> behaviour be for a block such as:
>
> CREATE TABLE foo (
>   id serial,
>   data text
> );
>
> -- Index required on data for finding Wumpus' quickly
> CREATE INDEX foo_idx ON foo (data);
>
> Is that likely to be a problem, or am I overthinking it?
>
>
>>
>> -- Rob
>>
>> On Fri, Jul 21, 2017 at 7:09 AM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Robert,
>>>
>>> I mean rather than using cmd key for Mac and CTRL key for Windows/Linux,
>>> I used "CTRL" key for all the platforms.
>>> And regarding choosing comma & period keys, they all are near each to
>>> each other so user can remember them easily.
>>>
>>> Let me know If my thinking was wrong for shortcut keys, I'll change them
>>> accordingly and send new patch.
>>>
>>> On Fri, Jul 21, 2017 at 4:25 PM, Robert Eckhardt 
>>> wrote:
>>>
 I'm not sure what you mean by across platforms.  Do you mean that those
 are the keyboard shortcuts in pgAdmin 3?

 Rob

 On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala" <
 murtuza.zabuaw...@enterprisedb.com> wrote:

 Hi Robert,

 Just to make shortcut keys uniform across all the platforms.

 On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt 
 wrote:

> Murtuza,
>
> Is there a particular reason you choose the keyboard shortcuts that
> you choose. When we were looking at this earlier to see what was being 
> used
> elsewhere we discovered:
>
> jetbrains  cmd+/
> pycharmcmd+/
> SublimeCtrl+/ Toggle line comment
>Ctrl+Shift+/ Toggle block comment
> EclipseCTRL + /
> Notepad++  CTRL+Q   Toggle line comment
>CTRL+SHIFT+Q Toggle block comment
> TextWrangler   Ctrl+/
>
> -- Rob
>
>
> On Thu, Jul 20, 2017 at 1:05 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>>
>> On Thu, Jul 20, 2017 at 10:29 PM, Dave Page 
>> wrote:
>>
>>> Hi
>>>
>>> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 Please find patch attached, There were two issues,
 1) We removed the default button to clear the editor window, it
 broke _clear_query_tool() functionality.
 2) The buttons arrangements, we added new Edit button in between
 Delete and Filter button causing the "Explain" -> "Explain Options" sub
 menu to go out of browser visibility in feature test, so it was 
 failing.

 I have put Edit button near Clear button for now, until we come up
 with new design for our editor for displaying these options.

>>>
>>> Hmm, I moved it there intentionally as it's a more traditional
>>> position and thus more discoverable.
>>>
>>> Can we just launch the browser with a wider size, say, 1280? It's on
>>> line 43 of app_starter.py...
>>>
>>>
>> Yes, that will work too.
>>
>>>

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

 On Thu, Jul 20, 2017 at 6:04 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> I am working on this, will send you patch soon.
>
> On Thu, Jul 20, 2017 at 5:53 PM, Dave Page 
> wrote:
>
>> Did you get a chance to look at this yet Murtuza?
>>
>> On Wed, Jul 19, 2017 at 3:37 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Sure, Will take a look.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Wed, Jul 19, 2017 at 8:00 PM, Dave Page 
>>> wrote:
>>>
>

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

2017-07-21 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Ensure babel-polyfill is loaded in older qWebKits. Fixes #2593

[Dave Page] Fix test assertion.

--
[...truncated 339.62 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:

156 tests passed
1 test failed:
ForeignTableDeleteTestCase (Check foreign table Node)
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,
 

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 4:21 PM, Robert Eckhardt 
wrote:

> I hope you're overthinking. Having not implemented it yet I'm not sure.
>
> Block commenting will look like the below
>
> /*
> CREATE TABLE foo (
>   id serial,
>   data text
> );
>
> -- Index required on data for finding Wumpus' quickly
> CREATE INDEX foo_idx ON foo (data);
> */
>

Right - but how would line commenting (and uncommenting) behave. With 2
separate shortcuts it's pretty clear - keep adding or removing one level of
commenting at a time. When removing, ignore any lines without comments
(this is what happens now).

If you use a single key though, what is the behaviour on the first press?
Comment everything, or remove the comment marker from the line in the
middle?

It's a valid use-case to comment comments like that if you want to disable
a chunk of a script. It's clear it would work with a block comment, but
some folks prefer line comments for temporary use as they are much more
visible, especially with large blocks.


>
> -- Rob
>
> On Fri, Jul 21, 2017 at 11:13 AM, Dave Page  wrote:
>
>>
>>
>> On Fri, Jul 21, 2017 at 4:08 PM, Robert Eckhardt 
>> wrote:
>>
>>> I wouldn't say wrong, it just wasn't what I was expecting.
>>>
>>> I guess I'd like to hear what others are expecting. If I had my way we
>>> would use
>>>
>>> Ctrl+/   single line comment and uncomment (prepend with --)
>>> Ctrl+Shift+/ block comment and uncomment (bracket with /* and */)
>>>
>>>
>>> where Ctrl == command on Mac.
>>>
>>
>> I think those might be easier to remember than the current keys.
>>
>> I'm not sure it makes sense to have a single key for line commenting and
>> uncommenting though. Whilst it's certainly cleaner, what should the
>> behaviour be for a block such as:
>>
>> CREATE TABLE foo (
>>   id serial,
>>   data text
>> );
>>
>> -- Index required on data for finding Wumpus' quickly
>> CREATE INDEX foo_idx ON foo (data);
>>
>> Is that likely to be a problem, or am I overthinking it?
>>
>>
>>>
>>> -- Rob
>>>
>>> On Fri, Jul 21, 2017 at 7:09 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Robert,

 I mean rather than using cmd key for Mac and CTRL key for
 Windows/Linux, I used "CTRL" key for all the platforms.
 And regarding choosing comma & period keys, they all are near each to
 each other so user can remember them easily.

 Let me know If my thinking was wrong for shortcut keys, I'll change
 them accordingly and send new patch.

 On Fri, Jul 21, 2017 at 4:25 PM, Robert Eckhardt 
 wrote:

> I'm not sure what you mean by across platforms.  Do you mean that
> those are the keyboard shortcuts in pgAdmin 3?
>
> Rob
>
> On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala" <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
> Hi Robert,
>
> Just to make shortcut keys uniform across all the platforms.
>
> On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt  > wrote:
>
>> Murtuza,
>>
>> Is there a particular reason you choose the keyboard shortcuts that
>> you choose. When we were looking at this earlier to see what was being 
>> used
>> elsewhere we discovered:
>>
>> jetbrains  cmd+/
>> pycharmcmd+/
>> SublimeCtrl+/ Toggle line comment
>>Ctrl+Shift+/ Toggle block comment
>> EclipseCTRL + /
>> Notepad++  CTRL+Q   Toggle line comment
>>CTRL+SHIFT+Q Toggle block comment
>> TextWrangler   Ctrl+/
>>
>> -- Rob
>>
>>
>> On Thu, Jul 20, 2017 at 1:05 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>>
>>> On Thu, Jul 20, 2017 at 10:29 PM, Dave Page 
>>> wrote:
>>>
 Hi

 On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find patch attached, There were two issues,
> 1) We removed the default button to clear the editor window, it
> broke _clear_query_tool() functionality.
> 2) The buttons arrangements, we added new Edit button in between
> Delete and Filter button causing the "Explain" -> "Explain Options" 
> sub
> menu to go out of browser visibility in feature test, so it was 
> failing.
>
> I have put Edit button near Clear button for now, until we come up
> with new design for our editor for displaying these options.
>

 Hmm, I moved it there intentionally as it's a more traditional
 position and thus more discoverable.

 Can we just launch the browser with a wider size, say, 1280? It's
 on line 43 of app_starter.py...


>>> Yes, that will work too.
>>>

>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://ww

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

2017-07-21 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Ensure babel-polyfill is loaded in older qWebKits. Fixes #2593

[Dave Page] Fix test assertion.

[Dave Page] Update yarn.lock

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

PostgreSQL 9.3:

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

PostgreSQL 9.4:

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

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Robert Eckhardt
I understand now.

If any one line is different then the entire thing will be commented so in
your example:

--CREATE TABLE foo (
 -- id serial,
 -- data text
--);

---- Index required on data for finding Wumpus' quickly . (not sure if
there should be spaces or not)
--CREATE INDEX foo_idx ON foo (data);

Similarly if we have all but one commented sterting like this:


--CREATE TABLE foo (
 -- id serial,
 -- data text
--);

Index required on data for finding Wumpus' quickly . (not sure if there
should be spaces or not)
--CREATE INDEX foo_idx ON foo (data);


It will then look like this (again spaces optional):

--  --CREATE TABLE foo (
--   -- id serial,
--   -- data text
--  --);

--Index required on data for finding Wumpus' quickly . (not sure if there
should be spaces or not)
--  --CREATE INDEX foo_idx ON foo (data);



-- Rob

On Fri, Jul 21, 2017 at 11:29 AM, Dave Page  wrote:

>
>
> On Fri, Jul 21, 2017 at 4:21 PM, Robert Eckhardt 
> wrote:
>
>> I hope you're overthinking. Having not implemented it yet I'm not sure.
>>
>> Block commenting will look like the below
>>
>> /*
>> CREATE TABLE foo (
>>   id serial,
>>   data text
>> );
>>
>> -- Index required on data for finding Wumpus' quickly
>> CREATE INDEX foo_idx ON foo (data);
>> */
>>
>
> Right - but how would line commenting (and uncommenting) behave. With 2
> separate shortcuts it's pretty clear - keep adding or removing one level of
> commenting at a time. When removing, ignore any lines without comments
> (this is what happens now).
>
> If you use a single key though, what is the behaviour on the first press?
> Comment everything, or remove the comment marker from the line in the
> middle?
>
> It's a valid use-case to comment comments like that if you want to disable
> a chunk of a script. It's clear it would work with a block comment, but
> some folks prefer line comments for temporary use as they are much more
> visible, especially with large blocks.
>
>
>>
>> -- Rob
>>
>> On Fri, Jul 21, 2017 at 11:13 AM, Dave Page  wrote:
>>
>>>
>>>
>>> On Fri, Jul 21, 2017 at 4:08 PM, Robert Eckhardt 
>>> wrote:
>>>
 I wouldn't say wrong, it just wasn't what I was expecting.

 I guess I'd like to hear what others are expecting. If I had my way we
 would use

 Ctrl+/   single line comment and uncomment (prepend with --)
 Ctrl+Shift+/ block comment and uncomment (bracket with /* and */)


 where Ctrl == command on Mac.

>>>
>>> I think those might be easier to remember than the current keys.
>>>
>>> I'm not sure it makes sense to have a single key for line commenting and
>>> uncommenting though. Whilst it's certainly cleaner, what should the
>>> behaviour be for a block such as:
>>>
>>> CREATE TABLE foo (
>>>   id serial,
>>>   data text
>>> );
>>>
>>> -- Index required on data for finding Wumpus' quickly
>>> CREATE INDEX foo_idx ON foo (data);
>>>
>>> Is that likely to be a problem, or am I overthinking it?
>>>
>>>

 -- Rob

 On Fri, Jul 21, 2017 at 7:09 AM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Robert,
>
> I mean rather than using cmd key for Mac and CTRL key for
> Windows/Linux, I used "CTRL" key for all the platforms.
> And regarding choosing comma & period keys, they all are near each to
> each other so user can remember them easily.
>
> Let me know If my thinking was wrong for shortcut keys, I'll change
> them accordingly and send new patch.
>
> On Fri, Jul 21, 2017 at 4:25 PM, Robert Eckhardt  > wrote:
>
>> I'm not sure what you mean by across platforms.  Do you mean that
>> those are the keyboard shortcuts in pgAdmin 3?
>>
>> Rob
>>
>> On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala" <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>> Hi Robert,
>>
>> Just to make shortcut keys uniform across all the platforms.
>>
>> On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt <
>> reckha...@pivotal.io> wrote:
>>
>>> Murtuza,
>>>
>>> Is there a particular reason you choose the keyboard shortcuts that
>>> you choose. When we were looking at this earlier to see what was being 
>>> used
>>> elsewhere we discovered:
>>>
>>> jetbrains  cmd+/
>>> pycharmcmd+/
>>> SublimeCtrl+/ Toggle line comment
>>>Ctrl+Shift+/ Toggle block comment
>>> EclipseCTRL + /
>>> Notepad++  CTRL+Q   Toggle line comment
>>>CTRL+SHIFT+Q Toggle block comment
>>> TextWrangler   Ctrl+/
>>>
>>> -- Rob
>>>
>>>
>>> On Thu, Jul 20, 2017 at 1:05 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>

 On Thu, Jul 20, 2017 at 10:29 PM, Dave Page 
 wrote:

> Hi
>
> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>>

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 4:43 PM, Robert Eckhardt 
wrote:

> I understand now.
>
> If any one line is different then the entire thing will be commented so in
> your example:
>
> --CREATE TABLE foo (
>  -- id serial,
>  -- data text
> --);
>
> ---- Index required on data for finding Wumpus' quickly . (not sure if
> there should be spaces or not)
> --CREATE INDEX foo_idx ON foo (data);
>
> Similarly if we have all but one commented sterting like this:
>
>
> --CREATE TABLE foo (
>  -- id serial,
>  -- data text
> --);
>
> Index required on data for finding Wumpus' quickly . (not sure if there
> should be spaces or not)
> --CREATE INDEX foo_idx ON foo (data);
>
>
> It will then look like this (again spaces optional):
>
> --  --CREATE TABLE foo (
> --   -- id serial,
> --   -- data text
> --  --);
>
> --Index required on data for finding Wumpus' quickly . (not sure if there
> should be spaces or not)
> --  --CREATE INDEX foo_idx ON foo (data);
>
>
Right - we lose the ability to uncomment multiple levels though, which may
also be useful.


>
>
> -- Rob
>
> On Fri, Jul 21, 2017 at 11:29 AM, Dave Page  wrote:
>
>>
>>
>> On Fri, Jul 21, 2017 at 4:21 PM, Robert Eckhardt 
>> wrote:
>>
>>> I hope you're overthinking. Having not implemented it yet I'm not sure.
>>>
>>> Block commenting will look like the below
>>>
>>> /*
>>> CREATE TABLE foo (
>>>   id serial,
>>>   data text
>>> );
>>>
>>> -- Index required on data for finding Wumpus' quickly
>>> CREATE INDEX foo_idx ON foo (data);
>>> */
>>>
>>
>> Right - but how would line commenting (and uncommenting) behave. With 2
>> separate shortcuts it's pretty clear - keep adding or removing one level of
>> commenting at a time. When removing, ignore any lines without comments
>> (this is what happens now).
>>
>> If you use a single key though, what is the behaviour on the first press?
>> Comment everything, or remove the comment marker from the line in the
>> middle?
>>
>> It's a valid use-case to comment comments like that if you want to
>> disable a chunk of a script. It's clear it would work with a block comment,
>> but some folks prefer line comments for temporary use as they are much more
>> visible, especially with large blocks.
>>
>>
>>>
>>> -- Rob
>>>
>>> On Fri, Jul 21, 2017 at 11:13 AM, Dave Page  wrote:
>>>


 On Fri, Jul 21, 2017 at 4:08 PM, Robert Eckhardt 
 wrote:

> I wouldn't say wrong, it just wasn't what I was expecting.
>
> I guess I'd like to hear what others are expecting. If I had my way we
> would use
>
> Ctrl+/   single line comment and uncomment (prepend with --)
> Ctrl+Shift+/ block comment and uncomment (bracket with /* and */)
>
>
> where Ctrl == command on Mac.
>

 I think those might be easier to remember than the current keys.

 I'm not sure it makes sense to have a single key for line commenting
 and uncommenting though. Whilst it's certainly cleaner, what should the
 behaviour be for a block such as:

 CREATE TABLE foo (
   id serial,
   data text
 );

 -- Index required on data for finding Wumpus' quickly
 CREATE INDEX foo_idx ON foo (data);

 Is that likely to be a problem, or am I overthinking it?


>
> -- Rob
>
> On Fri, Jul 21, 2017 at 7:09 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Robert,
>>
>> I mean rather than using cmd key for Mac and CTRL key for
>> Windows/Linux, I used "CTRL" key for all the platforms.
>> And regarding choosing comma & period keys, they all are near each to
>> each other so user can remember them easily.
>>
>> Let me know If my thinking was wrong for shortcut keys, I'll change
>> them accordingly and send new patch.
>>
>> On Fri, Jul 21, 2017 at 4:25 PM, Robert Eckhardt <
>> reckha...@pivotal.io> wrote:
>>
>>> I'm not sure what you mean by across platforms.  Do you mean that
>>> those are the keyboard shortcuts in pgAdmin 3?
>>>
>>> Rob
>>>
>>> On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala" <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
>>> Hi Robert,
>>>
>>> Just to make shortcut keys uniform across all the platforms.
>>>
>>> On Fri, Jul 21, 2017 at 1:25 AM, Robert Eckhardt <
>>> reckha...@pivotal.io> wrote:
>>>
 Murtuza,

 Is there a particular reason you choose the keyboard shortcuts that
 you choose. When we were looking at this earlier to see what was being 
 used
 elsewhere we discovered:

 jetbrains  cmd+/
 pycharmcmd+/
 SublimeCtrl+/ Toggle line comment
Ctrl+Shift+/ Toggle block comment
 EclipseCTRL + /
 Notepad++  CTRL+Q   Toggle line comment
CTRL+SHIFT+Q Toggle block comment
 TextWrangler   Ctrl+/


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Robert Eckhardt
>
> Right - we lose the ability to uncomment multiple levels though, which may
> also be useful.
>

Well yes.

I would argue that simplicity trumps potential use. I'd also argue that
attempting to maintain consistency across environments (IDEs, etc. ) is
advantageous. This was the philosophy we were going with when enabling
excel like behavior (also why I'm not fully happy with how it is today).

-- Rob


Jenkins build is back to normal : pgadmin4-master-python26 #381

2017-07-21 Thread pgAdmin 4 Jenkins
See 





Re: [pgAdmin4][Patch]: Stop Flask from initialising service twice in Debug mode

2017-07-21 Thread Matthew Kleiman
Surinder, you are my hero! 🎁

On Fri, Jul 21, 2017 at 4:47 AM, Dave Page  wrote:

> Thanks, applied. The reloader has always been a little temperamental for
> me, so I couldn't prove this doesn't break it. If someone finds it does,
> please yelp.
>
> On Fri, Jul 21, 2017 at 8:27 AM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi
>>
>> In this patch, i have added reference to the implementation.
>> Please find updated patch and review.
>>
>> Thanks,
>> Surinder
>>
>> On Fri, Jul 21, 2017 at 12:32 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> When pgAdmin4 runs in DEBUG mode, Flask initialise service twice, while
>>> in non-DEBUG mode, once. It is pain while development because `yarn run
>>> bundle` also runs twice.
>>>
>>> It is because the parameter `use_reloader` = True in Debug Mode.
>>>
>>> If `os.environ` variable `WERKZEUG_RUN_MAIN` is set to None, i.e. app is
>>> starting for the first time and then its value is changed to True.
>>>
>>> Please find attached patch.
>>>
>>> Thanks
>>> Surinder
>>>
>>>
>>>
>>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][Patch] Font sizes to 13 px and not bolded

2017-07-21 Thread Shirley Wang
Oh whoa I didn't realize they became all wonky. It also looks like headers
in the statistics table is still bold, so perhaps there's something missing
in our patch. We'll take a look.

On Thu, Jul 20, 2017 at 4:01 PM Dave Page  wrote:

> Hi
>
> On Thu, Jul 20, 2017 at 7:55 PM, Shirley Wang  wrote:
>
>> Hi
>>
>> Attached is a patch for changing the font sizes of dialog, table, and
>> graph headers to 13 px and unbold them.
>>
>> Let us know your thoughts.
>>
>>
> I think this is heading in the right direction, but it's not quite there
> yet. As you can see in the attached screenshot the table headers for
> Statistics, Dependencies and Dependents, and the subnode headers and column
> headers still need work. I think this patch makes that even more obvious
> than it is now, so I'm not going to apply it until the other items can be
> addressed as well.
>
> Thanks!
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Shirley Wang
Until we learn definitively from users that the current implementation of
commenting/uncommenting in other tools is not working, we should use what
is common practice. We can use that as a baseline and then if we learn that
there needs to be another shortcut, we can add additional functionality.
It's much easier to add something for users than to take away.

On Fri, Jul 21, 2017 at 12:08 PM Robert Eckhardt 
wrote:

> Right - we lose the ability to uncomment multiple levels though, which may
>> also be useful.
>>
>
> Well yes.
>
> I would argue that simplicity trumps potential use. I'd also argue that
> attempting to maintain consistency across environments (IDEs, etc. ) is
> advantageous. This was the philosophy we were going with when enabling
> excel like behavior (also why I'm not fully happy with how it is today).
>
> -- Rob
>


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 8:57 PM, Shirley Wang  wrote:

> Until we learn definitively from users that the current implementation of
> commenting/uncommenting in other tools is not working, we should use what
> is common practice. We can use that as a baseline and then if we learn that
> there needs to be another shortcut, we can add additional functionality.
> It's much easier to add something for users than to take away.
>

There isn't really any common practice as far as I can see. In a 20 minute
search I found the following variations (substitute Ctrl for Cmd on
non-Mac):

Tools supporting only one comment mode:

XCode: Cmd+/
Visual Studio: Ctrl+K+C Ctrl+K+U
SQL Server Management Studio: Ctrl+K+C Ctrl+K+U
pgAdmin 3: Cmd+K/Cmd+Shift+K
Editra: Cmd+1
Netbeans: Cmd+Shift+C
Eclipse: Cmd+/
Sublime Text: Cmd+/ Cmd+Shift+/
Toad: Ctrl+b Ctrl+Shift+b
MySQL Workbench: Cmd+/

Tools supporting line and block comment modes:

PyCharms (line comment): Cmd+/
PyCharms (block comment): Cmd+Alt+/
Notepad++ (line comment): Ctrl+q
Notepad++ (block comment): Ctrl+Shift+q

I'd say we should go with Cmd+/ and Cmd+Shift+/ as that seems the most
common by a small margin - however, I'm still not convinced that we don't
need two keys for optimal behaviour of line commenting.

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

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


[pgadmin-hackers][patch]

2017-07-21 Thread Joao De Almeida Pereira
Hi hackers,
With the last commits, the behavior of focusing on a selected entry when
entering the History Tab was not working as expected.
This patch will bring this behavior back.

Thanks
Joao & Matt


focus-on-entry-when-enter-history.diff
Description: Binary data


Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Robert Eckhardt
I'd say we should go with Cmd+/ and Cmd+Shift+/ as that seems the most
common by a small margin - however, I'm still not convinced that we don't
need two keys for optimal behaviour of line commenting.


To be clear, I'm not 100% convinced either. I am, however, convinced that
it is the right first step and then we can get user feedback.

-- Rob