Thread: [pgAdmin4][Patch]: Foreign Data Wrapper

[pgAdmin4][Patch]: Foreign Data Wrapper

From
Neel Patel
Date:
Hi All,

Please find attached patch file that include the below three nodes under the database node.

    - Foreign Data Wrappers
    - Foreign Servers
    - User Mappings

Do review it and let me know for any comments.

Thanks,
Neel Patel
Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Akshay Joshi
Date:
Hi Neel 

Below are my review comments
  • For the consistency order in the privileges control should be Grantee, Privileges and Granter.
  • Correct the SQL from "DROP Foreign Data Wrapper" to "DROP FOREIGN DATA WRAPPER" in sql pane.
  • For Owner control there should a validation like "Owner can't be empty" when user tries to modify owner for Foreign data wrapper, Foreign Servers.
  • Correct the SQL from "DROP Foreign Server" to "DROP SERVER" in sql pane when click on any Foreign Server node.
  • When click on database node it should show menu for "Create-> Foreign Data Wrapper", when click on any Foreign data wrapper node it should show menu for "Create-> Foreign Data Wrapper" and "Create-> Foreign Server", when click on any Foreign Server node it should show menu for "Create-> Foreign Server" and "Create-> User Mapping".
  • Correct the SQL from "DROP User Mapping enterprisedb" to "DROP USER MAPPING FOR enterprisedb SERVER fs1" in sql pane when click on any User Mapping node.
  • On postgresql 9.1 and 9.2 Foreign Data wrapper node failed with below error when clicked on properties or sql tab.
       function expression in FROM cannot refer to other relations of same query level LINE 15: aclexplode(fdwacl) d ^
Apart from the above please fixed warning as much as possible using pep8 tool.

On Fri, Feb 5, 2016 at 5:29 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi All,

Please find attached patch file that include the below three nodes under the database node.

    - Foreign Data Wrappers
    - Foreign Servers
    - User Mappings

Do review it and let me know for any comments.

Thanks,
Neel Patel


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




--
Akshay Joshi
Principal Software Engineer 


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Neel Patel
Date:
Hi,

Thanks Akshay for reviewing the patch.

Please find attached patch file with the fix of all review comments.

Thanks,
Neel Patel

On Thu, Feb 11, 2016 at 4:07 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Neel 

Below are my review comments
  • For the consistency order in the privileges control should be Grantee, Privileges and Granter.
Fixed. 
  • Correct the SQL from "DROP Foreign Data Wrapper" to "DROP FOREIGN DATA WRAPPER" in sql pane.
Fixed. 
  • For Owner control there should a validation like "Owner can't be empty" when user tries to modify owner for Foreign data wrapper, Foreign Servers.
Fixed. 
  • Correct the SQL from "DROP Foreign Server" to "DROP SERVER" in sql pane when click on any Foreign Server node.
Fixed. 
  • When click on database node it should show menu for "Create-> Foreign Data Wrapper", when click on any Foreign data wrapper node it should show menu for "Create-> Foreign Data Wrapper" and "Create-> Foreign Server", when click on any Foreign Server node it should show menu for "Create-> Foreign Server" and "Create-> User Mapping".
Fixed. 
  • Correct the SQL from "DROP User Mapping enterprisedb" to "DROP USER MAPPING FOR enterprisedb SERVER fs1" in sql pane when click on any User Mapping node.
Fixed. 
  • On postgresql 9.1 and 9.2 Foreign Data wrapper node failed with below error when clicked on properties or sql tab.
       function expression in FROM cannot refer to other relations of same query level LINE 15: aclexplode(fdwacl) d ^
Fixed.
 
Apart from the above please fixed warning as much as possible using pep8 tool.
 
Most of the warnings has been fixed.


On Fri, Feb 5, 2016 at 5:29 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi All,

Please find attached patch file that include the below three nodes under the database node.

    - Foreign Data Wrappers
    - Foreign Servers
    - User Mappings

Do review it and let me know for any comments.

Thanks,
Neel Patel


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




--
Akshay Joshi
Principal Software Engineer 


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246

Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Neel Patel
Date:
Hi,

Please find attached patch file for the following three nodes.
  • Foreign Data Wrappers
  • Foreign Servers
  • User Mapping
With this patch, we have implemented "Dependencies", "Dependent" tab and proper comments has been added.

Do review it and let us know for any comments.

Thanks,
Neel Patel

On Fri, Feb 12, 2016 at 2:13 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi,

Thanks Akshay for reviewing the patch.

Please find attached patch file with the fix of all review comments.

Thanks,
Neel Patel

On Thu, Feb 11, 2016 at 4:07 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Neel 

Below are my review comments
  • For the consistency order in the privileges control should be Grantee, Privileges and Granter.
Fixed. 
  • Correct the SQL from "DROP Foreign Data Wrapper" to "DROP FOREIGN DATA WRAPPER" in sql pane.
Fixed. 
  • For Owner control there should a validation like "Owner can't be empty" when user tries to modify owner for Foreign data wrapper, Foreign Servers.
Fixed. 
  • Correct the SQL from "DROP Foreign Server" to "DROP SERVER" in sql pane when click on any Foreign Server node.
Fixed. 
  • When click on database node it should show menu for "Create-> Foreign Data Wrapper", when click on any Foreign data wrapper node it should show menu for "Create-> Foreign Data Wrapper" and "Create-> Foreign Server", when click on any Foreign Server node it should show menu for "Create-> Foreign Server" and "Create-> User Mapping".
Fixed. 
  • Correct the SQL from "DROP User Mapping enterprisedb" to "DROP USER MAPPING FOR enterprisedb SERVER fs1" in sql pane when click on any User Mapping node.
Fixed. 
  • On postgresql 9.1 and 9.2 Foreign Data wrapper node failed with below error when clicked on properties or sql tab.
       function expression in FROM cannot refer to other relations of same query level LINE 15: aclexplode(fdwacl) d ^
Fixed.
 
Apart from the above please fixed warning as much as possible using pep8 tool.
 
Most of the warnings has been fixed.


On Fri, Feb 5, 2016 at 5:29 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi All,

Please find attached patch file that include the below three nodes under the database node.

    - Foreign Data Wrappers
    - Foreign Servers
    - User Mappings

Do review it and let me know for any comments.

Thanks,
Neel Patel


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




--
Akshay Joshi
Principal Software Engineer 


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Dave Page
Date:
Hi

On Tue, Feb 23, 2016 at 5:24 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi,

Please find attached patch file for the following three nodes.
  • Foreign Data Wrappers
  • Foreign Servers
  • User Mapping
With this patch, we have implemented "Dependencies", "Dependent" tab and proper comments has been added.

Do review it and let us know for any comments.

This seems to be nearly ready now. Some feedback below - note that a couple of the issues may be caused by infrastructure code, in which case please do fix them, but feel free to put them in a different patch:

- When adding a User Mapping, you cannot specify an empty option, e.g. a blank password.

- When granting USAGE to PUBLIC on a foreign server, the WITH GRANT OPTION is set, despite not being selected. e.g. adding "U" permissions for "public" results in:

GRANT ALL ON FOREIGN SERVER redis_server TO public;
GRANT ALL ON FOREIGN SERVER redis_server TO public WITH GRANT OPTION;

- Why all the extra blank lines in this SQL? I would expect to see only 2, between the ALTER/COMMENT/GRANT sections.

====
ALTER SERVER redis_server
    VERSION 'Fooo';

COMMENT ON SERVER redis_server
    IS 'Redis Server x';






GRANT ALL ON FOREIGN SERVER redis_server TO public;
GRANT ALL ON FOREIGN SERVER redis_server TO public WITH GRANT OPTION;


====

- Error messages from the server are not displayed properly - e.g:

invalid option "server"
HINT:  Valid options in this context are: <none>

Is displayed as:

invalid option "server" HINT: Valid options in this context are:

(Notice the lack of "<none>")

- A foreign server object is not listed as being dependent upon the FDW it's defined as using (but, pgAdmin 3 gets this wrong too). 

- The "Options" tabs have a hint message of "Please enter some value!", whether the focus is in the Option or Value field. Please fix to display:

Please enter an option name.

or

Please enter a value.

Based on the current focus. Note also that there should not be an exclamation mark.

Thanks!

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

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

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Neel Patel
Date:
Hi Dave,

Thank you for the reviewing the patch.
Please find inline comments and attached updated patch file after fixing all the comments.

Do let us know in case of any comments.

Thanks,
Neel Patel

On Fri, Mar 4, 2016 at 10:19 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Tue, Feb 23, 2016 at 5:24 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi,

Please find attached patch file for the following three nodes.
  • Foreign Data Wrappers
  • Foreign Servers
  • User Mapping
With this patch, we have implemented "Dependencies", "Dependent" tab and proper comments has been added.

Do review it and let us know for any comments.

This seems to be nearly ready now. Some feedback below - note that a couple of the issues may be caused by infrastructure code, in which case please do fix them, but feel free to put them in a different patch:

- When adding a User Mapping, you cannot specify an empty option, e.g. a blank password.
 
Fixed. User will not be able to save with blank password. "Save" button will be disabled and error message will be displayed.
 

- When granting USAGE to PUBLIC on a foreign server, the WITH GRANT OPTION is set, despite not being selected. e.g. adding "U" permissions for "public" results in:

GRANT ALL ON FOREIGN SERVER redis_server TO public;
GRANT ALL ON FOREIGN SERVER redis_server TO public WITH GRANT OPTION;
 
Fixed.
 

- Why all the extra blank lines in this SQL? I would expect to see only 2, between the ALTER/COMMENT/GRANT sections.

====
ALTER SERVER redis_server
    VERSION 'Fooo';

COMMENT ON SERVER redis_server
    IS 'Redis Server x';






GRANT ALL ON FOREIGN SERVER redis_server TO public;
GRANT ALL ON FOREIGN SERVER redis_server TO public WITH GRANT OPTION;


====
 
Fixed.
 

- Error messages from the server are not displayed properly - e.g:

invalid option "server"
HINT:  Valid options in this context are: <none>

Is displayed as:

invalid option "server" HINT: Valid options in this context are:

(Notice the lack of "<none>")

Here we are displaying the generic error message text received from database server. We can not add <none> to message text but "HINT" will be displayed in new line.

e.g. If you execute below command in PG 9.5 through "plpgsql" then database server will give the error message without valid context.

CREATE FOREIGN DATA WRAPPER test_fdw VALIDATOR postgresql_fdw_validator OPTIONS (server '123');

Error message will be as below from database server.

ERROR:  invalid option "server"
HINT:  Valid options in this context are: 


- A foreign server object is not listed as being dependent upon the FDW it's defined as using (but, pgAdmin 3 gets this wrong too). 

Fixed.
 

- The "Options" tabs have a hint message of "Please enter some value!", whether the focus is in the Option or Value field. Please fix to display:

Please enter an option name.

or

Please enter a value.

Based on the current focus. Note also that there should not be an exclamation mark.

Fixed.
 

Thanks!

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

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

Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Dave Page
Date:
Hi

On Thu, Mar 10, 2016 at 7:33 AM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> Thank you for the reviewing the patch.
> Please find inline comments and attached updated patch file after fixing all
> the comments.
>
> Do let us know in case of any comments.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 4, 2016 at 10:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Tue, Feb 23, 2016 at 5:24 PM, Neel Patel <neel.patel@enterprisedb.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> Please find attached patch file for the following three nodes.
>>>
>>> Foreign Data Wrappers
>>> Foreign Servers
>>> User Mapping
>>>
>>> With this patch, we have implemented "Dependencies", "Dependent" tab and
>>> proper comments has been added.
>>>
>>> Do review it and let us know for any comments.
>>
>>
>> This seems to be nearly ready now. Some feedback below - note that a
>> couple of the issues may be caused by infrastructure code, in which case
>> please do fix them, but feel free to put them in a different patch:
>>
>> - When adding a User Mapping, you cannot specify an empty option, e.g. a
>> blank password.
>
>
> Fixed. User will not be able to save with blank password. "Save" button will
> be disabled and error message will be displayed.

That's exactly what shouldn't happen - what if my password is actually
blank? I should be able to specify an option with an empty value.

>> - When granting USAGE to PUBLIC on a foreign server, the WITH GRANT OPTION
>> is set, despite not being selected. e.g. adding "U" permissions for "public"
>> results in:
>>
>> GRANT ALL ON FOREIGN SERVER redis_server TO public;
>> GRANT ALL ON FOREIGN SERVER redis_server TO public WITH GRANT OPTION;
>
>
> Fixed.
>
>>
>>
>> - Why all the extra blank lines in this SQL? I would expect to see only 2,
>> between the ALTER/COMMENT/GRANT sections.
>>
>> ====
>> ALTER SERVER redis_server
>>     VERSION 'Fooo';
>>
>> COMMENT ON SERVER redis_server
>>     IS 'Redis Server x';
>>
>>
>>
>>
>>
>>
>> GRANT ALL ON FOREIGN SERVER redis_server TO public;
>> GRANT ALL ON FOREIGN SERVER redis_server TO public WITH GRANT OPTION;
>>
>>
>> ====
>
>
> Fixed.
>
>>
>>
>> - Error messages from the server are not displayed properly - e.g:
>>
>> invalid option "server"
>> HINT:  Valid options in this context are: <none>
>>
>> Is displayed as:
>>
>> invalid option "server" HINT: Valid options in this context are:
>>
>> (Notice the lack of "<none>")
>
>
> Here we are displaying the generic error message text received from database
> server. We can not add <none> to message text but "HINT" will be displayed
> in new line.
>
> e.g. If you execute below command in PG 9.5 through "plpgsql" then database
> server will give the error message without valid context.
>
> CREATE FOREIGN DATA WRAPPER test_fdw VALIDATOR postgresql_fdw_validator
> OPTIONS (server '123');
>
> Error message will be as below from database server.
>
> ERROR:  invalid option "server"
> HINT:  Valid options in this context are:
>
>> - A foreign server object is not listed as being dependent upon the FDW
>> it's defined as using (but, pgAdmin 3 gets this wrong too).
>
>
> Fixed.
>
>>
>>
>> - The "Options" tabs have a hint message of "Please enter some value!",
>> whether the focus is in the Option or Value field. Please fix to display:
>>
>> Please enter an option name.
>>
>> or
>>
>> Please enter a value.
>>
>> Based on the current focus. Note also that there should not be an
>> exclamation mark.
>
>
> Fixed.
>
>>
>>
>> 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


Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Neel Patel
Date:
Hi Dave,

Please find attached patch file with all the fixes.
Let us know for any comments.

Thanks,
Neel Patel

On Thu, Mar 10, 2016 at 5:36 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Thu, Mar 10, 2016 at 7:33 AM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> Thank you for the reviewing the patch.
> Please find inline comments and attached updated patch file after fixing all
> the comments.
>
> Do let us know in case of any comments.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 4, 2016 at 10:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Tue, Feb 23, 2016 at 5:24 PM, Neel Patel <neel.patel@enterprisedb.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> Please find attached patch file for the following three nodes.
>>>
>>> Foreign Data Wrappers
>>> Foreign Servers
>>> User Mapping
>>>
>>> With this patch, we have implemented "Dependencies", "Dependent" tab and
>>> proper comments has been added.
>>>
>>> Do review it and let us know for any comments.
>>
>>
>> This seems to be nearly ready now. Some feedback below - note that a
>> couple of the issues may be caused by infrastructure code, in which case
>> please do fix them, but feel free to put them in a different patch:
>>
>> - When adding a User Mapping, you cannot specify an empty option, e.g. a
>> blank password.
>
>
> Fixed. User will not be able to save with blank password. "Save" button will
> be disabled and error message will be displayed.

That's exactly what shouldn't happen - what if my password is actually
blank? I should be able to specify an option with an empty value.

>> - When granting USAGE to PUBLIC on a foreign server, the WITH GRANT OPTION
>> is set, despite not being selected. e.g. adding "U" permissions for "public"
>> results in:
>>
>> GRANT ALL ON FOREIGN SERVER redis_server TO public;
>> GRANT ALL ON FOREIGN SERVER redis_server TO public WITH GRANT OPTION;
>
>
> Fixed.
>
>>
>>
>> - Why all the extra blank lines in this SQL? I would expect to see only 2,
>> between the ALTER/COMMENT/GRANT sections.
>>
>> ====
>> ALTER SERVER redis_server
>>     VERSION 'Fooo';
>>
>> COMMENT ON SERVER redis_server
>>     IS 'Redis Server x';
>>
>>
>>
>>
>>
>>
>> GRANT ALL ON FOREIGN SERVER redis_server TO public;
>> GRANT ALL ON FOREIGN SERVER redis_server TO public WITH GRANT OPTION;
>>
>>
>> ====
>
>
> Fixed.
>
>>
>>
>> - Error messages from the server are not displayed properly - e.g:
>>
>> invalid option "server"
>> HINT:  Valid options in this context are: <none>
>>
>> Is displayed as:
>>
>> invalid option "server" HINT: Valid options in this context are:
>>
>> (Notice the lack of "<none>")
>
>
> Here we are displaying the generic error message text received from database
> server. We can not add <none> to message text but "HINT" will be displayed
> in new line.
>
> e.g. If you execute below command in PG 9.5 through "plpgsql" then database
> server will give the error message without valid context.
>
> CREATE FOREIGN DATA WRAPPER test_fdw VALIDATOR postgresql_fdw_validator
> OPTIONS (server '123');
>
> Error message will be as below from database server.
>
> ERROR:  invalid option "server"
> HINT:  Valid options in this context are:
>
>> - A foreign server object is not listed as being dependent upon the FDW
>> it's defined as using (but, pgAdmin 3 gets this wrong too).
>
>
> Fixed.
>
>>
>>
>> - The "Options" tabs have a hint message of "Please enter some value!",
>> whether the focus is in the Option or Value field. Please fix to display:
>>
>> Please enter an option name.
>>
>> or
>>
>> Please enter a value.
>>
>> Based on the current focus. Note also that there should not be an
>> exclamation mark.
>
>
> Fixed.
>
>>
>>
>> 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

Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Dave Page
Date:
Hi

On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> Please find attached patch file with all the fixes.
> Let us know for any comments.

I just spent a couple of hours looking at this. I've made numerous
changes for consistency with other nodes (the way they display,
default values etc) - patch attached. There are a few issues remaining
though:

- Editing a foreign data wrapper doesn't work: e.g. when trying to
edit a comment or rename:

2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
11:37:45] "GET /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
233, in dispatch_request
    return method(*args, **kwargs)
  File
"/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
line 225, in wrap
    return f(*args, **kwargs)
  File
"/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
line 516, in msql
    if sql and sql.strip('\n') and sql.strip(' '):
AttributeError: 'Response' object has no attribute 'strip'

- If I add an Option at the same time, the rename and comment SQL is included.

- If I remove the option from the list, the the SQL panel still shows it.

- Same issue exists for Foreign Servers.

- Same issue exists when *creating* User Mappings.

- The Dependency tab for an FDW continually says: "-- Please wait
while we fetch the dependency information from the server."

- User mappings are not listed as dependents of their foreign server.
The FS does list them as a dependency though.

- Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css ?

- On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
additional options to the Username dropdown?

Otherwise, I think this is pretty much there. Thanks.

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

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

Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Neel Patel
Date:
Hi Dave,

I am not able to apply the attached patch file. I am getting the below error.
If possible, Can you please send correct the patch file so that i can fix the comments on top of your patch.


######
(pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply foreign_data_wrapper_v5-dave.patch
foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
        
foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
        
foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
        
foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
    
foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
    
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png' without full index line
error: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png' without full index line
error: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png' without full index line
error: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png' without full index line
error: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png' without full index line
error: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png' without full index line
error: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png: patch does not apply

#############

On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> Please find attached patch file with all the fixes.
> Let us know for any comments.

I just spent a couple of hours looking at this. I've made numerous
changes for consistency with other nodes (the way they display,
default values etc) - patch attached. There are a few issues remaining
though:

- Editing a foreign data wrapper doesn't work: e.g. when trying to
edit a comment or rename:

2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
11:37:45] "GET /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
233, in dispatch_request
    return method(*args, **kwargs)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
line 225, in wrap
    return f(*args, **kwargs)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
line 516, in msql
    if sql and sql.strip('\n') and sql.strip(' '):
AttributeError: 'Response' object has no attribute 'strip'

- If I add an Option at the same time, the rename and comment SQL is included.

- If I remove the option from the list, the the SQL panel still shows it.

- Same issue exists for Foreign Servers.

- Same issue exists when *creating* User Mappings.

- The Dependency tab for an FDW continually says: "-- Please wait
while we fetch the dependency information from the server."

- User mappings are not listed as dependents of their foreign server.
The FS does list them as a dependency though.

- Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css ?

- On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
additional options to the Username dropdown?

Otherwise, I think this is pretty much there. Thanks.

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

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

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Dave Page
Date:
Huh, weird. The quick fix is this:

patch -p1 < ~/foreign_data_wrapper_v5-dave.patch

From the top of the source tree.

On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
<neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> I am not able to apply the attached patch file. I am getting the below
> error.
> If possible, Can you please send correct the patch file so that i can fix
> the comments on top of your patch.
>
>
> ######
> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
> foreign_data_wrapper_v5-dave.patch
> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>
> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>
> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>
> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>
> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>
> error: cannot apply binary patch to
>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
> without full index line
> error:
>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
> patch does not apply
> error: cannot apply binary patch to
>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
> without full index line
> error:
>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
> patch does not apply
> error: cannot apply binary patch to
>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
> without full index line
> error:
>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
> patch does not apply
> error: cannot apply binary patch to
>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
> without full index line
> error:
>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
> patch does not apply
> error: cannot apply binary patch to
> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
> without full index line
> error:
> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
> patch does not apply
> error: cannot apply binary patch to
> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
> without full index line
> error:
> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
> patch does not apply
>
> #############
>
> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel <neel.patel@enterprisedb.com>
>> wrote:
>> > Hi Dave,
>> >
>> > Please find attached patch file with all the fixes.
>> > Let us know for any comments.
>>
>> I just spent a couple of hours looking at this. I've made numerous
>> changes for consistency with other nodes (the way they display,
>> default values etc) - patch attached. There are a few issues remaining
>> though:
>>
>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>> edit a comment or rename:
>>
>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>> 11:37:45] "GET
>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>> HTTP/1.1" 500 -
>> Traceback (most recent call last):
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1836, in __call__
>>     return self.wsgi_app(environ, start_response)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1820, in wsgi_app
>>     response = self.make_response(self.handle_exception(e))
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1403, in handle_exception
>>     reraise(exc_type, exc_value, tb)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1817, in wsgi_app
>>     response = self.full_dispatch_request()
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1477, in full_dispatch_request
>>     rv = self.handle_user_exception(e)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1381, in handle_user_exception
>>     reraise(exc_type, exc_value, tb)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1475, in full_dispatch_request
>>     rv = self.dispatch_request()
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> line 1461, in dispatch_request
>>     return self.view_functions[rule.endpoint](**req.view_args)
>>   File
>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>> line 84, in view
>>     return self.dispatch_request(*args, **kwargs)
>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>> 233, in dispatch_request
>>     return method(*args, **kwargs)
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> line 225, in wrap
>>     return f(*args, **kwargs)
>>   File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> line 516, in msql
>>     if sql and sql.strip('\n') and sql.strip(' '):
>> AttributeError: 'Response' object has no attribute 'strip'
>>
>> - If I add an Option at the same time, the rename and comment SQL is
>> included.
>>
>> - If I remove the option from the list, the the SQL panel still shows it.
>>
>> - Same issue exists for Foreign Servers.
>>
>> - Same issue exists when *creating* User Mappings.
>>
>> - The Dependency tab for an FDW continually says: "-- Please wait
>> while we fetch the dependency information from the server."
>>
>> - User mappings are not listed as dependents of their foreign server.
>> The FS does list them as a dependency though.
>>
>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css ?
>>
>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>> additional options to the Username dropdown?
>>
>> Otherwise, I think this is pretty much there. 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


Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Dave Page
Date:
Alternatively, try this one.

On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
> Huh, weird. The quick fix is this:
>
> patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>
> From the top of the source tree.
>
> On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
> <neel.patel@enterprisedb.com> wrote:
>> Hi Dave,
>>
>> I am not able to apply the attached patch file. I am getting the below
>> error.
>> If possible, Can you please send correct the patch file so that i can fix
>> the comments on top of your patch.
>>
>>
>> ######
>> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> foreign_data_wrapper_v5-dave.patch
>> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>>
>> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>>
>> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>>
>> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>>
>> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>>
>> error: cannot apply binary patch to
>>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> without full index line
>> error:
>>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> patch does not apply
>> error: cannot apply binary patch to
>>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> without full index line
>> error:
>>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> patch does not apply
>> error: cannot apply binary patch to
>>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> without full index line
>> error:
>>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> patch does not apply
>> error: cannot apply binary patch to
>>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> without full index line
>> error:
>>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> patch does not apply
>>
>> #############
>>
>> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> Hi
>>>
>>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel <neel.patel@enterprisedb.com>
>>> wrote:
>>> > Hi Dave,
>>> >
>>> > Please find attached patch file with all the fixes.
>>> > Let us know for any comments.
>>>
>>> I just spent a couple of hours looking at this. I've made numerous
>>> changes for consistency with other nodes (the way they display,
>>> default values etc) - patch attached. There are a few issues remaining
>>> though:
>>>
>>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>>> edit a comment or rename:
>>>
>>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>>> 11:37:45] "GET
>>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>>> HTTP/1.1" 500 -
>>> Traceback (most recent call last):
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1836, in __call__
>>>     return self.wsgi_app(environ, start_response)
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1820, in wsgi_app
>>>     response = self.make_response(self.handle_exception(e))
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1403, in handle_exception
>>>     reraise(exc_type, exc_value, tb)
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1817, in wsgi_app
>>>     response = self.full_dispatch_request()
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1477, in full_dispatch_request
>>>     rv = self.handle_user_exception(e)
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1381, in handle_user_exception
>>>     reraise(exc_type, exc_value, tb)
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1475, in full_dispatch_request
>>>     rv = self.dispatch_request()
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1461, in dispatch_request
>>>     return self.view_functions[rule.endpoint](**req.view_args)
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>>> line 84, in view
>>>     return self.dispatch_request(*args, **kwargs)
>>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>>> 233, in dispatch_request
>>>     return method(*args, **kwargs)
>>>   File
>>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>>> line 225, in wrap
>>>     return f(*args, **kwargs)
>>>   File
>>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>>> line 516, in msql
>>>     if sql and sql.strip('\n') and sql.strip(' '):
>>> AttributeError: 'Response' object has no attribute 'strip'
>>>
>>> - If I add an Option at the same time, the rename and comment SQL is
>>> included.
>>>
>>> - If I remove the option from the list, the the SQL panel still shows it.
>>>
>>> - Same issue exists for Foreign Servers.
>>>
>>> - Same issue exists when *creating* User Mappings.
>>>
>>> - The Dependency tab for an FDW continually says: "-- Please wait
>>> while we fetch the dependency information from the server."
>>>
>>> - User mappings are not listed as dependents of their foreign server.
>>> The FS does list them as a dependency though.
>>>
>>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css ?
>>>
>>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>>> additional options to the Username dropdown?
>>>
>>> Otherwise, I think this is pretty much there. Thanks.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



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

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

Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Neel Patel
Date:
Hi Dave,

New patch file gives another kind of error. Attached is the error log file for the reference.
Anyway, I will use first patch file by giving command "patch -p1 " which is working and manually copy the image files.

Thanks,
Neel Patel

On Fri, Mar 11, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
Alternatively, try this one.

On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
> Huh, weird. The quick fix is this:
>
> patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>
> From the top of the source tree.
>
> On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
> <neel.patel@enterprisedb.com> wrote:
>> Hi Dave,
>>
>> I am not able to apply the attached patch file. I am getting the below
>> error.
>> If possible, Can you please send correct the patch file so that i can fix
>> the comments on top of your patch.
>>
>>
>> ######
>> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> foreign_data_wrapper_v5-dave.patch
>> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>>
>> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>>
>> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>>
>> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>>
>> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>>
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> patch does not apply
>>
>> #############
>>
>> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> Hi
>>>
>>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel <neel.patel@enterprisedb.com>
>>> wrote:
>>> > Hi Dave,
>>> >
>>> > Please find attached patch file with all the fixes.
>>> > Let us know for any comments.
>>>
>>> I just spent a couple of hours looking at this. I've made numerous
>>> changes for consistency with other nodes (the way they display,
>>> default values etc) - patch attached. There are a few issues remaining
>>> though:
>>>
>>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>>> edit a comment or rename:
>>>
>>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>>> 11:37:45] "GET
>>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>>> HTTP/1.1" 500 -
>>> Traceback (most recent call last):
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1836, in __call__
>>>     return self.wsgi_app(environ, start_response)
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1820, in wsgi_app
>>>     response = self.make_response(self.handle_exception(e))
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1403, in handle_exception
>>>     reraise(exc_type, exc_value, tb)
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1817, in wsgi_app
>>>     response = self.full_dispatch_request()
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1477, in full_dispatch_request
>>>     rv = self.handle_user_exception(e)
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1381, in handle_user_exception
>>>     reraise(exc_type, exc_value, tb)
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1475, in full_dispatch_request
>>>     rv = self.dispatch_request()
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>>> line 1461, in dispatch_request
>>>     return self.view_functions[rule.endpoint](**req.view_args)
>>>   File
>>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>>> line 84, in view
>>>     return self.dispatch_request(*args, **kwargs)
>>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>>> 233, in dispatch_request
>>>     return method(*args, **kwargs)
>>>   File
>>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>>> line 225, in wrap
>>>     return f(*args, **kwargs)
>>>   File
>>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>>> line 516, in msql
>>>     if sql and sql.strip('\n') and sql.strip(' '):
>>> AttributeError: 'Response' object has no attribute 'strip'
>>>
>>> - If I add an Option at the same time, the rename and comment SQL is
>>> included.
>>>
>>> - If I remove the option from the list, the the SQL panel still shows it.
>>>
>>> - Same issue exists for Foreign Servers.
>>>
>>> - Same issue exists when *creating* User Mappings.
>>>
>>> - The Dependency tab for an FDW continually says: "-- Please wait
>>> while we fetch the dependency information from the server."
>>>
>>> - User mappings are not listed as dependents of their foreign server.
>>> The FS does list them as a dependency though.
>>>
>>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css ?
>>>
>>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>>> additional options to the Username dropdown?
>>>
>>> Otherwise, I think this is pretty much there. Thanks.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



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

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

Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Dave Page
Date:
Hmm...

So how are you creating patches? The first one I did was by adding
everything I needed with "git add", then doing "git diff --cached".
The second one I did "git add -N" for the new files, then did a
regular "git diff".

On Fri, Mar 11, 2016 at 1:33 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> New patch file gives another kind of error. Attached is the error log file
> for the reference.
> Anyway, I will use first patch file by giving command "patch -p1 " which is
> working and manually copy the image files.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 11, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Alternatively, try this one.
>>
>> On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Huh, weird. The quick fix is this:
>> >
>> > patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>> >
>> > From the top of the source tree.
>> >
>> > On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
>> > <neel.patel@enterprisedb.com> wrote:
>> >> Hi Dave,
>> >>
>> >> I am not able to apply the attached patch file. I am getting the below
>> >> error.
>> >> If possible, Can you please send correct the patch file so that i can
>> >> fix
>> >> the comments on top of your patch.
>> >>
>> >>
>> >> ######
>> >> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> >> foreign_data_wrapper_v5-dave.patch
>> >> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>> >>
>> >> error: cannot apply binary patch to
>> >>
>> >>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >>
'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >>
web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> >> patch does not apply
>> >>
>> >> #############
>> >>
>> >> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel
>> >>> <neel.patel@enterprisedb.com>
>> >>> wrote:
>> >>> > Hi Dave,
>> >>> >
>> >>> > Please find attached patch file with all the fixes.
>> >>> > Let us know for any comments.
>> >>>
>> >>> I just spent a couple of hours looking at this. I've made numerous
>> >>> changes for consistency with other nodes (the way they display,
>> >>> default values etc) - patch attached. There are a few issues remaining
>> >>> though:
>> >>>
>> >>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>> >>> edit a comment or rename:
>> >>>
>> >>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>> >>> 11:37:45] "GET
>> >>>
>> >>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>> >>> HTTP/1.1" 500 -
>> >>> Traceback (most recent call last):
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1836, in __call__
>> >>>     return self.wsgi_app(environ, start_response)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1820, in wsgi_app
>> >>>     response = self.make_response(self.handle_exception(e))
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1403, in handle_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1817, in wsgi_app
>> >>>     response = self.full_dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1477, in full_dispatch_request
>> >>>     rv = self.handle_user_exception(e)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1381, in handle_user_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1475, in full_dispatch_request
>> >>>     rv = self.dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1461, in dispatch_request
>> >>>     return self.view_functions[rule.endpoint](**req.view_args)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>> >>> line 84, in view
>> >>>     return self.dispatch_request(*args, **kwargs)
>> >>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>> >>> 233, in dispatch_request
>> >>>     return method(*args, **kwargs)
>> >>>   File
>> >>>
>> >>>
"/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 225, in wrap
>> >>>     return f(*args, **kwargs)
>> >>>   File
>> >>>
>> >>>
"/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 516, in msql
>> >>>     if sql and sql.strip('\n') and sql.strip(' '):
>> >>> AttributeError: 'Response' object has no attribute 'strip'
>> >>>
>> >>> - If I add an Option at the same time, the rename and comment SQL is
>> >>> included.
>> >>>
>> >>> - If I remove the option from the list, the the SQL panel still shows
>> >>> it.
>> >>>
>> >>> - Same issue exists for Foreign Servers.
>> >>>
>> >>> - Same issue exists when *creating* User Mappings.
>> >>>
>> >>> - The Dependency tab for an FDW continually says: "-- Please wait
>> >>> while we fetch the dependency information from the server."
>> >>>
>> >>> - User mappings are not listed as dependents of their foreign server.
>> >>> The FS does list them as a dependency though.
>> >>>
>> >>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css
>> >>> ?
>> >>>
>> >>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>> >>> additional options to the Username dropdown?
>> >>>
>> >>> Otherwise, I think this is pretty much there. Thanks.
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



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

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


Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Ashesh Vashi
Date:
git diff --cached --binary

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


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


On Fri, Mar 11, 2016 at 7:39 PM, Dave Page <dpage@pgadmin.org> wrote:
Hmm...

So how are you creating patches? The first one I did was by adding
everything I needed with "git add", then doing "git diff --cached".
The second one I did "git add -N" for the new files, then did a
regular "git diff".

On Fri, Mar 11, 2016 at 1:33 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> New patch file gives another kind of error. Attached is the error log file
> for the reference.
> Anyway, I will use first patch file by giving command "patch -p1 " which is
> working and manually copy the image files.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 11, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Alternatively, try this one.
>>
>> On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Huh, weird. The quick fix is this:
>> >
>> > patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>> >
>> > From the top of the source tree.
>> >
>> > On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
>> > <neel.patel@enterprisedb.com> wrote:
>> >> Hi Dave,
>> >>
>> >> I am not able to apply the attached patch file. I am getting the below
>> >> error.
>> >> If possible, Can you please send correct the patch file so that i can
>> >> fix
>> >> the comments on top of your patch.
>> >>
>> >>
>> >> ######
>> >> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> >> foreign_data_wrapper_v5-dave.patch
>> >> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>> >>
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> >> patch does not apply
>> >>
>> >> #############
>> >>
>> >> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel
>> >>> <neel.patel@enterprisedb.com>
>> >>> wrote:
>> >>> > Hi Dave,
>> >>> >
>> >>> > Please find attached patch file with all the fixes.
>> >>> > Let us know for any comments.
>> >>>
>> >>> I just spent a couple of hours looking at this. I've made numerous
>> >>> changes for consistency with other nodes (the way they display,
>> >>> default values etc) - patch attached. There are a few issues remaining
>> >>> though:
>> >>>
>> >>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>> >>> edit a comment or rename:
>> >>>
>> >>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>> >>> 11:37:45] "GET
>> >>>
>> >>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>> >>> HTTP/1.1" 500 -
>> >>> Traceback (most recent call last):
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1836, in __call__
>> >>>     return self.wsgi_app(environ, start_response)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1820, in wsgi_app
>> >>>     response = self.make_response(self.handle_exception(e))
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1403, in handle_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1817, in wsgi_app
>> >>>     response = self.full_dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1477, in full_dispatch_request
>> >>>     rv = self.handle_user_exception(e)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1381, in handle_user_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1475, in full_dispatch_request
>> >>>     rv = self.dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1461, in dispatch_request
>> >>>     return self.view_functions[rule.endpoint](**req.view_args)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>> >>> line 84, in view
>> >>>     return self.dispatch_request(*args, **kwargs)
>> >>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>> >>> 233, in dispatch_request
>> >>>     return method(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 225, in wrap
>> >>>     return f(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 516, in msql
>> >>>     if sql and sql.strip('\n') and sql.strip(' '):
>> >>> AttributeError: 'Response' object has no attribute 'strip'
>> >>>
>> >>> - If I add an Option at the same time, the rename and comment SQL is
>> >>> included.
>> >>>
>> >>> - If I remove the option from the list, the the SQL panel still shows
>> >>> it.
>> >>>
>> >>> - Same issue exists for Foreign Servers.
>> >>>
>> >>> - Same issue exists when *creating* User Mappings.
>> >>>
>> >>> - The Dependency tab for an FDW continually says: "-- Please wait
>> >>> while we fetch the dependency information from the server."
>> >>>
>> >>> - User mappings are not listed as dependents of their foreign server.
>> >>> The FS does list them as a dependency though.
>> >>>
>> >>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css
>> >>> ?
>> >>>
>> >>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>> >>> additional options to the Username dropdown?
>> >>>
>> >>> Otherwise, I think this is pretty much there. Thanks.
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



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

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


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

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Dave Page
Date:
OK, I'll add --binary next time. Not sure why I didn't think of that...

Thanks.

On Fri, Mar 11, 2016 at 2:10 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
git diff --cached --binary

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


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


On Fri, Mar 11, 2016 at 7:39 PM, Dave Page <dpage@pgadmin.org> wrote:
Hmm...

So how are you creating patches? The first one I did was by adding
everything I needed with "git add", then doing "git diff --cached".
The second one I did "git add -N" for the new files, then did a
regular "git diff".

On Fri, Mar 11, 2016 at 1:33 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> New patch file gives another kind of error. Attached is the error log file
> for the reference.
> Anyway, I will use first patch file by giving command "patch -p1 " which is
> working and manually copy the image files.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 11, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Alternatively, try this one.
>>
>> On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Huh, weird. The quick fix is this:
>> >
>> > patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>> >
>> > From the top of the source tree.
>> >
>> > On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
>> > <neel.patel@enterprisedb.com> wrote:
>> >> Hi Dave,
>> >>
>> >> I am not able to apply the attached patch file. I am getting the below
>> >> error.
>> >> If possible, Can you please send correct the patch file so that i can
>> >> fix
>> >> the comments on top of your patch.
>> >>
>> >>
>> >> ######
>> >> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> >> foreign_data_wrapper_v5-dave.patch
>> >> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>> >>
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> >> patch does not apply
>> >>
>> >> #############
>> >>
>> >> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel
>> >>> <neel.patel@enterprisedb.com>
>> >>> wrote:
>> >>> > Hi Dave,
>> >>> >
>> >>> > Please find attached patch file with all the fixes.
>> >>> > Let us know for any comments.
>> >>>
>> >>> I just spent a couple of hours looking at this. I've made numerous
>> >>> changes for consistency with other nodes (the way they display,
>> >>> default values etc) - patch attached. There are a few issues remaining
>> >>> though:
>> >>>
>> >>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>> >>> edit a comment or rename:
>> >>>
>> >>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>> >>> 11:37:45] "GET
>> >>>
>> >>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>> >>> HTTP/1.1" 500 -
>> >>> Traceback (most recent call last):
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1836, in __call__
>> >>>     return self.wsgi_app(environ, start_response)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1820, in wsgi_app
>> >>>     response = self.make_response(self.handle_exception(e))
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1403, in handle_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1817, in wsgi_app
>> >>>     response = self.full_dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1477, in full_dispatch_request
>> >>>     rv = self.handle_user_exception(e)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1381, in handle_user_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1475, in full_dispatch_request
>> >>>     rv = self.dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1461, in dispatch_request
>> >>>     return self.view_functions[rule.endpoint](**req.view_args)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>> >>> line 84, in view
>> >>>     return self.dispatch_request(*args, **kwargs)
>> >>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>> >>> 233, in dispatch_request
>> >>>     return method(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 225, in wrap
>> >>>     return f(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 516, in msql
>> >>>     if sql and sql.strip('\n') and sql.strip(' '):
>> >>> AttributeError: 'Response' object has no attribute 'strip'
>> >>>
>> >>> - If I add an Option at the same time, the rename and comment SQL is
>> >>> included.
>> >>>
>> >>> - If I remove the option from the list, the the SQL panel still shows
>> >>> it.
>> >>>
>> >>> - Same issue exists for Foreign Servers.
>> >>>
>> >>> - Same issue exists when *creating* User Mappings.
>> >>>
>> >>> - The Dependency tab for an FDW continually says: "-- Please wait
>> >>> while we fetch the dependency information from the server."
>> >>>
>> >>> - User mappings are not listed as dependents of their foreign server.
>> >>> The FS does list them as a dependency though.
>> >>>
>> >>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css
>> >>> ?
>> >>>
>> >>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>> >>> additional options to the Username dropdown?
>> >>>
>> >>> Otherwise, I think this is pretty much there. Thanks.
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



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

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


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




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

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

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Neel Patel
Date:
Hi Dave,

We have made changes on top of your modified patch.
Please find attached patch file with all the fixes. For some of the reported issues, we are not able to reproduce it.
Can you please help to reproduce the issue, if you found with latest attached patch file ?

Thanks,
Neel Patel

On Fri, Mar 11, 2016 at 7:41 PM, Dave Page <dpage@pgadmin.org> wrote:
OK, I'll add --binary next time. Not sure why I didn't think of that...

Thanks.

On Fri, Mar 11, 2016 at 2:10 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
git diff --cached --binary

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


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


On Fri, Mar 11, 2016 at 7:39 PM, Dave Page <dpage@pgadmin.org> wrote:
Hmm...

So how are you creating patches? The first one I did was by adding
everything I needed with "git add", then doing "git diff --cached".
The second one I did "git add -N" for the new files, then did a
regular "git diff".

On Fri, Mar 11, 2016 at 1:33 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> New patch file gives another kind of error. Attached is the error log file
> for the reference.
> Anyway, I will use first patch file by giving command "patch -p1 " which is
> working and manually copy the image files.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 11, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Alternatively, try this one.
>>
>> On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Huh, weird. The quick fix is this:
>> >
>> > patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>> >
>> > From the top of the source tree.
>> >
>> > On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
>> > <neel.patel@enterprisedb.com> wrote:
>> >> Hi Dave,
>> >>
>> >> I am not able to apply the attached patch file. I am getting the below
>> >> error.
>> >> If possible, Can you please send correct the patch file so that i can
>> >> fix
>> >> the comments on top of your patch.
>> >>
>> >>
>> >> ######
>> >> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> >> foreign_data_wrapper_v5-dave.patch
>> >> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>> >>
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> >> patch does not apply
>> >>
>> >> #############
>> >>
>> >> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel
>> >>> <neel.patel@enterprisedb.com>
>> >>> wrote:
>> >>> > Hi Dave,
>> >>> >
>> >>> > Please find attached patch file with all the fixes.
>> >>> > Let us know for any comments.
>> >>>
>> >>> I just spent a couple of hours looking at this. I've made numerous
>> >>> changes for consistency with other nodes (the way they display,
>> >>> default values etc) - patch attached. There are a few issues remaining
>> >>> though:
>> >>>
>> >>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>> >>> edit a comment or rename:
>> >>>
>> >>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>> >>> 11:37:45] "GET
>> >>>
>> >>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>> >>> HTTP/1.1" 500 -
>> >>> Traceback (most recent call last):
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1836, in __call__
>> >>>     return self.wsgi_app(environ, start_response)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1820, in wsgi_app
>> >>>     response = self.make_response(self.handle_exception(e))
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1403, in handle_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1817, in wsgi_app
>> >>>     response = self.full_dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1477, in full_dispatch_request
>> >>>     rv = self.handle_user_exception(e)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1381, in handle_user_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1475, in full_dispatch_request
>> >>>     rv = self.dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1461, in dispatch_request
>> >>>     return self.view_functions[rule.endpoint](**req.view_args)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>> >>> line 84, in view
>> >>>     return self.dispatch_request(*args, **kwargs)
>> >>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>> >>> 233, in dispatch_request
>> >>>     return method(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 225, in wrap
>> >>>     return f(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 516, in msql
>> >>>     if sql and sql.strip('\n') and sql.strip(' '):
>> >>> AttributeError: 'Response' object has no attribute 'strip'
Fixed. 
>> >>>
>> >>> - If I add an Option at the same time, the rename and comment SQL is
>> >>> included.
>> >>>
>> >>> - If I remove the option from the list, the the SQL panel still shows
>> >>> it.
>> >>>
>> >>> - Same issue exists for Foreign Servers.
>> >>>
>> >>> - Same issue exists when *creating* User Mappings.
>> >>>
>> >>> - The Dependency tab for an FDW continually says: "-- Please wait
>> >>> while we fetch the dependency information from the server."
>> >>>
Not able to reproduce the issue. If possible, can you please give steps if you found the issue with this patch.  
>> >>> - User mappings are not listed as dependents of their foreign server.
>> >>> The FS does list them as a dependency though.
Fixed. 
>> >>>
>> >>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css
>> >>> ?
We made the changes to make the node icon display properly in  dependencies/dependent tabs but from the latest commit, it looks good compared to older version. So no need to include in the patch.
>> >>>
>> >>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>> >>> additional options to the Username dropdown?
Fixed. 
>> >>>
>> >>> Otherwise, I think this is pretty much there. Thanks.
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



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

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


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




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

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

Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Dave Page
Date:
Hi

Almost there :-)

- The text felds on the Options grid resize when they're in Edit mode. See the recent patch by Arun to prevent this in other nodes.

- If I remove an option from the grid, then re-add it, the SQL generated is backwards:

ALTER SERVER redis_server1
    RENAME TO redis_server;

COMMENT ON SERVER redis_server
    IS 'Redis Server';

ALTER SERVER redis_server
    OPTIONS (ADD port '6379');

ALTER SERVER redis_server
    OPTIONS (DROP port);
    
- The dependency and dependents tabs list object types in initcap with underscores instead of spaces - e.g "Foreign_data_wrapper" should be "Foreign Data Wrapper"

- I cannot select the Grantee on the security grids. See my comments a few minutes ago to Ashesh/Murtuza - looks like this is a new, general bug.

Fix those, (possibly excepting the last), and I think we're good to go.

Thanks!

On Tue, Mar 15, 2016 at 6:41 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi Dave,

We have made changes on top of your modified patch.
Please find attached patch file with all the fixes. For some of the reported issues, we are not able to reproduce it.
Can you please help to reproduce the issue, if you found with latest attached patch file ?

Thanks,
Neel Patel

On Fri, Mar 11, 2016 at 7:41 PM, Dave Page <dpage@pgadmin.org> wrote:
OK, I'll add --binary next time. Not sure why I didn't think of that...

Thanks.

On Fri, Mar 11, 2016 at 2:10 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
git diff --cached --binary

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


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


On Fri, Mar 11, 2016 at 7:39 PM, Dave Page <dpage@pgadmin.org> wrote:
Hmm...

So how are you creating patches? The first one I did was by adding
everything I needed with "git add", then doing "git diff --cached".
The second one I did "git add -N" for the new files, then did a
regular "git diff".

On Fri, Mar 11, 2016 at 1:33 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> New patch file gives another kind of error. Attached is the error log file
> for the reference.
> Anyway, I will use first patch file by giving command "patch -p1 " which is
> working and manually copy the image files.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 11, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Alternatively, try this one.
>>
>> On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Huh, weird. The quick fix is this:
>> >
>> > patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>> >
>> > From the top of the source tree.
>> >
>> > On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
>> > <neel.patel@enterprisedb.com> wrote:
>> >> Hi Dave,
>> >>
>> >> I am not able to apply the attached patch file. I am getting the below
>> >> error.
>> >> If possible, Can you please send correct the patch file so that i can
>> >> fix
>> >> the comments on top of your patch.
>> >>
>> >>
>> >> ######
>> >> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> >> foreign_data_wrapper_v5-dave.patch
>> >> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>> >>
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> >> patch does not apply
>> >>
>> >> #############
>> >>
>> >> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel
>> >>> <neel.patel@enterprisedb.com>
>> >>> wrote:
>> >>> > Hi Dave,
>> >>> >
>> >>> > Please find attached patch file with all the fixes.
>> >>> > Let us know for any comments.
>> >>>
>> >>> I just spent a couple of hours looking at this. I've made numerous
>> >>> changes for consistency with other nodes (the way they display,
>> >>> default values etc) - patch attached. There are a few issues remaining
>> >>> though:
>> >>>
>> >>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>> >>> edit a comment or rename:
>> >>>
>> >>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>> >>> 11:37:45] "GET
>> >>>
>> >>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>> >>> HTTP/1.1" 500 -
>> >>> Traceback (most recent call last):
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1836, in __call__
>> >>>     return self.wsgi_app(environ, start_response)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1820, in wsgi_app
>> >>>     response = self.make_response(self.handle_exception(e))
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1403, in handle_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1817, in wsgi_app
>> >>>     response = self.full_dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1477, in full_dispatch_request
>> >>>     rv = self.handle_user_exception(e)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1381, in handle_user_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1475, in full_dispatch_request
>> >>>     rv = self.dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1461, in dispatch_request
>> >>>     return self.view_functions[rule.endpoint](**req.view_args)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>> >>> line 84, in view
>> >>>     return self.dispatch_request(*args, **kwargs)
>> >>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>> >>> 233, in dispatch_request
>> >>>     return method(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 225, in wrap
>> >>>     return f(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 516, in msql
>> >>>     if sql and sql.strip('\n') and sql.strip(' '):
>> >>> AttributeError: 'Response' object has no attribute 'strip'
Fixed. 
>> >>>
>> >>> - If I add an Option at the same time, the rename and comment SQL is
>> >>> included.
>> >>>
>> >>> - If I remove the option from the list, the the SQL panel still shows
>> >>> it.
>> >>>
>> >>> - Same issue exists for Foreign Servers.
>> >>>
>> >>> - Same issue exists when *creating* User Mappings.
>> >>>
>> >>> - The Dependency tab for an FDW continually says: "-- Please wait
>> >>> while we fetch the dependency information from the server."
>> >>>
Not able to reproduce the issue. If possible, can you please give steps if you found the issue with this patch.  
>> >>> - User mappings are not listed as dependents of their foreign server.
>> >>> The FS does list them as a dependency though.
Fixed. 
>> >>>
>> >>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css
>> >>> ?
We made the changes to make the node icon display properly in  dependencies/dependent tabs but from the latest commit, it looks good compared to older version. So no need to include in the patch.
>> >>>
>> >>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>> >>> additional options to the Username dropdown?
Fixed. 
>> >>>
>> >>> Otherwise, I think this is pretty much there. Thanks.
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



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

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


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




--
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]: Foreign Data Wrapper

From
Neel Patel
Date:
Hi Dave,

Last email was returned due to "The message body is too long (208845 > 204800)" error.
Please find attached zip file of the modified patch file.

Thanks,
Neel Patel

On Thu, Mar 17, 2016 at 12:01 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi Dave,

Please find attached patch file with all the reported issues fixed (except last).

Thanks,
Neel Patel

On Wed, Mar 16, 2016 at 8:44 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

Almost there :-)

- The text felds on the Options grid resize when they're in Edit mode. See the recent patch by Arun to prevent this in other nodes.

- If I remove an option from the grid, then re-add it, the SQL generated is backwards:

ALTER SERVER redis_server1
    RENAME TO redis_server;

COMMENT ON SERVER redis_server
    IS 'Redis Server';

ALTER SERVER redis_server
    OPTIONS (ADD port '6379');

ALTER SERVER redis_server
    OPTIONS (DROP port);
    
- The dependency and dependents tabs list object types in initcap with underscores instead of spaces - e.g "Foreign_data_wrapper" should be "Foreign Data Wrapper"

- I cannot select the Grantee on the security grids. See my comments a few minutes ago to Ashesh/Murtuza - looks like this is a new, general bug.

Fix those, (possibly excepting the last), and I think we're good to go.

Thanks!

On Tue, Mar 15, 2016 at 6:41 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi Dave,

We have made changes on top of your modified patch.
Please find attached patch file with all the fixes. For some of the reported issues, we are not able to reproduce it.
Can you please help to reproduce the issue, if you found with latest attached patch file ?

Thanks,
Neel Patel

On Fri, Mar 11, 2016 at 7:41 PM, Dave Page <dpage@pgadmin.org> wrote:
OK, I'll add --binary next time. Not sure why I didn't think of that...

Thanks.

On Fri, Mar 11, 2016 at 2:10 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
git diff --cached --binary

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


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


On Fri, Mar 11, 2016 at 7:39 PM, Dave Page <dpage@pgadmin.org> wrote:
Hmm...

So how are you creating patches? The first one I did was by adding
everything I needed with "git add", then doing "git diff --cached".
The second one I did "git add -N" for the new files, then did a
regular "git diff".

On Fri, Mar 11, 2016 at 1:33 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> New patch file gives another kind of error. Attached is the error log file
> for the reference.
> Anyway, I will use first patch file by giving command "patch -p1 " which is
> working and manually copy the image files.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 11, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Alternatively, try this one.
>>
>> On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Huh, weird. The quick fix is this:
>> >
>> > patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>> >
>> > From the top of the source tree.
>> >
>> > On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
>> > <neel.patel@enterprisedb.com> wrote:
>> >> Hi Dave,
>> >>
>> >> I am not able to apply the attached patch file. I am getting the below
>> >> error.
>> >> If possible, Can you please send correct the patch file so that i can
>> >> fix
>> >> the comments on top of your patch.
>> >>
>> >>
>> >> ######
>> >> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> >> foreign_data_wrapper_v5-dave.patch
>> >> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>> >>
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> >> patch does not apply
>> >>
>> >> #############
>> >>
>> >> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel
>> >>> <neel.patel@enterprisedb.com>
>> >>> wrote:
>> >>> > Hi Dave,
>> >>> >
>> >>> > Please find attached patch file with all the fixes.
>> >>> > Let us know for any comments.
>> >>>
>> >>> I just spent a couple of hours looking at this. I've made numerous
>> >>> changes for consistency with other nodes (the way they display,
>> >>> default values etc) - patch attached. There are a few issues remaining
>> >>> though:
>> >>>
>> >>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>> >>> edit a comment or rename:
>> >>>
>> >>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>> >>> 11:37:45] "GET
>> >>>
>> >>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>> >>> HTTP/1.1" 500 -
>> >>> Traceback (most recent call last):
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1836, in __call__
>> >>>     return self.wsgi_app(environ, start_response)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1820, in wsgi_app
>> >>>     response = self.make_response(self.handle_exception(e))
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1403, in handle_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1817, in wsgi_app
>> >>>     response = self.full_dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1477, in full_dispatch_request
>> >>>     rv = self.handle_user_exception(e)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1381, in handle_user_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1475, in full_dispatch_request
>> >>>     rv = self.dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1461, in dispatch_request
>> >>>     return self.view_functions[rule.endpoint](**req.view_args)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>> >>> line 84, in view
>> >>>     return self.dispatch_request(*args, **kwargs)
>> >>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>> >>> 233, in dispatch_request
>> >>>     return method(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 225, in wrap
>> >>>     return f(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 516, in msql
>> >>>     if sql and sql.strip('\n') and sql.strip(' '):
>> >>> AttributeError: 'Response' object has no attribute 'strip'
Fixed. 
>> >>>
>> >>> - If I add an Option at the same time, the rename and comment SQL is
>> >>> included.
>> >>>
>> >>> - If I remove the option from the list, the the SQL panel still shows
>> >>> it.
>> >>>
>> >>> - Same issue exists for Foreign Servers.
>> >>>
>> >>> - Same issue exists when *creating* User Mappings.
>> >>>
>> >>> - The Dependency tab for an FDW continually says: "-- Please wait
>> >>> while we fetch the dependency information from the server."
>> >>>
Not able to reproduce the issue. If possible, can you please give steps if you found the issue with this patch.  
>> >>> - User mappings are not listed as dependents of their foreign server.
>> >>> The FS does list them as a dependency though.
Fixed. 
>> >>>
>> >>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css
>> >>> ?
We made the changes to make the node icon display properly in  dependencies/dependent tabs but from the latest commit, it looks good compared to older version. So no need to include in the patch.
>> >>>
>> >>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>> >>> additional options to the Username dropdown?
Fixed. 
>> >>>
>> >>> Otherwise, I think this is pretty much there. Thanks.
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



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

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


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




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


Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Neel Patel
Date:
Hi Dave,

Please find attached patch file with all the reported issues fixed (except last).

Thanks,
Neel Patel

On Wed, Mar 16, 2016 at 8:44 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

Almost there :-)

- The text felds on the Options grid resize when they're in Edit mode. See the recent patch by Arun to prevent this in other nodes.

- If I remove an option from the grid, then re-add it, the SQL generated is backwards:

ALTER SERVER redis_server1
    RENAME TO redis_server;

COMMENT ON SERVER redis_server
    IS 'Redis Server';

ALTER SERVER redis_server
    OPTIONS (ADD port '6379');

ALTER SERVER redis_server
    OPTIONS (DROP port);
    
- The dependency and dependents tabs list object types in initcap with underscores instead of spaces - e.g "Foreign_data_wrapper" should be "Foreign Data Wrapper"

- I cannot select the Grantee on the security grids. See my comments a few minutes ago to Ashesh/Murtuza - looks like this is a new, general bug.

Fix those, (possibly excepting the last), and I think we're good to go.

Thanks!

On Tue, Mar 15, 2016 at 6:41 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi Dave,

We have made changes on top of your modified patch.
Please find attached patch file with all the fixes. For some of the reported issues, we are not able to reproduce it.
Can you please help to reproduce the issue, if you found with latest attached patch file ?

Thanks,
Neel Patel

On Fri, Mar 11, 2016 at 7:41 PM, Dave Page <dpage@pgadmin.org> wrote:
OK, I'll add --binary next time. Not sure why I didn't think of that...

Thanks.

On Fri, Mar 11, 2016 at 2:10 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
git diff --cached --binary

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


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


On Fri, Mar 11, 2016 at 7:39 PM, Dave Page <dpage@pgadmin.org> wrote:
Hmm...

So how are you creating patches? The first one I did was by adding
everything I needed with "git add", then doing "git diff --cached".
The second one I did "git add -N" for the new files, then did a
regular "git diff".

On Fri, Mar 11, 2016 at 1:33 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> New patch file gives another kind of error. Attached is the error log file
> for the reference.
> Anyway, I will use first patch file by giving command "patch -p1 " which is
> working and manually copy the image files.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 11, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Alternatively, try this one.
>>
>> On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Huh, weird. The quick fix is this:
>> >
>> > patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>> >
>> > From the top of the source tree.
>> >
>> > On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
>> > <neel.patel@enterprisedb.com> wrote:
>> >> Hi Dave,
>> >>
>> >> I am not able to apply the attached patch file. I am getting the below
>> >> error.
>> >> If possible, Can you please send correct the patch file so that i can
>> >> fix
>> >> the comments on top of your patch.
>> >>
>> >>
>> >> ######
>> >> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> >> foreign_data_wrapper_v5-dave.patch
>> >> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>> >>
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> >> patch does not apply
>> >>
>> >> #############
>> >>
>> >> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel
>> >>> <neel.patel@enterprisedb.com>
>> >>> wrote:
>> >>> > Hi Dave,
>> >>> >
>> >>> > Please find attached patch file with all the fixes.
>> >>> > Let us know for any comments.
>> >>>
>> >>> I just spent a couple of hours looking at this. I've made numerous
>> >>> changes for consistency with other nodes (the way they display,
>> >>> default values etc) - patch attached. There are a few issues remaining
>> >>> though:
>> >>>
>> >>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>> >>> edit a comment or rename:
>> >>>
>> >>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>> >>> 11:37:45] "GET
>> >>>
>> >>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>> >>> HTTP/1.1" 500 -
>> >>> Traceback (most recent call last):
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1836, in __call__
>> >>>     return self.wsgi_app(environ, start_response)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1820, in wsgi_app
>> >>>     response = self.make_response(self.handle_exception(e))
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1403, in handle_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1817, in wsgi_app
>> >>>     response = self.full_dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1477, in full_dispatch_request
>> >>>     rv = self.handle_user_exception(e)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1381, in handle_user_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1475, in full_dispatch_request
>> >>>     rv = self.dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1461, in dispatch_request
>> >>>     return self.view_functions[rule.endpoint](**req.view_args)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>> >>> line 84, in view
>> >>>     return self.dispatch_request(*args, **kwargs)
>> >>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>> >>> 233, in dispatch_request
>> >>>     return method(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 225, in wrap
>> >>>     return f(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 516, in msql
>> >>>     if sql and sql.strip('\n') and sql.strip(' '):
>> >>> AttributeError: 'Response' object has no attribute 'strip'
Fixed. 
>> >>>
>> >>> - If I add an Option at the same time, the rename and comment SQL is
>> >>> included.
>> >>>
>> >>> - If I remove the option from the list, the the SQL panel still shows
>> >>> it.
>> >>>
>> >>> - Same issue exists for Foreign Servers.
>> >>>
>> >>> - Same issue exists when *creating* User Mappings.
>> >>>
>> >>> - The Dependency tab for an FDW continually says: "-- Please wait
>> >>> while we fetch the dependency information from the server."
>> >>>
Not able to reproduce the issue. If possible, can you please give steps if you found the issue with this patch.  
>> >>> - User mappings are not listed as dependents of their foreign server.
>> >>> The FS does list them as a dependency though.
Fixed. 
>> >>>
>> >>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css
>> >>> ?
We made the changes to make the node icon display properly in  dependencies/dependent tabs but from the latest commit, it looks good compared to older version. So no need to include in the patch.
>> >>>
>> >>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>> >>> additional options to the Username dropdown?
Fixed. 
>> >>>
>> >>> Otherwise, I think this is pretty much there. Thanks.
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



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

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


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




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

Attachment

Re: [pgAdmin4][Patch]: Foreign Data Wrapper

From
Dave Page
Date:
Hi,

You missed the second from last as well, but I got that for you :-).

Thanks, committed!

On Thu, Mar 17, 2016 at 6:31 AM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi Dave,

Please find attached patch file with all the reported issues fixed (except last).

Thanks,
Neel Patel

On Wed, Mar 16, 2016 at 8:44 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

Almost there :-)

- The text felds on the Options grid resize when they're in Edit mode. See the recent patch by Arun to prevent this in other nodes.

- If I remove an option from the grid, then re-add it, the SQL generated is backwards:

ALTER SERVER redis_server1
    RENAME TO redis_server;

COMMENT ON SERVER redis_server
    IS 'Redis Server';

ALTER SERVER redis_server
    OPTIONS (ADD port '6379');

ALTER SERVER redis_server
    OPTIONS (DROP port);
    
- The dependency and dependents tabs list object types in initcap with underscores instead of spaces - e.g "Foreign_data_wrapper" should be "Foreign Data Wrapper"

- I cannot select the Grantee on the security grids. See my comments a few minutes ago to Ashesh/Murtuza - looks like this is a new, general bug.

Fix those, (possibly excepting the last), and I think we're good to go.

Thanks!

On Tue, Mar 15, 2016 at 6:41 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi Dave,

We have made changes on top of your modified patch.
Please find attached patch file with all the fixes. For some of the reported issues, we are not able to reproduce it.
Can you please help to reproduce the issue, if you found with latest attached patch file ?

Thanks,
Neel Patel

On Fri, Mar 11, 2016 at 7:41 PM, Dave Page <dpage@pgadmin.org> wrote:
OK, I'll add --binary next time. Not sure why I didn't think of that...

Thanks.

On Fri, Mar 11, 2016 at 2:10 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
git diff --cached --binary

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


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


On Fri, Mar 11, 2016 at 7:39 PM, Dave Page <dpage@pgadmin.org> wrote:
Hmm...

So how are you creating patches? The first one I did was by adding
everything I needed with "git add", then doing "git diff --cached".
The second one I did "git add -N" for the new files, then did a
regular "git diff".

On Fri, Mar 11, 2016 at 1:33 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> New patch file gives another kind of error. Attached is the error log file
> for the reference.
> Anyway, I will use first patch file by giving command "patch -p1 " which is
> working and manually copy the image files.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 11, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Alternatively, try this one.
>>
>> On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Huh, weird. The quick fix is this:
>> >
>> > patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>> >
>> > From the top of the source tree.
>> >
>> > On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
>> > <neel.patel@enterprisedb.com> wrote:
>> >> Hi Dave,
>> >>
>> >> I am not able to apply the attached patch file. I am getting the below
>> >> error.
>> >> If possible, Can you please send correct the patch file so that i can
>> >> fix
>> >> the comments on top of your patch.
>> >>
>> >>
>> >> ######
>> >> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> >> foreign_data_wrapper_v5-dave.patch
>> >> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>> >>
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> >> patch does not apply
>> >>
>> >> #############
>> >>
>> >> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel
>> >>> <neel.patel@enterprisedb.com>
>> >>> wrote:
>> >>> > Hi Dave,
>> >>> >
>> >>> > Please find attached patch file with all the fixes.
>> >>> > Let us know for any comments.
>> >>>
>> >>> I just spent a couple of hours looking at this. I've made numerous
>> >>> changes for consistency with other nodes (the way they display,
>> >>> default values etc) - patch attached. There are a few issues remaining
>> >>> though:
>> >>>
>> >>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>> >>> edit a comment or rename:
>> >>>
>> >>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>> >>> 11:37:45] "GET
>> >>>
>> >>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>> >>> HTTP/1.1" 500 -
>> >>> Traceback (most recent call last):
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1836, in __call__
>> >>>     return self.wsgi_app(environ, start_response)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1820, in wsgi_app
>> >>>     response = self.make_response(self.handle_exception(e))
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1403, in handle_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1817, in wsgi_app
>> >>>     response = self.full_dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1477, in full_dispatch_request
>> >>>     rv = self.handle_user_exception(e)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1381, in handle_user_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1475, in full_dispatch_request
>> >>>     rv = self.dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1461, in dispatch_request
>> >>>     return self.view_functions[rule.endpoint](**req.view_args)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>> >>> line 84, in view
>> >>>     return self.dispatch_request(*args, **kwargs)
>> >>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>> >>> 233, in dispatch_request
>> >>>     return method(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 225, in wrap
>> >>>     return f(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 516, in msql
>> >>>     if sql and sql.strip('\n') and sql.strip(' '):
>> >>> AttributeError: 'Response' object has no attribute 'strip'
Fixed. 
>> >>>
>> >>> - If I add an Option at the same time, the rename and comment SQL is
>> >>> included.
>> >>>
>> >>> - If I remove the option from the list, the the SQL panel still shows
>> >>> it.
>> >>>
>> >>> - Same issue exists for Foreign Servers.
>> >>>
>> >>> - Same issue exists when *creating* User Mappings.
>> >>>
>> >>> - The Dependency tab for an FDW continually says: "-- Please wait
>> >>> while we fetch the dependency information from the server."
>> >>>
Not able to reproduce the issue. If possible, can you please give steps if you found the issue with this patch.  
>> >>> - User mappings are not listed as dependents of their foreign server.
>> >>> The FS does list them as a dependency though.
Fixed. 
>> >>>
>> >>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css
>> >>> ?
We made the changes to make the node icon display properly in  dependencies/dependent tabs but from the latest commit, it looks good compared to older version. So no need to include in the patch.
>> >>>
>> >>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>> >>> additional options to the Username dropdown?
Fixed. 
>> >>>
>> >>> Otherwise, I think this is pretty much there. Thanks.
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



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

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


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




--
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]: Foreign Data Wrapper

From
Neel Patel
Date:
Thank you dave for the change.

In Version 6 patch file, I made the same change but don't know why were you not be able to see the object type with space ( may be depends.js was not updated ). After your comment i thought you want with underscore so i again change the logic. :)

Thanks,
Neel Patel

On Thu, Mar 17, 2016 at 5:11 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi,

You missed the second from last as well, but I got that for you :-).

Thanks, committed!

On Thu, Mar 17, 2016 at 6:31 AM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi Dave,

Please find attached patch file with all the reported issues fixed (except last).

Thanks,
Neel Patel

On Wed, Mar 16, 2016 at 8:44 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

Almost there :-)

- The text felds on the Options grid resize when they're in Edit mode. See the recent patch by Arun to prevent this in other nodes.

- If I remove an option from the grid, then re-add it, the SQL generated is backwards:

ALTER SERVER redis_server1
    RENAME TO redis_server;

COMMENT ON SERVER redis_server
    IS 'Redis Server';

ALTER SERVER redis_server
    OPTIONS (ADD port '6379');

ALTER SERVER redis_server
    OPTIONS (DROP port);
    
- The dependency and dependents tabs list object types in initcap with underscores instead of spaces - e.g "Foreign_data_wrapper" should be "Foreign Data Wrapper"

- I cannot select the Grantee on the security grids. See my comments a few minutes ago to Ashesh/Murtuza - looks like this is a new, general bug.

Fix those, (possibly excepting the last), and I think we're good to go.

Thanks!

On Tue, Mar 15, 2016 at 6:41 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi Dave,

We have made changes on top of your modified patch.
Please find attached patch file with all the fixes. For some of the reported issues, we are not able to reproduce it.
Can you please help to reproduce the issue, if you found with latest attached patch file ?

Thanks,
Neel Patel

On Fri, Mar 11, 2016 at 7:41 PM, Dave Page <dpage@pgadmin.org> wrote:
OK, I'll add --binary next time. Not sure why I didn't think of that...

Thanks.

On Fri, Mar 11, 2016 at 2:10 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
git diff --cached --binary

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


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


On Fri, Mar 11, 2016 at 7:39 PM, Dave Page <dpage@pgadmin.org> wrote:
Hmm...

So how are you creating patches? The first one I did was by adding
everything I needed with "git add", then doing "git diff --cached".
The second one I did "git add -N" for the new files, then did a
regular "git diff".

On Fri, Mar 11, 2016 at 1:33 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
> Hi Dave,
>
> New patch file gives another kind of error. Attached is the error log file
> for the reference.
> Anyway, I will use first patch file by giving command "patch -p1 " which is
> working and manually copy the image files.
>
> Thanks,
> Neel Patel
>
> On Fri, Mar 11, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Alternatively, try this one.
>>
>> On Fri, Mar 11, 2016 at 1:19 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Huh, weird. The quick fix is this:
>> >
>> > patch -p1 < ~/foreign_data_wrapper_v5-dave.patch
>> >
>> > From the top of the source tree.
>> >
>> > On Fri, Mar 11, 2016 at 12:52 PM, Neel Patel
>> > <neel.patel@enterprisedb.com> wrote:
>> >> Hi Dave,
>> >>
>> >> I am not able to apply the attached patch file. I am getting the below
>> >> error.
>> >> If possible, Can you please send correct the patch file so that i can
>> >> fix
>> >> the comments on top of your patch.
>> >>
>> >>
>> >> ######
>> >> (pgAdmin4_3_4)neel@ubuntu:~/Projects/pgAdmin4/pgadmin4$ git apply
>> >> foreign_data_wrapper_v5-dave.patch
>> >> foreign_data_wrapper_v5-dave.patch:1645: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3067: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3350: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3486: trailing whitespace.
>> >>
>> >> foreign_data_wrapper_v5-dave.patch:3712: trailing whitespace.
>> >>
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/coll-foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/static/img/foreign_server.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/coll-user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/static/img/user_mapping.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/coll-foreign_data_wrapper.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/static/img/foreign_data_wrapper.png:
>> >> patch does not apply
>> >>
>> >> #############
>> >>
>> >> On Fri, Mar 11, 2016 at 5:46 PM, Dave Page <dpage@pgadmin.org> wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel
>> >>> <neel.patel@enterprisedb.com>
>> >>> wrote:
>> >>> > Hi Dave,
>> >>> >
>> >>> > Please find attached patch file with all the fixes.
>> >>> > Let us know for any comments.
>> >>>
>> >>> I just spent a couple of hours looking at this. I've made numerous
>> >>> changes for consistency with other nodes (the way they display,
>> >>> default values etc) - patch attached. There are a few issues remaining
>> >>> though:
>> >>>
>> >>> - Editing a foreign data wrapper doesn't work: e.g. when trying to
>> >>> edit a comment or rename:
>> >>>
>> >>> 2016-03-11 11:37:45,198: INFO werkzeug: 127.0.0.1 - - [11/Mar/2016
>> >>> 11:37:45] "GET
>> >>>
>> >>> /browser/foreign_data_wrapper/msql/1/2/12641/16392?id=16392&description=gffgfgfxxx&_=1457696130182
>> >>> HTTP/1.1" 500 -
>> >>> Traceback (most recent call last):
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1836, in __call__
>> >>>     return self.wsgi_app(environ, start_response)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1820, in wsgi_app
>> >>>     response = self.make_response(self.handle_exception(e))
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1403, in handle_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1817, in wsgi_app
>> >>>     response = self.full_dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1477, in full_dispatch_request
>> >>>     rv = self.handle_user_exception(e)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1381, in handle_user_exception
>> >>>     reraise(exc_type, exc_value, tb)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1475, in full_dispatch_request
>> >>>     rv = self.dispatch_request()
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py",
>> >>> line 1461, in dispatch_request
>> >>>     return self.view_functions[rule.endpoint](**req.view_args)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py",
>> >>> line 84, in view
>> >>>     return self.dispatch_request(*args, **kwargs)
>> >>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
>> >>> 233, in dispatch_request
>> >>>     return method(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 225, in wrap
>> >>>     return f(*args, **kwargs)
>> >>>   File
>> >>>
>> >>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py",
>> >>> line 516, in msql
>> >>>     if sql and sql.strip('\n') and sql.strip(' '):
>> >>> AttributeError: 'Response' object has no attribute 'strip'
Fixed. 
>> >>>
>> >>> - If I add an Option at the same time, the rename and comment SQL is
>> >>> included.
>> >>>
>> >>> - If I remove the option from the list, the the SQL panel still shows
>> >>> it.
>> >>>
>> >>> - Same issue exists for Foreign Servers.
>> >>>
>> >>> - Same issue exists when *creating* User Mappings.
>> >>>
>> >>> - The Dependency tab for an FDW continually says: "-- Please wait
>> >>> while we fetch the dependency information from the server."
>> >>>
Not able to reproduce the issue. If possible, can you please give steps if you found the issue with this patch.  
>> >>> - User mappings are not listed as dependents of their foreign server.
>> >>> The FS does list them as a dependency though.
Fixed. 
>> >>>
>> >>> - Why the change to web/pgadmin/static/css/wcDocker/Themes/pgadmin.css
>> >>> ?
We made the changes to make the node icon display properly in  dependencies/dependent tabs but from the latest commit, it looks good compared to older version. So no need to include in the patch.
>> >>>
>> >>> - On the User Mappings dialogue, can we add CURRENT_USER and PUBLIC as
>> >>> additional options to the Username dropdown?
Fixed. 
>> >>>
>> >>> Otherwise, I think this is pretty much there. Thanks.
>> >>>
>> >>> --
>> >>> Dave Page
>> >>> Blog: http://pgsnake.blogspot.com
>> >>> Twitter: @pgsnake
>> >>>
>> >>> EnterpriseDB UK: http://www.enterprisedb.com
>> >>> The Enterprise PostgreSQL Company
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



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

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


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




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