Commit Graph

968 Commits (881d2a60a4e1ef357dcf9fcfb5375f8dc3dd2163)

Author SHA1 Message Date
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
Neel Patel 2c6f6609bc Debugger listener starting error displayed if user try to debug plpgsql cs_fmt_browser_version function that contains parameters. Fixes #1238 2016-08-29 13:47:15 +05:30
Neel Patel f5249f2e18 Set break point option should present in pgAdmin4 for trigger. Fixes #1226 2016-08-29 13:43:43 +05:30
Surinder Kumar 2d75eac117 SqlFieldControl enhancements 2016-08-29 13:21:45 +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
Murtuza Zabuawala 5a78dd7ad3 Implemented Synonym node for EPAS 2016-08-26 13:01:57 +05:30
Akshay Joshi 7b72448ec9 Internal sever error displayed if create New user mapping with public user. Fixes #1468 2016-08-26 11:23:15 +05:30
Murtuza Zabuawala 05473a7a35 domain node: id and pid is not being generated. Fixes #1586 2016-08-25 14:07:04 +05:30
Akshay Joshi e016869ad5 Trigger issues through right click. Fixes #1209 2016-08-24 12:10:54 +05:30
Murtuza Zabuawala 8d7b840e7e Fix startup navigation message. 2016-08-23 12:41:41 +01:00
Priyanka Shendge a535eddfcd Add schema and database child node regression tests. 2016-08-23 11:50:41 +01:00
Dave Page 0ce8b031f8 More sensible defaults for the mail server settings. 2016-08-23 11:41:45 +01:00
Ashesh Vashi 6775adc4c7 Cleanup old code in server_groups.js. Fixes #1247 2016-08-23 09:32:10 +05:30
Harshal Dhumal 58a79e4fc6 Fix parsing issue in packages. 2016-08-22 16:49:32 +01:00
Harshal Dhumal cf1be2a320 Add support for Packages on EPAS. 2016-08-22 12:30:16 +01:00
Surinder Kumar fe54a124da Don't offer to create resource groups on disconnected servers. Fixes #1569 2016-08-22 12:21:33 +01:00
Surinder Kumar 4c2020cdc7 Allow the use of the tab key to select options in combo boxes. Fixes #1251 2016-08-22 12:18:38 +01:00
Surinder Kumar 5690dfda16 Allow template databases to be used when creating new databases. Fixes #1570 2016-08-19 16:35:42 +01:00
Dave Page d5f6c63ead More string tweaks. 2016-08-19 11:48:34 +01:00
Surinder Kumar 761b54ce69 Allow the user to configure tabs in the SQL editor. Fixes #1406 2016-08-19 11:40:19 +01:00
Dave Page 0f99c3b60c Clarify font sizing description. 2016-08-19 11:23:07 +01:00
Khushboo Vashi eca47efb03 Update MFizz font library. Fixes #1311 2016-08-19 11:17:42 +01:00
Dave Page 33b4817008 Ensure fractional sizes work for the SQL font. 2016-08-19 11:08:42 +01:00
Akshay Joshi 86858b18f6 Fix validation of numeric preference min/max values. Fixes #1567 2016-08-19 11:00:05 +01:00
Surinder Kumar d5b0cd29d8 Display full text from backgrid cells that overflow in a tooltip. Fixes #1442 2016-08-19 10:54:13 +01:00
Akshay Joshi 7dffb020f1 Support CREATE LANGUAGE. Fixes #1252 2016-08-19 10:26:02 +01:00
Murtuza Zabuawala 013ff1090e Ensure PG/EPAS configuration warnings are shown appropriate for the server type. Fixes #1563 2016-08-18 17:18:20 +01:00
Murtuza Zabuawala d6391c7e9b Properly display messages from the server in the query tool. Fixes #1523 2016-08-18 17:08:40 +01:00
Akshay Joshi 2b1b60bc2b Reduce main menu height a little. Fixes #1453 2016-08-18 16:51:22 +01:00
Murtuza Zabuawala 8e0a61f556 Fixed typo in security labels macro Fixes #1457 2016-08-18 18:03:30 +05:30
Dave Page 050937a32a Fix WSGI support. 2016-08-18 13:43:00 +01:00
Neel Patel 48a50ce20b Give more useful error messages when unable to debug functions. Fixes #1224 2016-08-17 15:23:10 +01:00
Dave Page 6701bb191d String fix. 2016-08-17 15:10:33 +01:00
Harshal Dhumal 1056e9553f Show default database privileges in properties mode. Fixes #1538 2016-08-17 14:22:56 +01:00
Dave Page 91e3d3267f On reflection, don't allow the user to specify the unit when setting the SQL font size. Always use em's. 2016-08-17 13:45:52 +01:00
Dave Page b3f25cb4bb Allow customisation of the CodeMirror font size. Fixes #1565 2016-08-17 13:20:05 +01:00
Murtuza Zabuawala 9ec05d6bb1 Fix an issue where system level catalog are also displayed in PPAS server under relation of create new table like option. Fixes #1530 2016-08-16 16:29:50 +01:00
Murtuza Zabuawala c336e8a743 Fix an issue in foreign tables node where it was displaying catalog tables in inherits options causing internal server error. Fixes RM#1520 2016-08-16 15:44:44 +01:00
Dave Page 99b4a0fe5b Add unit tests for schemas, collations and trigger functions. 2016-08-16 12:54:02 +01:00
Surinder Kumar 67f481ab11 Prevent creation of FTS objects in catalogs. Fixes #1122 2016-08-16 12:49:19 +01:00
Surinder Kumar 6d839a2924 Prevent a query being executed whilst one is already in progress. Fixes #1532 2016-08-16 12:10:16 +01:00
Akshay Joshi 035066bd41 Fix query tool button/menu inconsistencies. Fixes #1461 2016-08-09 16:23:24 +01:00
Navnath Gadakh 81e2bc1e80 Test suite enhancements:
1. The user will specify the tablespace path in test_config.json.in
2.  If tablespace path not found, skip the test cases for that server(Only tablespace test cases)
3.  Add the skipped test summary in the test result. (Now it's showing on console + in log file, but need to update in a final enhanced test summary report. Which is research point we will work on that after finishing all nodes API test cases)
4.  Removed the test_ prefix from the values in the config files.
5. Add tablespace and roles tests
2016-08-09 16:05:40 +01:00
Dave Page 2b13d55016 Add missing updates from the previous commit. 2016-08-09 12:17:02 +01:00
Akshay Joshi 9dfc7bff35 Add missing collection node child counts. Fixes #1250 2016-08-09 12:12:05 +01:00
Dave Page 33457e6a90 Update message catalog. 2016-08-08 16:51:03 +01:00
Dave Page 48384cd6cd Bump version. 2016-08-08 16:48:10 +01:00
Harshal Dhumal 8918b8894d Fixed privileges parsing issue while editing privileges of existing object. Fixes #1417 2016-08-08 16:31:57 +01:00
Dave Page a025c0ebf0 Missing comma. Sigh. 2016-08-08 15:39:06 +01:00
Surinder Kumar 1bcac0b67c Fix more of the funky keyboard shortcuts. 2016-08-08 15:26:37 +01:00
Neel Patel 37ca3579f3 Fix a JS error in the runtime caused by f78024808e (#1177) 2016-08-08 14:42:14 +01:00
Surinder Kumar 5900848842 Sequence related validation/fixes. Fixes #1119
1) Add proper validation checks for fields.
2) Fixed wrong sql generation due to incorrect conditions in template.
2016-08-08 12:47:20 +01:00
Surinder Kumar 7cf4ac2474 Fix RE-SQL for Trigger Functions which was missing an 'AS'. Fixes #1524 2016-08-08 12:17:54 +01:00
Harshal Dhumal f78024808e Prevent the user attempting to run external commands if the bin path is not configured. Fixes #1177 2016-08-08 11:59:37 +01:00
Khushboo Vashi 8e099e29c3 Fix various escaping issues. Fixes #1527 2016-08-05 12:20:00 +01:00
Surinder Kumar a43f053a10 Fix file upload in File Manager in pgAdmin4 Runtime. Fixes #1397 2016-08-04 16:34:30 +01:00
Khushboo Vashi b00e94e904 Fix drop trigger function, function and procedures. Fixes #1467 2016-08-04 15:24:03 +01:00
Surinder Kumar 42f8745aba Fix error running VACUUM FULL FREEZE ANALYZE VERBOSE. Fixes #1519 2016-08-04 12:13:34 +01:00
Harshal Dhumal cb35c46f03 Fix View Data options for tables with columns that need quoting. Fixes #1492 2016-08-04 11:54:36 +01:00
Murtuza Zabuawala 8c433fbfce Fix display of numerics in the query tool. Fixes #1463 2016-08-04 11:31:24 +01:00
Harshal Dhumal dfceb63986 Add save password option in sever create mode. Fixes #1450
Do a little string/layout cleanup whilst passing.
2016-08-03 15:55:45 +01:00
Khushboo Vashi 68497b00f6 Fix dropping of Domains. Fixes #1470 2016-08-03 15:44:24 +01:00
Harshal Dhumal de568b3021 Fix renaming of constraints from the table dialogue. Fixes #1500
1] datamodel.js: For collection type added check before adding model into "changed" list instead of adding it blindly.

2] Type casting from str to int of column properties like attlen, attpricision.

3] Added missing data formating when adding new column to existing table (from table edit mode).

4] Added more validation for Foreign key constraint.

5] Column.js: Column grid (in table edit mode) show proper disabled color for disabled cell when grid renders.

6] All constraints and index js added idattribute to distinguish which s/constraint or s/index is updated on server side.

7] Column update.sql: Fixed sql when altering column data type. The issue was when we alter data type from which has length and precision to data type which don't have these properties and vice versa.
For e.g. alter data type numeric(10,12) to real (and vice versa)

8] Renaming constraint (RM1500).

9] simplejson KeyError handing for Python 2.7.
2016-08-03 15:39:14 +01:00
Dave Page 5d52767ba7 Move the dashboard tab filters into a button bar, and add a refresh button. Fixes #1505 2016-08-03 13:39:32 +01:00
Dave Page 4f90a5d4f4 Move button bar related classes together. 2016-08-03 13:38:12 +01:00
Dave Page 1ec1e9663c Ignore the pickle. 2016-08-03 10:25:10 +01:00
Harshal Dhumal ec3b9bb15b Allow to create the foreign table with inherits options. Fixes #1260 2016-08-02 09:38:56 +05:30
Murtuza Zabuawala 01252a13cf Further misc quoting/encoding related fixes. 2016-08-01 15:23:06 +01:00
Akshay Joshi e1cc3dded2 Allow customisable delete confirmation messages in backgrid. 2016-08-01 15:18:57 +01:00
Dave Page 16304aafd2 s/buttton/button/g, per Anthony DeBarros. Fixes #1518 2016-08-01 15:16:14 +01:00
Surinder Kumar 9c4eed70b4 Use the same keyboard shortcuts in the query tool as pgAdmin 3. Refs #1478
Per discussion on the mailing list, the shortcuts override the browser defaults (where there are any), but only when the query tool has focus.
2016-08-01 15:10:52 +01:00
Dmitriy Olshevskiy 94aa36f3d5 Remove redundant -- marker in the SQL panel on the properties dialogues. 2016-08-01 14:28:14 +01:00
Dave Page 5987af1b44 Minor readme tweak. 2016-07-27 15:35:11 +01:00
Navnath Gadakh 5c3c543d2e Test suite improvements:
- Test framework support API testing with multiple server for this we need to modify test_config.json(for user it’s test_config.json.in) and test_advanced_config.json(for user it’s test_advanced_config.json.in). Server details of PG and  PPAS are included in both .in files.

- Removed the logic of logging in  the test client on each test scenario(As per Khushboo's comment in previous email).  We need this logic in test cases under ‘browser/tests/’ as for test scenarios like change password and  invalid login test cases as test client should be logged out first. So, as per this the code is slightly modified in ‘browser/tests/’.
2016-07-27 15:33:36 +01:00
Murtuza Zabuawala b6e8d195dc Security label providers are an optional parameter. Fixes #1478. 2016-07-27 15:01:16 +01:00
Dave Page f4f8273994 Display basic query info when execution completes in the query tool. Fixes #1507 2016-07-27 11:36:13 +01:00
Murtuza Zabuawala 06e881570a Fix numerous encoding issues. Fixes #1307. Fixes #1479 2016-07-26 15:05:14 +01:00
Harshal Dhumal 166d42953c Give a more useful error message if attempting to drop an object that doesn't exist. Fixes #1154 2016-07-26 14:40:02 +01:00
Murtuza Zabuawala d3d96d5c05 Disable SQLALCHEMY track modification feature as it puts overhead on system, and if not set, now emits a warning. 2016-07-26 13:01:56 +01:00
Akshay Joshi e803464ee0 Replace 'Add' buttons with '+' 2016-07-26 12:54:59 +01:00
daze 19306934a0 Property 'URL' (of type string) not quoted in browser.js template when extending pgAdmin.Browser. Fixes #1504
Without quotes, the property can be mistakenly treated as a regex:

e.g.: URL: /pgadmin/browser/,

When that happens, JS engine throws "SyntaxError: invalid regular expression flag b" and the whole web interface freezes.
This problem usually occurs when pgadmin is hosted inside a subdirectory (https://host/pgadmin/ instead of https://host/).
2016-07-26 12:47:46 +01:00
Dave Page 790b28fb61 Flask-Babel 0.11+ compatibility. Fixes #1496 2016-07-25 17:23:10 +01:00
Harshal Dhumal 875360d1c8 When we use deps functionality, backform controls re-render then. But before we re-render them we must remove old grid (if any) otherwise is causes js error "Unable to call exitEditMode of undefined". Fixes #1497 2016-07-25 14:31:17 +01:00
Harshal Dhumal 9dd3cf2399 Make Save/Save As menu options work a little more sanely. Fixes #1460 2016-07-25 12:55:06 +01:00
Neel Patel dbd3c7f4c5 Allow creation of FDWs if the extension is in a non-default schema. Fixes #1320
Root cause:-

When user change schema of already created fdw extension then while creating the new fdw we should append the <schema_name>.<fdw_handler_name>.
Previously we added only <fdw_handler_name> so while executing the query it will not be able to find fdw handler name without schema name.

e.g. If user changed the fdw handler 'postgres_fdw_handler' under schema 'test' then we should display the handler  name under fdw as "test. postgres_fdw_handler".

Solution:-

With this patch, we have added <schema_name>.<fdw_handler_name> so while creating or updating the fdw, proper sql will be generated.
2016-07-25 12:48:11 +01:00
Surinder Kumar 91559c622b Fixes for function, procedure and trigger reverse SQL. Fixes #1293. Fixes #1294
1. RM#1293 - SQL pane is not displaying GRANT queries in functions node
2. RM#1294 - Comments are not visible in sql pane for trigger functions and functions

Explanation:
Previously we we using 'get_defintion.sql' template to generate SQL for SQL pane for functions, procedure & trigger functions node.
but GRANT statements and COMMENTS changes were missing. In order to fix that, now we have used both 'create.sql' and 'get_definition.sql' templates to generate full SQL query for SQL pane.
2016-07-22 16:38:21 +01:00
Dave Page 60659975ed Stop using deprecated imports. 2016-07-22 16:25:23 +01:00
Dave Page a014cf82a1 Use a numeric version check for upgrades. 2016-07-22 16:14:57 +01:00
Dave Page f783aeac63 Change button label to initcap. 2016-07-21 17:18:15 +01:00
Murtuza Zabuawala 3d7b40e111 Fix support for security labels. Fixes #1457 2016-07-21 16:35:35 +01:00
Harshal Dhumal a7d7577c7c Query tool file handling cleanup. Fixes #1460
- Opening a file should set the tab name to the filename
- Editing a file should add a * to the tab name to indicate the file is dirty
- Saving changes to a file should clear the *
- The Save button should have a drop-down menu, with a Save As option.
2016-07-21 13:44:42 +01:00
Murtuza Zabuawala 419ead9121 Ensure ajax requests are sent on second click of an object. Fixes #1462 2016-07-21 13:26:09 +01:00
Ashesh Vashi 417af3676d Using better way to find the current object in the properties panel. 2016-07-19 15:30:39 +05:30
Ashesh Vashi 8b35a60c08 Generate the proper unique name for the duplicate column name.
Thanks Murtuza for reporting the issue.
2016-07-19 11:27:03 +05:30
Dave Page 8e29d16eec Beta 3 version bump 2016-07-18 16:34:00 +01:00
Harshal Dhumal 83a1535f89 Fix saving of query output as CSV data. Fixes #1405 2016-07-18 15:29:09 +01:00
Dave Page ae9bbc0305 Ignore regression test files. 2016-07-18 14:50:49 +01:00
Dave Page f17c2e3b84 Enhancements to the regression test suite.
Navnath Gadakh and Priyanka Shendge
2016-07-18 14:50:21 +01:00