Re: Event trigges node patch [pgadmin4] - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Event trigges node patch [pgadmin4]
Date
Msg-id CA+OCxox8W6tTa5xnJwDE0+wub6Km_OBbEn1qP=qzkrptsrv+-g@mail.gmail.com
Whole thread Raw
In response to Re: Event trigges node patch [pgadmin4]  (Harshal Dhumal <harshal.dhumal@enterprisedb.com>)
List pgadmin-hackers
Thanks - applied with the following changes:

- Added owner and enabled status to properties list
- Display a list of trigger name, owner and comment when the collection node is selected.
- Treat Event Triggers as a leaf node.

Please be mindful of these issues with any future patches.

Thanks again!

On Wed, Mar 9, 2016 at 11:04 AM, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
Hi,


PFA updated patch for events trigger node.

-- 
Harshal Dhumal
Software Engineer 




On Fri, Mar 4, 2016 at 7:58 PM, Dave Page <dpage@pgadmin.org> wrote:


On Fri, Feb 12, 2016 at 6:32 AM, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
Hi,

PFA patch event triggers node.


Hi

It looks like this has bit-rotted. Please update and re-submit - currently it doesn't list triggers in the tree if they're already present, and if you try to create a new one it fails to find any trigger functions. I see this in the console:
 
2016-03-04 14:24:01,759: INFO werkzeug: 127.0.0.1 - - [04/Mar/2016 14:24:01] "GET /browser/event_trigger/nodes/1/1/12403/ 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 248, in dispatch_request
    return method(*args, **kwargs)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/event_triggers/__init__.py", line 118, in wrap
    return f(*args, **kwargs)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/event_triggers/__init__.py", line 142, in nodes
    res.append(
AttributeError: 'dict' object has no attribute 'append'

NOTE: Please also check the code conforms to the checklist I added to the docs earlier: http://git.postgresql.org/gitweb/?p=pgadmin4.git;a=blob;f=docs/en_US/code-review.rst

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

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




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

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

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: pgAdmin 4 commit: Add support for Event Triggers.
Next
From: Harshal Dhumal
Date:
Subject: Re: Patch sequence node [pgadmin4]