Commit Graph

5289 Commits (37d82d457cd1e27f12c1f41ac2ceffbf1f1a94f1)

Author SHA1 Message Date
Arun Kollan c814698328 Fix security label sizing. 2016-03-15 15:07:40 +00:00
Akshay Joshi 218cc3ec0c As 'show_system_objects' has been implemented, I have fixed an issue for dependencies/dependents.
With previous implementation each node will have to send the values of 'show_system_objects'
while calling get_dependencies/get_dependents function. Now I have changed the logic to use the
value directly into the base class functions.
2016-03-15 14:16:33 +00:00
Dave Page 2711d3492d Reduce column header letter spacing a touch. 2016-03-15 14:12:54 +00:00
Ashesh Vashi 4adea4dc25 Resolved an issue related to no proper valid/invalid event was
generated for the privilege control. Also, made changes in the
PrivilegeRoleModel, to allow to select a grantee only once for the
current user (as grantor), and omit them from other cell objects.

Valid/Invalid event was not properly triggered, whenever the child
attribute is a collection/model within a model (nested mode/collection
within model). This patch tried to take care of all such scenarios in
general.
2016-03-15 19:00:58 +05:30
Ashesh Vashi b52a5736ff Improvements in the form/properties dialog control generation, and data
change events.

- In input & textarea control, call the change event on key up (but -
  not on every key up events, wait for sometime before trigger that
  event, so that - we do not overdo that).
- In unique/subnode control, whenever we create new model object, set
  all the required static fields used by pgAdmin form generation logic.
- In NodeAjaxListCell, we don't need to call the list generation
  operation (ajax operation) for each and every cell. They use the same
  shared column object.
2016-03-15 18:58:22 +05:30
Neel Patel ff424850f8 Fix a bug in the database drive poll() function where we could try to reference a non-existant variable. 2016-03-15 13:01:28 +00:00
Arun Kollan cdd7a1f637 Subnode collection layout improvements, with additional tweaks from me. 2016-03-15 12:30:01 +00:00
Muhammad Aqeel b1d26db8d9 Fix PIP packaging code so it works nicely on Linux and Mac. 2016-03-15 11:46:04 +00:00
Muhammad Aqeel dc64160f82 Add a top level Makefile with a target and appropriate Python stuff to build a PIP package of the web code. 2016-03-14 10:26:59 +00:00
Murtuza Zabuawala 9220dcaa97 Fix an issue with uneditable text fields containing large amounts of data, 2016-03-14 09:31:36 +00:00
Dave Page fd05dec29c Default owner for new event triggers. 2016-03-11 16:58:46 +00:00
Murtuza Zabuawala b6f7202448 Add support for collations. 2016-03-11 13:40:28 +00:00
Dave Page c0086b092f Fix a number of minor issues with catalog objects:
- Remove unnecessary columns from collection property lists.
- Standardise property names and groupings.
- pg_attribute doesn't have an OID column, so use attnum instead (of atttypid!?!)
2016-03-11 10:09:23 +00:00
Dave Page 470881ac46 Fix cast SQL formatting. 2016-03-11 09:45:43 +00:00
Khushboo Vashi 2f334673a3 Fix a couple of issues with the unique-collection control:
- Pass the data to evaluation functions like canEdit, canAdd
- Properly honour the canAdd option.
2016-03-11 09:36:26 +00:00
Dave Page d21e60cc60 Fix default height for text areas. 2016-03-11 09:24:05 +00:00
Murtuza Zabuawala b747a5b5eb Update ACL parsing for tablespaces to use newer infrastructure. 2016-03-11 09:05:58 +00:00
Murtuza Zabuawala 5347bdb886 Added support for the catalog objects under special catalogs. (also,
added support for columns under it).
2016-03-11 01:09:06 +05:30
Ashesh Vashi 87623cb997 Resolved few typos, comments, and also some query correction in the SQL
templates for different nodes.
2016-03-11 01:02:25 +05:30
Dave Page b7f6df34ab Fixup some SQL formatting, per Khushboo 2016-03-10 17:23:59 +00:00
Dave Page ce5d7b7d60 Fix gettext calls per Khushboo 2016-03-10 17:18:42 +00:00
Dave Page 649b719845 Variables should have their own tab on dialogues. 2016-03-10 17:15:58 +00:00
Dave Page 83a662f798 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.
2016-03-10 17:08:27 +00:00
Dave Page 62537429d1 Show the ACL summary on the properties panel for databases. 2016-03-10 16:21:17 +00:00
Dave Page 2b6c8dff0b 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.
2016-03-10 16:14:26 +00:00
Dave Page f95b9f06ca Add some default connection parameters. 2016-03-10 15:58:17 +00:00
Arun Kollan 17ed27fbcd Make the dialogue control sizing slightly more compact and properly control textarea resizing. 2016-03-10 15:31:43 +00:00
Harshal Dhumal def1a30251 Add support for Sequences. 2016-03-10 15:23:04 +00:00
Harshal Dhumal 986375d60e Add support for Event Triggers. 2016-03-10 13:38:31 +00:00
Khushboo Vashi 3b03c17f2b Allow enabling/disabling of the Edit button of a sub-node collection grid. 2016-03-10 12:03:33 +00:00
Khushboo Vashi d32e861a47 Updated Privileges macros under Schema node.
The changes are required due to previous commit (8a7ec6b452) regarding "parse_priv_to_db" function.
2016-03-10 12:01:13 +00:00
Ashesh Vashi 77ae220f1e Resolved typos in SQL templates for PPAS
Thanks Khushboo Vashi for reporting.
2016-03-10 14:56:46 +05:30
Murtuza Zabuawala 8a7ec6b452 Update "parse_priv_to_db" function to return list a instead of a string.
This will also allow us to operate on individual privileges & also we
needed this functionality for column nodes.

For example,

*Earlier:* priv was string

GRANT {{ priv }} ON {{ type }} TO {{ conn|qtIdent(role) }};

*Now:* priv will be List, which we need to handle in jinja templates.

GRANT *{{ priv|join(', ') }}* ON {{ type }} TO {{ conn|qtIdent(role) }};
2016-03-09 17:10:03 +00:00
Arun Kollan 5d6c5bc74d Improve display of error messages on dialogues. 2016-03-09 16:03:24 +00:00
Akshay Joshi f08aa6a313 Always fetch column info from the server, even if there are no rows. 2016-03-08 15:59:53 +00:00
Dave Page a92d4841d1 Add support for Schemas and Catalogs.
Initial patch by Murtuza Zabuawala with further hacking by Ashesh Vashi and I.
2016-03-08 15:48:11 +00:00
Ashesh Vashi 785d180451 Added missing library in requirementsXXX.txt used by the preferences
utility.
2016-03-07 19:18:19 +05:30
Dave Page 5ea822f33e Preferences dialogue. Patch by Ashesh and Khushboo Vashi. 2016-03-07 11:48:53 +00:00
Ashesh Vashi 43116750b4 Honor the visible property of the model schema, and show/hide different
custom contorls based on it.
i.e.
UniqueCollectionControl, TabControl, FieldsetControl, etc.
2016-03-07 16:06:18 +05:30
Neel Patel 31ab9ebacc Using the correct member variable while fetching the notices/messages
from the psycopg2 connection.
2016-03-06 18:56:42 +05:30
Ashesh Vashi 6014448dd7 Trigger an event whenever a register script has been initialized from
the browser.
2016-03-06 18:52:22 +05:30
Ashesh Vashi cc08708f23 Allow to specify special type - 'group' in schema for the browser node,
which allows to determine certain group to hide/show the whole
tab/fieldset control in the properties, and create dialog.

Using this functionality in the database for the
'default privileges - types', which is not allowed before PG < 9.2 using
the version check.
2016-03-06 18:50:10 +05:30
Dave Page 5bf505e822 Add file missing from previous commit. 2016-03-04 13:17:13 +00:00
Dave Page 8f6c8fdd6e Add some code review notes/hints to the docs. 2016-03-04 12:26:26 +00:00
Ashesh Vashi ee71cab51e Removed the wrong copyright information in the javascript file, which is
owned by pgAdmin IV.
2016-03-04 17:39:51 +05:30
Murtuza Zabuawala fa97b5635e Enable/disable edit button functionality conditionally in backgrid. 2016-03-04 11:55:50 +00:00
Sanket Mehta a4e819c68c Fix an error retrieving dependents and dependencies for casts. 2016-03-04 11:03:30 +00:00
Murtuza Zabuawala 6ed5e7183e Backform control enhancements:
1) Unique collection control: we have added 'Edit' button in grid, earlier it was only delete button.
2) Sql field control: We have added control to disabled & visible functionality which were not available.
2016-03-04 11:00:17 +00:00
Ashesh Vashi 0b43443151 Allow the connection driver to return notices/messages from the server. 2016-03-04 10:35:50 +00:00
Harshal Dhumal d2e372114b Security Label and ACL template macros:
Way to use in template:

1) Security labels:

SECLABLE.SET(conn, object_type, object_name, provider, security_label,
object.schema)

SECLABLE.UNSET(conn, object_type, object_name, provider, object.schema)

2) Privileges:

PRIVILEGE.SET(conn, object_type, grantee, object_name,
privileges_without_grant, privileges_with_grant,
            object.schema)

PRIVILEGE.UNSETALL(conn, object_type, grantee, object_name, schema)

privileges_without_grant = comma separated string of privileges.
privileges_with_grant = comma separated string of privileges.
2016-03-03 15:12:37 +00:00