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

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
Cc: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch]: Foreign Data Wrapper
Date: 2016-03-11 12:16:48
Message-ID: CA+OCxoxPQKLw75oWbnM_H1ZS1rAy2wNG-U=ntOqibeHYQ9nNNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Thu, Mar 10, 2016 at 4:58 PM, Neel Patel <neel(dot)patel(at)enterprisedb(dot)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 Content-Type Size
foreign_data_wrapper_v5-dave.patch application/octet-stream 161.9 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2016-03-11 12:51:52 Re: PIP Package Building for pgAdmin4
Previous Message Muhammad Aqeel 2016-03-11 11:19:33 Re: PIP Package Building for pgAdmin4