Commit Graph

361 Commits

Author SHA1 Message Date
Navnath Gadakh
ae612f5403 Major update to the test suite:
1. Code changes (due to drop objects functionality).
2. Quoting for database names in drop databases.
3. Code changes for import errors for pickle_path and advanced_config variables.
2016-10-07 13:59:43 +01:00
Dave Page
50658808d9 Ensure variable is defined before use. 2016-10-07 13:59:10 +01:00
Khushboo Vashi
50859f8369 Correctly identify server type upon first connection. Fixes #1785 2016-10-07 12:57:36 +01:00
Murtuza Zabuawala
c931d715ac Fix refresh of Synonyms. Fixes #1611 2016-10-07 12:08:19 +01:00
Susan Douglas
8b2832bbc7 pgAgent docs. Fixes #1824 2016-10-04 14:48:57 +01:00
Ashesh Vashi
e52aeecd20 Fixes# 1808 - Invalid date-time format was used in the Start/End time
for Job Schedule.

Thanks Susan for the report.
2016-10-04 10:18:37 +05:30
Dave Page
d4af70aeb9 Label corrections. 2016-10-03 14:20:04 +01:00
Dave Page
a91f19a21d Fix typo. Fixes #1596 2016-09-30 10:36:39 +01:00
Dave Page
49ee8abb72 Fix typo 2016-09-30 09:45:14 +01:00
Dave Page
f9dacc5237 Fix label cpaitalisation 2016-09-26 15:04:47 +01:00
Surinder Kumar
0ae719dae0 Do not try to set in_recovery, is_replay_paused properties in the server
object, when data is not available.
2016-09-26 19:16:06 +05:30
Navnath Gadakh
a4aae4c245 Update role and tablespace tests to cleanup properly following a failure. 2016-09-26 14:02:59 +01:00
Ashesh Vashi
e591c6b5c0 pgAgent misc fixes:
1. When an existing schedule updated, or a new schedule is added from a pgAgent job dialog, it was not able to generate the proper update SQL Query.
2. The SubNodeCollectionControl was not removing the grid, when it is being getting removed.
2016-09-26 13:43:13 +01:00
Ashesh Vashi
237bfd4882 pgAgent - add modules for jobs, steps and schedules. Fixes #1341 2016-09-26 12:04:10 +01:00
Ashesh Vashi
912eebb583 Fix view creation. Fixes #1736 2016-09-26 11:00:18 +01:00
Dave Page
f51d8c72ef Fix validation message 2016-09-26 10:57:16 +01:00
Ashesh Vashi
6999249dcd Ensure the default schema is set when creating objects. Fixes #1735 2016-09-26 10:15:23 +01:00
Ashesh Vashi
1c623c56e7 Fixes#1737 - Setting the schedma-id as the pid (parent-id) for the
sequences node instead of the server-id.

Due to this - during updating the sequence node, it was not able to find
out the correct parent node, and it was updating the existing node, but
- later it (considering the old node) was removed by the replace logic.
2016-09-24 14:25:16 +05:30
Ashesh Vashi
8797b3f3bf Change rolvaliduntil format to "YYYY-MM-DD HH:mm:ss Z" for consistency with the rest of the app. 2016-09-23 10:10:31 +01:00
Ashesh Vashi
163ae4d53d Misc fixes and additions for pgAgent support:
- Added DatetimepickerControl, MomentCell (using moment.js)
- Used the 'DatetimepickerControl' in Role (Also - resolved an issue, when unset the datetime for 'Valid Until'.)
- Added a 'Select All/Unselect All' adaptor for Select2 used by pgAgent nodes.
- Fixed an issue with SubNodeCollectionControl, which was not starting the modification session of the child model, when created default value for collection is not null/undefined. And, hence - validation on the child model was not working.
- Fixed a memory leak with SqlFieldControl, and SqlTabControl, which was not releasing the CodeMirror properly.
2016-09-22 15:27:59 +01:00
Murtuza Zabuawala
a113b43a1f Add Packages as a synonym target type. Fixes #1611 2016-09-22 14:56:00 +01:00
Murtuza Zabuawala
f48f806657 Fix stats on PG 9.6. Fixes #1719 2016-09-22 14:17:47 +01:00
Navnath Gadakh
1cb5a7c7ca Update regression tests to resolve issues where database/connections were getting mixed up. 2016-09-22 12:58:38 +01:00
Harshal Dhumal
f117685d77 Drop all connections from the connection manager when a server is dropped to avoid issues if sqlite reuses an ID. Fixes #1720 2016-09-22 12:57:52 +01:00
Navnath Gadakh
c84fd83595 Enhanced summary output for the test suite. 2016-09-19 16:49:06 +01:00
Murtuza Zabuawala
2440f89a71 Fix an issue where the edit icon vanished and the default tab wasn't shown when advanced-editing a column in the table dialogue. Fixes #1704 2016-09-19 15:37:04 +01:00
Surinder Kumar
cc0cb83277 Resolve a syntax error when updating packages with no body. Fixes #1588 2016-09-19 15:33:19 +01:00
Murtuza Zabuawala
82d63804c1 Resolve a refresh issue when updating packages. Fixes #1625 2016-09-19 09:41:13 +01:00
Murtuza Zabuawala
fc5ce22de9 Allow creation of objects in schemas with special chars in the name. Fixes #1598
This was caused through generation of SQL based on HTML-escaped labels, not the raw versions.
2016-09-16 17:02:57 +01:00
Murtuza Zabuawala
c5f04d03c6 Fix an issue where several default privileges cause error on database. Fixes #1670 2016-09-16 16:06:29 +01:00
Surinder Kumar
92bc312d2d Fix updating of matview definitions. Fixes #1595 2016-09-16 15:41:07 +01:00
Magnus Hagander
ce20dbc25a Add classid filter to queries on pg_depend. Fixes #1705
There are a number of cases where queries in both pgadmin4 and pgadmin3 are done against pg_depend but falis to constrain the query on classid.

In particular, if for example a constraint and a sequence exists with the same oid (which is perfectly valid, as they are in different tables), a column will suddenly refer sequences that are completely incorrect. When we look up sequences, we have to make sure we only match dependencies against pg_class.
2016-09-16 11:24:54 +01:00
Surinder Kumar
165b93a968 Fix a syntax error when creating a trigger function on PPAS 9.5+. Fixes #1600 2016-09-16 11:12:41 +01:00
Surinder Kumar
1ce5b38f4a Fix an issue when changing the length of a column in the table dialogue. Fixes #1669 2016-09-16 11:09:13 +01:00
Ashesh Vashi
c48e8d415b The Switch Dependency Cell, implemented in schema module, has a special
case. Its purpose is now to handle certain scinarios specific to table
children modules.

Renamed it to 'TableChildSwitchCell' from 'SwitchDepCell' to avoid any
conflict in future.
2016-09-15 13:36:56 +05:30
Navnath Gadakh
d3d8836f61 Introduce a test config database for the regression tests, and track/remove objects that are created during testing. 2016-09-14 16:26:12 +01:00
Surinder Kumar
2ee631d6fc Remove blank lines in the formatting of SELECT scripts for functions. Fixes #1690 2016-09-14 11:08:10 +01:00
Surinder Kumar
f2469d113c Fix function signature generation for reverse engineered SQL. Fixes #1674
1) In SQL pane, the signature in comments had arguments with name and type, Now it will show arguments with type only.

2) There is no indent+newline between arguments (there isn't even a space). - Fixed

3) The default value for the last argument is omitted. - Fixed
Last argument is omitted because the value for the last argument we got from table is empty.
Now we form function signature in the get_definition.sql using 'pg_catalog.pg_get_function_arguments' method.

Above changes will reflect in Functions, Procedures & Trigger function Nodes.
2016-09-14 10:59:11 +01:00
Murtuza Zabuawala
046f6dd442 Fix creation of DO INSTEAD rules. Fixes #1681 2016-09-14 10:39:16 +01:00
Murtuza Zabuawala
071b609a44 Fix error when refreshing table node. Fixes #1686 2016-09-14 10:30:02 +01:00
Surinder Kumar
f2ed6fa4dd Fix function signature generation. Fixes #1683 2016-09-12 15:20:46 +01:00
Surinder Kumar
28b7a033bc Prevent creation of packages and rules in catalogs. Fixes #1682 2016-09-12 11:37:25 +01:00
Murtuza Zabuawala
35d3c396de Fix SQL generation for functions that return SETOF ... Fixes #1631 2016-09-07 14:53:22 +01:00
Dave Page
bd139bc83e Improve binary path settings hint. 2016-09-07 09:54:54 +01:00
Ashesh Vashi
8ac65070bc Improve the logic for Bad handling of missing connection database server RM #1387 2016-09-06 15:35:20 +05:30
Murtuza Zabuawala
f3f7413701 Use ISO formatted dates when setting rolvaluntil. Fixes #1153 2016-09-02 15:24:34 +01:00
Murtuza Zabuawala
689ef8d8d1 Fixes issues specific to SYNONYMS
- On droping a synonyms - the query should be modified in SQL pane.
- A proper message should be given on trying to drop an already dropped
  synonyms.
- Handle the synonyms with special characters.

Fixes #1607, #1608, #1609
2016-08-29 20:25:18 +05:30
Ashesh Vashi
b6f307256b Sorting the data during tree data loading using the natural sort
algorithm.

This patch takes care of:
* Consistent behaviour during create, update operation on any node.
  - It should return the node data during creating a new object, or
    updating the existing one.
* Now that - we have consistent behaviour during these operations, we
  can consistently move, update the tree item based the node data from
  the server.
* Implemented the methods for each node to get the information about
  that particular node only.
* Using the above changes to implement the 'refresh' operation on tree
  node properly.

I must thank Surinder, and Harshal for helping me implement the 'node'
method, and also changed the behaviour of create & update methods to
return the node data for most of the nodes.

Fixes #1244
2016-08-29 20:06:58 +05:30
Ashesh Vashi
f12d981a9d Handling the bad/lost connection of a database server.
Made backend changes for:
* Taking care of the connection status in the psycopg2 driver. And, when
  the connection is lost, it throws a exception with 503 http status
  message, and connection lost information in it.
* Allowing the flask application to propagate the exceptions even in the
  release mode.
* Utilising the existing password (while reconnection, if not
  disconnected explicitly).
* Introduced a new ajax response message 'service_unavailable' (http
  status code: 503), which suggests temporary service unavailable.

Client (front-end) changes:
* To handle the connection lost of a database server for different
  operations by generating proper events, and handle them properly.

Removed the connection status check code from different nodes, so that
- it generates the proper exception, when accessing the non-alive
  connection.

Fixes #1387
2016-08-29 12:01:35 +05:30
Akshay Joshi
1b05464a04 Getting 'AttributeError' in pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py. Fixes #1464 2016-08-26 14:25:33 +05:30