Re: [pgadmin-hackers][patch] Dependents and Dependencies in GreenPlum

2017-05-12 Thread Joao Pedro De Almeida Pereira
Hello Akshay,

You can find attached a new version of the patch that changes the test in
question.
This new version instead of requiring a creation of a new Role now does the
following:
1 - Creates a new Role
2 - Creates a table with that Role
3 - Checks for dependencies

Thanks
Joao & George

On Thu, May 11, 2017 at 7:33 AM, Joao Pedro De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hello all,
> This test is trying to check if the sql to retrieve the role dependencies
> of a object in the database is correct. Using a different user to connect
> to the database and create tables there is no need for extra setup because
> the role depedencies table entry is added automatically. Also we talked
> with some internal users and they told us they always used a different user
> to connect to the database with pgadmin.
>
> After your comments we realize that the test need to have a different
> setup in order to become more readable and resilient. What do we need to do
> in the test setup to ensure an entry is added to the role dependency table?
>
> Also the test need to be a little bit more resilient to work independently
> of the user that is used on the test.
>
> Thanks
> Joao
>
> On Thu, May 11, 2017, 3:20 AM Khushboo Vashi  com> wrote:
>
>> On Thu, May 11, 2017 at 12:03 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On 11 May 2017, at 07:11, Akshay Joshi 
>>> wrote:
>>>
>>> Hi Sarah
>>>
>>> On Thu, May 11, 2017 at 2:30 AM, Sarah McAlear 
>>> wrote:
>>>
 Hi Ashkay!

 TestTablesNodeSql hasn't failed but TestRoleDependenciesSql failed with
> below error:
> .\test_role_dependencies_sql.py\", line 41, in assertions\n
>  self.assertEqual(1, len(fetch_result))\nAssertionError: 1 != 0


 We experienced a similar problem when we started developing this patch.
 We noticed that we were connecting to the database with the super user (the
 db owner user), which did not create the role we are expecting when a table
 is created. To ensure that this role is created, we had to create a new
 user and use it to execute all the tests. After we made this change, the
 tests passed.

 Can you try to create a new user and use it to execute your tests?

>>>
>>> I did that and it works. I have created new user 'test' with
>>> superuser privileges and update parameter db_username="test" in
>>> test_config.json file. But still I am unable to understand why it doesn't
>>> work with 'postgres' (default) user?
>>>
>>>
>>> Agreed. That suggests something fishy is going on that should be
>>> understood.
>>>
>>>
>> We don't check role dependencies for every object. As per the code, the
>> role dependencies are executed for columns not for the table itself.
>> And in the test cases, the table object is trying to execute the role
>> dependencies, so I think this test case is not correct.
>>
>>>
 Thanks,
 João & Sarah

 On Wed, May 10, 2017 at 1:56 PM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

>
>
> On May 10, 2017 19:07, "Sarah McAlear"  wrote:
>
> Hi Akshay!
>
> Does this error occur on 9.6 or 10.0? We tested it in 9.6 and all our
> tests pass.
>
>
> On both 9.6 and 10.0. Query returned 0 rows which is compared
> against 1 in assert statement.
>
>
> Thanks!
> João & Sarah
>
> On Wed, May 10, 2017 at 2:29 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Sarah
>>
>> On Tue, May 9, 2017 at 9:03 PM, Sarah McAlear 
>> wrote:
>>
>>> Hi Akshay!
>>>
>>>
 Some test file names ended with "*_sql_template.py*" do we need to
 add that string ?
>>>
>>> we added this suffix after moving the tests up a level to
>>> tables/tests to clarify what subject they applied to. we changed the 
>>> suffix
>>> to "_sql.py"
>>>
>>> - Files "test_column_acl_sql_template.py" and "
 test_column_properties_sql_template.py" should be moved from
 tables->tests to tables->column->tests. As it's related to column.
 - Files "test_trigger_get_oid_sql_template.py" and "
 test_trigger_nodes_sql_template.py" should be moved from
 tables->tests to tables->triggers->tests. As its related to triggers.
>>>
>>> these tests are related to the sql files in tables/templates/column,
>>> not tables/column, so moving them into tables/column would be more
>>> confusing.
>>>
>>> Following test cases are failing
>>>
>>> Thank you, fixed, see new patch. Can you confirm that
>>> TestTablesNodeSql doesn't fail in your environment?
>>>
>>
>> TestTablesNodeSql hasn't failed but TestRoleDependenciesSql
>> failed with below error:
>> 

Re: [pgadmin-hackers] pgAdmin 4 commit: Improve handling of nulls and default values in the d

2017-05-12 Thread Dave Page
Hi

On Fri, May 12, 2017 at 3:20 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find attached patch and review.
>

Thanks, committed.


>
> Also, I found an issue  which
> logged and will work on it.
>

Yes, I also saw that, though I found the colour was lost on paste, not
save. I also found another issue -
https://redmine.postgresql.org/issues/2400. Can you fix that too please?

Thanks.



>
> On Fri, May 12, 2017 at 5:19 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> On Fri, May 12, 2017 at 5:00 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Fri, May 12, 2017 at 12:19 PM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 Hi,

 Below code snippet from above commit assumes that we have to disable
 last row after saving.

 @@ -2320,6
 
 +2340,10
 
 @@ define(
grid.setSelectedRows([]);
  }

 +// Add last row(new row) to keep track of it
 +if (is_added) {
 +  self.rows_to_disable.push(grid.getDat
 aLength()-1);
 +}

  However this is not the case all the time

 For e.g
 Table has some data already and If user adds new row (do not save) and
 then copy past few exiting rows (at this point  newly added row no longer
 remains at last position). And after saving it disable last row which is
 not the newly added row.

>>>
>>> Hmm, good point. Can you/Surinder work up a fix for that in time for the
>>> release please?
>>>
>> ​Sure Dave, I am working on it.​
>>
>>>
>>> --
>>> 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


[pgadmin-hackers] Build failed in Jenkins: pgadmin4-master-python34 #105

2017-05-12 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Track disabled rows properly in the edit grid.

--
[...truncated 245.95 KB...]
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tables.triggers.tests.test_triggers_get.TriggersGetTestCase)
Fetch trigger Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tables.triggers.tests.test_triggers_put.TriggersUpdateTestCase)
Put trigger Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_add.SchemaAddTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_delete.SchemaDeleteTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_get.SchemaGetTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_put.SchemaPutTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_add.TypesAddTestCase)
Add type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_delete.TypesDeleteTestCase)
Delete type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_get.TypesGetTestCase)
Get type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_put.TypesUpdateTestCase)
Update type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_add.ViewsAddTestCase)
Add view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_add.ViewsAddTestCase)
Add materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_delete.ViewsDeleteTestCase)
Delete view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_delete.ViewsDeleteTestCase)
Delete materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_get.ViewsGetTestCase)
Get view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_get.ViewsGetTestCase)
Get materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_put.ViewsUpdateTestCase)
Update view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_put.ViewsUpdateTestCase)
Update materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
Check Databases Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_add.ResourceGroupsAddTestCase)
Add resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_delete.ResourceGroupsDeleteTestCase)
Delete resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_put.ResourceGroupsPutTestCase)
Put resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.tests_resource_groups_get.ResourceGroupsGetTestCase)
Get resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase)
Check Tablespace Node ... ok
runTest 

[pgadmin-hackers] pgAdmin 4 commit: Track disabled rows properly in the edit grid.

2017-05-12 Thread Dave Page
Track disabled rows properly in the edit grid.

Branch
--
master

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

Modified Files
--
.../sqleditor/templates/sqleditor/js/sqleditor.js  | 41 --
1 file changed, 39 insertions(+), 2 deletions(-)


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


Re: [pgadmin-hackers] javascript and css minification process

2017-05-12 Thread George Gelashvili
>
> It's not yet. Those are utility scripts that I was eventually intending to
> call from appropriate make targets during package build. Before we get
> there though, we need code changes to ensure that we load minified code vs.
> debug code at the appropriate times. I haven't done much with it in a while
> as Tira had been talking about transpiling everything into a single blob
> (though that required us to ensure none of the JS files were Jinja
> templates any more).
>

Okay. We are thinking of using a javascript minification tool and run it as
part of the bundling process.
We are using grunt to bundle everything (such as react code and
dependencies). Other javascript and css files can be added to the bundling
process as we all see fit.


Re: [pgadmin-hackers] javascript and css minification process

2017-05-12 Thread Dave Page
Hi

On Fri, May 12, 2017 at 3:29 PM, George Gelashvili 
wrote:

> Hello
>
> We're looking at the js and css minimization python code to investigate
> minification as part of the pgadmin artifact build process.
>
> We're wondering why minimise.py is currently only manually invokable, via
> the minimise make step.
>
> Also it seems like currently, minimise.py's dependencies (rcssmin and
> rjsmin) are not being included in any requirements.txt
>
> When is the minification performed?
>

It's not yet. Those are utility scripts that I was eventually intending to
call from appropriate make targets during package build. Before we get
there though, we need code changes to ensure that we load minified code vs.
debug code at the appropriate times. I haven't done much with it in a while
as Tira had been talking about transpiling everything into a single blob
(though that required us to ensure none of the JS files were Jinja
templates any more).

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

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


[pgadmin-hackers] javascript and css minification process

2017-05-12 Thread George Gelashvili
Hello

We're looking at the js and css minimization python code to investigate
minification as part of the pgadmin artifact build process.

We're wondering why minimise.py is currently only manually invokable, via
the minimise make step.

Also it seems like currently, minimise.py's dependencies (rcssmin and
rjsmin) are not being included in any requirements.txt

When is the minification performed?

Thanks,
Joao and George


Re: [pgadmin-hackers] pgAdmin 4 commit: Improve handling of nulls and default values in the d

2017-05-12 Thread Surinder Kumar
Hi Dave,

Please find attached patch and review.

Also, I found an issue  which
logged and will work on it.

On Fri, May 12, 2017 at 5:19 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> On Fri, May 12, 2017 at 5:00 PM, Dave Page  wrote:
>
>>
>>
>> On Fri, May 12, 2017 at 12:19 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Below code snippet from above commit assumes that we have to disable
>>> last row after saving.
>>>
>>> @@ -2320,6
>>> 
>>> +2340,10
>>> 
>>> @@ define(
>>>grid.setSelectedRows([]);
>>>  }
>>>
>>> +// Add last row(new row) to keep track of it
>>> +if (is_added) {
>>> +  self.rows_to_disable.push(grid.getDat
>>> aLength()-1);
>>> +}
>>>
>>>  However this is not the case all the time
>>>
>>> For e.g
>>> Table has some data already and If user adds new row (do not save) and
>>> then copy past few exiting rows (at this point  newly added row no longer
>>> remains at last position). And after saving it disable last row which is
>>> not the newly added row.
>>>
>>
>> Hmm, good point. Can you/Surinder work up a fix for that in time for the
>> release please?
>>
> ​Sure Dave, I am working on it.​
>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


fix_disable_row_after_paste_row.patch
Description: Binary data

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


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue with Node rename

2017-05-12 Thread Murtuza Zabuawala
Hi Ashesh,

Please find updated patch as discussed.

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

On Fri, May 12, 2017 at 11:37 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Ashesh,
>
> As discussed please find updated patch removing hardcoded check for server
> & server-group node.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Fri, Apr 28, 2017 at 1:29 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Ashesh,
>>
>> PFA updated patch for the issue.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Apr 26, 2017 at 10:29 AM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>>
>>> On Mon, Apr 24, 2017 at 4:43 PM, Dave Page  wrote:
>>>
 Ashesh, can you review/commit this please? Thanks.

 On Mon, Apr 24, 2017 at 6:17 AM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch to fix the issue where node rename is not working
> properly after 7dd9efd8
> 
>  commit
> .
> RM#2355
>
 We should remove the existing node, and then insert at right place
>>> instead of refreshing the parent.
>>> Because - that will select the parent node, and not that node, and also
>>> - it adds overhead of refreshing the whole parent node.
>>>
>>> Please send the patch as per our discussion.
>>>
>>> -- Thanks, Ashesh
>>>

> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


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

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

>>>
>>>
>>
>


fix_update_node_v3.patch
Description: Binary data

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


Re: [pgadmin-hackers] backports.csv

2017-05-12 Thread Murtuza Zabuawala
Hi Dave,

I am not sure on this.

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

On Fri, May 12, 2017 at 5:32 PM, Dave Page  wrote:

> Hi Murtuza,
>
> Your recent addition of backports.csv to the pgAdmin requirements.txt
> seems to be causing an interesting problem. Whilst it works fine in a
> regular Python environment, in the cut-down environment used by the desktop
> runtime it fails because there is no backports/__init__.py file. This seems
> to be a well-known, but un-fixed issue in which PIP doesn't install the
> file as it should.
>
> Any ideas on how we might fix this? Obviously I can just touch the file
> when building the installers, but that doesn't seem ideal.
>
> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


[pgadmin-hackers] backports.csv

2017-05-12 Thread Dave Page
Hi Murtuza,

Your recent addition of backports.csv to the pgAdmin requirements.txt seems
to be causing an interesting problem. Whilst it works fine in a regular
Python environment, in the cut-down environment used by the desktop runtime
it fails because there is no backports/__init__.py file. This seems to be a
well-known, but un-fixed issue in which PIP doesn't install the file as it
should.

Any ideas on how we might fix this? Obviously I can just touch the file
when building the installers, but that doesn't seem ideal.

Thanks.

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

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


Re: [pgadmin-hackers] pgAdmin 4 commit: Improve handling of nulls and default values in the d

2017-05-12 Thread Surinder Kumar
On Fri, May 12, 2017 at 5:00 PM, Dave Page  wrote:

>
>
> On Fri, May 12, 2017 at 12:19 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Below code snippet from above commit assumes that we have to disable last
>> row after saving.
>>
>> @@ -2320,6
>> 
>> +2340,10
>> 
>> @@ define(
>>grid.setSelectedRows([]);
>>  }
>>
>> +// Add last row(new row) to keep track of it
>> +if (is_added) {
>> +  self.rows_to_disable.push(grid.getDataLength()-1);
>> +}
>>
>>  However this is not the case all the time
>>
>> For e.g
>> Table has some data already and If user adds new row (do not save) and
>> then copy past few exiting rows (at this point  newly added row no longer
>> remains at last position). And after saving it disable last row which is
>> not the newly added row.
>>
>
> Hmm, good point. Can you/Surinder work up a fix for that in time for the
> release please?
>
​Sure Dave, I am working on it.​

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


Re: [pgadmin-hackers] pgAdmin 4 commit: Improve handling of nulls and default values in the d

2017-05-12 Thread Dave Page
On Fri, May 12, 2017 at 12:19 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Below code snippet from above commit assumes that we have to disable last
> row after saving.
>
> @@ -2320,6
> 
> +2340,10
> 
> @@ define(
>grid.setSelectedRows([]);
>  }
>
> +// Add last row(new row) to keep track of it
> +if (is_added) {
> +  self.rows_to_disable.push(grid.getDataLength()-1);
> +}
>
>  However this is not the case all the time
>
> For e.g
> Table has some data already and If user adds new row (do not save) and
> then copy past few exiting rows (at this point  newly added row no longer
> remains at last position). And after saving it disable last row which is
> not the newly added row.
>

Hmm, good point. Can you/Surinder work up a fix for that in time for the
release please?

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

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


Re: [pgadmin-hackers] pgAdmin 4 commit: Improve handling of nulls and default values in the d

2017-05-12 Thread Harshal Dhumal
Hi,

Below code snippet from above commit assumes that we have to disable last
row after saving.

@@ -2320,6

+2340,10

@@ define(
   grid.setSelectedRows([]);
 }

+// Add last row(new row) to keep track of it
+if (is_added) {
+  self.rows_to_disable.push(grid.getDataLength()-1);
+}

 However this is not the case all the time

For e.g
Table has some data already and If user adds new row (do not save) and then
copy past few exiting rows (at this point  newly added row no longer
remains at last position). And after saving it disable last row which is
not the newly added row.








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

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

On Fri, May 12, 2017 at 3:24 PM, Dave Page  wrote:

> Improve handling of nulls and default values in the data editor. Fixes
> #2257
>
> Branch
> --
> master
>
> Details
> ---
> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=
> 4f9628ed436de53b1ab1a06b123755a86a8f2288
> Author: Surinder Kumar 
>
> Modified Files
> --
> .../tables/templates/column/sql/9.2_plus/nodes.sql |  3 +-
> .../tables/templates/column/sql/default/nodes.sql  |  3 +-
> web/pgadmin/static/css/pgadmin.css |  2 +-
> .../static/js/slickgrid/slick.pgadmin.editors.js   | 39 +++---
> .../js/slickgrid/slick.pgadmin.formatters.js   | 46
> --
> web/pgadmin/tools/sqleditor/__init__.py| 25 +++-
> web/pgadmin/tools/sqleditor/command.py | 30 +-
> .../tools/sqleditor/static/css/sqleditor.css   | 12 +-
> .../sqleditor/templates/sqleditor/js/sqleditor.js  | 28 -
> 9 files changed, 163 insertions(+), 25 deletions(-)
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue of menu visibility when node is hidden

2017-05-12 Thread Dave Page
Thanks, applied.

On Fri, May 12, 2017 at 11:59 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> Please find updated patch with changes as per comments given by Joao.
>
> @Joao,
> Thank you for reviewing the patch.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Thu, May 11, 2017 at 8:19 PM, Joao Pedro De Almeida Pereira <
> jdealmeidapere...@pivotal.io> wrote:
>
>> Hi Murtuza,
>>
>> Since you are adding a new function to the browser.js component, we
>> would encourage you to extract the function out of the templated javascript
>> file so that it can be tested. A good example of this would be the
>> pgadmin/static/js/size_prettify.js.
>>
>> For this specific function we found one function that is used from
>> browser.js, and you can Stub that out using
>> createSpyObject(browser, 'get_preference');
>>
>> We think the object here is not 100% line coverage but 100% of the
>> behavior should be covered.
>>
>> Also, suggest you change the variable name perf to preference. Looks
>> like it is a typo.
>>
>> Regards,
>> João & Matt
>>
>> On Thu, May 11, 2017 at 3:08 AM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA patch to fix the issue where user hides the any node from Preference
>>> dialog but the menu(both context/object) still appears in pgAdmin4.
>>> RM#2225
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


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

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


[pgadmin-hackers] pgAdmin 4 commit: Hide menu options for creating objects, if the object

2017-05-12 Thread Dave Page
Hide menu options for creating objects, if the object type is set to hidden. 
Includes Jasmine tests. Fixes #2225

Branch
--
master

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

Modified Files
--
.../browser/templates/browser/js/browser.js| 31 +++--
web/pgadmin/static/js/check_node_visibility.js | 53 ++
.../javascript/check_node_visiblity_spec.js| 32 +
web/regression/javascript/test-main.js |  1 +
4 files changed, 113 insertions(+), 4 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue of menu visibility when node is hidden

2017-05-12 Thread Murtuza Zabuawala
Hi,

Please find updated patch with changes as per comments given by Joao.

@Joao,
Thank you for reviewing the patch.

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

On Thu, May 11, 2017 at 8:19 PM, Joao Pedro De Almeida Pereira <
jdealmeidapere...@pivotal.io> wrote:

> Hi Murtuza,
>
> Since you are adding a new function to the browser.js component, we would
> encourage you to extract the function out of the templated javascript file
> so that it can be tested. A good example of this would be the
> pgadmin/static/js/size_prettify.js.
>
> For this specific function we found one function that is used from
> browser.js, and you can Stub that out using
> createSpyObject(browser, 'get_preference');
>
> We think the object here is not 100% line coverage but 100% of the
> behavior should be covered.
>
> Also, suggest you change the variable name perf to preference. Looks like
> it is a typo.
>
> Regards,
> João & Matt
>
> On Thu, May 11, 2017 at 3:08 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch to fix the issue where user hides the any node from Preference
>> dialog but the menu(both context/object) still appears in pgAdmin4.
>> RM#2225
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>
diff --git a/web/pgadmin/browser/templates/browser/js/browser.js 
b/web/pgadmin/browser/templates/browser/js/browser.js
index a663ae8..1f93f0b 100644
--- a/web/pgadmin/browser/templates/browser/js/browser.js
+++ b/web/pgadmin/browser/templates/browser/js/browser.js
@@ -1,6 +1,7 @@
 define('pgadmin.browser',
 ['require', 'jquery', 'underscore', 'underscore.string', 'bootstrap',
-'pgadmin', 'alertify', 'codemirror', 'codemirror/mode/sql/sql', 
'wcdocker',
+'pgadmin', 'alertify', 'codemirror', 'sources/check_node_visibility',
+'codemirror/mode/sql/sql', 'wcdocker',
 'jquery.contextmenu', 'jquery.aciplugin', 'jquery.acitree',
 'pgadmin.alertifyjs', 'pgadmin.browser.messages',
 'pgadmin.browser.menu', 'pgadmin.browser.panel',
@@ -8,7 +9,10 @@ define('pgadmin.browser',
 'pgadmin.browser.node', 'pgadmin.browser.collection'
 
],
-function(require, $, _, S, Bootstrap, pgAdmin, Alertify, CodeMirror) {
+function(
+  require, $, _, S, Bootstrap, pgAdmin, Alertify,
+  CodeMirror, checkNodeVisibility
+) {
 
   // Some scripts do export their object in the window only.
   // Generally the one, which do no have AMD support.
@@ -593,10 +597,16 @@ function(require, $, _, S, Bootstrap, pgAdmin, Alertify, 
CodeMirror) {
 single: single
   }
 },
+
+// This will hold preference data (Works as a cache object)
+// Here node will be a key and it's preference data will be value
+node_preference_data: {},
+
 // Add menus of module/extension at appropriate menu
 add_menus: function(menus) {
-  var pgMenu = this.menus;
-  var MenuItem = pgAdmin.Browser.MenuItem;
+  var self = this,
+pgMenu = this.menus,
+MenuItem = pgAdmin.Browser.MenuItem;
   _.each(menus, function(m) {
 _.each(m.applies, function(a) {
   /* We do support menu type only from this list */
@@ -604,6 +614,19 @@ function(require, $, _, S, Bootstrap, pgAdmin, Alertify, 
CodeMirror) {
   'context', 'file', 'edit', 'object',
   'management', 'tools', 'help']) >= 0) {
 var menus;
+
+// If current node is not visible in browser tree
+// then return from here
+if(!checkNodeVisibility(self, m.node)) {
+return;
+} else if(_.has(m, 'module') && !_.isUndefined(m.module)) {
+  // If module to which this menu applies is not visible in
+  // browser tree then also we do not display menu
+  if(!checkNodeVisibility(self, m.module.type)) {
+return;
+  }
+}
+
 pgMenu[a] = pgMenu[a] || {};
 if (_.isString(m.node)) {
   menus = pgMenu[a][m.node] = pgMenu[a][m.node] || {};
diff --git a/web/pgadmin/static/js/check_node_visibility.js 
b/web/pgadmin/static/js/check_node_visibility.js
new file mode 100644
index 000..987a395
--- /dev/null
+++ b/web/pgadmin/static/js/check_node_visibility.js
@@ -0,0 +1,53 @@
+//
+//
+// pgAdmin 4 - PostgreSQL Tools
+//
+// Copyright (C) 2013 - 2017, The pgAdmin Development Team
+// This software is released under the PostgreSQL Licence
+//
+//
+
+define(['jquery', 'underscore', 'underscore.string'],
+  function ($, 

[pgadmin-hackers] Jenkins build is back to normal : pgadmin4-master-python34 #103

2017-05-12 Thread pgAdmin 4 Jenkins
See 




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


Re: [pgadmin-hackers] [pgAdmin4][Patch][RM2257]: Query tool - Insert row doesn't use default values

2017-05-12 Thread Surinder Kumar
Hi Dave,

On Fri, May 12, 2017 at 3:41 PM, Dave Page  wrote:

> Hi,
>
> Couple of comments:
>
> - Can we improve the speed of this test? Perhaps by adding multiple rows
> to the table at once, then checking the result after a single save/refresh?
> We need to keep the feature tests as fast as possible to ensure they remain
> practical to run.
>
​Sure. I will do this and send updated patch.​

>
> - I get the following failure under Python 2. It passes under Python 3 as
> you might imagine given the assertion error.
>
​I will check.​

>
> Thanks!
>
> 2017-05-12 11:00:00,860:ERROR:STDERR:==
> 
> 2017-05-12 11:00:00,861:ERROR:STDERR:FAIL: runTest
> (pgadmin.feature_tests.view_data_dml_queries.CheckForViewDataTest)
> 2017-05-12 11:00:00,861:ERROR:STDERR:Validate Insert, Update operations
> in View data with given test data
> 2017-05-12 11:00:00,861:ERROR:STDERR:--
> 
> 2017-05-12 11:00:00,861:ERROR:STDERR:Traceback (most recent call last):
> 2017-05-12 11:00:00,861:ERROR:STDERR:  File "/Users/dpage/git/pgadmin4/web
> /pgadmin/feature_tests/view_data_dml_queries.py", line 160, in runTest
> 2017-05-12 11:00:00,861:ERROR:STDERR:self._update_row_in_table(key)
> 2017-05-12 11:00:00,861:ERROR:STDERR:  File "/Users/dpage/git/pgadmin4/web
> /pgadmin/feature_tests/view_data_dml_queries.py", line 432, in
> _update_row_in_table
> 2017-05-12 11:00:00,861:ERROR:STDERR:self._verify_update_data(table,
> row)
> 2017-05-12 11:00:00,861:ERROR:STDERR:  File "/Users/dpage/git/pgadmin4/web
> /pgadmin/feature_tests/view_data_dml_queries.py", line 477, in
> _verify_update_data
> 2017-05-12 11:00:00,861:ERROR:STDERR:self.assertEquals(cell2,
> test_verify_data['data_default_nulls'])
> 2017-05-12 11:00:00,861:ERROR:STDERR:AssertionError: "''" != u''
> 2017-05-12 11:00:00,861:ERROR:STDERR:--
> 
> 2017-05-12 11:00:00,861:ERROR:STDERR:Ran 6 tests in 208.850s
> 2017-05-12 11:00:00,861:ERROR:STDERR:FAILED
> 2017-05-12 11:00:00,861:ERROR:STDERR: (failures=1)
> On Wed, May 10, 2017 at 3:02 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find attached patch for Feature test cases for RM_2257
>>
>> *Implementation detail:*
>>
>>  - Added a test_data.json file which contains Insert and Update test
>> related input data
>>
>>  - First of all, we create three tables such as
>>  a) defaults_text
>>  b) defaults_boolean
>>  c) defaults_number
>>  d) defaults_json
>>  These tables has columns with different constraints (default value,
>> not_null etc) to test with various input test data.
>>
>> - Test cases for insert are executed first and then test cases for update.
>>
>> Please review the patch.
>>
>>
>> On Wed, May 10, 2017 at 2:22 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> Please find attached patch for RM only.
>>>
>>> *Changes:*
>>>
>>>  - All formatters now handles both [null] and [default] values
>>>
>>>  - the cell values are validated on server side as in pgAdmin3.
>>>
>>>  - added light grey color for cells with [null] and [default]
>>> placeholders.
>>>
>>> On Wed, May 10, 2017 at 2:12 PM, Dave Page  wrote:
>>>


 On Wed, May 10, 2017 at 9:39 AM, Surinder Kumar <
 surinder.ku...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Wed, May 10, 2017 at 2:06 PM, Dave Page  wrote:
>
>> Any chance we can get this wrapped up today Surinder?
>>
> ​I have fixed RM case, I am currently writing its feature test cases
> which is taking some time.
> Should I send patch for RM case only?​ I will try to complete test
> cases by today eod.
>

 Yes please.

 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
>


[pgadmin-hackers] pgAdmin 4 commit: Minor colour tweaks for highlighted rows in the data

2017-05-12 Thread Dave Page
Minor colour tweaks for highlighted rows in the data editor. These are likely 
to be changed again when we overhaul and standardise the colouring, but at 
least now they're using colours from the style guide.

Branch
--
master

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

Modified Files
--
web/pgadmin/tools/sqleditor/static/css/sqleditor.css | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)


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


[pgadmin-hackers] Jenkins build is back to normal : pgadmin4-master-python33 #104

2017-05-12 Thread pgAdmin 4 Jenkins
See 




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


[pgadmin-hackers] pgAdmin 4 commit: Updated psycopg2 version for PostgreSQL 10 compatibil

2017-05-12 Thread Akshay Joshi
Updated psycopg2 version for PostgreSQL 10 compatibility. Fixes #2377

Branch
--
master

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

Modified Files
--
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


Re: [pgadmin-hackers] [pgAdmin4][Patch][RM2257]: Query tool - Insert row doesn't use default values

2017-05-12 Thread Dave Page
Hi,

Couple of comments:

- Can we improve the speed of this test? Perhaps by adding multiple rows to
the table at once, then checking the result after a single save/refresh? We
need to keep the feature tests as fast as possible to ensure they remain
practical to run.

- I get the following failure under Python 2. It passes under Python 3 as
you might imagine given the assertion error.

Thanks!

2017-05-12 11:00:00,860:ERROR:STDERR:==

2017-05-12 11:00:00,861:ERROR:STDERR:FAIL: runTest
(pgadmin.feature_tests.view_data_dml_queries.CheckForViewDataTest)
2017-05-12 11:00:00,861:ERROR:STDERR:Validate Insert, Update operations in
View data with given test data
2017-05-12 11:00:00,861:ERROR:STDERR:--

2017-05-12 11:00:00,861:ERROR:STDERR:Traceback (most recent call last):
2017-05-12 11:00:00,861:ERROR:STDERR:  File "/Users/dpage/git/pgadmin4/
web/pgadmin/feature_tests/view_data_dml_queries.py", line 160, in runTest
2017-05-12 11:00:00,861:ERROR:STDERR:self._update_row_in_table(key)
2017-05-12 11:00:00,861:ERROR:STDERR:  File "/Users/dpage/git/pgadmin4/
web/pgadmin/feature_tests/view_data_dml_queries.py", line 432, in
_update_row_in_table
2017-05-12 11:00:00,861:ERROR:STDERR:self._verify_update_data(table,
row)
2017-05-12 11:00:00,861:ERROR:STDERR:  File "/Users/dpage/git/pgadmin4/
web/pgadmin/feature_tests/view_data_dml_queries.py", line 477, in
_verify_update_data
2017-05-12 11:00:00,861:ERROR:STDERR:self.assertEquals(cell2,
test_verify_data['data_default_nulls'])
2017-05-12 11:00:00,861:ERROR:STDERR:AssertionError: "''" != u''
2017-05-12 11:00:00,861:ERROR:STDERR:--

2017-05-12 11:00:00,861:ERROR:STDERR:Ran 6 tests in 208.850s
2017-05-12 11:00:00,861:ERROR:STDERR:FAILED
2017-05-12 11:00:00,861:ERROR:STDERR: (failures=1)
On Wed, May 10, 2017 at 3:02 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find attached patch for Feature test cases for RM_2257
>
> *Implementation detail:*
>
>  - Added a test_data.json file which contains Insert and Update test
> related input data
>
>  - First of all, we create three tables such as
>  a) defaults_text
>  b) defaults_boolean
>  c) defaults_number
>  d) defaults_json
>  These tables has columns with different constraints (default value,
> not_null etc) to test with various input test data.
>
> - Test cases for insert are executed first and then test cases for update.
>
> Please review the patch.
>
>
> On Wed, May 10, 2017 at 2:22 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find attached patch for RM only.
>>
>> *Changes:*
>>
>>  - All formatters now handles both [null] and [default] values
>>
>>  - the cell values are validated on server side as in pgAdmin3.
>>
>>  - added light grey color for cells with [null] and [default]
>> placeholders.
>>
>> On Wed, May 10, 2017 at 2:12 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Wed, May 10, 2017 at 9:39 AM, Surinder Kumar <
>>> surinder.ku...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 On Wed, May 10, 2017 at 2:06 PM, Dave Page  wrote:

> Any chance we can get this wrapped up today Surinder?
>
 ​I have fixed RM case, I am currently writing its feature test cases
 which is taking some time.
 Should I send patch for RM case only?​ I will try to complete test
 cases by today eod.

>>>
>>> Yes please.
>>>
>>> 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


[pgadmin-hackers] Build failed in Jenkins: pgadmin4-master-python34 #102

2017-05-12 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Properly handle non-ASCII column names in CSV. Fixes #2314

[Dave Page] Improve handling of nulls and default values in the data editor. 
Fixes

--
[...truncated 245.94 KB...]
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tables.triggers.tests.test_triggers_get.TriggersGetTestCase)
Fetch trigger Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tables.triggers.tests.test_triggers_put.TriggersUpdateTestCase)
Put trigger Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_add.SchemaAddTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_delete.SchemaDeleteTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_get.SchemaGetTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_put.SchemaPutTestCase)
Check Schema Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_add.TypesAddTestCase)
Add type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_delete.TypesDeleteTestCase)
Delete type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_get.TypesGetTestCase)
Get type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.types.tests.test_types_put.TypesUpdateTestCase)
Update type under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_add.ViewsAddTestCase)
Add view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_add.ViewsAddTestCase)
Add materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_delete.ViewsDeleteTestCase)
Delete view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_delete.ViewsDeleteTestCase)
Delete materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_get.ViewsGetTestCase)
Get view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_get.ViewsGetTestCase)
Get materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_put.ViewsUpdateTestCase)
Update view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.schemas.views.tests.test_views_put.ViewsUpdateTestCase)
Update materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
Check Databases Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_add.ResourceGroupsAddTestCase)
Add resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_delete.ResourceGroupsDeleteTestCase)
Delete resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_put.ResourceGroupsPutTestCase)
Put resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.tests_resource_groups_get.ResourceGroupsGetTestCase)
Get resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
Check Tablespace Node ... ok
runTest 

[pgadmin-hackers] pgAdmin 4 commit: Improve handling of nulls and default values in the d

2017-05-12 Thread Dave Page
Improve handling of nulls and default values in the data editor. Fixes #2257

Branch
--
master

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

Modified Files
--
.../tables/templates/column/sql/9.2_plus/nodes.sql |  3 +-
.../tables/templates/column/sql/default/nodes.sql  |  3 +-
web/pgadmin/static/css/pgadmin.css |  2 +-
.../static/js/slickgrid/slick.pgadmin.editors.js   | 39 +++---
.../js/slickgrid/slick.pgadmin.formatters.js   | 46 --
web/pgadmin/tools/sqleditor/__init__.py| 25 +++-
web/pgadmin/tools/sqleditor/command.py | 30 +-
.../tools/sqleditor/static/css/sqleditor.css   | 12 +-
.../sqleditor/templates/sqleditor/js/sqleditor.js  | 28 -
9 files changed, 163 insertions(+), 25 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue with Node rename

2017-05-12 Thread Ashesh Vashi
Sure.
I am reviewing it.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


On Fri, May 12, 2017 at 3:09 PM, Dave Page  wrote:

> Ashesh, can you get this in today please?
>
> Thanks.
>
> On Fri, May 12, 2017 at 7:07 AM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Ashesh,
>>
>> As discussed please find updated patch removing hardcoded check for
>> server & server-group node.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Fri, Apr 28, 2017 at 1:29 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Ashesh,
>>>
>>> PFA updated patch for the issue.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Wed, Apr 26, 2017 at 10:29 AM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>

 On Mon, Apr 24, 2017 at 4:43 PM, Dave Page  wrote:

> Ashesh, can you review/commit this please? Thanks.
>
> On Mon, Apr 24, 2017 at 6:17 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA minor patch to fix the issue where node rename is not working
>> properly after 7dd9efd8
>> 
>>  commit
>> .
>> RM#2355
>>
> We should remove the existing node, and then insert at right place
 instead of refreshing the parent.
 Because - that will select the parent node, and not that node, and also
 - it adds overhead of refreshing the whole parent node.

 Please send the patch as per our discussion.

 -- Thanks, Ashesh

>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org
>> )
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


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


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue with Node rename

2017-05-12 Thread Dave Page
Ashesh, can you get this in today please?

Thanks.

On Fri, May 12, 2017 at 7:07 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Ashesh,
>
> As discussed please find updated patch removing hardcoded check for server
> & server-group node.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Fri, Apr 28, 2017 at 1:29 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Ashesh,
>>
>> PFA updated patch for the issue.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Apr 26, 2017 at 10:29 AM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>>
>>> On Mon, Apr 24, 2017 at 4:43 PM, Dave Page  wrote:
>>>
 Ashesh, can you review/commit this please? Thanks.

 On Mon, Apr 24, 2017 at 6:17 AM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch to fix the issue where node rename is not working
> properly after 7dd9efd8
> 
>  commit
> .
> RM#2355
>
 We should remove the existing node, and then insert at right place
>>> instead of refreshing the parent.
>>> Because - that will select the parent node, and not that node, and also
>>> - it adds overhead of refreshing the whole parent node.
>>>
>>> Please send the patch as per our discussion.
>>>
>>> -- Thanks, Ashesh
>>>

> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


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


[pgadmin-hackers] pgAdmin 4 commit: Properly handle non-ASCII column names in CSV. Fixes

2017-05-12 Thread Dave Page
Properly handle non-ASCII column names in CSV. Fixes #2314

Branch
--
master

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

Modified Files
--
web/pgadmin/utils/driver/psycopg2/__init__.py | 46 +++
1 file changed, 40 insertions(+), 6 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issues with CSV file download

2017-05-12 Thread Dave Page
Thanks - patch applied.

On Thu, May 11, 2017 at 3:21 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find patch to handle non-ascii column names in CSV for Pyhton2.
>
> Thanks to Harshal for pointing out the issue.
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Mon, May 8, 2017 at 6:06 PM, Dave Page  wrote:
>
>> Thanks, patch applied.
>>
>> On Mon, May 8, 2017 at 1:14 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the patch to fix the issues in CSV file download feature,
>>>
>>> 1) To handle non-ascii filenames which we set from table name
>>> RM#2314
>>>
>>> 2) To handle non-ascii query data
>>> RM#2353
>>>
>>> 3) To dump JSON type columns properly in csv
>>> RM#2360
>>>
>>> Please review.
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


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

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


Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue with Node rename

2017-05-12 Thread Murtuza Zabuawala
Hi Ashesh,

As discussed please find updated patch removing hardcoded check for server
& server-group node.

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

On Fri, Apr 28, 2017 at 1:29 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Ashesh,
>
> PFA updated patch for the issue.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Apr 26, 2017 at 10:29 AM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>>
>> On Mon, Apr 24, 2017 at 4:43 PM, Dave Page  wrote:
>>
>>> Ashesh, can you review/commit this please? Thanks.
>>>
>>> On Mon, Apr 24, 2017 at 6:17 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi,

 PFA minor patch to fix the issue where node rename is not working
 properly after 7dd9efd8
 
  commit
 .
 RM#2355

>>> We should remove the existing node, and then insert at right place
>> instead of refreshing the parent.
>> Because - that will select the parent node, and not that node, and also -
>> it adds overhead of refreshing the whole parent node.
>>
>> Please send the patch as per our discussion.
>>
>> -- Thanks, Ashesh
>>
>>>
 --
 Regards,
 Murtuza Zabuawala
 EnterpriseDB: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company


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


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


fix_update_node_v2.patch
Description: Binary data

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