Commit Graph

742 Commits

Author SHA1 Message Date
Surinder Kumar
5dbbd8e638 Resolve problem displaying intervals and timestamps. Fixes #1352
1) No handling for INTERVAL type datetime.
For example: executing query
SELECT INTERVAL '15 minutes';
throws json serialization error, because it returns time in timedelta format which is not handled.

Added support to handle timedelta datetime format in DataTypeJSONEncoder class

2) When we try to get BC dates from database raises ValueError: year is out of range
For eg:
SELECT TIMESTAMP '0044-03-15 10:00:00 BC',
It is because pyscopg2 doesn't handle BC datetime format.

So we have defined our method which type cast the datetime value to string in pyscopg2 overriding default behaviour.

Reference:
http://initd.org/psycopg/docs/advanced.html#type-casting-from-sql-to-python
ccf3693be6/pgcli/pgexecute.py
2016-06-14 17:09:47 +01:00
Surinder Kumar
e881695050 Fix query tool horizontal scrolling of results. Fixes #1362
The backgrid-sizeable's css property 'overflow: hidden' was overriding backgrid table css property and It was reproducible only in runtime.
Removed 'overflow: hidden' property from backgrid-sizeabled-columns.css
2016-06-14 15:51:14 +01:00
Harshal Dhumal
b0b21fd46c Avoid showing multiple 'Reset Layout' options under file menu. Fixes #1348
Also restructured code related to reset layout functionality.
2016-06-14 15:01:15 +01:00
Murtuza Zabuawala
62c1369938 Add "Move objects..” functionality to tablespace node. Fixes #1286
Additionally I have removed pre_9.1 sql's & align SQL line indentation as well.
2016-06-14 14:53:48 +01:00
Harshal Dhumal
93706ee40b Preferences and user management help button fixes. Fixes #1318 2016-06-14 12:33:03 +01:00
Murtuza Zabuawala
fe1c86cbbe Fix SSL mode selection. Fixes #1144 2016-06-14 12:26:07 +01:00
Dave Page
0f12defd20 Tell the user where the app server is running. 2016-06-14 12:00:06 +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
Sebastiaan van Stijn
8b770ae479 Fix "global name 'execfile' not defined".
execfile was removed in Python 3.0. This
uses 'exec(open(filename).read())' as an
alternative, which works on all Python
versions.
2016-06-13 16:24:54 +01:00
Murtuza Zabuawala
1f9d0ffc54 Fix comment removal for various nodes. Fixes #1331 2016-06-13 16:22:50 +01:00
Dave Page
970d3aafbf Help buttons for various dialogues. 2016-06-13 16:17:36 +01:00
Surinder Kumar
c331b514a9 Auto-close the date picker when selecting a role expiry date. Fixes #1327 2016-06-10 17:13:06 +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
Murtuza Zabuawala
d9804ae2a2 Add a menu option to reset the layout. Fixes #1248 2016-06-10 16:55:58 +01:00
Harshal Dhumal
6cfa022e35 Validate email addresses when creating the config DB. 2016-06-10 16:19:46 +01:00
Murtuza Zabuawala
fcd33162a9 Fix role valid until date handling. Fixes #1107 2016-06-10 16:12:51 +01:00
Sanket Mehta
d5a91c969c Ensure the properties dialogues create objects in a single transaction/statement. Fixes #1107 2016-06-10 16:07:24 +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
Surinder Kumar
802840fd7f Fix various cosmetic issues with preference dialog
1. Foreign keys listed twice
The label for Exclusion constraint was set to 'Foreign keys'. fixed it.
2. Trigger function, Unique constraint, Primary key should be in title case
3. if user click outside of Preferences window it disappear (it should not disappear)
set preference alertify dialog option closableByDimmer to false.
4. Columns node settings listed twice
Override the register_preferences method in Columns CatalogObjectColumnsModule class
because there are two types of columns node, catalogs columns and tables columns.
so the settings for table columns should also work for catalog columns. Thats why we are not showing preference option for catalogs column node.
Ashesh fixed this issue.
2016-06-08 13:29:49 +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
Murtuza Zabuawala
d7f5e95b2b Fix unwanted space indentation issue in Database node. 2016-06-08 12:56:56 +01:00
Murtuza Zabuawala
47007076cc Fix validation issue causing statistics tab to break if no node is selected on browser tree and user clicks on statistics tab. 2016-06-08 12:48:34 +01:00
Surinder Kumar
a871b15fe9 When any of the docked tab(statistics, dependents & dependencies)
are clicked without selecting any tree node. it gives error in browser
console panel.
Because the node passed is undefined. and check is missing. This is now
fixed by adding check for node passed.
2016-06-08 12:46:30 +01:00
Murtuza Zabuawala
61037d4f60 Fix styling of statistics table. Fixes #1315 2016-06-08 09:30:53 +01:00
Dave Page
8a571df248 Revert "Fix appicon font styling."
This doesn't actually work - there seems to be something funky about
the way the runtime renders mfizz icons on Windows.

This reverts commit 5bbaf7841e.
2016-06-07 14:55:38 +01:00
Dave Page
5bbaf7841e Fix appicon font styling. 2016-06-07 14:08:37 +01:00
Murtuza Zabuawala
4ace8bb5b6 Statistics support remaining object types that support them. 2016-06-07 13:16:12 +01:00
Murtuza Zabuawala
ac2612264c Fix validation of object before using it 2016-06-07 12:37:58 +01:00
Murtuza Zabuawala
20a22731e0 Fix incorrect condition checking for privileges. 2016-06-07 12:37:02 +01:00
Harshal Dhumal
f3fae9d238 Fix email validation and mouse pointer over the Users option. 2016-06-07 09:24:44 +01:00
Harshal Dhumal
e4f21568ad Fix styling of Alertify buttons 2016-06-07 09:23:58 +01:00
Dave Page
124f49869e Fix typo per Susan. 2016-06-07 09:06:29 +01:00
Ashesh Vashi
7d08e42bbe During encryption password is converted to buffer (instead of
bytearray), and that is causing the issue in Python 2.

This was regress of commit-id: 37e2e1d24b
2016-06-07 13:26:43 +05:30
Ashesh Vashi
37e2e1d24b Fixing the decryption issue during restoring the connection on restart.
As we convert the binary password to string during storing the
connection information, we also need to convert it back to byte-arrays
during restoring the connections.

Hence - decode the passowrd using 'utf-8' encoding during storing the
connection information, and encode it during restoring the connections.
2016-06-06 22:48:53 +05:30
Harshal Dhumal
7f1e57c2a6 Remove the header controls of subnode control properly, when removing it
from the VariableControl, and the customized TokenControl in the
fts_configuration javascript module during clean up process.
2016-06-06 18:53:19 +05:30
Murtuza Zabuawala
9ed2530b1f Fixes #1110 - Proper validation for the security labels. 2016-06-06 18:07:13 +05:30
Harshal Dhumal
e3ab4501d5 User management. 2016-06-06 13:34:08 +01:00
Dave Page
4398d1d869 Fix mouse cursor on dashboard quick links. Fixes #1163 2016-06-03 13:10:49 +01:00
Ashesh Vashi
129ca87937 Removing wrongly overridden CSS on the Select2 arrow, and
selection__rendered.
2016-06-03 16:16:15 +05:30
Harshal Dhumal
5eef63c068 Added support for the password cell. 2016-06-03 16:13:43 +05:30
Murtuza Zabuawala
6dbfb7db7e Fixes #1273 - Resolved an issue setting privileges on the SHELL type. 2016-06-03 15:58:10 +05:30
Murtuza Zabuawala
6501f4cf36 Fixes #1280 - Resolved issue in json encoding while dealing with the
date format.
2016-06-03 15:54:04 +05:30
Dave Page
fc654a0934 Let's make it Beta 1 2016-06-03 11:19:57 +01:00
Murtuza Zabuawala
c14ff8e15e Fixes #1300 - Honour show system object in the table dialog, and do not
show catalog schema tables.
2016-06-03 15:45:13 +05:30
Murtuza Zabuawala
9c8637cf0f Corrected the z-index of backgrid-filter so that - it does not take
precedence over top panel.
2016-06-03 15:43:06 +05:30
Murtuza Zabuawala
6036c431b0 Fixes #1283, #1287 - Do not show null description in the create mode,
corrected the index expression on table node.

Reported by Thom Brown.
2016-06-03 15:41:24 +05:30
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
8b54b59f2b Fixes #1285 - Update the comments (description) over the tablespace
properly.
2016-06-03 15:36:47 +05:30
Murtuza Zabuawala
9436542074 Fixes #1223 - Do not allow to drop user from non-super user.
Also - fixed some javascript variable scope issue in the 'delete_obj'
function of nodes.
2016-06-03 15:32:33 +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
Harshal Dhumal
ab9f63d960 Fixes# 1210 - Send the columns SQL with proper mime type. 2016-06-03 15:24:39 +05:30
Murtuza Zabuawala
40ab0b7c88 Fixes #1298 - ACL for the SEQUENCE node were not parsed properly. 2016-06-03 15:23:14 +05:30
Harshal Dhumal
dea4b8ca31 Proper evaluation of the optionsValues in the Backgrid Select2Cell. 2016-06-03 15:20:56 +05:30
Murtuza Zabuawala
c3e2f5f212 Resolve threading issue in the dashboards. 2016-06-03 09:16:11 +01:00
Ashesh Vashi
af1e70ba4f Load the collection node sorted on order by 'label'. 2016-06-03 06:49:20 +05:30
Ashesh Vashi
8313bc9b8a Do proper validation of the server node. 2016-06-03 06:29:23 +05:30
Ashesh Vashi
57f3cbfa3b Select parent node when deleting/dropping the last children. 2016-06-03 06:06:40 +05:30
Ashesh Vashi
05a3d509bc Fixes #1104 - Load the first level node properly, whenever we add first
node under it, and select that node.

This fixes the problem of adding first server.
2016-06-03 05:57:58 +05:30
Susan Douglas
e47671edaa Table dialog and backup tool docs 2016-06-02 14:05:46 +01:00
Murtuza Zabuawala
1f25e90fa4 Fixes #1276 - Resolved an issue - 'TypeError: c is undefined on removing
member type from Type=composite'.
2016-06-02 15:31:07 +05:30
Ashesh Vashi
e18b135f6f Rename the 'Auto Vacuum' tab to 'Parameter' as it represents 'Storage
Parameters'.
2016-06-02 15:28:32 +05:30
Surinder Kumar
2610eaefbe Fixes# 1290 - Use qtLiteral with parameterized values.
When not using qtLiteral, it was result into an error - "unknown
error displayed when modify comments which may special characters on
Materialized view".
2016-06-02 15:08:24 +05:30
Murtuza Zabuawala
bf042d46a2 Check valid DOMElement existance before accessing it while updating the
menu updation.
2016-06-02 15:01:16 +05:30
Murtuza Zabuawala
60208b7ae5 Fixes an issue rendering the dashboard, when data object is missing.
Also, fixed an issue checking the existence of the data object before
accessing it in schema javascript module.
2016-06-02 14:58:14 +05:30
Murtuza Zabuawala
d202366a5d Fixes #1185 - While connecting to the server, application becomes almost
inaccessible.

In stand (without threaded) mode, flask application is not able to
process more than one request at a time. Hence - even the client
(browser) send multiple request, when connecting the server (which is
inaccessible), rest of operations get blocked, as making the connection
with the database server is blocking operation.

In order to fix the issue, we're starting the application with thread
support, in which it will create a separate thread of each request.
2016-06-02 14:51:33 +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
Murtuza Zabuawala
4482bbb1ba Fixed a typo in Type node javascript module. 2016-05-31 23:29:50 +05:30
Khushboo Vashi
b4d195aafe Fixes #1278 - Load the foreign server node javascript module when
databases (not when servers) are being loaded.
2016-05-31 23:26:55 +05:30
Murtuza Zabuawala
afcb62cfd6 Fixes #1262 - Do not allow to delete the default server group. 2016-05-31 13:48:07 +05:30
Ashesh Vashi
79d5e33955 Do not allow to edit properties for the object under a catalog schema. 2016-05-31 00:16:33 +05:30
Surinder Kumar
4aaa58352c Support for the 'Refresh CONCURRENTLY' is applicable only on the
database server >= 9.4.
2016-05-30 17:01:04 +05:30
Murtuza Zabuawala
70cca42d61 Fixes #1147 - 65536 is valid port for PostgreSQL. 2016-05-29 16:04:10 +05:30
Murtuza Zabuawala
f4cb7d8f9c Fixes #1231, #1237
* 'Of type' can't be used with 'Like'.
* 'Of type' usage conflicts with adding columns.
2016-05-29 16:02:08 +05:30
Surinder Kumar
6cb83f08d6 Load nodes under the schema at database level.
The following node module script will be loaded, when first database
node object is added in the browser tree.
* Domains
* Foreign tables
* FTS Configuration
* FTS Dictionary, and
* Functions

Icons for these modules needs to be shown in the dependents list.
2016-05-29 15:33:35 +05:30
Murtuza Zabuawala
c96f28b66f Fixes #1123 - Options other than 'Create' are not available in the
procedure node.

This patch also includes other fixes related 'procedure' node as below:
* Generate correct statement for dropping procedure.
* Fetch the missing schema name for the EXEC script.
* Removed the 'DROP CASCADE' menu options, as it is not supported by
  procedure.
2016-05-29 15:28:17 +05:30
Ashesh Vashi
7e51a8fd56 Improvement in the security tab for each of the nodes.
* Hide the security tab for the objects under the catalog schema.
  Patched by Surinder Kumar, vastly improved by me.

* Make the securtiy label across all the nodes, using the same backbone
  model across the nodes, and make changes in the backend code for the
  same.
2016-05-29 15:19:36 +05:30
Murtuza Zabuawala
100f075510 Fixes #1142 - Update the comments in edit mode for the function,
procedure, trigger function nod objects.
2016-05-28 19:47:12 +05:30
Murtuza Zabuawala
fd0d740acc Fixes #1143 - Update the comments in edit mode for the foreign data
wrapper, and foreign table objects.
2016-05-28 19:45:12 +05:30
Sanket Mehta
2fb1e96e2f Fixes #1113 - Casts should be in alphabetical order. 2016-05-28 18:57:26 +05:30
Susan Douglas
b482ba6ce9 Additional documentation pages for dialogs. 2016-05-27 17:13:36 +01:00
Ashesh Vashi
f247153920 Updated the Alertify to use latest version 1.7.0 2016-05-27 14:54:29 +05:30
Dave Page
b85fa58344 Additional docs from Susan. 2016-05-26 15:29:33 +01:00
Dave Page
7aea8f8536 s/domain-constraints/domain_constraints for consistency. 2016-05-26 15:27:06 +01:00
Paresh More
0dabbf3dad Auto-run setup.py if the config database doesn't exist. 2016-05-26 13:00:27 +01:00
Surinder Kumar
6f2c8cfb31 Fixing couple issues with some of the nodes.
* Added 'catalog' as parent type for the domain, procedure nodes.
* Proper initialization of the FTS Configuration, FTS Parser, FTS
  Dictionary, FTS Template Nodes.
* Proper Indentation in collection.js
2016-05-26 11:19:17 +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
Murtuza Zabuawala
db79f3ff3d Fixes #1150 - Disconnecting a database action should followed by
updating the menu state according to its current state.
2016-05-25 17:44:39 +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
Murtuza Zabuawala
b1aa956af8 Fixes #1118 - Handle null, or empty string for the comments in Jinja2
template for Sequence Node.
2016-05-25 17:37:06 +05:30
Ashesh Vashi
cf0f692d00 Dialog default sizing. 2016-05-25 11:18:05 +01:00
Ashesh Vashi
75fb99651a Center align the switch in backgrid 2016-05-25 13:46:42 +05:30
Ashesh Vashi
798ff03818 Role can update the catalog is not support from PG >= 9.5.
We will set rolcatupdate same as rolsuper from the properties query for
PG >= 9.5
2016-05-25 13:46:42 +05:30