Re: [pgAdmin4][Patch]: RM-2859: Can't create new user

2017-11-27 Thread Dave Page
On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Fri, Nov 24, 2017 at 3:21 PM, Dave Page  wrote:
>
>>
>>
>> On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Thu, Nov 23, 2017 at 2:58 PM, Dave Page  wrote:
>>>
 Hi

 On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix RM #2859:  Can't create new user.
>
> The "User Management" dialogue footer was overlapping the back-grid
> table which has been fixed.
>

 If my screen is too small, it now looks like the attached screenshot,
 which is really quite ugly.

 If we don't leave the bottom blank space then in case of error the
>>> error-message will shown on the grid itself and user can't perform any task.
>>> Please refer the attached screen-shot for the same.
>>>
>>
>> Right, but we also can't have that space left blank like that. Can't we
>> extend the scroll range of the grid? In other words, always include space
>> for an extra row or so, so it can scroll above the error message, when, and
>> only when a message is shown?
>>
>>
> Please find the attached screen-shot, If we always include an extra row.
> Suggestion please.
>

I think that's much better, though still not ideal. What if we made the
error messages closable like other notifications?


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

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


Re: [pgAdmin4][Patch]: RM-2859: Can't create new user

2017-11-27 Thread Khushboo Vashi
On Mon, Nov 27, 2017 at 2:20 PM, Dave Page  wrote:

>
>
> On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Fri, Nov 24, 2017 at 3:21 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Thu, Nov 23, 2017 at 2:58 PM, Dave Page  wrote:

> Hi
>
> On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find the attached patch to fix RM #2859:  Can't create new
>> user.
>>
>> The "User Management" dialogue footer was overlapping the back-grid
>> table which has been fixed.
>>
>
> If my screen is too small, it now looks like the attached screenshot,
> which is really quite ugly.
>
> If we don't leave the bottom blank space then in case of error the
 error-message will shown on the grid itself and user can't perform any 
 task.
 Please refer the attached screen-shot for the same.

>>>
>>> Right, but we also can't have that space left blank like that. Can't we
>>> extend the scroll range of the grid? In other words, always include space
>>> for an extra row or so, so it can scroll above the error message, when, and
>>> only when a message is shown?
>>>
>>>
>> Please find the attached screen-shot, If we always include an extra row.
>> Suggestion please.
>>
>
> I think that's much better, though still not ideal. What if we made the
> error messages closable like other notifications?
>
> The error-messages in pgAdmin 4 are not closable, so it will not go with
the flow.

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


Re: [pgAdmin4][Patch]: RM-2859: Can't create new user

2017-11-27 Thread Dave Page
On Mon, Nov 27, 2017 at 9:19 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Nov 27, 2017 at 2:20 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> On Fri, Nov 24, 2017 at 3:21 PM, Dave Page  wrote:
>>>


 On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Thu, Nov 23, 2017 at 2:58 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached patch to fix RM #2859:  Can't create new
>>> user.
>>>
>>> The "User Management" dialogue footer was overlapping the back-grid
>>> table which has been fixed.
>>>
>>
>> If my screen is too small, it now looks like the attached screenshot,
>> which is really quite ugly.
>>
>> If we don't leave the bottom blank space then in case of error the
> error-message will shown on the grid itself and user can't perform any 
> task.
> Please refer the attached screen-shot for the same.
>

 Right, but we also can't have that space left blank like that. Can't we
 extend the scroll range of the grid? In other words, always include space
 for an extra row or so, so it can scroll above the error message, when, and
 only when a message is shown?


>>> Please find the attached screen-shot, If we always include an extra row.
>>> Suggestion please.
>>>
>>
>> I think that's much better, though still not ideal. What if we made the
>> error messages closable like other notifications?
>>
>> The error-messages in pgAdmin 4 are not closable, so it will not go with
> the flow.
>

I meant to do it globally.


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

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


Re: [pgAdmin4][Patch]: RM-2859: Can't create new user

2017-11-27 Thread Khushboo Vashi
On Mon, Nov 27, 2017 at 2:59 PM, Dave Page  wrote:

>
>
> On Mon, Nov 27, 2017 at 9:19 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 2:20 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 On Fri, Nov 24, 2017 at 3:21 PM, Dave Page  wrote:

>
>
> On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Thu, Nov 23, 2017 at 2:58 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,

 Please find the attached patch to fix RM #2859:  Can't create new
 user.

 The "User Management" dialogue footer was overlapping the back-grid
 table which has been fixed.

>>>
>>> If my screen is too small, it now looks like the attached
>>> screenshot, which is really quite ugly.
>>>
>>> If we don't leave the bottom blank space then in case of error the
>> error-message will shown on the grid itself and user can't perform any 
>> task.
>> Please refer the attached screen-shot for the same.
>>
>
> Right, but we also can't have that space left blank like that. Can't
> we extend the scroll range of the grid? In other words, always include
> space for an extra row or so, so it can scroll above the error message,
> when, and only when a message is shown?
>
>
 Please find the attached screen-shot, If we always include an extra
 row.
 Suggestion please.

>>>
>>> I think that's much better, though still not ideal. What if we made the
>>> error messages closable like other notifications?
>>>
>>> The error-messages in pgAdmin 4 are not closable, so it will not go with
>> the flow.
>>
>
> I meant to do it globally.
>
> Should I create the separate case for this?

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


Re: [pgAdmin4][Patch]: RM-2859: Can't create new user

2017-11-27 Thread Dave Page
On Mon, Nov 27, 2017 at 10:39 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Nov 27, 2017 at 2:59 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 9:19 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 2:20 PM, Dave Page  wrote:
>>>


 On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Fri, Nov 24, 2017 at 3:21 PM, Dave Page  wrote:
>
>>
>>
>> On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Thu, Nov 23, 2017 at 2:58 PM, Dave Page 
>>> wrote:
>>>
 Hi

 On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix RM #2859:  Can't create new
> user.
>
> The "User Management" dialogue footer was overlapping the
> back-grid table which has been fixed.
>

 If my screen is too small, it now looks like the attached
 screenshot, which is really quite ugly.

 If we don't leave the bottom blank space then in case of error the
>>> error-message will shown on the grid itself and user can't perform any 
>>> task.
>>> Please refer the attached screen-shot for the same.
>>>
>>
>> Right, but we also can't have that space left blank like that. Can't
>> we extend the scroll range of the grid? In other words, always include
>> space for an extra row or so, so it can scroll above the error message,
>> when, and only when a message is shown?
>>
>>
> Please find the attached screen-shot, If we always include an extra
> row.
> Suggestion please.
>

 I think that's much better, though still not ideal. What if we made the
 error messages closable like other notifications?

 The error-messages in pgAdmin 4 are not closable, so it will not go
>>> with the flow.
>>>
>>
>> I meant to do it globally.
>>
>> Should I create the separate case for this?
>

No, I don't think there's any need for that.

Does it seem like it would solve the problem appropriately?

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

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


pgAdmin 4 commit: Doc screenshot update

2017-11-27 Thread Dave Page
Doc screenshot update

Branch
--
master

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

Modified Files
--
docs/en_US/images/add_pgadmin_user.png | Bin 38475 -> 60446 bytes
docs/en_US/images/add_restore_point.png| Bin 27794 -> 21428 bytes
docs/en_US/images/backup_disable.png   | Bin 28607 -> 33127 bytes
docs/en_US/images/backup_do_not_save.png   | Bin 37575 -> 40334 bytes
docs/en_US/images/backup_general.png   | Bin 46977 -> 47190 bytes
docs/en_US/images/backup_globals_general.png   | Bin 50460 -> 53707 bytes
docs/en_US/images/backup_globals_messages.png  | Bin 34226 -> 34262 bytes
.../images/backup_globals_process_watcher.png  | Bin 287673 -> 250187 bytes
docs/en_US/images/backup_messages.png  | Bin 37279 -> 40581 bytes
docs/en_US/images/backup_miscellaneous.png | Bin 45469 -> 48790 bytes
docs/en_US/images/backup_objects.png   | Bin 33343 -> 37870 bytes
docs/en_US/images/backup_process_watcher.png   | Bin 141087 -> 192673 bytes
docs/en_US/images/backup_queries.png   | Bin 40477 -> 48381 bytes
docs/en_US/images/backup_sections.png  | Bin 29249 -> 35556 bytes
docs/en_US/images/backup_server_general.png| Bin 52245 -> 48633 bytes
docs/en_US/images/backup_server_messages.png   | Bin 32936 -> 34497 bytes
.../en_US/images/backup_server_process_watcher.png | Bin 280605 -> 249830 bytes
docs/en_US/images/cast_definition.png  | Bin 66787 -> 46128 bytes
docs/en_US/images/cast_general.png | Bin 38927 -> 33021 bytes
docs/en_US/images/cast_sql.png | Bin 53414 -> 42673 bytes
docs/en_US/images/ce_error_hba.png | Bin 61509 -> 53698 bytes
docs/en_US/images/ce_not_running.png   | Bin 69868 -> 59733 bytes
docs/en_US/images/ce_password_failed.png   | Bin 58451 -> 43762 bytes
docs/en_US/images/ce_timeout.png   | Bin 15924 -> 21417 bytes
docs/en_US/images/check_definition.png | Bin 46402 -> 39905 bytes
docs/en_US/images/check_general.png| Bin 34750 -> 34339 bytes
docs/en_US/images/check_sql.png| Bin 88807 -> 59534 bytes
docs/en_US/images/collation_definition.png | Bin 52995 -> 40456 bytes
docs/en_US/images/collation_general.png| Bin 55400 -> 44980 bytes
docs/en_US/images/collation_sql.png| Bin 68901 -> 43200 bytes
docs/en_US/images/column_definition.png| Bin 64174 -> 50801 bytes
docs/en_US/images/column_general.png   | Bin 40886 -> 42352 bytes
docs/en_US/images/column_security.png  | Bin 48504 -> 56051 bytes
docs/en_US/images/column_sql.png   | Bin 59323 -> 74924 bytes
docs/en_US/images/column_variables.png | Bin 40449 -> 47380 bytes
docs/en_US/images/connect_to_server.png| Bin 44888 -> 31582 bytes
docs/en_US/images/database_definition.png  | Bin 74464 -> 56899 bytes
docs/en_US/images/database_general.png | Bin 46337 -> 44163 bytes
docs/en_US/images/database_parameters.png  | Bin 43189 -> 52871 bytes
docs/en_US/images/database_security.png| Bin 56673 -> 94272 bytes
docs/en_US/images/database_sql.png | Bin 89038 -> 114144 bytes
docs/en_US/images/debug_error_message.png  | Bin 39810 -> 71958 bytes
docs/en_US/images/debug_ic_step_in.png | Bin 139266 -> 166395 bytes
docs/en_US/images/debug_main.png   | Bin 81469 -> 157828 bytes
docs/en_US/images/debug_params.png | Bin 33593 -> 50862 bytes
docs/en_US/images/debug_set_breakpoint.png | Bin 27621 -> 13098 bytes
docs/en_US/images/debug_stack.png  | Bin 20776 -> 32025 bytes
docs/en_US/images/debug_step_in.png| Bin 146841 -> 166155 bytes
docs/en_US/images/debug_toolbar.png| Bin 3306 -> 5795 bytes
docs/en_US/images/debug_variables.png  | Bin 41657 -> 40811 bytes
docs/en_US/images/domain_constraint_definition.png | Bin 45861 -> 42572 bytes
docs/en_US/images/domain_constraint_general.png| Bin 43766 -> 40713 bytes
docs/en_US/images/domain_constraint_sql.png| Bin 95281 -> 46357 bytes
docs/en_US/images/domain_constraints.png   | Bin 42587 -> 45484 bytes
docs/en_US/images/domain_definition.png| Bin 82663 -> 54045 bytes
docs/en_US/images/domain_general.png   | Bin 60750 -> 49345 bytes
docs/en_US/images/domain_security.png  | Bin 44604 -> 46457 bytes
docs/en_US/images/domain_sql.png   | Bin 129614 -> 66030 bytes
docs/en_US/images/event_trigger_definition.png | Bin 83619 -> 58828 bytes
docs/en_US/images/event_trigger_general.png| Bin 51060 -> 44786 bytes
docs/en_US/images/event_trigger_security.png   | Bin 47990 -> 55222 bytes
docs/en_U

pgAdmin 4 commit: Revert inadvertant change to doc page

2017-11-27 Thread Dave Page
Revert inadvertant change to doc page

Branch
--
master

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

Modified Files
--
docs/en_US/pgadmin_login.rst | 2 --
1 file changed, 2 deletions(-)



Re: [pgAdmin4][Patch]: RM-2859: Can't create new user

2017-11-27 Thread Khushboo Vashi
On Mon, Nov 27, 2017 at 4:13 PM, Dave Page  wrote:

>
>
> On Mon, Nov 27, 2017 at 10:39 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 2:59 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 9:19 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Mon, Nov 27, 2017 at 2:20 PM, Dave Page  wrote:

>
>
> On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Fri, Nov 24, 2017 at 3:21 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Thu, Nov 23, 2017 at 2:58 PM, Dave Page 
 wrote:

> Hi
>
> On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find the attached patch to fix RM #2859:  Can't create new
>> user.
>>
>> The "User Management" dialogue footer was overlapping the
>> back-grid table which has been fixed.
>>
>
> If my screen is too small, it now looks like the attached
> screenshot, which is really quite ugly.
>
> If we don't leave the bottom blank space then in case of error the
 error-message will shown on the grid itself and user can't perform any 
 task.
 Please refer the attached screen-shot for the same.

>>>
>>> Right, but we also can't have that space left blank like that. Can't
>>> we extend the scroll range of the grid? In other words, always include
>>> space for an extra row or so, so it can scroll above the error message,
>>> when, and only when a message is shown?
>>>
>>>
>> Please find the attached screen-shot, If we always include an extra
>> row.
>> Suggestion please.
>>
>
> I think that's much better, though still not ideal. What if we made
> the error messages closable like other notifications?
>
> The error-messages in pgAdmin 4 are not closable, so it will not go
 with the flow.

>>>
>>> I meant to do it globally.
>>>
>>> Should I create the separate case for this?
>>
>
> No, I don't think there's any need for that.
>
> Does it seem like it would solve the problem appropriately?
>
>
It would lead us to more complexity
1. How can we keep track of the closed error messages for multiple fields?
2. We have validated backbone model on focus out/change, so we need to
change the basic error model.


I have attached the patch for the RM #2859.

Thanks,
Khushboo

-- 
> 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/css/bootstrap.overrides.css b/web/pgadmin/static/css/bootstrap.overrides.css
index b894021..6e3e580 100755
--- a/web/pgadmin/static/css/bootstrap.overrides.css
+++ b/web/pgadmin/static/css/bootstrap.overrides.css
@@ -1218,6 +1218,11 @@ height: calc(100% - 35px);
   line-height: 16px;
 }
 
+.user_management table tbody tr.blank_row {
+  visibility: hidden;
+  height: 35px;
+}
+
 .pg-panel-statistics-container >table.backgrid.table-bordered {
   border: 0px;
 }
diff --git a/web/pgadmin/tools/user_management/static/js/user_management.js b/web/pgadmin/tools/user_management/static/js/user_management.js
index ffdf8b2..4ae738c 100644
--- a/web/pgadmin/tools/user_management/static/js/user_management.js
+++ b/web/pgadmin/tools/user_management/static/js/user_management.js
@@ -392,8 +392,8 @@ define([
   prepare: function() {
 var self = this,
   footerTpl = _.template([
-'',
-  '',
+'',
+  '',
 '',
   '',
 '',
@@ -405,8 +405,7 @@ define([
 '',
   '',
 ''].join("\n")),
-  $footer = $(footerTpl()),
-  $statusBar = $footer.find('.pg-prop-status-bar'),
+  $statusBar = $(footerTpl()),
   UserRow = Backgrid.Row.extend({
 userInvalidColor: "lightYellow",
 
@@ -558,7 +557,7 @@ define([
 
 this.$content = $("").append(
 headerTpl(data)).append($gridBody
-).append($footer);
+).append($statusBar);
 
 $(this.elements.body.childNodes[0]).addClass(
   'alertify_tools_dialog_backgrid_properties');
@@ -569,7 +568,12 @@ define([
 $('.search_users').append(
   userFilter(userCollection).render().el);
 
-userCollection.fetch();
+ 

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

2017-11-27 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Doc screenshot update

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

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

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

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

Re: [pgAdmin4][Patch]: RM-2859: Can't create new user

2017-11-27 Thread Dave Page
On Mon, Nov 27, 2017 at 11:03 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Nov 27, 2017 at 4:13 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 10:39 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 2:59 PM, Dave Page  wrote:
>>>


 On Mon, Nov 27, 2017 at 9:19 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Nov 27, 2017 at 2:20 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> On Fri, Nov 24, 2017 at 3:21 PM, Dave Page 
>>> wrote:
>>>


 On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Thu, Nov 23, 2017 at 2:58 PM, Dave Page 
> wrote:
>
>> Hi
>>
>> On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached patch to fix RM #2859:  Can't create
>>> new user.
>>>
>>> The "User Management" dialogue footer was overlapping the
>>> back-grid table which has been fixed.
>>>
>>
>> If my screen is too small, it now looks like the attached
>> screenshot, which is really quite ugly.
>>
>> If we don't leave the bottom blank space then in case of error
> the error-message will shown on the grid itself and user can't 
> perform any
> task.
> Please refer the attached screen-shot for the same.
>

 Right, but we also can't have that space left blank like that.
 Can't we extend the scroll range of the grid? In other words, always
 include space for an extra row or so, so it can scroll above the error
 message, when, and only when a message is shown?


>>> Please find the attached screen-shot, If we always include an extra
>>> row.
>>> Suggestion please.
>>>
>>
>> I think that's much better, though still not ideal. What if we made
>> the error messages closable like other notifications?
>>
>> The error-messages in pgAdmin 4 are not closable, so it will not go
> with the flow.
>

 I meant to do it globally.

 Should I create the separate case for this?
>>>
>>
>> No, I don't think there's any need for that.
>>
>> Does it seem like it would solve the problem appropriately?
>>
>>
> It would lead us to more complexity
> 1. How can we keep track of the closed error messages for multiple fields?
>

Do we need to?


> 2. We have validated backbone model on focus out/change, so we need to
> change the basic error model.
>

I'm not sure why. Can't we just have an X button on the error panel that
will hide it? If another error occurs (e.g. because the user changes
focus), just re-display it.


>
>
> I have attached the patch for the RM #2859.
>
> Thanks,
> Khushboo
>
> --
>> 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


Fix for RM2811

2017-11-27 Thread Harshal Dhumal
Hi,

Please find attached patch to fix RM2811

Issue was caused due to assumption made when current position in log file
while reading it reaches to last line then
we were assuming process is finished. However this is not the case.
Background process may be busy performing
some other task and logs might not be logged to file immediately. So we
should also check process exit code along
with above condition.

Apart from above this patch also includes minor fix related to status text
colour.

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

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/misc/bgprocess/processes.py b/web/pgadmin/misc/bgprocess/processes.py
index 0b94775..209c2a1 100644
--- a/web/pgadmin/misc/bgprocess/processes.py
+++ b/web/pgadmin/misc/bgprocess/processes.py
@@ -365,7 +365,7 @@ class BatchProcess(object):
 if enc is None or enc == 'ascii':
 enc = 'utf-8'
 
-def read_log(logfile, log, pos, ctime):
+def read_log(logfile, log, pos, ctime, ecode=None):
 completed = True
 idx = 0
 c = re.compile(r"(\d+),(.*$)")
@@ -376,6 +376,9 @@ class BatchProcess(object):
 with open(logfile, 'rb') as f:
 eofs = os.fstat(f.fileno()).st_size
 f.seek(pos, 0)
+if pos == eofs and ecode is None:
+completed = False
+
 while pos < eofs:
 idx += 1
 line = f.readline()
@@ -394,15 +397,12 @@ class BatchProcess(object):
 completed = False
 break
 if pos == eofs:
-completed = True
+if ecode is None:
+completed = False
 break
 
 return pos, completed
 
-if process_output:
-out, out_completed = read_log(self.stdout, stdout, out, ctime)
-err, err_completed = read_log(self.stderr, stderr, err, ctime)
-
 j = Process.query.filter_by(
 pid=self.id, user_id=current_user.id
 ).first()
@@ -423,11 +423,11 @@ class BatchProcess(object):
 
 execution_time = (etime - stime).total_seconds()
 
-if process_output and self.ecode is not None and (
-len(stdout) + len(stderr) < 1024
-):
-out, out_completed = read_log(self.stdout, stdout, out, ctime)
-err, err_completed = read_log(self.stderr, stderr, err, ctime)
+if process_output:
+out, out_completed = read_log(self.stdout, stdout, out, ctime,
+  self.ecode)
+err, err_completed = read_log(self.stderr, stderr, err, ctime,
+  self.ecode)
 else:
 out_completed = err_completed = False
 
diff --git a/web/pgadmin/misc/bgprocess/static/js/bgprocess.js b/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
index a4506b5..bc61733 100644
--- a/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
+++ b/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
@@ -301,9 +301,16 @@ define('misc.bgprocess', [
   ).append(
 $('').text(' ' + gettext('seconds'))
   );
-  self.container.find('.pg-bg-status').empty().append(
+  var $status_bar = $(self.container.find('.pg-bg-status'));
+  $status_bar.empty().append(
 self.curr_status
   );
+
+  if (self.exit_code === 0) {
+$status_bar.addClass('bg-success');
+  } else if (self.exit_code == 1){
+$status_bar.addClass('bg-failed');
+  }
 } else {
   self.show_detailed_view.apply(self)
 }


pgAdmin 4 commit: Ensure we don't show the full path on the server when

2017-11-27 Thread Dave Page
Ensure we don't show the full path on the server when using virtual filesystem 
roots in server mode for SSL certs. Fixes #2866

Branch
--
master

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

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



Re: [pgAdmin4][Patch]: Do not use actual path when displaying dummy SSL certificates files

2017-11-27 Thread Dave Page
Thanks, applied.

On Thu, Nov 23, 2017 at 11:55 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue where we were exposing the actual storage
> directory path when user did not provided their own SSL certificates in
> Server mode.
> RM#2866
>
> --
> 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]: RM-2859: Can't create new user

2017-11-27 Thread Khushboo Vashi
On Mon, Nov 27, 2017 at 4:47 PM, Dave Page  wrote:

>
>
> On Mon, Nov 27, 2017 at 11:03 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 4:13 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 10:39 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Mon, Nov 27, 2017 at 2:59 PM, Dave Page  wrote:

>
>
> On Mon, Nov 27, 2017 at 9:19 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 2:20 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 On Fri, Nov 24, 2017 at 3:21 PM, Dave Page 
 wrote:

>
>
> On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Thu, Nov 23, 2017 at 2:58 PM, Dave Page 
>> wrote:
>>
>>> Hi
>>>
>>> On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,

 Please find the attached patch to fix RM #2859:  Can't create
 new user.

 The "User Management" dialogue footer was overlapping the
 back-grid table which has been fixed.

>>>
>>> If my screen is too small, it now looks like the attached
>>> screenshot, which is really quite ugly.
>>>
>>> If we don't leave the bottom blank space then in case of error
>> the error-message will shown on the grid itself and user can't 
>> perform any
>> task.
>> Please refer the attached screen-shot for the same.
>>
>
> Right, but we also can't have that space left blank like that.
> Can't we extend the scroll range of the grid? In other words, always
> include space for an extra row or so, so it can scroll above the error
> message, when, and only when a message is shown?
>
>
 Please find the attached screen-shot, If we always include an extra
 row.
 Suggestion please.

>>>
>>> I think that's much better, though still not ideal. What if we made
>>> the error messages closable like other notifications?
>>>
>>> The error-messages in pgAdmin 4 are not closable, so it will not go
>> with the flow.
>>
>
> I meant to do it globally.
>
> Should I create the separate case for this?

>>>
>>> No, I don't think there's any need for that.
>>>
>>> Does it seem like it would solve the problem appropriately?
>>>
>>>
>> It would lead us to more complexity
>> 1. How can we keep track of the closed error messages for multiple fields?
>>
>
> Do we need to?
>
>
>> 2. We have validated backbone model on focus out/change, so we need to
>> change the basic error model.
>>
>
> I'm not sure why. Can't we just have an X button on the error panel that
> will hide it? If another error occurs (e.g. because the user changes
> focus), just re-display it.
>
>
This means, if the error message is displayed for the field 1 and after
closing if we go ahead without filling up the valid data, on the focus out;
the same error message will be shown.

I was thinking; if we have closed the error message for the field 1, then
it will not display any kind of message for that particular field. So, I
have mentioned about the complexity.

>
>> I have attached the patch for the RM #2859.
>>
>> Thanks,
>> Khushboo
>>
>> --
>>> 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: [pgAdmin4][Patch]: RM-2859: Can't create new user

2017-11-27 Thread Dave Page
On Mon, Nov 27, 2017 at 11:26 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Nov 27, 2017 at 4:47 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 11:03 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 4:13 PM, Dave Page  wrote:
>>>


 On Mon, Nov 27, 2017 at 10:39 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Nov 27, 2017 at 2:59 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 9:19 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 2:20 PM, Dave Page 
>>> wrote:
>>>


 On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi Dave,
>
> On Fri, Nov 24, 2017 at 3:21 PM, Dave Page 
> wrote:
>
>>
>>
>> On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Thu, Nov 23, 2017 at 2:58 PM, Dave Page 
>>> wrote:
>>>
 Hi

 On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch to fix RM #2859:  Can't create
> new user.
>
> The "User Management" dialogue footer was overlapping the
> back-grid table which has been fixed.
>

 If my screen is too small, it now looks like the attached
 screenshot, which is really quite ugly.

 If we don't leave the bottom blank space then in case of error
>>> the error-message will shown on the grid itself and user can't 
>>> perform any
>>> task.
>>> Please refer the attached screen-shot for the same.
>>>
>>
>> Right, but we also can't have that space left blank like that.
>> Can't we extend the scroll range of the grid? In other words, always
>> include space for an extra row or so, so it can scroll above the 
>> error
>> message, when, and only when a message is shown?
>>
>>
> Please find the attached screen-shot, If we always include an
> extra row.
> Suggestion please.
>

 I think that's much better, though still not ideal. What if we made
 the error messages closable like other notifications?

 The error-messages in pgAdmin 4 are not closable, so it will not go
>>> with the flow.
>>>
>>
>> I meant to do it globally.
>>
>> Should I create the separate case for this?
>

 No, I don't think there's any need for that.

 Does it seem like it would solve the problem appropriately?


>>> It would lead us to more complexity
>>> 1. How can we keep track of the closed error messages for multiple
>>> fields?
>>>
>>
>> Do we need to?
>>
>>
>>> 2. We have validated backbone model on focus out/change, so we need to
>>> change the basic error model.
>>>
>>
>> I'm not sure why. Can't we just have an X button on the error panel that
>> will hide it? If another error occurs (e.g. because the user changes
>> focus), just re-display it.
>>
>>
> This means, if the error message is displayed for the field 1 and after
> closing if we go ahead without filling up the valid data, on the focus out;
> the same error message will be shown.
>

Yes.


>
> I was thinking; if we have closed the error message for the field 1, then
> it will not display any kind of message for that particular field. So, I
> have mentioned about the complexity.
>

I'm not convinced we need that level of complexity.

Can you whip up a PoC so we can see how it behaves?



>
>>> I have attached the patch for the RM #2859.
>>>
>>> Thanks,
>>> Khushboo
>>>
>>> --
 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


Re: [pgAdmin4][Patch]: RM-2859: Can't create new user

2017-11-27 Thread Khushboo Vashi
On Mon, Nov 27, 2017 at 4:58 PM, Dave Page  wrote:

>
>
> On Mon, Nov 27, 2017 at 11:26 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 4:47 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 11:03 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Mon, Nov 27, 2017 at 4:13 PM, Dave Page  wrote:

>
>
> On Mon, Nov 27, 2017 at 10:39 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 2:59 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 9:19 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Mon, Nov 27, 2017 at 2:20 PM, Dave Page 
 wrote:

>
>
> On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Fri, Nov 24, 2017 at 3:21 PM, Dave Page 
>> wrote:
>>
>>>
>>>
>>> On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>


 On Thu, Nov 23, 2017 at 2:58 PM, Dave Page 
 wrote:

> Hi
>
> On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find the attached patch to fix RM #2859:  Can't create
>> new user.
>>
>> The "User Management" dialogue footer was overlapping the
>> back-grid table which has been fixed.
>>
>
> If my screen is too small, it now looks like the attached
> screenshot, which is really quite ugly.
>
> If we don't leave the bottom blank space then in case of error
 the error-message will shown on the grid itself and user can't 
 perform any
 task.
 Please refer the attached screen-shot for the same.

>>>
>>> Right, but we also can't have that space left blank like that.
>>> Can't we extend the scroll range of the grid? In other words, always
>>> include space for an extra row or so, so it can scroll above the 
>>> error
>>> message, when, and only when a message is shown?
>>>
>>>
>> Please find the attached screen-shot, If we always include an
>> extra row.
>> Suggestion please.
>>
>
> I think that's much better, though still not ideal. What if we
> made the error messages closable like other notifications?
>
> The error-messages in pgAdmin 4 are not closable, so it will not
 go with the flow.

>>>
>>> I meant to do it globally.
>>>
>>> Should I create the separate case for this?
>>
>
> No, I don't think there's any need for that.
>
> Does it seem like it would solve the problem appropriately?
>
>
 It would lead us to more complexity
 1. How can we keep track of the closed error messages for multiple
 fields?

>>>
>>> Do we need to?
>>>
>>>
 2. We have validated backbone model on focus out/change, so we need to
 change the basic error model.

>>>
>>> I'm not sure why. Can't we just have an X button on the error panel that
>>> will hide it? If another error occurs (e.g. because the user changes
>>> focus), just re-display it.
>>>
>>>
>> This means, if the error message is displayed for the field 1 and after
>> closing if we go ahead without filling up the valid data, on the focus out;
>> the same error message will be shown.
>>
>
> Yes.
>
>
>>
>> I was thinking; if we have closed the error message for the field 1, then
>> it will not display any kind of message for that particular field. So, I
>> have mentioned about the complexity.
>>
>
> I'm not convinced we need that level of complexity.
>
> Can you whip up a PoC so we can see how it behaves?
>
> Sure.

>
>

 I have attached the patch for the RM #2859.

 Thanks,
 Khushboo

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


Re: [pgAdmin4][Patch]: RM #2849 - Allow editing of data on tables with OIDs but no primary key

2017-11-27 Thread Dave Page
Hi

On Thu, Nov 23, 2017 at 1:28 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached patch for RM #2849: Allow editing of data on
> tables with OIDs but no primary key.
>

I like that if I add a new row or rows and hit Save, the OIDs are fetched
immediately. However;

- It marks the row as read-only. We do that currently because we don't
return the key info on Save, and thus require a Refresh before any further
editing. However, if we have the OID, we can edit again immediately.

- If we can return the new OIDs on Save, can't we do the same for primary
key values? That would be consistent with OIDs, and would remove the need
to disable rows, leading to a much nicer use experience I think.

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

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


pgAdmin 4 commit: Attempt to decode database errors based on lc_message

2017-11-27 Thread Dave Page
Attempt to decode database errors based on lc_messages. Fixes #2806. Fixes #2821

Branch
--
master

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

Modified Files
--
web/pgadmin/utils/driver/psycopg2/__init__.py | 20 +++-
1 file changed, 19 insertions(+), 1 deletion(-)



Re: [pgAdmin4][Patch]: To decode database errors properly

2017-11-27 Thread Dave Page
Thanks, applied.

On Mon, Nov 27, 2017 at 6:33 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue where if the database server is installed on
> the windows system then in most cases the parameter 'lc_messages' has
> environment dependent encoding.
> RM#2806
> RM#2821
>
> --
> 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: Fix for RM2811

2017-11-27 Thread Dave Page
Hi

On Mon, Nov 27, 2017 at 11:23 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch to fix RM2811
>
> Issue was caused due to assumption made when current position in log file
> while reading it reaches to last line then
> we were assuming process is finished. However this is not the case.
> Background process may be busy performing
> some other task and logs might not be logged to file immediately. So we
> should also check process exit code along
> with above condition.
>
> Apart from above this patch also includes minor fix related to status text
> colour.
>

Seems to work nicely, except that the text scrolls out of view almost
immediately. Can you fix it to jump to the end of the text when more is
appended please?

Thanks.

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

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


pgAdmin 4 commit: Use sufficiently long random strings in test objects

2017-11-27 Thread Dave Page
Use sufficiently long random strings in test objects to avoid conflicts.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=80c4a3fb1a6c23b8e81a4144ec8ca5a37da2e835
Author: Navnath Gadakh 

Modified Files
--
.../databases/event_triggers/tests/test_event_trigger_add.py| 4 ++--
.../databases/event_triggers/tests/test_event_trigger_delete.py | 4 ++--
.../databases/event_triggers/tests/test_event_trigger_get.py| 4 ++--
.../databases/event_triggers/tests/test_event_trigger_put.py| 4 ++--
.../foreign_servers/tests/test_foreign_servers_add.py   | 4 ++--
.../foreign_servers/tests/test_foreign_servers_delete.py| 4 ++--
.../foreign_servers/tests/test_foreign_servers_get.py   | 4 ++--
.../foreign_servers/tests/test_foreign_servers_put.py   | 6 +++---
.../foreign_servers/user_mapping/tests/test_user_mapping_add.py | 4 ++--
.../foreign_servers/user_mapping/tests/test_user_mapping_delete.py  | 4 ++--
.../foreign_servers/user_mapping/tests/test_user_mapping_get.py | 4 ++--
.../foreign_servers/user_mapping/tests/test_user_mapping_put.py | 4 ++--
.../databases/foreign_data_wrappers/tests/test_fdw_delete.py| 2 +-
.../servers/databases/foreign_data_wrappers/tests/test_fdw_get.py   | 2 +-
.../servers/databases/foreign_data_wrappers/tests/test_fdw_put.py   | 2 +-
.../servers/databases/foreign_data_wrappers/tests/utils.py  | 2 +-
.../servers/databases/languages/tests/test_language_add.py  | 2 +-
.../servers/databases/languages/tests/test_language_delete.py   | 2 +-
.../servers/databases/languages/tests/test_language_get.py  | 2 +-
.../servers/databases/languages/tests/test_language_put.py  | 2 +-
.../databases/schemas/collations/tests/test_collation_add.py| 4 ++--
.../databases/schemas/collations/tests/test_collation_delete.py | 2 +-
.../databases/schemas/collations/tests/test_collation_get.py| 2 +-
.../databases/schemas/collations/tests/test_collation_put.py| 2 +-
.../servers/databases/schemas/domains/tests/test_domain_add.py  | 2 +-
.../servers/databases/schemas/domains/tests/test_domain_delete.py   | 2 +-
.../servers/databases/schemas/domains/tests/test_domain_get.py  | 2 +-
.../servers/databases/schemas/domains/tests/test_domain_put.py  | 2 +-
.../schemas/foreign_tables/tests/test_foreign_table_add.py  | 6 +++---
.../schemas/foreign_tables/tests/test_foreign_table_delete.py   | 6 +++---
.../schemas/foreign_tables/tests/test_foreign_table_get.py  | 6 +++---
.../schemas/foreign_tables/tests/test_foreign_table_put.py  | 6 +++---
.../schemas/fts_configurations/tests/test_fts_configuration_add.py  | 4 ++--
.../fts_configurations/tests/test_fts_configuration_delete.py   | 2 +-
.../schemas/fts_configurations/tests/test_fts_configuration_get.py  | 2 +-
.../schemas/fts_configurations/tests/test_fts_configuration_put.py  | 2 +-
.../schemas/fts_dictionaries/tests/test_fts_dictionaries_add.py | 2 +-
.../schemas/fts_dictionaries/tests/test_fts_dictionaries_delete.py  | 2 +-
.../schemas/fts_dictionaries/tests/test_fts_dictionaries_get.py | 2 +-
.../schemas/fts_dictionaries/tests/test_fts_dictionaries_put.py | 2 +-
.../databases/schemas/fts_parser/tests/test_fts_parser_add.py   | 2 +-
.../databases/schemas/fts_parser/tests/test_fts_parser_delete.py| 2 +-
.../databases/schemas/fts_parser/tests/test_fts_parser_get.py   | 2 +-
.../databases/schemas/fts_parser/tests/test_fts_parser_put.py   | 2 +-
.../databases/schemas/fts_templates/tests/test_fts_templates_add.py | 2 +-
.../schemas/fts_templates/tests/test_fts_templates_delete.py| 2 +-
.../databases/schemas/fts_templates/tests/test_fts_templates_get.py | 2 +-
.../databases/schemas/fts_templates/tests/test_fts_templates_put.py | 2 +-
.../databases/schemas/functions/tests/test_trigger_func_add.py  | 2 +-
.../databases/schemas/functions/tests/test_trigger_func_delete.py   | 2 +-
.../databases/schemas/functions/tests/test_trigger_func_get.py  | 2 +-
.../databases/schemas/functions/tests/test_trigger_func_put.py  | 2 +-
.../servers/databases/schemas/packages/tests/test_package_add.py| 2 +-
.../servers/databases/schemas/packages/tests/test_package_delete.py | 4 ++--
.../servers/databases/schemas/packages/tests/test_package_get.py| 4 ++--
.../servers/databases/schemas/packages/tests/test_package_put.py| 4 ++--
.../servers/databases/schemas/sequences/tests/test_sequence_add.py  | 2 +-
.../databases/schemas/sequences/tests/test_sequence_delete.py   | 2 +-
.../servers/databases/schemas/sequences/tests/test_sequence_get.py  | 2 +-
.../servers/databases/schemas/sequences/tests/test_sequence_put.py  | 2 +-
.../servers/databases/schemas/synonyms/tests/test_synonym_add.py| 4 ++--
.../servers/databases/schemas/synonyms/tests/test_synonym_delete.py | 4 ++--
.../servers/databases

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

2017-11-27 Thread pgAdmin 4 Jenkins
See 





Re: Fix for RM2811

2017-11-27 Thread Harshal Dhumal
Hi Dave,

Please find updated patch.

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

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

On Mon, Nov 27, 2017 at 5:28 PM, Dave Page  wrote:

> Hi
>
> On Mon, Nov 27, 2017 at 11:23 AM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> Please find attached patch to fix RM2811
>>
>> Issue was caused due to assumption made when current position in log file
>> while reading it reaches to last line then
>> we were assuming process is finished. However this is not the case.
>> Background process may be busy performing
>> some other task and logs might not be logged to file immediately. So we
>> should also check process exit code along
>> with above condition.
>>
>> Apart from above this patch also includes minor fix related to status
>> text colour.
>>
>
> Seems to work nicely, except that the text scrolls out of view almost
> immediately. Can you fix it to jump to the end of the text when more is
> appended please?
>
> Fixed.


> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/web/pgadmin/misc/bgprocess/processes.py b/web/pgadmin/misc/bgprocess/processes.py
index 0b94775..209c2a1 100644
--- a/web/pgadmin/misc/bgprocess/processes.py
+++ b/web/pgadmin/misc/bgprocess/processes.py
@@ -365,7 +365,7 @@ class BatchProcess(object):
 if enc is None or enc == 'ascii':
 enc = 'utf-8'
 
-def read_log(logfile, log, pos, ctime):
+def read_log(logfile, log, pos, ctime, ecode=None):
 completed = True
 idx = 0
 c = re.compile(r"(\d+),(.*$)")
@@ -376,6 +376,9 @@ class BatchProcess(object):
 with open(logfile, 'rb') as f:
 eofs = os.fstat(f.fileno()).st_size
 f.seek(pos, 0)
+if pos == eofs and ecode is None:
+completed = False
+
 while pos < eofs:
 idx += 1
 line = f.readline()
@@ -394,15 +397,12 @@ class BatchProcess(object):
 completed = False
 break
 if pos == eofs:
-completed = True
+if ecode is None:
+completed = False
 break
 
 return pos, completed
 
-if process_output:
-out, out_completed = read_log(self.stdout, stdout, out, ctime)
-err, err_completed = read_log(self.stderr, stderr, err, ctime)
-
 j = Process.query.filter_by(
 pid=self.id, user_id=current_user.id
 ).first()
@@ -423,11 +423,11 @@ class BatchProcess(object):
 
 execution_time = (etime - stime).total_seconds()
 
-if process_output and self.ecode is not None and (
-len(stdout) + len(stderr) < 1024
-):
-out, out_completed = read_log(self.stdout, stdout, out, ctime)
-err, err_completed = read_log(self.stderr, stderr, err, ctime)
+if process_output:
+out, out_completed = read_log(self.stdout, stdout, out, ctime,
+  self.ecode)
+err, err_completed = read_log(self.stderr, stderr, err, ctime,
+  self.ecode)
 else:
 out_completed = err_completed = False
 
diff --git a/web/pgadmin/misc/bgprocess/static/js/bgprocess.js b/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
index a4506b5..be4ac15 100644
--- a/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
+++ b/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
@@ -159,8 +159,12 @@ define('misc.bgprocess', [
 while (ie < err.length) {
   res.push('' + escapeHTML(err[ie++][1]) + '');
 }
+
 if (res.length) {
   self.logs.append(res.join(''));
+  setTimeout(function() {
+self.logs[0].scrollTop = self.logs[0].scrollHeight;
+  });
 }
 
 if (self.stime) {
@@ -301,9 +305,16 @@ define('misc.bgprocess', [
   ).append(
 $('').text(' ' + gettext('seconds'))
   );
-  self.container.find('.pg-bg-status').empty().append(
+  var $status_bar = $(self.container.find('.pg-bg-status'));
+  $status_bar.empty().append(
 self.curr_status
   );
+
+  if (self.exit_code === 0) {
+$status_bar.addClass('bg-success');
+  } else if (self.exit_code == 1){
+$status_bar.addClass('bg-failed');
+  }
 } else {
   self.show_detailed_view.apply(self)
 }
@@ -336,7 +347,9 @@ define('misc.bgprocess', [
 if (is_new) {
   // set logs
   $logs.html(self.logs);
-
+  setTimeout(function() {
+  

pgAdmin 4 commit: Display process output as it happens. Fixes #2811

2017-11-27 Thread Dave Page
Display process output as it happens. Fixes #2811

Branch
--
master

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

Modified Files
--
web/pgadmin/misc/bgprocess/processes.py   | 22 +++---
web/pgadmin/misc/bgprocess/static/js/bgprocess.js | 17 +++--
2 files changed, 26 insertions(+), 13 deletions(-)



Re: Fix for RM2811

2017-11-27 Thread Harshal Dhumal
On Mon, Nov 27, 2017 at 6:32 PM, Dave Page  wrote:

> Hi
>
> On Mon, Nov 27, 2017 at 12:29 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find updated patch.
>>
>> --
>> *Harshal Dhumal*
>> *Sr. Software Engineer*
>>
>> EnterpriseDB India: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Mon, Nov 27, 2017 at 5:28 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Mon, Nov 27, 2017 at 11:23 AM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 Hi,

 Please find attached patch to fix RM2811

 Issue was caused due to assumption made when current position in log
 file while reading it reaches to last line then
 we were assuming process is finished. However this is not the case.
 Background process may be busy performing
 some other task and logs might not be logged to file immediately. So we
 should also check process exit code along
 with above condition.

 Apart from above this patch also includes minor fix related to status
 text colour.

>>>
>>> Seems to work nicely, except that the text scrolls out of view almost
>>> immediately. Can you fix it to jump to the end of the text when more is
>>> appended please?
>>>
>>> Fixed.
>>
>
> Looks good - though when I tested with a large database, it got to a point
> and then just stopped adding more data to the logs (in fact, even the err
> file in the process_log directory stopped receiving updates). However, the
> database carried on being dumped, and it had definitely moved past the
> point it was up to in the logs. I've attached all the output received - it
> literally stops at the 'c'.
>
> I've committed the patch, but can you see if you can reproduce this please?
>
Sure Dave. I'll have a look at this once.

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


Re: [pgAdmin4][Patch]: RM-2859: Can't create new user

2017-11-27 Thread Khushboo Vashi
On Mon, Nov 27, 2017 at 5:01 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Nov 27, 2017 at 4:58 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 11:26 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 4:47 PM, Dave Page  wrote:
>>>


 On Mon, Nov 27, 2017 at 11:03 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Nov 27, 2017 at 4:13 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 10:39 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 27, 2017 at 2:59 PM, Dave Page 
>>> wrote:
>>>


 On Mon, Nov 27, 2017 at 9:19 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Nov 27, 2017 at 2:20 PM, Dave Page 
> wrote:
>
>>
>>
>> On Mon, Nov 27, 2017 at 5:25 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> On Fri, Nov 24, 2017 at 3:21 PM, Dave Page 
>>> wrote:
>>>


 On Thu, Nov 23, 2017 at 10:43 AM, Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

>
>
> On Thu, Nov 23, 2017 at 2:58 PM, Dave Page 
> wrote:
>
>> Hi
>>
>> On Thu, Nov 23, 2017 at 5:03 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached patch to fix RM #2859:  Can't
>>> create new user.
>>>
>>> The "User Management" dialogue footer was overlapping the
>>> back-grid table which has been fixed.
>>>
>>
>> If my screen is too small, it now looks like the attached
>> screenshot, which is really quite ugly.
>>
>> If we don't leave the bottom blank space then in case of
> error the error-message will shown on the grid itself and user 
> can't
> perform any task.
> Please refer the attached screen-shot for the same.
>

 Right, but we also can't have that space left blank like that.
 Can't we extend the scroll range of the grid? In other words, 
 always
 include space for an extra row or so, so it can scroll above the 
 error
 message, when, and only when a message is shown?


>>> Please find the attached screen-shot, If we always include an
>>> extra row.
>>> Suggestion please.
>>>
>>
>> I think that's much better, though still not ideal. What if we
>> made the error messages closable like other notifications?
>>
>> The error-messages in pgAdmin 4 are not closable, so it will not
> go with the flow.
>

 I meant to do it globally.

 Should I create the separate case for this?
>>>
>>
>> No, I don't think there's any need for that.
>>
>> Does it seem like it would solve the problem appropriately?
>>
>>
> It would lead us to more complexity
> 1. How can we keep track of the closed error messages for multiple
> fields?
>

 Do we need to?


> 2. We have validated backbone model on focus out/change, so we need to
> change the basic error model.
>

 I'm not sure why. Can't we just have an X button on the error panel
 that will hide it? If another error occurs (e.g. because the user changes
 focus), just re-display it.


>>> This means, if the error message is displayed for the field 1 and after
>>> closing if we go ahead without filling up the valid data, on the focus out;
>>> the same error message will be shown.
>>>
>>
>> Yes.
>>
>>
>>>
>>> I was thinking; if we have closed the error message for the field 1,
>>> then it will not display any kind of message for that particular field. So,
>>> I have mentioned about the complexity.
>>>
>>
>> I'm not convinced we need that level of complexity.
>>
>> Can you whip up a PoC so we can see how it behaves?
>>
>> Please find the attached patch.

This patch includes:
- The fix for this RM
- Close button for the error message for the User management module
- Close button for other node modules like server , schema etc

Thanks,
Khushboo

> Sure.
>
>>
>>
>
> I have attached the patch for the RM #2859.
>
> Thanks,
> Khushboo
>
> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>