Commit Graph

106 Commits

Author SHA1 Message Date
Navnath Gadakh
81e2bc1e80 Test suite enhancements:
1. The user will specify the tablespace path in test_config.json.in
2.  If tablespace path not found, skip the test cases for that server(Only tablespace test cases)
3.  Add the skipped test summary in the test result. (Now it's showing on console + in log file, but need to update in a final enhanced test summary report. Which is research point we will work on that after finishing all nodes API test cases)
4.  Removed the test_ prefix from the values in the config files.
5. Add tablespace and roles tests
2016-08-09 16:05:40 +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
Murtuza Zabuawala
01252a13cf Further misc quoting/encoding related fixes. 2016-08-01 15:23:06 +01:00
Navnath Gadakh
5c3c543d2e Test suite improvements:
- Test framework support API testing with multiple server for this we need to modify test_config.json(for user it’s test_config.json.in) and test_advanced_config.json(for user it’s test_advanced_config.json.in). Server details of PG and  PPAS are included in both .in files.

- Removed the logic of logging in  the test client on each test scenario(As per Khushboo's comment in previous email).  We need this logic in test cases under ‘browser/tests/’ as for test scenarios like change password and  invalid login test cases as test client should be logged out first. So, as per this the code is slightly modified in ‘browser/tests/’.
2016-07-27 15:33:36 +01:00
Murtuza Zabuawala
06e881570a Fix numerous encoding issues. Fixes #1307. Fixes #1479 2016-07-26 15:05:14 +01:00
Dave Page
60659975ed Stop using deprecated imports. 2016-07-22 16:25:23 +01:00
Ashesh Vashi
8b35a60c08 Generate the proper unique name for the duplicate column name.
Thanks Murtuza for reporting the issue.
2016-07-19 11:27:03 +05:30
Harshal Dhumal
83a1535f89 Fix saving of query output as CSV data. Fixes #1405 2016-07-18 15:29:09 +01:00
Dave Page
f17c2e3b84 Enhancements to the regression test suite.
Navnath Gadakh and Priyanka Shendge
2016-07-18 14:50:21 +01:00
Murtuza Zabuawala
5560d5b334 Properly support the interval type. Fixes #1437 2016-07-18 09:40:45 +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
Ashesh Vashi
2b809523eb [Python 3 Compability] Made changes to make the new server-side session
implementation works with Python 3.
2016-07-11 16:29:06 +05:30
Ashesh Vashi
61698b7b4d Do not use the sqlite for session handling, as the old implementation is
optimized to work from multiple threads. It has too many frequent
transaction from multiple threads, and that tends to result into the
'database is locked' error of sqlite.

With the new implemenation, we're using the caching mechanism, which
keep the data in the memory all the time, and saves it on request
completion, and loads it only for the first time. Also, it will storage
the data using pickle, which will be faster than accessing sqlite.

Fixes #1329
2016-07-08 16:57:46 +05:30
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
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
Murtuza Zabuawala
c702ef9c48 Fix password encryption with non-alpha passwords. Fixes #1371 2016-06-16 20:32:57 +01:00
Ashesh Vashi
fc295f94a3 Remove recusive call of _wait_timeout() due to which python server is crashing 2016-06-16 17:49:02 +05:30
Murtuza Zabuawala
a800b19c87 Fix display of NaN and Bytea data. Fixes #1350. Fixes #1309 2016-06-16 11:20:00 +01:00
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
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
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
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
Murtuza Zabuawala
6501f4cf36 Fixes #1280 - Resolved issue in json encoding while dealing with the
date format.
2016-06-03 15:54:04 +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
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
ca62825c90 Set PGPASSWORD environment variable from the process executor before running
the external utility.
2016-05-15 22:29:17 +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
Harshal Dhumal
14839bf5de Always make sure - we convert the psasword to string in the as_dict
function.
2016-05-14 01:14:26 +05:30
Ashesh Vashi
b22d73ec46 Improvise the pgsql driver to keep the utility names used for different
operation like backup, restore, etc within it.

Also:
* improvised the color combination of the background process logger.
* Removed an unnecessary print statement from the
  get_storage_directory(..) function, also return None if STORAGE_DIR
  is set to None.
2016-05-14 00:48:20 +05:30
Harshal Dhumal
4816f5ed12 Change server password feature 2016-05-13 13:21:20 +05:30
Ashesh Vashi
9cdd1f8098 Added support for the server side file manager, which will be useful in
selection, creation, upload/download files/directories resides on the
server side.

This will be useful for file selection/creation for different server
side utilites like pg_dump, pg_dumpall, pg_restore.
2016-05-13 00:04:32 +05:30
Ashesh Vashi
7f790a7f49 Use the same cursor object of a connection object only from the same
server.

Current implementation keeps the cursor object in the 'g' (current
request context) object identified by the connection-id.
But - it fails to identify a different connection object request, when
we have same database name in different database server, it does not
able to identify it as separate request, Hence - now we will use
server-id qualified identifier for the same object.

Thanks Neel Patel for pointing out the issue.
2016-05-12 13:08:38 +05:30
Ashesh Vashi
9cae686c65 Allow the modules to define the i18n messages, and other messages
required by its javascript module.

This will allow us to load the javascript modules as a static file, and
not as a Jinja2 template. This will increase the load time, as it will
decrease number of templates to be processed during loading those
javascripts.
2016-05-10 16:07:48 +05:30
Ashesh Vashi
e8b4bb909b Do not honour the session-id, longer than 40 characters, instead create
new session-id in that case.
2016-05-09 00:04:37 +05:30
Karen Blatchley
949e536bae First round of string review and cleanup. 2016-05-06 13:53:48 +01:00
Dave Page
0628ee0425 Dashboards v1 2016-05-05 16:42:16 +01:00
Khushboo Vashi
970e0c3540 [Python 3] Fixed an issue iterate the keys from the session loaded from
the sqlite.
2016-04-26 16:16:29 +05:30
Ashesh Vashi
26e9ceaf48 Do not reset the driver registry when the 'load_driver' method of
DriverRegistry is executed second time.

Also, initialize the driver before registering different blueprints,
which uses those driver inside them.

Thanks Khushboo for reporting the issue.
2016-04-25 15:33:54 +05:30
Priyanka Shendge
98d473a7ec Initial version of a regression test framework 2016-04-17 10:39:08 -04:00
Akshay Joshi
03d6fce53c Add support for an affected row count property to the DB interface. 2016-04-12 17:02:54 +01:00
Dave Page
62fcfd928d Add context-sensitive SQL help. 2016-04-12 13:36:06 +01:00
Ashesh Vashi
c304d3e90e Save the database OID of the maintenance database. 2016-04-11 17:15:55 +05:30
Neel Patel
e585ddbdaf Improvise the PostgreSQL driver to fetch the status message.
At the moment, we will only allow to fetch status messages from the
asynchronous connection only, later - we may implement to fetch the
status message from the normal connection too.
2016-04-05 13:29:20 +05:30
Akshay Joshi
5331075ab0 Improvise the psycopg2 wrapped driver for PostgreSQL to show formatted
message on demand.

Also - resolved an issue identifying the aborted transaction while using
the asychronous connection.
2016-04-04 12:29:43 +05:30
Ashesh Vashi
067c269fc8 Convert the value in proper format, as we may only get string values
for integer and numeric type.
2016-03-24 14:29:49 +05:30
Ashesh Vashi
7bce6dd903 The changed value of a multiline/text control was not saved in the
configuration database due to unable to identify the change properly.
Thanks Dave for reporting.

This also includes a support to use a 'text' type of preference, and
show help string next to the control.
2016-03-24 13:00:15 +05:30
Murtuza Zabuawala
12a0cb1ba1 [Python 3] Fixed the issue loading the value for the session key from the sqlite. 2016-03-23 12:40:11 +05:30