Commit Graph

413 Commits (d53c47e1cf23c60f22bb4b30c013a4d4adad6083)

Author SHA1 Message Date
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