Commit Graph

7153 Commits

Author SHA1 Message Date
Ashesh Vashi
d891a9d4d7 Log the executing SQL stataments and error propertly from the psycopg2 driver 2015-12-16 13:34:12 +05:30
Ashesh Vashi
8611e29c60 Pass on the browser tree events by generating node specific 'browser-node' events.
Added a test event in test.js
2015-12-16 13:27:08 +05:30
Murtuza Zabuawala
c3b517cb91 Using bootstrap-swtich for creating a custom backform control for
boolean values. (Modified quite a lot by Ashesh, before committing).

This patch also allow to set the header class in the backgrid through
setting  'cellHeaderClass' property of the schema object for any of the
node. It will allow us to set the different behaviour of the cell in the
list. One of the test case for it is: this will allow us to set the
different width of each column in the list using CSS class(es).
2015-12-04 17:16:49 +05:30
Murtuza Zabuawala
a04ef2de43 Fixed an issue related taking input as raw_input on Python 2.
This is regression, introduced in the commit-id:
209ee78b25
2015-12-04 15:37:06 +05:30
Ashesh Vashi
57d6c3b406 Do validation before enabling the Save button. 2015-12-04 15:33:16 +05:30
Ashesh Vashi
537df154fe Fixing few issues with context menu icon missing.
Introduced a new ajax function to return the HTTP Status code 410 (GONE).
Changed the location of the javascript from each modules, it loads.

Added .swp, .swo files in the .gitignore file
2015-12-04 14:47:18 +05:30
Ashesh Vashi
b36e264fd3 Load collection.js along with the node.js from browser.js 2015-11-28 20:19:29 +05:30
Ashesh Vashi
6d46dfbfba Added new url rules for each node by change NodeView class:
- Renamed the URL 'nodes' to 'children', because - we'll return the
  children for the current node.
- Using the URL 'nodes' to fetch all nodes of its type, when not
  specified the node-id, otherwise regenerate that node info using the
  node-id (it will be used by the refresh function).

- Added the URL 'msql' for fetching modified SQL for the modified
  objects.
- Separated the URL 'deps' (GET/POST methods) to 'dependency' and
  'dependent', because - it will be used to fetch the properties of the
  object, not manipulate it. (as suggested by Dave).

This commit includes the changes related to it in the specific nodes.
(i.e. server-group, and server).

Also, includes a javascript change to ask the user (if they really want
to leave the page, and it is not an accidental navigation by keyboard
shortcuts).
2015-11-23 13:57:43 +05:30
Ashesh Vashi
9bc9025075 Issues resolved related to connection management and collection nodes:
- Allow to release connection using the database OID (did).
- Generate correct url for the collection nodes.
- Removed the server-type from the collection node module, from the
  generate_browser_collection_node(...) function.
- Show version string, and not version integer in the server properties
  (when connected).
2015-11-20 14:55:55 +05:30
Murtuza Zabuawala
e52fd0d349 Resolved an issue related Python 3.x compability regarding setting
property name was same as variable.
2015-11-20 11:34:27 +05:30
Ashesh Vashi
d753374977 Resolved a typo in the version check condition during schema generation.
Also, resolved an issue related showing the correct server variant in
properties dialog, it is a regression introduced by the patch server
version check.
2015-11-20 10:45:35 +05:30
Ashesh Vashi
5ff09223a2 Allow to generate events from the nodes, whenever some any events.
i.e.
'server-connect' and 'server-disconnected' events will be generated
while server gets connected and disconnected respectively.

For demo purpose - listening to the server connection from the test
script.
2015-11-19 23:42:01 +05:30
Ashesh Vashi
77834ccdda Changed the logic to identify the PostgreSQL server variant, when we
connect to the database server. Also, added modified the way, we do
check the node is supported by the server.

Instead of creating separate blueprint for the server types, they will
be independently works. In order to add different variant of the
PostgreSQL, we need to extend the ServerType class, and override the
'instanceOf' function for identification using version string. Please
take a look at the ppas.py for the example.

During checking the back-end support for the node, we will also check
the server type (variant) along with the version within the range of
maximum and minimum version for the node. And, the same support added
for the schema attributes in front-end (JavaScript).

Really thankful to Khushboo Vashi for her initial work in front-end. I
took it further from there.
2015-11-19 23:18:00 +05:30
Khushboo Vashi
3323543b5a Resolved few issues in connection creation in the psycopg2 (pgAdmin
driver)

1. Update correct variable for database information in the connection
   manager.
2. Raise exception, when database not found, instead of return the
   (boolean, error message) tupple.
2015-11-19 14:42:37 +05:30
Ashesh Vashi
80314a9aa3 Allow to connect any of the database using its OID using the connection
manager, once the connection to the maintenance database has been made,
because - we will have did (i.e. Database OID) most of the time for the
any node, and not its name as identifier.

This will allow us to work directly with OID, and we will not need to
bother about renaming of the database name.
2015-11-17 19:14:09 +05:30
Ashesh Vashi
cc3a262de0 Adding pgadmin4.log, and runtime/.qmake.stash to .gitignore, so that -
it does not show up in git status.
2015-11-17 18:22:01 +05:30
Ashesh Vashi
9e67000e7b Removed debug code added in the commit:
ed8600ef89
2015-11-17 12:05:03 +05:30
Ashesh Vashi
3077da0062 Resolved an issue when refreshing any browser node 2015-11-17 11:54:32 +05:30
Khushboo Vashi
ed8600ef89 Adding support for collection browser node. 2015-11-17 11:53:14 +05:30
Murtuza Zabuawala
52b86b6fb4 Added NoneType exception handling in settings & server modules while returning json response. 2015-11-13 16:59:16 +00:00
Murtuza Zabuawala
fe10994fb9 Update requirements files. 2015-11-13 16:57:22 +00:00
Murtuza Zabuawala
64d74d0819 Login Issue fixed, As encryption/decryption returns output in bytes datatype it fails to authenticate in python3. 2015-11-13 16:54:49 +00:00
Murtuza Zabuawala
209ee78b25 First round of Python 3 compatibility fixes. 2015-11-06 10:23:19 +00:00
Murtuza Zabuawala
da6043e7a5 Include PIP requirements files for both Python 2 and Python 3. 2015-11-03 14:13:49 +00:00
Ashesh Vashi
cbab08aaaf Do not set focus to the properties container, when selected any node.
As discussed with Khushboo, we need a negate function of disabled in the
backgrid cell.
2015-11-03 12:36:34 +05:30
Khushboo Vashi
a1170c4c82 Do not allow to edit data from the properties dialog 2015-11-03 11:31:35 +05:30
Ashesh Vashi
45596dffa0 Resolved few undo action on UI tabs - tabs were not getting activated
during undo-redo action. Also, resolved the focus losing issue, which
closing the subnode editor using undo action.

Also, resolved an issue related to 'beforeopen' failed on server node,
due to api changes on tree events.
2015-10-30 13:07:12 +05:30
Ashesh Vashi
30c560f33b Added undo action on some of the UI changes too.
i.e. Switch between the tabs, opening/closing the subnode in edit mode.

Also, removed the Save, Cancel buttons from the subnode editor, it was
looking very redudant. Ctrl+Z for undo, Ctrl+Shift+Z/Ctrl+Y for Redo
shortcut will be good enough for undoing all the changes in the
properties panel.
2015-10-30 02:03:29 +05:30
Prasad Somwanshi
6c62d9eecd sleep api used in pgAdmin4.cpp doesn't seem cross-platform(used from POSIX
specific C header). Either need to be replaced by C++11 equivalent or Qt
one. QThread::sleep seem appropriate to me.
2015-10-29 11:24:07 +01:00
Ashesh Vashi
c1db54b2c2 Allow to save only the partial model changes, undo-redo operation
within the edit/create dialog/panel using the backbone.undo.js.
2015-10-28 22:54:30 +05:30
Khushboo Vashi
c1503ade47 Introducing the infrastructure for colleciton of the subnodes listing,
creation, and editing within the properties panel infrastructure.

We do use the backgrid.js for listing the subnode collection, and for
editing/creating new object for the subnode, we do use the same
infrastructure using the backform.
2015-10-28 22:36:09 +05:30
Ashesh Vashi
c53b57a013 Resolved couple of small bugs introduced during database server
connection management implementation.
2015-10-28 22:34:25 +05:30
Ashesh Vashi
a0cfddffdf Adding maximum session idle time in the config.py file 2015-10-22 11:49:53 +05:30
Ashesh Vashi
7f8ebb01d8 Update document for the develpers as per current implementation 2015-10-20 13:00:05 +05:30
Ashesh Vashi
e27e39a8f3 Added support for the infrastructure for on demand access/create the
server connection.

The BaseDriver and BaseConnection are two abstract classes, which allows
us to replace the existing driver with the currently used. The current
implementation supports to connect the PostgreSQL and Postgres Plus
Advanced Server using the psycopg2 driver.
2015-10-20 12:33:29 +05:30
Ashesh Vashi
b52d72f176 Do flush the changes done after creating the require tables. Because -
it causes an issue performing DDL operations without sending DML to the
database, flush(..) does the job for us, it sends those operations to
the database without committing it.

And, this was causing the issue in current implemenation, while setting
'Administrator' role to the given email-id after the create_role, and
create_user operations during setup.
2015-09-22 11:19:50 +05:30
Ashesh Vashi
4e5e0c125f Resolved an issue related enabling the menus for the selected node 2015-09-21 10:15:41 +05:30
Ashesh Vashi
798398dba5 Fixed few bugs and changed the node create/edit view to use the dialog
(tabbed) UI.

Also, fixed few bugs pointed by Dave:
* Open the URL in separate browser tab/window.
* Fixed few CSS changes for look and feel for the dialog view
* Some of the panels were not listed in the context menu for the
  wcDocker.
2015-08-11 19:19:29 +05:30
Ashesh Vashi
b0b964dd55 Adding the module.js route for each in the NodeView class. 2015-07-30 16:17:34 +05:30
Ashesh Vashi
7d9224ba8b Changed the disabled control looks different from the eneabled.
Changed the width of fieldset-content.
2015-07-23 18:32:05 +05:30
Khushboo Vashi
b4e20d9119 Updated alertify.js to 1.4.1
This release contains some features/bugs, which will be used by connection management functionality
2015-07-23 18:12:06 +05:30
Ashesh Vashi
ffa65f2bfb Using disconnected server icon from pgAdmin III 2015-07-22 22:44:54 +05:30
Ashesh Vashi
146e901327 Show the disabled control in view only mode of properties 2015-07-22 22:27:32 +05:30
Ashesh Vashi
86479453b3 Check for current schema version on startup and update the schema (if
required).
2015-07-22 22:12:42 +05:30
Ashesh Vashi
500271a2ed Showing the dockable pane looked like a dialog. 2015-07-22 17:56:17 +05:30
Ashesh Vashi
8a8c8bbae4 Try to make the look and feel of the UI same as it was earlier for consitency. 2015-07-22 09:46:11 +05:30
Ashesh Vashi
9d372a4555 Updated wcDocker to the latest version 2015-07-20 16:06:17 +05:30
Ashesh Vashi
59e87183a1 Resolved a bug introduced in last commit 2015-07-17 11:22:14 +05:30
Ashesh Vashi
dee3185bae Resolved a bug with the menu enable/disble logic.
Also, do not generate list disabled menu in the context menu
2015-07-17 10:06:04 +05:30
Ashesh Vashi
605f9aba32 Removed the readonly mode from the properties panel for any object.
Changed UI as per feedback from Dave
2015-07-14 13:15:59 +05:30