Commit Graph

1528 Commits

Author SHA1 Message Date
Murtuza Zabuawala
4b74a5ff35 Enable dialogue help buttons on Language and Foreign Table dialogues. Fixes #2116 2017-06-06 09:52:44 +01:00
Murtuza Zabuawala
0bc9997a95 Properly refresh the parent node when renaming children. Fixes #2355 2017-06-06 09:50:05 +01:00
Dave Page
9e98ded06c Display and allow toggling of trigger enable/disable status from the trigger dialogue. Fixes #2386 2017-06-05 17:11:21 +01:00
Murtuza Zabuawala
3f150f3f4e Handle procedure flags (IMMUTABLE STRICT SECURITY DEFINER PARALLEL RESTRICTED) properly in RE-SQL on EPAS. Fixes #2280 2017-06-05 17:04:55 +01:00
Murtuza Zabuawala
a4d86d24e6 Cache statistics more reliably. Fixes #2357 2017-06-05 17:01:03 +01:00
Surinder Kumar
456096092d Avoid re-rendering the edit grid for every row that is pasted. 2017-05-30 16:22:11 +01:00
Surinder Kumar
1f26953504 Cleanup handling of default/null values when data editting. FIxes #2400 2017-05-27 14:51:02 -04:00
Murtuza Zabuawala
8aabee352c Import the ordereddict module for Python 2.6 2017-05-26 12:34:05 -04:00
Murtuza Zabuawala
2c9af4784e Allow creation of ENUM types with no members. Fixes #2426 2017-05-26 12:21:23 -04:00
Murtuza Zabuawala
dba64e77f1 Order columns in multi-column pkeys correctly. Fixes #2417 2017-05-26 11:04:32 -04:00
Murtuza Zabuawala
45d423c0ce Ensure the last placeholder is included when generating UPDATE scripts for tables. Fixes #2436 2017-05-26 10:59:09 -04:00
Murtuza Zabuawala
a45bb905f5 Pass the database ID to the query tool when using the Script options. Fixes #2435 2017-05-26 10:57:31 -04:00
Khushboo Vashi
3216eca4a8 Add feature tests to ensure that data types are properly rendered in the query tool. 2017-05-26 10:46:58 -04:00
Dave Page
2f097cd016 Fix typo in freshly added check. 2017-05-25 17:10:41 -04:00
Murtuza Zabuawala
e9da157cc7 Add numerous missing checks to ensure objects really exist when we think they do. Fixes #2427 2017-05-25 16:28:04 -04:00
Dave Page
04ce72a6ae Fix RE-SQL for rules which got the table name wrong in the header and DROP statement. Fixes #2422 2017-05-19 12:21:29 +01:00
Murtuza Zabuawala
eb18320950 Improve error handling in cases where the user tries to rename or create a server group that would duplicate an existing group. Fixes #2414 2017-05-17 15:57:38 +01:00
Dave Page
17de7db70b Fix server stats display for EPAS 9.2, where inet needs casting to text for concatenation. Fixes #1831 2017-05-17 15:53:13 +01:00
Murtuza Zabuawala
a3226b1eb5 Reverse engineer SQL for table-returning functions correctly. Fixes #1851 2017-05-17 15:49:56 +01:00
Murtuza Zabuawala
655d5888a6 Various FTS dictionary cleanups. Fixes #1126 2017-05-17 14:13:05 +01:00
Surinder Kumar
1db81da020 Fix JS error when selecting a single grid cell. 2017-05-16 08:44:29 +01:00
Dave Page
be42b67f79 Ensure all required directories are created before we start logging. 2017-05-15 15:59:47 +01:00
Surinder Kumar
d7d4bf475b Various improvements to the NULL/DEFAULT handling in the data editor. Fixes #2399 2017-05-15 15:04:16 +01:00
Murtuza Zabuawala
1cb2a62fa8 Ensure object names are properly escaped for external process management. Fixes #2405 2017-05-15 13:01:12 +01:00
Murtuza Zabuawala
2ad14b379e Validate table presence in SQL and Properties route handles. Fixes #2395 2017-05-15 10:15:09 +01:00
Joao Pedro De Almeida Pereira
3bf17d9df4 1) Splits the SQL query used to retrieve the Dependents, Dependencies, and Roles SQL file into multiple versioned files.
2) Add Unit Tests for each file.
3) Add ORDER BY into Copy Selection Feature test to ensure the results are retrieved always in the same order
4) Renamed the Scenario of the xss_checks_pgadmin_debugger_test and skip it for versions less than 9.1
5) Deleted unused __init__.py files.
2017-05-15 10:40:46 +05:30
Surinder Kumar
0e7efc0cf8 Track disabled rows properly in the edit grid. 2017-05-12 16:42:06 +01:00
Murtuza Zabuawala
aea0d93390 Hide menu options for creating objects, if the object type is set to hidden. Includes Jasmine tests. Fixes #2225 2017-05-12 12:10:46 +01:00
Dave Page
dd318e679d Minor colour tweaks for highlighted rows in the data editor. These are likely to be changed again when we overhaul and standardise the colouring, but at least now they're using colours from the style guide. 2017-05-12 11:29:46 +01:00
Surinder Kumar
4f9628ed43 Improve handling of nulls and default values in the data editor. Fixes #2257 2017-05-12 10:53:57 +01:00
Murtuza Zabuawala
05787fdba9 Properly handle non-ASCII column names in CSV. Fixes #2314 2017-05-12 10:38:23 +01:00
Murtuza Zabuawala
94cbd70370 Don't change the trigger icon back to "enabled" when the trigger is updated when it's disabled. Fixes #2271 2017-05-10 09:48:21 +01:00
Murtuza Zabuawala
9452e0699e Allow creation of tables with pure numeric names. Fixes #2284 2017-05-10 09:40:32 +01:00
Andrei Antonov
cbf2de6c27 HTML escape the label, when setting the collection node count along
with the label of the tree-nodes.
2017-05-10 13:26:18 +05:30
Murtuza Zabuawala
13f4432bbd Support loading files with Unicode BOMs. Fixes #2369 2017-05-09 12:06:49 +01:00
Neel Patel
d0e9c82fea Fixes #2328
1) Fixed issue of opening Query Tool and Debugger in new Tab with QT 5.8 and annulen webkit
 2) Moved unload event of window from javascript files to html.
 3) Change alertify messages for debugger.
 4) Closed all connections created by debugger. Previously only one connection has been closed.
2017-05-09 13:03:44 +05:30
Murtuza Zabuawala
63d42745ef Fix various issues in CSV file download feature:
1) To handle non-ascii filenames which we set from table name. Fixes #2314

2) To handle non-ascii query data. Fixes #2253

3) To dump JSON type columns properly in csv. Fixes #2360
2017-05-08 13:36:11 +01:00
Harshal Dhumal
a80f760933 Only reconnect to databases that were previously connected. Fixes #2292 2017-05-08 12:36:51 +01:00
Khushboo Vashi
94b7fc483a Fix sorting of sizes on the statistics views by sorting raw values and prettifying on the client side. Includes Jasmine tests for the prettyfying function. Fixes #2315 2017-05-08 11:29:13 +01:00
Navnath Gadakh
c32bf7780e Windows compatibility fixes for the test suite. 2017-05-08 09:25:05 +01:00
Murtuza Zabuawala
155348d712 Fix the Backup module where it was not working if user changes its preference language other than english. Fixes #2354 2017-05-04 16:06:10 +01:00
Murtuza Zabuawala
95f763463f Fix an issue in NodeAjaxControl caching with cache-node field and add cache-node field in Trigger & Event trigger node so that whenever the user creates new Trigger Function we get new data from server in NodeAjaxControl. . Fixes #2242 2017-05-04 16:02:28 +01:00
Surinder Kumar
93df5e3e54 Ensure errors thrown when deleting rows in the query tool in edit mode are shown properly. Fixes #2356 2017-05-02 12:20:30 +01:00
Murtuza Zabuawala
6790bfd0c0 Fixed handling of default parameters ordering in functions. Fixes #2350 2017-04-25 18:40:44 +05:30
Murtuza Zabuawala
1ce1f216ca Fixed handling of nested privileges. Fixes #2335 2017-04-25 12:39:46 +05:30
Murtuza Zabuawala
38c8a4fb60 Fix handling of bigint[] type. Fixes #2272 2017-04-25 12:24:02 +05:30
Murtuza Zabuawala
928c0d3de8 startsWith() function of java script is not supported in IE, instead use startsWith() function of underscore string. Fixes #2347 2017-04-25 12:00:15 +05:30
Joao Pedro De Almeida Pereira
f718e1f49c Only display the header row in SlickGrid where columns actually exist. 2017-04-24 20:26:59 +01:00
Akshay Joshi
a449be784e Initial support for PG 10.0, per #2214 (missed some files) 2017-04-24 13:56:01 +01:00
Akshay Joshi
59834fba31 Initial support for PG 10.0, per #2214 2017-04-24 13:55:29 +01:00
Sarah McAlear
6283ef7f5e [Configuration][Migration] Use 'alembic' for migration of the SQLite
based configuration file from one version to another, and also allows us
to have a single path of creating the table instead of creating tables
using SQLAlchemy or hand rolled SQL

This allows us to run the migrations directly in the code, and it will
avoid the error prone version numbering.

Patched by: Sarah McAlear
Revisions: Joao Pedro De Almeida Pereira, George Gelashvili.
Reviewed by: Ashesh Vashi, Murtuza Zabuawala
2017-04-24 08:37:27 +05:30
Khushboo Vashi
618d9bc7a9 Enable horizontal scrolling in the treeview. Fixes #2339 2017-04-21 10:00:22 +01:00
Jonas Thelemann
929a43c9fa Prevent the top-left logo from changing colour when clicked. 2017-04-18 15:09:09 +01:00
Jonas Thelemann
8e127cf4fa German translation update. 2017-04-18 15:03:36 +01:00
Dave Page
9f6041b2a7 Revert "Ensure the treeview can be scrolled horizontally. Fixes #2339"
This reverts commit 78c25cef21 which apparently prevents tree nodes being collapsed.
2017-04-18 14:51:26 +01:00
Khushboo Vashi
8d6add13c0 Order foreign table columns correctly. Fixes #2318 2017-04-18 14:37:30 +01:00
Khushboo Vashi
78c25cef21 Ensure the treeview can be scrolled horizontally. Fixes #2339 2017-04-18 14:01:13 +01:00
Khushboo Vashi
a3007b7335 Ensure database driver names and description strings can be translated. Fixes #2190 2017-04-18 13:33:27 +01:00
Matthew Kleiman
d663d553c5 Allow column or row selection in the query tool. Fixes #2216 2017-04-18 13:28:45 +01:00
Murtuza Zabuawala
c35dbc7211 Proper alignment of dropdown menu labels 2017-04-14 15:53:25 +05:30
Akshay Joshi
0d566a6f3a Changed switch label from True/False to Show/Hide for 'Package Functions' and 'Package Procedures' node in Preferences dialog. 2017-04-14 14:57:38 +05:30
Surinder Kumar
9bbc05051c Remove some unused events. 2017-04-12 15:46:31 +01:00
Murtuza Zabuawala
019c1302cb Update inode info when refreshing treeview nodes. Fixes #2336 2017-04-12 13:29:56 +01:00
Akshay Joshi
cbee76eac8 Align labels with switches properly. 2017-04-12 13:28:07 +01:00
Navnath Gadakh
62716c4193 Include passed test results in the JSON output from the regression tests. 2017-04-12 13:11:53 +01:00
Murtuza Zabuawala
7dd9efd811 Fix binary search algorithm so new treeview nodes are added in the correct position. Fixes #2331 2017-04-12 13:01:24 +01:00
Murtuza Zabuawala
a2a2b8b888 Ensure the query tool displays but does not render HTML returned by the server in the results grid. Fixes #2330. 2017-04-10 14:07:48 +01:00
RAJASEKAR G
024b97479d Recover properly if a database is renamed externally. Fixes #2077 2017-04-10 11:09:01 +01:00
RAJASEKAR G
14f3a57d82 Ensure menus are updated after disconnecting a server. Fixes #2281 2017-04-10 09:35:21 +01:00
Murtuza Zabuawala
3dba7d8303 Fixes #2321 - [Browser Tree] Shows only the newly created node (not, all
other child node) of a parent node, when it has not been already loaded.

In order to resolve the issue - we will open the parent, and select the
created node, instead of adding it to parent node.
2017-04-07 08:58:43 +05:30
RAJASEKAR G
3880bc7eb8 Fix validation on the table dialogue so the Save button isn't enabled if the name is removed and autovac custom settings are enabled. Fixes #2105 2017-04-06 09:56:52 +01:00
RAJASEKAR G
c758920890 Properly handle EXPLAIN queries entered directly by the user in the query tool. Fixes #2287 2017-04-06 09:46:42 +01:00
Begina Felicysym
9ac5bf4f12 Update the Polish translation 2017-04-06 09:36:10 +01:00
Navnath Gadakh
dd23f71478 Write a JSON file when regression tests run, listing results. 2017-04-06 09:33:29 +01:00
Jonas Thelemann
b8566a0127 Un-split some strings for translateability. And so begins the battle between gettext and pep8... 2017-04-05 15:05:11 +01:00
Dave Page
6d9cfa6679 Update translations 2017-04-05 14:03:17 +01:00
Jonas Thelemann
e66616b1d8 Add German translation Fixes #2323 2017-04-05 14:02:46 +01:00
Jonas Thelemann
ea2b3f43bd Remove unnecessary quotes. 2017-04-05 13:58:47 +01:00
Jonas Thelemann
ddfa934357 Unified usage of "definition incomplete". 2017-04-05 13:55:00 +01:00
Jonas Thelemann
37120bf199 (De)Capitalized strings to fit the common/usual format, corrected spelling, removed unnecessary characters. 2017-04-05 13:50:49 +01:00
Jonas Thelemann
65f21a8cd7 Replace all occurrences of "can not" with "cannot". 2017-04-05 13:38:14 +01:00
Maxim Zakharov
85db82c7f4 Avoid an unauthorised error if clicking on the logo in desktop mode. 2017-04-05 13:33:12 +01:00
Ashesh Vashi
4d55e8abe8 Resolved a typo in the previous commit. 2017-04-03 19:00:06 +05:30
Ashesh Vashi
02a3919b06 As per Murtuza, we will have the '__module__', when running as a WSGI
application, but - it will not have the '__file__' attribute.
2017-04-03 18:55:24 +05:30
Ashesh Vashi
b756407c3c When running pgAdmin as a WSGI application, we will not be able to find
the '__main__' module under 'sys.modules'.
2017-04-03 18:44:53 +05:30
Murtuza Zabuawala
74655e60a0 Replace the '$DIR' only when found in the binary directory string. 2017-04-03 18:32:50 +05:30
Aravindraja Thinakaran
bb0bd8acc5 Properly handle truncated table names (> NAMEDATALEN). Fixes #2277 2017-04-01 02:57:48 -04:00
Harshal Dhumal
9acf340400 Generic function qtLiteral was not adapting values properly when they contain non ascii characters. Fixes #2305 2017-03-31 21:11:25 -04:00
Dave Page
4ba9269a88 Remove debug code. 2017-03-31 20:27:41 -04:00
Akshay Joshi
6a861f7a91 Add the config option ALLOW_SAVE_PASSWORD to allow admins to disable saving of passwords. Fixes #2232 2017-03-31 20:14:37 -04:00
Khushboo Vashi
efb077b7f7 Fix error highlighting in the query tool. Fixes #2291 2017-03-31 20:06:55 -04:00
Murtuza Zabuawala
08ff9d7422 Dialog Help was broken in case where query tool/Debugger opens in new browser tab. Fixes #2310 2017-03-31 16:08:05 +05:30
Maxim Zakharov
8005b05292 Fixes #2304, #2145 - Resolve the issue for restoring the table from the backup.
Earlier - implementation was generating the backup code like as below:
XXX/pg_restore.exe --host "x.x.x.x" --port "xxxx" --username "osboxes" --no-password --dbname "test" --data-only --verbose --table "tt.test2" "XXX-FILE.bak"

It should have been:
XXX/pg_restore.exe --host "x.x.x.x" --port "xxxx" --username "osboxes" --no-password --dbname "test" --data-only --verbose --schema "tt" --table "test2" "XXX-FILE.bak"
2017-03-31 13:16:17 +05:30
Joao Pedro De Almeida Pereira
eb89998dc0 From a visual standpoint, grey highlight makes selection look deselected rather than selected. A brighter color would quickly provide visual feedback on an action.
With this patch the color of selected rows look more highlighted.
2017-03-30 22:56:13 -04:00
Sarah McAlear
1d27341e21 Fix translation extraction for new client side translations, and update catalogs. 2017-03-28 15:21:49 -04:00
Khushboo Vashi
8745417926 Fix ascending/descending sort order in backgrid while clicking on the headers. Fixes #2303 2017-03-28 09:19:24 -04:00
Dave Page
7450c2df0d Revert code cleanup that wasn't 2.6 compatible. 2017-03-27 21:27:17 -04:00
Dave Page
95f43d59b8 Revert "Ensure client-side translations are correctly extracted into the message templates."
This reverts commit 82bd97aed0.

There are still issues extracting with these changes.
2017-03-27 13:53:40 -04:00
Sarah McAlear
82bd97aed0 Ensure client-side translations are correctly extracted into the message templates. 2017-03-27 13:24:47 -04:00
Khushboo Vashi
633d2ad28c Fix the bin path preferences. 2017-03-27 12:25:59 -04:00
Akshay Joshi
757500c478 Ensure preferences are properly saved the first time they're set. 2017-03-27 12:19:28 -04:00
Dave Page
b2ab35e990 Don't require an auth key for the static help files. It doesn't play nicely with webkit. 2017-03-26 21:52:31 -04:00
Jonas Thelemann
c391696054 Remove some unnecessary line breaks causing problems with translations. 2017-03-26 20:26:58 -04:00
Dave Page
6152d73f13 Fix some code inspection complaints 2017-03-25 22:04:52 -04:00
Dave Page
a6fa35789c Fix broken markup 2017-03-25 22:04:52 -04:00
Dave Page
4f27afc99b Ensure the spinner doesn't obscure the version 2017-03-25 22:04:52 -04:00
Akshay Joshi
569ceb3906 Modify the web code to allow the Query Tool and Debugger to be opened in new tabs, per settings in Preferences. Fixes #1344
Note that this does *not* enable the runtime to use multiple windows at this stage. It's really only useful in Server mode.
2017-03-24 14:43:56 +00:00
Khushboo Vashi
0eda6033df Allow users to select UI language at login or from Preferences rather than unpredictable behaviour from browsers. Fixes #2190 2017-03-24 14:20:10 +00:00
Dave Page
6cb9ece6fd Decode error messages before trying to use them. 2017-03-24 14:11:31 +00:00
Wayne Winch Jr
5f2a15dd6d Fix deletion of rows where the primary key isn't at ordinal zero. Fixes #2274 2017-03-24 13:32:56 +00:00
Murtuza Zabuawala
d4e88217eb Added timeout in _wait_timeout function in our psycopg2 module.
Fixes debugger module, Added common function to covert 2d array data to dict for BackGrid.
2017-03-24 14:01:59 +05:30
Dave Page
d205550b53 Fix Python 3 compatibility. 2017-03-23 13:43:24 +00:00
Dave Page
8748ee20cb Client side translation. 2017-03-23 12:35:28 +00:00
Atira Odhner
10920404e1 Re-organised the regression directory now we have multiple test suites: move test_utils.py into python_test_utils/ 2017-03-23 11:59:31 +00:00
Atira Odhner
fe9bc379c7 Replace the template selection feature test with one that tests table DDL generation (which also covers template selection). 2017-03-23 11:47:21 +00:00
Atira Odhner
77007996ed Support generation of DDL for tables in Greenplum DB. Fixes #2261 2017-03-23 11:40:06 +00:00
Atira Odhner
0ba0b25290 Move foreign key templates into a default directory. 2017-03-23 11:13:06 +00:00
Harshal Dhumal
720aefbe6f Select2Cell: Check if cell is in multiselect mode before setting default selection of multiple values. Fixes #2283 2017-03-23 10:45:42 +00:00
Dave Page
5b12fd6d5f Client-side translation for the About and Dashboard modules. 2017-03-22 12:57:59 +00:00
Ashesh Vashi
90a369b7de [Extendible][Dashboard] Allow to create a server clicking the
'Add New Server' button on the dashboard, even when the first node is
of not type of 'server-group' in the browser tree.
2017-03-21 22:58:07 +05:30
Harshal Dhumal
2142824448 PRevent an error being displayed if the user views data on a table with no columns. Fixes #2244 2017-03-21 16:40:21 +00:00
Surinder Kumar
aee1492d0d Correct some EDB Postgres Advanced Server branding. 2017-03-21 10:12:26 +00:00
Ashesh Vashi
4eafdbeff6 Resolved a typo - show a '?' after the 'Show timing' preference. 2017-03-21 11:17:35 +05:30
Ashesh Vashi
72128df75c [Extendible][Dashboard] Allow to show the dashboard of their choice for
the selected node in the browser tree.
2017-03-20 19:17:47 +05:30
Sarah McAlear
c9e04fec8d Show tooltips for disabled buttons to help user learning. Fixes #2226 2017-03-20 10:33:35 +00:00
Murtuza Zabuawala
145983d544 Add miissing braces to reverse engineered SQL header block for Functions. Fixes #2246 2017-03-17 12:48:58 +00:00
Murtuza Zabuawala
461086c17d Fix View Data filter options. Fixes #2265 2017-03-17 12:45:59 +00:00
Murtuza Zabuawala
e9702752d9 Fix hadling of DATERANGE[] type. Fixes #2258 2017-03-17 12:40:08 +00:00
Harshal Dhumal
e4134695e5 Fix dropping of databases with Unicode names. Fixes #2243
1. Pickup correct encoding in qtLiteral to decode.
2. While releasing database connection only decode database name if it's not unicode.
2017-03-17 10:33:03 +00:00
Dave Page
648c332488 Import from flask_babel instead of the deprecated flask.ext.babel. Fixes #2264 2017-03-17 10:22:41 +00:00
Atira Odhner
4464be6f43 Fix a typo and remove an unnecessary copy of the column properties template. 2017-03-17 10:02:52 +00:00
Dave Page
b2a74ad26d Fix a bunch of file headers. 2017-03-16 14:27:55 +00:00
Atira Odhner
ae0d8e89eb Fix the path to JS 2017-03-15 17:12:58 +00:00
Atira Odhner
889050b71d Fix quotes to ensure we have valid JS. 2017-03-15 17:11:53 +00:00
Atira Odhner
172b41cba8 Refactor clipboard copying into a separate file for use outside the SQL Editor. 2017-03-15 17:11:11 +00:00
Atira Odhner
4445f9dd63 Add a mechanism for centralising JS translations, to avoid having to render many JS files with Jinja. 2017-03-15 17:10:22 +00:00
Murtuza Zabuawala
ff9d6cd3d5 Fix previous partial commit 2017-03-14 09:34:12 +00:00
Murtuza Zabuawala
cc4c557122 Move Bootstrap files into the distribution format. 2017-03-14 09:23:30 +00:00
Dave Page
1c6f30a0ed Remove \n in translation that was causing a syntax error. 2017-03-13 10:39:36 +00:00
Ashesh Vashi
7767c085c3 Resolved an issue finding the python interpreter on *nix systems, and
Windows 2008 R2 (32 bit), while running the pgAdmin 4 as runtime for
the PostgreSQL one click installers.

- Found a typo in runtime code, we were appending the path using ';' on
  *nix systems too. We should have used ':', and that did not allow the
  os.environ['PATH'] to identify the correct path of the python
  interpreter under the 'venv' directory.

- On Windows 2008, it was not honouring the environment variables, set
  under the Qt application (e.g. pgAdmin4.exe runtime), in the python
  application. (e.g. pgAdmin4.py). We will need to assume that - the
  python interpreter resides under the 'venv' directory outside the
  'bin' directory.

- Also, on windows 2008, it was setting PYTHONHOME environment variable
  to the full path of the pgAdmin4.exe, we need to reset it to 'venv'
  directory, if we find the python interpreter under it.

Thanks Murtuza Zabuawala for tips, and help.
2017-03-10 21:19:06 +05:30
Atira Odhner
28deb34283 Remove some dead code. 2017-03-10 10:27:17 +00:00
Begina Felicysym
5e6c29d5db Update Polish translation 2017-03-10 09:03:18 +00:00
Joao Pedro De Almeida Pereira
d756f2f6c6 Create screenshots when feature tests fail. 2017-03-09 15:34:51 +00:00
Harshal Dhumal
502c827697 Fix numeric control validation in nested schemas. Fixes #2241 2017-03-09 15:23:18 +00:00
Dave Page
670c8a2cc1 Disable HTMLMIN with Python 2.6 as it doesn't work on that older version. 2017-03-09 15:21:52 +00:00
Murtuza Zabuawala
bc63652811 Fix the issue where Import/Export was failing in linux runtime. Fixes #2166
Issue:
Changes done by Ashesh in pgAdmin4.py file for setting up PYTHONHOME variable to sys.prefix was applicable only for windows only.

Additionally I have also added exception handling for file provided by user for Backup/Restore/Import/Export.
2017-03-09 09:54:55 +00:00
Murtuza Zabuawala
533833cb02 Cleanup some ugly code formatting. 2017-03-09 09:27:41 +00:00
Dave Page
18d465e7bc Fix some messages and update the Polish translation from Begina Felicysym 2017-03-09 09:23:19 +00:00
Begina Felicysym
b6fefd89b6 Add a Polish translation 2017-03-08 10:14:18 +00:00
Dave Page
fb44ffffa0 Fix a couple of translation issues, and remove the test French translation files. 2017-03-08 10:13:15 +00:00
Dave Page
1f9fd507b0 Translation updates. 2017-03-07 11:20:20 +00:00
Ashesh Vashi
6cc1fbe739 Import config only when needed, it was causing cyclic dependency when
running the regression suite.
2017-03-07 16:07:10 +05:30
Jonas Thelemann
e3e951e86d Prevent the Slonik logo obscuring the login dialogue on small displays in server mode. Fixes #2230 2017-03-07 10:33:38 +00:00
Jonas Thelemann
c34f5fd2d4 Use "could not" consistently, instead of "couldn't" which was used in some places. 2017-03-07 10:29:54 +00:00
Ashesh Vashi
f2fc1ceba8 Resolved quite a few file-system encoding/decoding related cases.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).

We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.

TODO
* Add better support for non-ascii characters in the database name on
  windows with Python 3
* Improve the messages created after the background processes by
  different modules (such as Backup, Restore, Import/Export, etc.),
  which does not show short-paths, and xml representable characters for
  non-ascii characters, when found in the database objects, and the file
  PATH.

Fixes #2174, #1797, #2166, #1940

Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
2017-03-07 15:31:03 +05:30
Dave Page
3317a02120 Fix regression tests with runtime auth. Fixes #2228 2017-03-06 15:24:52 +00:00
Dave Page
6696b3c316 Authenticate the runtime to the server. Fixes #2228 2017-03-06 14:53:49 +00:00
Murtuza Zabuawala
6d6a3753ee Fix the path to the busy indicator for the treeview which changed when the aciTree module was moved. 2017-03-06 10:36:07 +00:00
Murtuza Zabuawala
da186ea77b Ensure servers are deleted when their parent group is deleted. Fixes #2212 2017-03-06 10:35:27 +00:00
Murtuza Zabuawala
af499c0c9a Show the correct indeterminate state when editing new boolean values. Fixes #2218 2017-03-06 10:30:58 +00:00
Neel Patel
278c64c361 Add missing "Run Now" option for pgAdmin jobs. Fixes #1796 2017-03-06 10:24:43 +00:00
Dave Page
d1b95aeb33 Revert "Rename the top level feature tests directory for consistency with other test directories"
The exclude command line option relies on the directory name. This needs fixing...

This reverts commit 9288d69b62.
2017-03-02 11:23:05 +00:00
Dave Page
9288d69b62 Rename the top level feature tests directory for consistency with other test directories 2017-03-02 11:09:08 +00:00
Harshal Dhumal
ffa8d94e76 Better handling the non-ascii characters for different database objects.
Using 'psycopg2.extensions.UNICODE' (for Python < 3) in the psycopg2
driver for proper conversation of unicode characters. Also - adjusted
the string typecaster to take care of different character types (char,
character, text, name, character varying, and their array types).

Reviewed by: Dave Page, Murtuza Zabuawala & Akshay Joshi
2017-03-02 15:09:28 +05:30
Atira Odhner
e89c54c15d Make feature test app teardown more reliable, and tests faster
- don't spin up app and chromedriver between each test
    - catching signals also tears down the app
    - do layout reset between tests, but assume that tests will not leave a modal opened.

 Use selenium built-in waiting function and fix flakiness around clicking the alertify OK button

    - we think the OK button does not have its event bound when it is created.

If you see more flakiness around clicking the alertify OK button, let us know. The element is clickable but we have to arbitrarily wait for the event to be bound and that timing may vary system to system.

The feature tests are about 7 seconds faster now.

Tira & Joao
2017-03-01 13:20:06 +00:00
Dave Page
59c6be534d Typo fixes. 2017-03-01 12:49:15 +00:00
Khushboo Vashi
ddb8bad201 Fix Sequence ACL SQL for PG 9.3/9.2. 2017-03-01 12:46:58 +00:00
Murtuza Zabuawala
480e00fddf Query tool efficiency.Convert the data as a 2D array instead of dict. Fixes #2036
Incremental back off when polling. Fixes #2038

Initial Patch By: Dave Page
2017-03-01 16:58:51 +05:30
Atira Odhner
0cd914f3f9 Improve visibility of syntax highlighting colours. Fixes #2215 2017-02-28 15:08:36 +00:00
Murtuza Zabuawala
e2e000a371 Remove a debug message. 2017-02-28 14:44:58 +00:00
Navnath Gadakh
1f935d699e Testsuite fixes for 9.3 and 9.2 support. 2017-02-28 14:22:10 +00:00
Dave Page
5dc2326e9d Consistent dialogue configuration 2017-02-27 14:58:22 +00:00
Dave Page
3638d63330 Move pgadmin plugins for codemirror back out of the vendor area. 2017-02-27 13:18:28 +00:00
Dave Page
206b9255c5 Fix CSS path. Fixes #2213 2017-02-27 12:39:13 +00:00
Sarah McAlear
a0a31e55ae Move 3rd party client code into vendor/ directories for ease of maintenance. 2017-02-24 17:01:21 +00:00
Dave Page
b19081421b Ensure primary key column names are quoted in View Data mode of the Query Tool. Fixes #2208 2017-02-24 13:58:23 +00:00
Surinder Kumar
40ff651ef3 Fix display of boolean nulls in the query tool. Fixes #2205 2017-02-24 13:47:37 +00:00
Surinder Kumar
88cae263b2 Fix display of long integers and decimals. Fixes #2039. Fixes #2119. Fixes #2154 2017-02-24 13:39:40 +00:00
Surinder Kumar
c0f2aab001 Ensure we never sort columns on the treeview. Fixes #2185 2017-02-24 13:02:13 +00:00
Harshal Dhumal
b961b2d929 Fix function arguments when generating create SQL. Fixes #2198 2017-02-24 12:42:25 +00:00
Khushboo Vashi
0ba9b7db43 Add PARALLEL SAFE|UNSAFE|RESTRICTED support. Fixes #2089 2017-02-24 12:21:05 +00:00
Harshal Dhumal
1c09b57a1a Fix casting issue with dependents queries. 2017-02-24 10:48:46 +00:00
Harshal Dhumal
685b1ea12f Fix renaming of check constraints when the table name is changed at the same time. Fixes #2201 2017-02-24 10:44:43 +00:00
Harshal Dhumal
5e33fe4e95 Properly handle event trigger functions in different schemas. Fixes #2200 2017-02-24 10:40:11 +00:00
Atira Odhner
fe1aec5de0 Add feature test framework, using selenium and chromedriver for UI testing.
Written by both George and Atira at Pivotal.
2017-02-22 12:41:28 +00:00
Murtuza Zabuawala
89137f57b2 Display un-sized varlen column types correctly in the query tool. Fixes #2151 2017-02-21 13:12:50 +00:00
George Gelashvili
03a161cc0a Don't try to decode connection error strings that are null. 2017-02-16 16:42:19 +00:00
Dave Page
03f292ce51 Tidy up the regression test output a little. 2017-02-16 11:40:54 +00:00
Murtuza Zabuawala
9ad1316990 Various encoding fixes. Fixes #2160 2017-02-16 11:00:40 +00:00
Surinder Kumar
833629d438 Fix exclusion constraint reverse engineered SQL. Fixes #2115 2017-02-16 10:54:21 +00:00
Surinder Kumar
cbaad81f00 Correct node labels in Preferences for EDB functions and procedures. Fixes #2126 2017-02-16 10:47:28 +00:00
Atira Odhner
b6486f3d42 Test suite runner enhancements:
To chase down a set of tests that were failing together, we wanted to run
deeper trees of tests. We changed the behavior of the --pkg argument to
runtests.py so it runs tests under a package and its subpackages, instead
of for a single node.

It gave us more flexibility in what tests to run. This also includes the
--exclude option.

To run tests for a single node, ".tests" can be appended to the package path.

Tira & George.
2017-02-15 15:10:31 +00:00
Dave Page
ae10da4371 Another Python 3.x compatibility fix. 2017-02-13 10:27:16 +00:00
Dave Page
14f181d2ba Fix Python 3 compatibility. 2017-02-13 10:07:38 +00:00
Atira Odhner
1340c1c2ee Make syntax highlighting more visible by making keywords and numbers bolder. 2017-02-13 10:05:54 +00:00
Atira Odhner
ec9e8b79a3 Basic support for viewing tables in Greenplum. Patch from George & Tira @ Pivotal. 2017-02-13 10:02:20 +00:00
Murtuza Zabuawala
6887920295 Ensure FTS parsers and templates are removed prior to creating them when testing. 2017-02-09 12:05:55 +00:00
Murtuza Zabuawala
c34fdaf37d Fix the issue with Jinja conditions in Foreign Data Wrappers, Foreign Servers, User Mapping.
I also did some re-formatting & re-factoring to code to remove all the duplicate code.
2017-02-09 12:05:09 +00:00
Murtuza Zabuawala
a914ea088c Python 2.6 compatibility fixes. 2017-02-08 16:28:04 +00:00
Dave Page
2dc0eab057 Update translation files. 2017-02-06 16:25:16 +00:00
Murtuza Zabuawala
ec93077040 Compatibility fixes for newer versions of Jinja2 (e.g. 2.9.5+). Fixes #2156 2017-02-06 12:53:16 +00:00
Murtuza Zabuawala
c96da34c28 Fix handling of "char" columns. Fixes #2152 2017-02-06 10:59:03 +00:00
Murtuza Zabuawala
4d8683e13a Fix display of graphical query plans for UPDATE/DELETE queries. Fixes #2133 2017-02-06 10:43:31 +00:00
Murtuza Zabuawala
3ea8a7b211 Fix column addition regression test. 2017-02-06 09:46:34 +00:00
Surinder Kumar
4566877188 Handle NULL booleans in the data editor. Fixes #1790 2017-02-05 11:06:48 +01:00
Ashesh Vashi
b7c5039416 Fix process execution. Fixes #1679. Fixes #2144.
Re-engineer the background process executor, to avoid using sqlite as some builds of
components it relies on do not support working in forked children.
2017-02-04 15:26:57 +01:00
Surinder Kumar
54ba1fbe59 Support setting text fields to empty strings or NULL in the data editor grid. Fixes #1790 2017-02-04 14:10:30 +01:00
Neel Patel
c17e201a92 Handle saved directories that no longer exist gracefully. Fixes #2110 2017-02-03 15:19:21 +01:00
Murtuza Zabuawala
bf8c3c4180 Handle sized time/timestamp columns correctly. Fixes #2076 2017-02-03 14:51:58 +01:00
Khushboo Vashi
f2ac6fc6a7 1) Wrong tablespace displayed in table properties. Fixes #2069
2) Message (Connection to the server has been lost.) displayed with Materialized view and view under sql tab. Fixes #2139
2017-02-03 16:13:07 +05:30
Harshal Dhumal
4ef26a528b Allow direct navigation (i.e. typing of paths) in the file manager. Fixes #1911 2017-02-03 10:51:36 +01:00
Murtuza Zabuawala
687a793383 Fix display of zeros in read-only grid editors. Fixes #2138 2017-02-01 13:48:46 +00:00
Murtuza Zabuawala
2d442da9ff Properly handle setting comments and other options on databases with allowconn = False. Fixes #2024 2017-02-01 10:23:45 +00:00
George Gelashvili
6d05302ca1 Rename the 9.1_plus templates to "default" to more appropriately support Greenplum which is based on 8.3. 2017-02-01 09:57:49 +00:00
Murtuza Zabuawala
0da8d1fe4c Another Python 3 fix. 2017-01-31 12:12:22 +00:00
Murtuza Zabuawala
2e5771e164 Python 3 fix for the template loader test. 2017-01-31 10:02:20 +00:00
Atira Odhner
c6b67fc66a Bypass recovery checks with older servers. This is required for Greenplum which is based on PG 8.3 at present. 2017-01-30 17:02:55 +00:00
Surinder Kumar
30e546208f Ensure dialogues cannot be moved under the navbar. Fixes #2047 2017-01-30 14:02:01 +00:00
Murtuza Zabuawala
e8f0cf6d94 Resolve various trigger issues. Fixes #2015
- Allow changing of row/statement flag
- When user update any of the parameter - trigger gets disappear from browser tree. To make it visible user  has to do refresh.
- Edit Mode - 'Row level' trigger was not allowed to edit for "inline edb-spl" trigger function, even though "Row Trigger" is enabled.
- SQL was not generated properly when user change 'Row Trigger', Fires and events.
- Edit Mode - Fires and Events should be allowed to edit for "inline edb-spl" function mentioned with Code in description.
- Edit Mode - For trigger, if user edit parameters like Fires, Events, Code, Row trigger etc. then new OID is getting generated so we should fetch and return new OID in response rather then old trigger OID.
2017-01-30 13:05:15 +00:00
George Gelashvili
19be3529f8 Create a template loader for SQL templates.
This will automatically find the correct version of a template for the server version, and allows us to remove templates that were previously duplicated for different server versions.

Patch by George & Tira at Pivotal. Review by me and Murtuza from EDB.

Discussion: https://www.postgresql.org/message-id/flat/CAHowoHaU9_pkCt%2B1g8dpY3hsXXZmsJZiJH-3-_Hd%2BC1MxiGhtA%40mail.gmail.com#CAHowoHaU9_pkCt+1g8dpY3hsXXZmsJZiJH-3-_Hd+C1MxiGhtA@mail.gmail.com
2017-01-30 11:25:03 +00:00
Surinder Kumar
e01cf748ea Enable/disable NULLs and ASC/DESC options for index columns and exclusion constraints appropriately. Fixes #2061. Fixes #1840. 2017-01-25 13:21:39 +00:00
Murtuza Zabuawala
29a6f2e124 Fix Reset Statistics operation for which the popup messages weren't displaying correctly. Fixes #2091 2017-01-24 10:19:33 +00:00
Dave Page
801c7688a3 A little message cleanup. 2017-01-24 10:18:30 +00:00
Harshal Dhumal
415119d581 Properly remove any event listeners added by subnode control. 2017-01-20 13:24:37 +00:00
Dave Page
ac4178233b Revert "Handle comments on databases with datallowconn=False correctly. Fixes #2024"
This reverts commit e431eb9d8e.
2017-01-20 13:21:05 +00:00
Murtuza Zabuawala
6557433061 Fix display of enum GUCs on users/databases etc. Fixes #2067 2017-01-17 10:45:01 +00:00
Murtuza Zabuawala
28621999f2 Improve display of columns of exclusion contraints and foreign keys in the properties lists. Fixes #2065 2017-01-17 10:25:26 +00:00
Murtuza Zabuawala
e431eb9d8e Handle comments on databases with datallowconn=False correctly. Fixes #2024 2017-01-16 15:42:25 +00:00
Neel Patel
0d4bc0d27d Store layout changes on each adjustment, rather than on unload which is unreliable. Fixes #1967
We also use an async request now, rather than a deprecated sync request.
2017-01-16 15:34:55 +00:00
Khushboo Vashi
024b664c21 Improve the display of role membership on both the properties panel and role dialogue. Fixes #1730 2017-01-16 14:48:25 +00:00
Dave Page
a85861ca57 Remove some comments that don't fit with our normal presentation of generated SQL. 2017-01-16 14:46:44 +00:00
Surinder Kumar
86f6857cb7 Fix sorting of numerics in the statistics grids. Fixes #1938 2017-01-09 15:55:38 +05:30
Murtuza Zabuawala
4c19f93b3b Use the correct OID for retrieving properties of freshly created exclusion constraints. Fixes #1896 2017-01-09 15:05:22 +05:30
Surinder Kumar
e400693126 Add BigNumberJS library for upcoming large number related fixes. 2017-01-09 09:07:21 +05:30
Surinder Kumar
b14f8239d2 Fix a SQL error when reverse-engineering ROLE SQL on EPAS servers. Fixes #1830 2017-01-09 08:14:34 +05:30
Khushboo Vashi
01b2288d57 Ensure columns with types that are not in pg_catalog are handled properly in the table dialog. 2017-01-09 08:05:51 +05:30
Surinder Kumar
d05534ad6c Prevent attempts to access what may be an empty list. Fixes #1832 2017-01-09 07:56:02 +05:30
Neel Patel
d87345ef52 Ensure breakpoints are cleared properly when clearing all of them. Fixes #1745 2017-01-08 19:05:13 +05:30
Navnath Gadakh
1325b30e0b Various improvements to the regression tests, notably avoiding use of signals unavailable on Windows. 2017-01-08 18:48:04 +05:30
Murtuza Zabuawala
bdf9761472 Improve consistency of dialogue controls offered. Fixes #1364 2017-01-08 16:05:34 +05:30
Neel Patel
8d71e888b4 Remember the last used directory in the file manager. Fixes #1910 2017-01-08 15:27:59 +05:30
Dave Page
5d0a0e57e7 Allow selection of message box contents for ease of error message copy/paste. 2017-01-08 15:27:58 +05:30
Neel Patel
2787c5c207 Reset the column list properly if the access method is changed on an index to ensure error handling works correctly. Fixes #2009 2017-01-08 15:27:58 +05:30
Surinder Kumar
6e14bef801 Show icons for unique and exclusion constraints in the dependency/dependents panels. Fixes #2033 2017-01-08 15:27:58 +05:30
Murtuza Zabuawala
879a6bef53 Fix keyboard control of switches in the column grid. Fixes #1394 2017-01-08 15:27:58 +05:30
Neel Patel
a33ee2ae32 Improve detection of the pldbgapi extension and functions before allowing debugging. Fixes #2026 2017-01-08 15:27:58 +05:30
Surinder Kumar
e3c8cb2706 Prevent attempts to create server groups with no name. Fixes #2012 2017-01-08 15:27:58 +05:30
Akshay Joshi
ae809c4506 Properly detect when files have changed in the query tool and set the dirty flag accordingly. Fixes #1807
Note that (like pgAdmin 3) we don't make any attempt to detect if all changes have been undone and completely reverted as that could be very expensive with large scripts.
2017-01-08 15:27:58 +05:30
Surinder Kumar
07e1c61eea Allow setting of effective_io_concurrency on tablespaces in 9.6+. Fixes #2000 2017-01-08 15:27:58 +05:30
Dave Page
a93a99fdc0 Improve query plan tooltip formatting. 2017-01-06 15:38:27 +00:00