Commit Graph

306 Commits

Author SHA1 Message Date
Ashesh Vashi
e65b605912 Using client-side 'url_for' implementation in the import/export module. 2017-06-16 00:00:17 +05:30
Ashesh Vashi
07580b8444 Using client-side 'url_for' implementation in the maintenance module. 2017-06-15 23:50:53 +05:30
Surinder Kumar
2a87585665 Fix script options which were inadvertently broken in the query tool tab naming patch. 2017-06-15 12:19:47 +01:00
Murtuza Zabuawala
8376d33d77 Fix canceling of Grant Wizard on Windows. Fixes #2142 2017-06-15 11:42:13 +01:00
Surinder Kumar
fdc9eed514 Ensure text editors render in an appropriate place on the results grid. Fixes #2477 2017-06-14 12:18:27 +01:00
Surinder Kumar
57d866f7b7 Use a more sensible name for Query Tool tabs. Fixes #2482 2017-06-13 11:34:24 +01:00
Shruti B Iyer
1208206bc0 Initial re-vamp of the History tab. 2017-06-13 09:50:41 +01:00
Ashesh Vashi
0243d886c3 Using client-side 'url_for' implementation in the Grant-Wizard module. 2017-06-13 11:47:55 +05:30
Ashesh Vashi
f9a3878220 Using client-side 'url_for' implementation in the restore module. 2017-06-13 11:00:17 +05:30
Ashesh Vashi
4a46f7b1eb Using client-side 'url_for' implementation in the backup module. 2017-06-13 10:59:11 +05:30
Surinder Kumar
af43ccfc07 Teach dialogues about Escape to cancel, Enter to Save/OK, and F1 for help. Fixes #1535 2017-06-12 16:43:29 +01:00
Murtuza Zabuawala
3743c6e86e Refresh the SQL editor view on resize to ensure the contents are re-rendered for the new viewport. Fixes #2078 2017-06-12 13:25:52 +01:00
Surinder Kumar
49976b1934 Fine tune result grid column sizing now we don't have checkboxes. 2017-06-09 09:24:20 +01:00
Surinder Kumar
73c6f1ca3b A little leanup of the styling of the edit grid 2017-06-08 17:06:34 +01:00
Sarah McAlear
01bfa88309 Improvements to the Query Results grid:
- Improve the UI
- Allow copy/paste from sets of rows, columns or arbitrary blocks of cells

Patch by Matt, Shruti, Joao and Sarah @ Pivotal

Fixes #2476
2017-06-08 13:31:36 +01:00
Surinder Kumar
2fddf750e6 Retain column sizing in the query tool results grid when the same query is re-run multiple times in a row. Fixes #1971 2017-06-08 12:41:56 +01:00
George Gelashvili
8d8e7dab3c Extract row staging into it's own module with tests. 2017-06-07 14:17:10 +01:00
Shruti B Iyer
0d05385585 Update the styling to use the set of grays defined in the WIP style guide. 2017-06-07 13:57:49 +01:00
Ashesh Vashi
ae80976689 Using the client-side translation using the client-side 'gettext'
implementation.

This is the first step towards 'Avoid creating the javascript modules
using Jinja templates'.
2017-06-07 15:53:05 +05:30
Murtuza Zabuawala
7e9f82bc17 Prevent attempts to debug procedures with variadic arguments. Fixes #1466 2017-06-06 12:58:52 +01:00
Khushboo Vashi
d21cbb8b1f Handle composite primary keys correctly when deleting rows in the Edit Grid. Fixes #2425 2017-06-06 09:58:47 +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
dba64e77f1 Order columns in multi-column pkeys correctly. Fixes #2417 2017-05-26 11:04:32 -04:00
Surinder Kumar
1db81da020 Fix JS error when selecting a single grid cell. 2017-05-16 08:44:29 +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
Surinder Kumar
0e7efc0cf8 Track disabled rows properly in the edit grid. 2017-05-12 16:42:06 +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
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
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
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
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
Matthew Kleiman
d663d553c5 Allow column or row selection in the query tool. Fixes #2216 2017-04-18 13:28:45 +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
c758920890 Properly handle EXPLAIN queries entered directly by the user in the query tool. Fixes #2287 2017-04-06 09:46:42 +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
Khushboo Vashi
efb077b7f7 Fix error highlighting in the query tool. Fixes #2291 2017-03-31 20:06:55 -04:00
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
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
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
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
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
Murtuza Zabuawala
461086c17d Fix View Data filter options. Fixes #2265 2017-03-17 12:45:59 +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
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
Atira Odhner
28deb34283 Remove some dead code. 2017-03-10 10:27:17 +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
fb44ffffa0 Fix a couple of translation issues, and remove the test French translation files. 2017-03-08 10:13:15 +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
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
Dave Page
3638d63330 Move pgadmin plugins for codemirror back out of the vendor area. 2017-02-27 13:18:28 +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
Murtuza Zabuawala
89137f57b2 Display un-sized varlen column types correctly in the query tool. Fixes #2151 2017-02-21 13:12:50 +00:00
Murtuza Zabuawala
a914ea088c Python 2.6 compatibility fixes. 2017-02-08 16:28:04 +00:00
Surinder Kumar
4566877188 Handle NULL booleans in the data editor. Fixes #1790 2017-02-05 11:06:48 +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
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
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
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
Neel Patel
d87345ef52 Ensure breakpoints are cleared properly when clearing all of them. Fixes #1745 2017-01-08 19:05:13 +05:30
Murtuza Zabuawala
bdf9761472 Improve consistency of dialogue controls offered. Fixes #1364 2017-01-08 16:05:34 +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
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
Dave Page
f221194bcc Update copyright notices for 2017. 2017-01-04 13:33:32 +00:00
Dave Page
87d4937726 Minimise memory requirements for rendered cells and rows in SlickGrid. Fixes #2035
- The CSS class 'slick-row' has been renamed to 'sr'

- The CSS class 'slick-cell' has been renamed to 'sc'

- The SQL Editor included an unused 'normal_row' class on each row which has been removed as it was unreferenced in the code or CSS.

The intent of these changes is to minimise memory usage by the grid, by saving a few bytes per row/cell.
It's questionable how much difference this actually makes given that SlickGrid updates the document so it
only includes the visible rows on the fly, but every little helps.
2016-12-22 17:43:42 +00:00
Dave Page
d3862eef3f Fix some additional table styling inconsistencies. 2016-12-19 14:26:33 +00:00
Khushboo Vashi
5008872203 Ensure the SQL editor has enough space to show block folding arrows in the gutter. 2016-12-19 11:35:27 +00:00
Harshal Dhumal
5adc6b71ca fix display of double scrollbars on the grant wizard. Fixes #2028 2016-12-19 09:25:14 +00:00
Murtuza Zabuawala
6fc8f040ff Allow users to enable wrapping of code in SQL boxes. Fixes#2025 2016-12-16 17:07:41 +00:00
Khushboo Vashi
53ea991907 Properly size the SQL Editor gutter as the width of the line numbers increases. Fixes #1780 2016-12-16 13:04:16 +00:00
Akshay Joshi
686237413c Use more sensible column sizes for the data output in the query tool. Fixes #1789
Per Akshay:

I have tried to get the width of the content but we are sending complete data as collection to the SlickGrid. We will have to fetch the content of each column and figure out the maximum length for that column by iterating all the rows is too expensive. Apart from that to set the width in 'ch' we will have to do it using css. With current implementation we are setting the column option of the SlickGrid from javascript code.

I have fixed this issue by setting the width of the columns based on data type. I have set the width of boolean column to 60, all the numeric/integer columns to 80 and for all other data types it is 20% of the container width as 33% is too wide.
2016-12-12 10:13:53 +00:00
Khushboo Vashi
53481023fa Properly sort rows by the pkey when viewing first/last 100. Fixes #2007 2016-12-12 10:06:34 +00:00
Dave Page
4a280b2517 Only show the filename in query tool tabs, not the whole path. 2016-12-09 12:42:30 +00:00
Akshay Joshi
b8d03d5dc2 Don't cast data when saving in the edit grid, so errors are seen and data doesn't get silently modified. Fixes #1994 2016-12-09 12:05:46 +00:00
Khushboo Vashi
81841cdb3c Treat databases with datallowconn=false appropriately. Fixes #1801 2016-12-09 11:59:13 +00:00
Dave Page
eb337cadce Remove unused rows per page config option. 2016-12-05 13:59:44 +09:00
Surinder Kumar
a64824a851 Fix various encoding issues with multibyte paths and filenames.
Fixes #1986. Fixes #1940.
2016-12-05 13:10:56 +09:00
Dave Page
394381bf75 Add search/replace support to the Query Tool, including regexp matching. Fixes #1765 2016-11-24 15:38:39 +00:00
Murtuza Zabuawala
b7c819e912 Render column headers at the correct width in the query tool under Firefox. Fixes #1680 2016-11-18 14:24:16 +00:00
Murtuza Zabuawala
6e68e7501a Display messages and notices received in the query tool. Fixes #1953 2016-11-18 13:53:57 +00:00
Dave Page
29743ad3c4 Allow selection of process output and commands. 2016-11-18 12:05:19 +00:00
Dave Page
687f1f640f Prevent users selecting elements of the UI that shouldn't be selectable. Fixes #1976 2016-11-18 10:55:00 +00:00