Commit Graph

1424 Commits

Author SHA1 Message Date
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
Murtuza Zabuawala
00d2ab0338 Cast OIDs to oid not int, otherwise we lose half the range which results in objects not being accessible. Fixes #1951 2016-11-11 14:36:41 +00:00
Murtuza Zabuawala
6f30cabdbb Resolve various debugger quirks. Fixes #1227
- Prevent the user from executing multiple options at once, resulting in "Execute cannot be used while an asynchronous query is underway********** Error ****" messages

- Stop polling when debugging is complete.

- Don't show the busy cursory when debugging is complete.

- Display info messages properly, and reset them between executions.
2016-11-11 14:25:11 +00:00
Akshay Joshi
7da3ece169 Ensure all changes to rows are stored in the data editor. Fixes #1919 2016-11-07 15:07:43 +00:00
Khushboo Vashi
5a1795e4a0 Fix quoting of objects names for external utilities. Fixes #1603, fixes #1220, fixes #1221 2016-10-21 14:57:19 +01:00
Surinder Kumar
1e66119ef5 Ensure the File Manager honours the file type while traversing the directories. Fixes #1858
When a File Manager is closed by clicking cancel button. Its dom element not destroyed.. So on traversing into directories, when it tries to get currently selected file type, it looks into the dom element but it gets dom of previous dialogs not of currently dialog.

Now whenever an instance of File Manager is closed. its dom elements are also destroyed.
2016-10-21 14:26:12 +01:00
Surinder Kumar
9155c2111f Ensure the grant wizard works with objects with special characters in the name. Fixes #1599 2016-10-21 11:58:46 +01:00
Neel Patel
4e86345c28 Allow debugging of functions and procedures in packages on EPAS. Fixes #1577 2016-10-07 12:46:34 +01:00
Dave Page
a0aaa80029 Allow users to choose SELECT permissions for sequences in the Grant Wizard. Fixes #1835 2016-10-06 10:02:21 +01:00
Dave Page
f9320811d7 Allow users to choose SELECT permissions for tables in the Grant Wizard. Fixes #1835 2016-10-06 09:56:44 +01:00
Surinder Kumar
3b4776ab5f Improve network/server activity feedback for the user. Fixes #1751 2016-09-26 15:10:38 +01:00
Ashesh Vashi
0bf48d06fb Ensure the view data filter box is usable. Fixes #1733 2016-09-26 10:50:09 +01:00
Dave Page
2d222067b9 Fix layout of the filter box. 2016-09-26 10:48:31 +01:00
Dave Page
7a40171300 Handle nested JSON correctly in SlickGrid. Fixes #1713. Fixes #1404 2016-09-21 13:43:27 +01:00
Surinder Kumar
28ce31a022 Save error details when executing to CSV, if no data is returned. This ensures the user gets some feedback rather than nothing at all. Fixes #1592 2016-09-20 11:57:51 +01:00
Murtuza Zabuawala
f991354f9a Handle composite type return values properly in the debugger. Fixes #1662 2016-09-20 11:27:51 +01:00
Ashesh Vashi
7ab0eb158f Ensure jQuery is loaded before SlickGrid. Fixes #1712
Patch by Ashesh with contributions from Surinder.
2016-09-19 17:08:57 +01:00
Murtuza Zabuawala
c044af9585 Bulk delete rows in SlickGrid. Fixes #1696 2016-09-16 16:46:58 +01:00
Ashesh Vashi
2f32427c59 Fix an issue in the Query Tool which causes it to hang in some installations of Chrome 53.0.2785.116 on Mac.
This commit also modifies the Query Tool to load SlickGrid using require.js.
2016-09-16 10:18:49 +01:00
Surinder Kumar
016de5dc88 Fix scrolling in the query tool editor. Fixes #1579 2016-09-15 10:15:00 +01:00
Murtuza Zabuawala
3807ba047b Don't have the query tool try to load arrow_right_spearmint.png. Fixes #1693 2016-09-14 16:12:49 +01:00
Murtuza Zabuawala
db7b8a8fa5 Don't disable the save button when executing a query in the query tool. Fixes #1695 2016-09-14 11:22:54 +01:00
Murtuza Zabuawala
751327eacc Ensure View Data on a table with zero columns doesn't throw an error. Fixes #1677 2016-09-14 10:43:08 +01:00
Murtuza Zabuawala
ffc58b74d2 Allow viewing of long data values in the grid. Fixes #1672 2016-09-12 12:39:40 +01:00
Murtuza Zabuawala
982c291a31 Confirm loss of changes with the user before clearing the query or history, or opening a new file in the Query Tool. Fixes #1666 2016-09-08 09:12:48 +01:00
Surinder Kumar
f13de8b86b Ensure the query tool editor has focus when the tab is selected or when first shown so the user can immediately type/execute. Fixes #1581 2016-09-07 16:20:47 +01:00
Murtuza Zabuawala
8b61aa49d0 Warn the user about unsaved changes to SQL or data before closing the query tool. Fixes #1661 2016-09-05 17:18:43 +01:00
Murtuza Zabuawala
15df12c924 Highlight invalid rows when saving data in the edit grid. Fixes #1637 2016-09-02 16:05:00 +01:00
Murtuza Zabuawala
087332f32e Fix the boolean editor, and warn the user if there are unsaved changed in the edit grid before refreshing. 2016-09-01 11:50:48 +01:00
Neel Patel
8dca4b0e0b Fixed an syntantical issue, which was not supported by QtWebkit.
The issue was regression of the patch for the 'SlickGrid'.

Fixes #1621
2016-08-30 14:43:50 +05:30
Murtuza Zabuawala
c56e4667df SlickGrid Integration in to query tool. Fixes #1618 2016-08-29 20:17:01 +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
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
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
Neel Patel
48a50ce20b Give more useful error messages when unable to debug functions. Fixes #1224 2016-08-17 15:23:10 +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
Surinder Kumar
1bcac0b67c Fix more of the funky keyboard shortcuts. 2016-08-08 15:26:37 +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
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
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
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
Akshay Joshi
e803464ee0 Replace 'Add' buttons with '+' 2016-07-26 12:54:59 +01:00
Dave Page
790b28fb61 Flask-Babel 0.11+ compatibility. Fixes #1496 2016-07-25 17:23:10 +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
Dave Page
60659975ed Stop using deprecated imports. 2016-07-22 16:25:23 +01:00
Dave Page
f783aeac63 Change button label to initcap. 2016-07-21 17:18:15 +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
Harshal Dhumal
83a1535f89 Fix saving of query output as CSV data. Fixes #1405 2016-07-18 15:29:09 +01:00
Harshal Dhumal
c7d25c33f2 Make the Parameter grid use a workflow consistent with other grids. Fixes #1241
1. Altered variable control to make its UI consistent with privileges and Security labels.
2. Changed datamodel.js to handle duplicate rows at datamodel level and not UI/Control level. (See variable control for example)
2016-07-18 11:50:42 +01:00
Ashesh Vashi
9ba6bafb2b Using own version of cursor class to allow us to take care of the
duplicate name in column description.
2016-07-16 10:42:51 +05:30
Murtuza Zabuawala
d15dfac60f FIx a hang in the query tool that could occur if a column type couldn't be determined. Fixes #1438 2016-07-15 12:59:01 +01:00
Murtuza Zabuawala
517a797947 Fix query tool display of various types:
date
reltime
abstime
time with timezone
time without timezone
2016-07-15 11:59:45 +01:00
Surinder Kumar
1a129cf30e File management dialogue enhancements:
- Double click on file/folder icon or name will navigate to the folder/file.
- Selected file/folder can be renamed by Rename button only. Double click rename is removed.
- Filename text box will not hide on smaller screen. Setting minimum width of File Browser fixed it.
- Path at top will only show directory name, not the file name and it is greyed out
2016-07-15 10:50:25 +01:00
Surinder Kumar
9ad0bd1026 Fix clear query option which was opening a query tool in new window in Mac Runtime 2016-07-13 12:35:22 +01:00
Surinder Kumar
47e849dee0 The spinner icon is not visible while executing query or running debugger in Runtime environment specific to Ubuntu. This issue is related to RM#1186
To make it work, we need to explicitly set -webkit-animation property to 'none' for classes "sql-editor-busy-icon.fa-pulse" and ".debugger-container fa-pulse".

'fa-pulse' class is responsible to spin the busy icon, but setting its -webkit-animation property to none will not spin icon but icon and message will be shown.
2016-07-13 12:32:05 +01:00
Neel Patel
d22ea8bf61 Properly support file downloads in the desktop runtime. Fixes #1405. Fixes #1342 2016-07-13 12:26:24 +01:00
Surinder Kumar
52d1af63a5 Scroll to the new row when adding one in the query tool. Fixes #1435 2016-07-07 12:35:44 +01:00
Surinder Kumar
6c6660e576 Resolve "Move to last page" warning shown unnecessarily issue. Fixes #1422 2016-07-05 12:20:40 +01:00
Surinder Kumar
1bd27b847b Grey the SQL panel in edit data mode. Fixes #1423
Introduced a new class 'cm_disabled' with css property background-color to '#EEEEE'
Query tool in edit mode, add the class 'cm_disabled' to set background color to dark and set the cursor property to 'nocursor' to disable editor.
Increased the query tool title padding to fix the issue of whitespace below the title.
2016-07-05 12:11:36 +01:00
Murtuza Zabuawala
3ee8861d44 Fix JSON type rendering. Fixes #1404 2016-07-04 10:05:59 +01:00
Dave Page
aa44122a8a Fix query execution keys in the Mac runtime. Needs more work to sanitize with CodeMirror, but this is a step further. Fixes #1336 2016-06-30 09:56:15 +01:00
Dave Page
0282ef7992 Use a standard colour for error highlighting. 2016-06-29 20:54:08 +01:00
Surinder Kumar
53434030c1 Consistent busy indication. Fixes #1242 2016-06-29 12:16:02 +01:00
Dave Page
1222681888 Revert "Display busy indicators in a much more consistent way. Fixes #1242"
This reverts commit 7fbefa507b which seems to be
missing things.
2016-06-29 10:32:20 +01:00
Dave Page
7fbefa507b Display busy indicators in a much more consistent way. Fixes #1242 2016-06-27 17:09:37 +01:00
Murtuza Zabuawala
e9ad27678f Allow maintenance operations on Index/Primary key/Unique constraints. Fixes #1390 2016-06-24 13:59:16 +01:00
Dave Page
0ee096dbf6 Code tidy. 2016-06-21 15:33:33 +01:00
Dave Page
8908c5b2d3 Code tidy. 2016-06-21 15:29:50 +01:00
Neel Patel
ae99ce7428 Query tool and debugger rendering issue in Linux
Issue : -

Whenever we open any alertify dialog inside the query tool and debugger panel then panel contents are not visible. Query tool panel display as blank.
This issue is only reproducible in Linux.

Solution:-

Animations and transitions are not automatically GPU accelerated and by default use browser's slow rendering engine.
We need to set 'translate3d' value of '-webkit-transform' property in order to use GPU.

After applying this property under linux, Webkit calculates wrong position of the elements so panel contents are not visible.

To make it work, we need to explicitly set '-webkit-transform' property to 'none' for .ajs-notifier, .ajs-message, .ajs-modal classes.

Fixes #1186
2016-06-21 15:24:48 +01:00
Dave Page
7d0fe669ca Code tidy. 2016-06-21 14:21:06 +01:00
Dave Page
3026b470e9 Optimise Python imports. 2016-06-21 14:12:14 +01:00
Surinder Kumar
85a7104e2c Restore should include database name in dialog title like in backup.
Add icons to restore and cancel button in restore dialog.
2016-06-21 12:16:03 +01:00
Murtuza Zabuawala
a1f65e981f Fix an issue in query tool where it was not able to handle special characters in editor title.
Fixes #1381
2016-06-21 09:30:34 +01:00
Surinder Kumar
a563e17f9b Make the backup and restore dialogues non-modal. 2016-06-21 09:25:31 +01:00
Dave Page
991cbcabcb Fix help URLs 2016-06-21 09:23:53 +01:00
Harshal Dhumal
19b4f9e01f Issue Fixed: Now User cannot be created with single (or less than 6 ) character password.
Fixes #1386
2016-06-21 09:20:21 +01:00
Surinder Kumar
eb5a97bc3c Issue: Unable to create backup of database.
Regression of commit id: bc4703c5
2016-06-21 09:17:13 +01:00
Harshal Dhumal
237f93591f Keyboard shortcuts in the Query Tool:
Execute  -->   Ctrl + Shift + E
Explain  -->    Ctrl + Shift + X
Explain analyze  -->   Ctrl + Shift + A
2016-06-20 13:03:46 +01:00
Akshay Joshi
c04b729c1d Set the minimum value to 50 and maximum value to 2000 for the items per page in the result grid 2016-06-20 16:23:49 +05:30
Neel Patel
dd4705af60 Fix debugger issues which could occur if one or more of the ajax calls used to gather execution environment info completed in an unexpected order.
To resolve this, we have callbacks from each ajax call initiate the next one so everything is guaranteed to be sequential.

Fixes #1354
Fixes #1323
2016-06-20 10:21:43 +01:00
Ashesh Vashi
3350eaceab Use the same layout mechanism used as in the panel using elementary
layout support in different dialogs. Fixes #1358.
2016-06-20 12:46:33 +05:30
Dave Page
05e7ee5a05 Second attempt at fixing the file handling code. Tested on Mac and Windows in both desktop and server modes. 2016-06-17 22:05:49 +01:00
Dave Page
2c62d1a4b7 Revert "Make the file manager work a little more sanely with regard to paths."
This breaks things even more on Windows :-(

This reverts commit 35243b9869.
2016-06-17 18:19:51 +01:00
Dave Page
35243b9869 Make the file manager work a little more sanely with regard to paths. 2016-06-17 17:12:04 +01:00
Dave Page
be100b82e6 Missed string change 2016-06-17 15:28:40 +01:00
Dave Page
8c279421f3 Re-order view data options 2016-06-17 14:39:44 +01:00
Dave Page
fd6c43b393 String improvements. 2016-06-17 14:21:14 +01:00
Murtuza Zabuawala
bc4703c5b7 Fix the issue in backup/restore while selecting section-> data option, it was throwing error.. Fixes #1219 2016-06-17 14:01:30 +01:00
Ashesh Vashi
359b1d0176 Use a separate class to remove the footer space in the query editor,
when no of records in a page is set to 0 (or, less than 0). So that -
we do not loose CSS applied on the children DOM Elements dependent of
the original class.

This was regression of commit-id:
f9393aee44

We were loosing the formatting under the grid table due to this change.
2016-06-17 15:11:47 +05:30
Akshay Joshi
f9393aee44 Allow a value of 0 rows per page to mean "no paging". Allow rows to be added on any page.
Fixes #1356
2016-06-16 09:57:44 +01:00
Dave Page
0717b40543 Wording improvements. 2016-06-15 12:42:21 +01:00
Harshal Dhumal
93706ee40b Preferences and user management help button fixes. Fixes #1318 2016-06-14 12:33:03 +01:00
Surinder Kumar
677008af10 Fix file type detection for Python 2.6. Fixes #1330
To find out the type of file selected using FileManager in query tool, we use bitwise OR( | ) on two sets which is not working on python-2.6.9 version.
Now we took list of elements instead of sets to fix the issue.
2016-06-13 16:35:11 +01:00
Dave Page
970d3aafbf Help buttons for various dialogues. 2016-06-13 16:17:36 +01:00
Surinder Kumar
1783e040e6 Fix re-display of privileges on the grant wizard if the back button is used. Fixes #1324
This issue was regression of commit id: 47d7e24bb9
Shouldn't have return statement in view object because it is called by render of wizard object class to render the page in wizard.
2016-06-10 17:08:48 +01:00
Surinder Kumar
9e8e3fc787 Fix file selection on Windows. Fixes #1319
1) Unable to select sql file through query tool on windows OS. In file_manager.js, we are stripping initial slash '/' from the path obtained, but we should not strip if it is full path like 'c:/path/to/dir/filename.ext'

2) Handle directory path if STORAGE_DIR is None. Proper checks are added.
2016-06-10 17:06:22 +01:00
Surinder Kumar
085f8e198e Make the Grant Wizard non-modal. 2016-06-08 16:57:03 +01:00
Surinder Kumar
47d7e24bb9 Add a Help button to the bottom left of the Wizard framework 2016-06-08 14:08:12 +01:00
Neel Patel
17fa6dcc40 Properly quote function names when starting the debugger. Fixes #1225 2016-06-08 13:22:03 +01:00
Surinder Kumar
8eb0742076 Add the Query Tool to the context menu, and improve prioritisation. Fixes #1256 2016-06-08 13:18:59 +01:00
Harshal Dhumal
f3fae9d238 Fix email validation and mouse pointer over the Users option. 2016-06-07 09:24:44 +01:00
Dave Page
124f49869e Fix typo per Susan. 2016-06-07 09:06:29 +01:00
Harshal Dhumal
e3ab4501d5 User management. 2016-06-06 13:34:08 +01:00
Akshay Joshi
967159664e Fixes #1303 Query with Order by clause is not working in Query Tool 2016-06-03 14:40:57 +05:30
Murtuza Zabuawala
1bd37d1f76 Fixes #1275 Issue with Query tool for PPAS - not showing the correct output 2016-06-03 14:34:50 +05:30
Surinder Kumar
e8a52fcd31 Fixes #1295 - Added menu for the 'Grant Wizard' for the trigger function
nodes.
2016-06-02 14:48:24 +05:30
Surinder Kumar
278f18bab8 Fixes #1243 - Allow to resize the columns of the result table in the
Query editor.
2016-06-02 14:46:58 +05:30
Ashesh Vashi
486da5e12c Fixed issue only coming in the runtime.
* Do not need to translate an empty string. (that results into the
  translation header inclusion in the javacript module).
* String.prototype.StartsWith is not an well received function, it has
  not been available in the QWebkit for linux.
2016-06-02 13:15:26 +05:30
Ashesh Vashi
954163b495 Resolved an typo in Backup dialog.
Reported by Susan Douglas.
2016-06-01 15:39:54 +05:30
Ashesh Vashi
adcaeeeaf8 Resolved an typo in Backup dialog.
Reported by Susan Douglas.
2016-06-01 13:43:57 +05:30
Neel Patel
95fe98600f Use the correct URL in the 'View Filtered Rows' dialog for the table
node. It should have not honoured the object node which is selected
afterwards.
2016-05-25 17:56:37 +05:30
Surinder Kumar
f4938beb3c Error out - when user tries to load a binary file in the Query Editor. 2016-05-25 17:51:44 +05:30
Surinder Kumar
4741992ad7 [Grant Wizard] Added support for Materialized View in the Grant Wizard.
Also - done proper view clean up when the wizard is cancelled.
2016-05-25 17:41:02 +05:30
Surinder Kumar
d4644428e6 Fixes #1217 - Added support for the context menu - 'View Data' for the
Materialized View.
2016-05-25 00:02:52 +05:30
Ashesh Vashi
dca6951e74 Fixes #1218 - Backup table not working.
Send parameters in proper format to work it well with table backup.

Thanks Fahar for reporting it.
2016-05-24 12:09:31 +05:30
Ashesh Vashi
0840e6af2d [Backup] Checking for 'only_data' parameter before accessing it.
Reported by Neel Patel
2016-05-24 12:02:49 +05:30
Akshay Joshi
0a354055a9 Adding support for autocomplete in the SQL Editor.
In Query editor, we can use the autocomplete feature by using keyword
combination - 'Ctrl + Space'.
2016-05-21 16:04:29 +05:30
Neel Patel
da28dc8507 Added support for importing and exporting the table data. 2016-05-21 15:43:43 +05:30
Akshay Joshi
3a9b331df6 Change the priority of Tools menu item 2016-05-19 13:53:49 +05:30
Akshay Joshi
8312efe927 Fixed issue of getting/setting preferences options for 'Explain' 2016-05-17 14:38:44 +05:30
Akshay Joshi
216b6b16b5 Fixed issue change 'Auto Commit' option from preferences not reflacted properly on UI and also not set the class variable 2016-05-17 12:31:39 +05:30
Ashesh Vashi
d1e3237e2e Fixed misc issues 2016-05-16 19:51:15 +05:30
Ashesh Vashi
8bd17cb433 [Python 3 compatibility] Introduced a separate HTML safe string function
in 'utils' module, earlier the function -'escape(...)' was converting
the strings to bytes, and that's reason, it was not working on Python 3.
2016-05-16 11:58:42 +05:30
Ashesh Vashi
38bb45ec86 Adding backup as a allowed file type in the backup utility file-control 2016-05-16 02:19:41 +05:30
Sanket Mehta
fcc3d112e2 Integrate the graphical explain module in the Query Editor.
Added few TODO list for the graphical explain module by Ashesh.
2016-05-16 01:07:54 +05:30
Murtuza Zabuawala
5ca63fba48 Initial version for generationg the CREATE/SELECT/EXEC scripts for the
selected node.
2016-05-16 00:25:34 +05:30
Neel Patel
c34e62207a Added support different maintenance operations
i.e. vacuum, analyze, reindex, cluster.

Tweaked by Ashesh for:
* Integrate it with the background process executor, and observer.
* Changed the UI for operation selection from select2 to custom radio
  group.
* Made it consistent with other tools like backup, restore, etc.
2016-05-16 00:16:52 +05:30
Ashesh Vashi
ca62825c90 Set PGPASSWORD environment variable from the process executor before running
the external utility.
2016-05-15 22:29:17 +05:30
Murtuza Zabuawala
2da3a710a1 Added support for restoring a tar/custom type backup file in a object.
Tweaked by Ashesh Vashi as below:
- Integrated it with the background process executor, and observer.
- Improved the message format of the backup module messages.
- Created an item in TODO list to list down the objects in the selected
  backup file.
2016-05-15 20:00:02 +05:30
Murtuza Zabuawala
8ca760ee2b Addd support for taking backup for the server.
Tweaked by Ashesh Vashi to integrate the backgroud process, and also
with some improvements as stated below:
* Resolved an issue loading existing preference.
* Improved the background process observer/executor for supporting
  detalied view.
* Added the utility path preferences in the ServerType class.
2016-05-15 16:04:39 +05:30
Surinder Kumar
1aeab98a2b Load, and save the files in the Query Editor.
Also, the changes done by Ashesh to resolved few issue with the file
manager in 'Select' mode.
2016-05-14 15:29:08 +05:30
Surinder Kumar
938ea21f40 Fixed following issues:
1) Grant wizard close issue.
   2) Moved grant wizard specific css from wizard.css to grant_wizard.css
   3) removed 'ajs_content' css from wizard.css causing padding issue in alertify dialog
2016-05-13 15:04:36 +05:30
Karen Blatchley
949e536bae First round of string review and cleanup. 2016-05-06 13:53:48 +01:00
Akshay Joshi
894002b06d Fixed below review comments for QueryTool
- The button bar be moved out into an HTML template
 - create.sql should perhaps be renamed to insert.sql
 - The "Add Row" button only works if you're on the last page of the resultset.
 - Use one wcDocker instead of two
 - Added support of code folding
2016-05-06 18:09:04 +05:30
Neel Patel
149c59aa4f Fixed below review comments
- Removed the "lineWrapping" option from the codemirror textarea because
  it was creating issue in the code folding.
- Handle the values while depositing during debugging.
- Properly handle the Array values while saving it to sqlite database
  and displayed in input dialog.
- SQL code folding was not supported in codemirror so added the same.
2016-05-06 16:05:32 +05:30
Ashesh Vashi
9dd3aeadb5 Do not close the menu, when clicking on the menu with checkbox.
Introduced a class 'noclose'. Then - menu-item having this class will
not propograte the events to its parent, hence - it will not be closed.

Some of the CSS applicable only to the immediate buttons only, and not
the grand-children.
2016-04-25 22:06:42 +05:30
Ashesh Vashi
085ce50545 Refresh the SQL control, whenever necessary.
Also, remove the CodeMirror object for better clean up process.

When a SQL control/tab is rendered in a hidden element, it does not
render really well. Because - it rely on the height, and width of the
container to count the gutten position, and margin, and other elements.

Hence - whenever the tab, panel becomes visible, we will refresh the
control.
2016-04-22 15:29:23 +05:30
Ashesh Vashi
a5aa6d159a Updated the CodeMirror to the latest stable version (5.14.2).
It has now the 'sql/x-pgsql' mode, which will make the queries more
familiar, and lot more improved addons.
2016-04-22 15:28:34 +05:30
Dave Page
471cd72bb9 Cleanup debugger dashboard 2016-04-20 09:00:25 -04:00
Neel Patel
4f8b018b39 Various tweaks and improvements to the debugger 2016-04-18 08:34:18 -04:00
Surinder Kumar
e7902d4b45 Support procedures and ignore packages that look like schemas properly in PPAS 2016-04-16 10:01:28 +01:00
Dave Page
4d7d3bd5e1 Icon and toolbar cleanup/consistency. 2016-04-15 13:32:17 +01:00
Dave Page
1c0e477823 Icon for the grant wizard. 2016-04-15 11:17:16 +01:00
Dave Page
9c65b73f31 Fix "View Filtered Rows" option. 2016-04-15 08:52:27 +01:00
Neel Patel
12ae40fe62 Procedural language debugger. 2016-04-14 21:36:04 +01:00
Akshay Joshi
c6acbcb5ad Query tool/data editor initial version 2016-04-14 15:04:03 +01:00
Seçkin Alan
af1e38a97a [Python 3 compability] Fixed the issue introduced by the Grant Wizard,
which fixes a issue with the Python 3.
2016-04-14 11:54:29 +05:30
Surinder Kumar
40c592a988 Grant wizard. 2016-04-13 16:11:43 +01:00
Ashesh Vashi
b85f9e6d1a Creating an empty pgAdmin module container (named tools) for keeping
all the sub-modules of type tools.
2016-02-28 12:49:36 +05:30