Re: [pgadmin-hackers] [pgAdmin4] [Patch]: Grant Wizard

2016-03-10 Thread Surinder Kumar
Hi,

PFA patch after rebasing.

On Wed, Mar 9, 2016 at 11:04 PM, Dave Page  wrote:

> Sorry Surinder - can you rebase this please? I think it was broken by
> 8a7ec6b45221f042bc39c9bce2c577e12b43cc3a :-(


>
How much work would it be to enable it to work at database level as well?

It depends on whether we need to enable grant wizard for all nodes under
database level or
enable it for specific nodes under database level.

>
> On Tue, Mar 8, 2016 at 1:48 PM, Surinder Kumar
>  wrote:
> > The menu option is dependent only on certain nodes like:
> >
> > 1. Schema Node
> > 2. Views Collection Node
> > 3. Tables Collection Node
> > 4. Sequences Collection Node
> > 5. Functions Collection Node
> >
> > It will be enabled on click of above listed nodes.
> >
> > On Tue, Mar 8, 2016 at 6:57 PM, Dave Page  wrote:
> >>
> >> On Tue, Mar 8, 2016 at 10:00 AM, Surinder Kumar
> >>  wrote:
> >> > Hi,
> >> >
> >> > I forgot to add 'node.ui.js' file in the previous patch, please ignore
> >> > the
> >> > previous patch.
> >> > Attached is the new patch,
> >> >
> >> > Please review the patch and let me know for any comments.
> >>
> >> Is this dependent on any other patches? The menu option never seems to
> >> be enabled for me when I test against git-master.
> >>
> >> --
> >> 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
>


grant_wizard_v4.patch
Description: Binary data

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


[pgadmin-hackers] pgAdmin 4 commit: Resolved typos in SQL templates for PPAS

2016-03-10 Thread Ashesh Vashi
Resolved typos in SQL templates for PPAS

Thanks Khushboo Vashi for reporting.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=77ae220f1e85ca7809793db2d342bc3165d82b13

Modified Files
--
.../schemas/templates/catalog/ppas/9.1_plus/sql/properties.sql   | 5 +
.../schemas/templates/catalog/ppas/9.2_plus/sql/properties.sql   | 2 +-
.../databases/schemas/templates/catalog/ppas/macros/catalogs.sql | 2 +-
3 files changed, 3 insertions(+), 6 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4] [Patch]: Grant Wizard

2016-03-10 Thread Surinder Kumar
Please apply Khusboo's patch for "Privileges macros under Schema" before
using grant wizard patch.

On Thu, Mar 10, 2016 at 2:52 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch after rebasing.
>
> On Wed, Mar 9, 2016 at 11:04 PM, Dave Page  wrote:
>
>> Sorry Surinder - can you rebase this please? I think it was broken by
>> 8a7ec6b45221f042bc39c9bce2c577e12b43cc3a :-(
>
>
>>
> How much work would it be to enable it to work at database level as well?
>
> It depends on whether we need to enable grant wizard for all nodes under
> database level or
> enable it for specific nodes under database level.
>
>>
>> On Tue, Mar 8, 2016 at 1:48 PM, Surinder Kumar
>>  wrote:
>> > The menu option is dependent only on certain nodes like:
>> >
>> > 1. Schema Node
>> > 2. Views Collection Node
>> > 3. Tables Collection Node
>> > 4. Sequences Collection Node
>> > 5. Functions Collection Node
>> >
>> > It will be enabled on click of above listed nodes.
>> >
>> > On Tue, Mar 8, 2016 at 6:57 PM, Dave Page  wrote:
>> >>
>> >> On Tue, Mar 8, 2016 at 10:00 AM, Surinder Kumar
>> >>  wrote:
>> >> > Hi,
>> >> >
>> >> > I forgot to add 'node.ui.js' file in the previous patch, please
>> ignore
>> >> > the
>> >> > previous patch.
>> >> > Attached is the new patch,
>> >> >
>> >> > Please review the patch and let me know for any comments.
>> >>
>> >> Is this dependent on any other patches? The menu option never seems to
>> >> be enabled for me when I test against git-master.
>> >>
>> >> --
>> >> Dave Page
>> >> Blog: http://pgsnake.blogspot.com
>> >> Twitter: @pgsnake
>> >>
>> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> The Enterprise PostgreSQL Company
>> >
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


Re: [pgadmin-hackers] [pgAdmin4] [Patch]: Grant Wizard

2016-03-10 Thread Dave Page
On Thu, Mar 10, 2016 at 9:50 AM, Surinder Kumar
 wrote:
> Please apply Khusboo's patch for "Privileges macros under Schema" before
> using grant wizard patch.

Thanks, that works. Some (hopefully final) feedback:

- Can we add a side-image? Not sure what yet - just a placeholder for
now until I come up with something.

- Why is the closed button in an odd position (see File -> Test Alert
for comparison)

- Why are we using a scrolling list AND pagination? I think a
scrolling list alone should be fine.

- The grid sizing is wrong. See how the scrollbar on the right in the
screenshot is off the edge of the dialogue, and there's a horizontal
scrollbar?

- We shouldn't truncate object names as that can be ambiguous. The
column should extend as necessary, and there should be a horizontal
scrollbar on the grid itself (not at the bottom of the dialogue
content).

- Function names should include the parameters, as they are part of
the identifier. Without, it can be ambigous - e.g. do_stuff(int) vs.
do_stuff(text).

- If I select only functions (for example), the Privileges panel
should only list privileges available for functions. If I select
multiple object types, it should show the available options for only
those object types.

- If I select functions and tables, and then choose (for example),
usage and truncate, it will attempt to set usage on tables and
truncate on functions. It should only attempt to set privileges on the
objects for which they are appropriate.

- On the last page, the Next button is disabled. It is turned a
marginally darker blue, but also highlights on mouse-over. The change
in shade is so subtle it's hard to see, and the highlight implies the
button is active when it isn't.

- The buttons appear to have a smaller corner radius than those on the
main browser, or in other dialogues.

- Button labels should have an   before them to properly space
the label from the icon (or better yet, this should be done in CSS,
though that would also need to be done elsewhere).

- Why do the URLs have a /wizard prefix? I think that should be removed.

- The available privileges for each object type seem to be defined in
both grant_wizard.js and allowed_acl.json. Can we just use
allowed_acl.json?

Thanks.

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


[pgadmin-hackers] pgAdmin 4 commit: Updated Privileges macros under Schema node.

2016-03-10 Thread Dave Page
Updated Privileges macros under Schema node.

The changes are required due to previous commit 
(8a7ec6b45221f042bc39c9bce2c577e12b43cc3a) regarding "parse_priv_to_db" 
function.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d32e861a4765336995b770db2e29e399f4695d9c
Author: Khushboo Vashi 

Modified Files
--
.../schemas/templates/macros/functions/privilege.macros| 10 +-
.../schemas/templates/macros/schemas/privilege.macros  | 10 +-
2 files changed, 10 insertions(+), 10 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Updated Privileges macros under Schema

2016-03-10 Thread Dave Page
Thanks, applied.

On Thu, Mar 10, 2016 at 6:27 AM, Khushboo Vashi
 wrote:
> Hi,
>
> Please find attached patch for the updated Privileges macros under Schema
> node.
>
> The changes are required due to previous commit
> (8a7ec6b45221f042bc39c9bce2c577e12b43cc3a) regarding "parse_priv_to_db"
> function.
>
> Thanks,
> Khushboo
>
>
> --
> 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


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


[pgadmin-hackers] pgAdmin 4 commit: Allow enabling/disabling of the Edit button of a sub-

2016-03-10 Thread Dave Page
Allow enabling/disabling of the Edit button of a sub-node collection grid.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=3b03c17f2bd4eed070cf29c641e7315b5a8a5954
Author: Khushboo Vashi 

Modified Files
--
web/pgadmin/static/js/backform.pgadmin.js | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)


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


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Disable/Enable Edit Button: Sub-node Collection

2016-03-10 Thread Dave Page
Thanks, applied.

On Thu, Mar 10, 2016 at 5:51 AM, Khushboo Vashi
 wrote:
> Hi,
>
> Please find attached patch to disable/enable the Edit button of a sub-node
> collection grid.
>
> Thanks,
> Khushboo
>
>
> --
> 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


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


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Foreign Data Wrapper

2016-03-10 Thread Dave Page
Hi

On Thu, Mar 10, 2016 at 7:33 AM, Neel Patel  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  wrote:
>>
>> Hi
>>
>> On Tue, Feb 23, 2016 at 5:24 PM, Neel Patel 
>> 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: 
>>
>> Is displayed as:
>>
>> invalid option "server" HINT: Valid options in this context are:
>>
>> (Notice the lack of "")
>
>
> Here we are displaying the generic error message text received from database
> server. We can not add  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


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


[pgadmin-hackers] pgAdmin 4 commit: Add support for Event Triggers.

2016-03-10 Thread Dave Page
Add support for Event Triggers.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=986375d60e45f2e73c625342cc1a0fd024dece3e
Author: Harshal Dhumal 

Modified Files
--
.../servers/databases/event_triggers/__init__.py   | 664 +
.../static/img/coll-event_trigger.png  | Bin 0 -> 350 bytes
.../event_triggers/static/img/event_trigger.png| Bin 0 -> 324 bytes
.../event_triggers/static/img/triggerbad.png   | Bin 0 -> 610 bytes
.../templates/event_triggers/js/event_trigger.js   | 180 ++
.../event_triggers/sql/9.3_plus/create.sql |   7 +
.../event_triggers/sql/9.3_plus/delete.sql |   7 +
.../event_triggers/sql/9.3_plus/eventfunctions.sql |   4 +
.../event_triggers/sql/9.3_plus/get_db.sql |   1 +
.../event_triggers/sql/9.3_plus/get_oid.sql|   5 +
.../event_triggers/sql/9.3_plus/grant.sql  |  26 +
.../event_triggers/sql/9.3_plus/nodes.sql  |   3 +
.../event_triggers/sql/9.3_plus/properties.sql |  17 +
.../event_triggers/sql/9.3_plus/update.sql |  66 ++
14 files changed, 980 insertions(+)


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


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

2016-03-10 Thread Dave Page
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.dhu...@enterprisedb.com> wrote:

> Hi,
>
>
> PFA updated patch for events trigger node.
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
> On Fri, Mar 4, 2016 at 7:58 PM, Dave Page  wrote:
>
>>
>>
>> On Fri, Feb 12, 2016 at 6:32 AM, Harshal Dhumal <
>> harshal.dhu...@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


Re: [pgadmin-hackers] Patch sequence node [pgadmin4]

2016-03-10 Thread Harshal Dhumal
Hi,

PFA update patch for sequence node.

Changes: Fixed leaf node issue.



-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB 

On Thu, Mar 10, 2016 at 12:45 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA updated patch for sequence node.
>
> Changes: 1] Added changes related to schema child node.
>2] re-based with latest code.
>3] Added dependencies and dependents functionality.
>
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
> On Wed, Feb 10, 2016 at 7:11 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA updated patch for sequence node.
>>
>> *Changes:* Updated sql files to refer macros from
>> schemas/templates/macros/schemas folder instead of servers/templates/macros
>>
>>
>> --
>> *Harshal Dhumal*
>> *Software Engineer *
>>
>>
>>
>> EenterpriseDB 
>>
>> On Wed, Feb 10, 2016 at 5:46 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Here is updated patch for sequence node. As macros are changed for
>>> security and privileges.
>>>
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Software Engineer *
>>>
>>>
>>>
>>> EenterpriseDB 
>>>
>>> On Tue, Feb 9, 2016 at 4:19 PM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 Hi,

 PFA patch for sequence node.


 --
 *Harshal Dhumal*
 *Software Engineer *



 EenterpriseDB 

>>>
>>>
>>
>
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py
new file mode 100644
index 000..cdf36f2
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py
@@ -0,0 +1,693 @@
+##
+#
+# pgAdmin 4 - PostgreSQL Tools
+#
+# Copyright (C) 2013 - 2016, The pgAdmin Development Team
+# This software is released under the PostgreSQL Licence
+#
+##
+
+"""Implements Sequence Node"""
+
+import json
+from flask import render_template, make_response, request, jsonify
+from flask.ext.babel import gettext as _
+from pgadmin.utils.ajax import make_json_response, \
+make_response as ajax_response, internal_server_error
+from pgadmin.browser.utils import PGChildNodeView
+from pgadmin.browser.server_groups.servers.utils import parse_priv_from_db, \
+parse_priv_to_db
+from pgadmin.browser.server_groups.servers.databases.schemas.utils \
+import SchemaChildModule
+import pgadmin.browser.server_groups.servers.databases as database
+from pgadmin.utils.ajax import precondition_required
+from pgadmin.utils.driver import get_driver
+from config import PG_DEFAULT_DRIVER
+from functools import wraps
+
+
+class SequenceModule(SchemaChildModule):
+"""
+class SequenceModule(CollectionNodeModule)
+
+A module class for Sequence node derived from CollectionNodeModule.
+
+Methods:
+---
+* __init__(*args, **kwargs)
+  - Method is used to initialize the SequenceModule and it's base module.
+
+* get_nodes(gid, sid, did)
+  - Method is used to generate the browser collection node.
+
+* script_load()
+  - Load the module script for sequence, when any of the database node is
+initialized.
+
+* node_inode()
+  - Method is overridden from its base class to make the node as leaf node.
+
+"""
+
+NODE_TYPE = 'sequence'
+COLLECTION_LABEL = _("Sequences")
+
+def __init__(self, *args, **kwargs):
+super(SequenceModule, self).__init__(*args, **kwargs)
+self.min_ver = None
+self.max_ver = None
+
+def get_nodes(self, gid, sid, did, scid):
+"""
+Generate the sequence node
+"""
+yield self.generate_browser_collection_node(scid)
+
+@property
+def script_load(self):
+"""
+Load the module script for database, when any of the database node is
+initialized.
+"""
+return database.DatabaseModule.NODE_TYPE
+
+@property
+def node_inode(self):
+"""
+Override this property to make the node a leaf node.
+
+Returns: False as this is the leaf node
+"""
+return False
+
+blueprint = SequenceModule(__name__)
+
+
+class SequenceView(PGChildNodeView):
+node_type = blueprint.node_type
+
+parent_ids = [
+{'type': 'int', 'id': 'gid'},
+{'type': 'int', 'id': 'sid'},
+{'type': 'int', 'id': 'did'},
+{'type': 'int', 'id': 'scid'}
+]
+ids = [
+{'type': 'int', 'id': 'seid'}
+]
+
+operations = dict({
+'obj': [
+{'get': 'properties', 'd

[pgadmin-hackers] pgAdmin 4 commit: Add support for Sequences.

2016-03-10 Thread Dave Page
Add support for Sequences.

Branch
--
master

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

Modified Files
--
.../databases/schemas/sequences/__init__.py| 692 +
.../schemas/sequences/static/img/coll-sequence.png | Bin 0 -> 359 bytes
.../schemas/sequences/static/img/sequence.png  | Bin 0 -> 405 bytes
.../sequences/templates/sequence/js/sequence.js| 249 
.../templates/sequence/sql/9.1_plus/acl.sql|  30 +
.../sequence/sql/9.1_plus/backend_support.sql  |  15 +
.../templates/sequence/sql/9.1_plus/create.sql |  16 +
.../templates/sequence/sql/9.1_plus/delete.sql |   1 +
.../templates/sequence/sql/9.1_plus/get_def.sql|   9 +
.../sequence/sql/9.1_plus/get_dependencies.sql |  12 +
.../templates/sequence/sql/9.1_plus/get_oid.sql|   5 +
.../templates/sequence/sql/9.1_plus/grant.sql  |  26 +
.../templates/sequence/sql/9.1_plus/nodes.sql  |   4 +
.../templates/sequence/sql/9.1_plus/properties.sql |  17 +
.../templates/sequence/sql/9.1_plus/update.sql |  94 +++
15 files changed, 1170 insertions(+)


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


Re: [pgadmin-hackers] Patch sequence node [pgadmin4]

2016-03-10 Thread Dave Page
Thanks - committed with the following changes:

- SQL template formatting improvements
- Don't display the ACL subnode panel on the Properties list, instead
display the text ACL.
- Preset defaults for the owner and schema when creating a new sequence.

On Thu, Mar 10, 2016 at 2:05 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA update patch for sequence node.
>
> Changes: Fixed leaf node issue.
>
>
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>
> On Thu, Mar 10, 2016 at 12:45 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA updated patch for sequence node.
>>
>> Changes: 1] Added changes related to schema child node.
>>2] re-based with latest code.
>>3] Added dependencies and dependents functionality.
>>
>>
>> --
>> *Harshal Dhumal*
>> *Software Engineer *
>>
>>
>>
>> EenterpriseDB 
>>
>> On Wed, Feb 10, 2016 at 7:11 PM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA updated patch for sequence node.
>>>
>>> *Changes:* Updated sql files to refer macros from
>>> schemas/templates/macros/schemas folder instead of servers/templates/macros
>>>
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Software Engineer *
>>>
>>>
>>>
>>> EenterpriseDB 
>>>
>>> On Wed, Feb 10, 2016 at 5:46 PM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 Hi,

 Here is updated patch for sequence node. As macros are changed for
 security and privileges.


 --
 *Harshal Dhumal*
 *Software Engineer *



 EenterpriseDB 

 On Tue, Feb 9, 2016 at 4:19 PM, Harshal Dhumal <
 harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch for sequence node.
>
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB 
>


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


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

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


[pgadmin-hackers] pgAdmin 4 commit: Make the dialogue control sizing slightly more compac

2016-03-10 Thread Dave Page
Make the dialogue control sizing slightly more compact and properly control 
textarea resizing.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=17ed27fbcde339566387948f1999d86f51e17d8e
Author: Arun Kollan 

Modified Files
--
web/pgadmin/static/css/overrides.css  | 18 
web/pgadmin/static/js/backform.pgadmin.js | 34 ---
2 files changed, 45 insertions(+), 7 deletions(-)


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


[pgadmin-hackers] pgAdmin 4 commit: Add some default connection parameters.

2016-03-10 Thread Dave Page
Add some default connection parameters.

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/server_groups/servers/__init__.py| 9 +++--
.../browser/server_groups/servers/templates/servers/servers.js   | 4 ++--
2 files changed, 9 insertions(+), 4 deletions(-)


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


[pgadmin-hackers] pgAdmin 4 commit: Fix various inconsistencies with databases and tables

2016-03-10 Thread Dave Page
Fix various inconsistencies with databases and tablespaces:

- Display the ACL string in properties, not the subnode panel.
- Offer default values for the owner of new objects.
- Add missing context menu option to create a tablespace from a server node.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=2b6c8dff0b12454d15e52f91484c372640b83335

Modified Files
--
.../databases/templates/databases/js/databases.js  | 12 
.../templates/tablespaces/js/tablespaces.js| 22 +-
.../tablespaces/sql/9.1_plus/properties.sql|  3 ++-
.../tablespaces/sql/9.2_plus/properties.sql|  3 ++-
.../tablespaces/sql/pre_9.1/properties.sql |  2 +-
5 files changed, 38 insertions(+), 4 deletions(-)


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


[pgadmin-hackers] pgAdmin 4 commit: Show the ACL summary on the properties panel for data

2016-03-10 Thread Dave Page
Show the ACL summary on the properties panel for databases.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=62537429d1ed530a5fe2f10e1ff7720ea9052cb7

Modified Files
--
.../servers/databases/templates/databases/js/databases.js| 3 +++
.../databases/templates/databases/sql/9.1_plus/properties.sql| 3 ++-
.../databases/templates/databases/sql/9.2_plus/properties.sql| 5 +++--
.../databases/templates/databases/sql/9.3_plus/properties.sql| 5 +++--
4 files changed, 11 insertions(+), 5 deletions(-)


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


[pgadmin-hackers] pgAdmin 4 commit: Fix all manner of inconsistencies in object propertie

2016-03-10 Thread Dave Page
Fix all manner of inconsistencies in object properties display:

- Don't display the OID on Edit dialogues
- Use the ACL summary display in the properties panel, not the subnode editor.
- s/Oid/OID/g
- Ensure all security properties are displayed in the Security group
- Ensure all object definition values are stored in the Definition (or a more 
precise) group, not General.
- Fix the ordering of General properties so the comment is always show last.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=83a662f7981ac2e03692b5f9673e1a928c1d0be5

Modified Files
--
.../databases/casts/templates/cast/js/casts.js | 17 +++--
.../templates/event_triggers/js/event_trigger.js   |  9 +++--
.../templates/extensions/js/extensions.js  | 12 +++-
.../languages/templates/languages/js/languages.js  | 15 +++
.../sequences/templates/sequence/js/sequence.js| 15 ++-
.../schemas/templates/catalog/js/catalog.js|  6 +++---
.../schemas/templates/schema/js/schema.js  | 22 +++---
.../databases/templates/databases/js/databases.js  | 15 ++-
.../servers/roles/templates/role/js/role.js|  2 +-
.../templates/tablespaces/js/tablespaces.js| 10 +-
10 files changed, 76 insertions(+), 47 deletions(-)


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


[pgadmin-hackers] pgAdmin 4 commit: Variables should have their own tab on dialogues.

2016-03-10 Thread Dave Page
Variables should have their own tab on dialogues.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=649b719845a0d3468352953a5173d67d36feee95

Modified Files
--
.../server_groups/servers/databases/templates/databases/js/databases.js | 2 +-
.../browser/server_groups/servers/roles/templates/role/js/role.js   | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


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


[pgadmin-hackers] pgAdmin 4 commit: Fix gettext calls per Khushboo

2016-03-10 Thread Dave Page
Fix gettext calls per Khushboo

Branch
--
master

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

Modified Files
--
.../servers/tablespaces/templates/tablespaces/js/tablespaces.js   | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


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


[pgadmin-hackers] pgAdmin 4 commit: Fixup some SQL formatting, per Khushboo

2016-03-10 Thread Dave Page
Fixup some SQL formatting, per Khushboo

Branch
--
master

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

Modified Files
--
.../templates/languages/sql/9.1_plus/acl.sql   | 36 +++---
.../languages/sql/9.1_plus/properties.sql  |  6 ++--
.../templates/languages/sql/9.1_plus/sqlpane.sql   |  5 +--
.../templates/languages/sql/9.1_plus/update.sql|  6 ++--
.../templates/languages/sql/9.3_plus/acl.sql   | 28 -
.../languages/sql/9.3_plus/properties.sql  |  6 ++--
.../templates/languages/sql/9.3_plus/sqlpane.sql   | 11 ---
.../templates/languages/sql/9.3_plus/update.sql|  6 ++--
8 files changed, 53 insertions(+), 51 deletions(-)


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


[pgadmin-hackers] pgAdmin 4 commit: Added support for the catalog objects under special c

2016-03-10 Thread Ashesh Vashi
Added support for the catalog objects under special catalogs. (also,
added support for columns under it).

Branch
--
master

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

Modified Files
--
.../databases/schemas/catalog_objects/__init__.py  | 300 ++
.../schemas/catalog_objects/columns/__init__.py| 343 +
.../columns/static/img/catalog_object_column.png   | Bin 0 -> 435 bytes
.../static/img/coll-catalog_object_column.png  | Bin 0 -> 400 bytes
.../js/catalog_object_column.js|  73 +
.../catalog_object_column/sql/9.1_plus/depend.sql  |  10 +
.../catalog_object_column/sql/9.1_plus/nodes.sql   |   7 +
.../sql/9.1_plus/properties.sql|  41 +++
.../catalog_objects/static/img/catalog_object.png  | Bin 0 -> 409 bytes
.../static/img/coll-catalog_object.png | Bin 0 -> 419 bytes
.../templates/catalog_object/js/catalog_object.js  |  56 
.../catalog_object/sql/pg/9.1_plus/nodes.sql   |   6 +
.../catalog_object/sql/pg/9.1_plus/properties.sql  |  12 +
.../catalog_object/sql/ppas/9.1_plus/nodes.sql |  11 +
.../sql/ppas/9.1_plus/properties.sql   |  23 ++
15 files changed, 882 insertions(+)


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


[pgadmin-hackers] pgAdmin 4 commit: Resolved few typos, comments, and also some query cor

2016-03-10 Thread Ashesh Vashi
Resolved few typos, comments, and also some query correction in the SQL
templates for different nodes.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=87623cb9979f40a68995fc4a50b5e67672d309cb

Modified Files
--
.../servers/databases/event_triggers/__init__.py   | 51 ++
.../languages/sql/9.1_plus/properties.sql  | 26 +++
.../languages/sql/9.3_plus/properties.sql  | 26 +++
.../templates/sequence/sql/9.1_plus/properties.sql | 12 ++---
.../databases/sql/9.1_plus/properties.sql  |  2 +-
.../databases/sql/9.2_plus/properties.sql  |  2 +-
.../databases/sql/9.3_plus/properties.sql  |  2 +-
.../tablespaces/sql/9.1_plus/properties.sql|  4 +-
.../tablespaces/sql/9.2_plus/properties.sql|  6 +--
.../tablespaces/sql/pre_9.1/properties.sql | 10 +++--
10 files changed, 78 insertions(+), 63 deletions(-)


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


Re: [pgadmin-hackers] PATCH: Added Node Type & Catalog objects [pgAdmin4]

2016-03-10 Thread Ashesh Vashi
Committed the catalog_objects with few changes:

- Renamed to catalog_objects
- columns under it were renamed to catalog_object_column
- Some of the query were specific to PPAS moved them to specific SQL
templates.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


On Tue, Mar 8, 2016 at 7:08 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to add new nodes in pgAdmin4.
> 1) Type node
> 2) Catalog objects
>
> *Note:* Both above nodes depended on schema/catalog node, Please apply
> them after latest patch of schema/catalog from Ashesh.
> - Type node also depends on parse_priv_function_templates.patch (which I
> sent in separate email today)
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


[pgadmin-hackers] PATCH: Fixed Textarea control template [pgAdmin4]

2016-03-10 Thread Murtuza Zabuawala
Hi,

PFA updated patch to fix an issue in textarea template, if we do not
provide default rows then control then it fails to render it (issue with
yesterday's Arun changes), Causing Sql-Feild Control to break which uses
textarea to render code mirror control.


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


Fixed_textare_control.patch
Description: Binary data

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