Commit Graph

7286 Commits

Author SHA1 Message Date
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
Ashesh Vashi
6ef2384e7f Allow to make change the behaviour of backform control based on other
attribute value.
2015-07-14 09:29:49 +05:30
Ashesh Vashi
544284ba89 Correcting the path of the minifized version of javascripts, when set
config.DEBUG to False (Reported by Khushboo Vashi)
2015-07-01 11:59:24 +05:30
Ashesh Vashi
768306f0cc Updated libraries used in pgAdmin IV 2015-06-30 12:39:02 +05:30
Ashesh Vashi
aa150030eb Introduced a mechanism to load required javascripts at runtime
(lazy loading) using the require.js. This allows us to load the
javascript required for any node, only when it was loaded in the browser
tree. Also, introduced the mechanism to show/edit/create of any node in
a tab panel (wcDocker.Panel).
2015-06-30 11:21:57 +05:30
Ashesh Vashi
35d01bea3e Introduced a class - NodeView to achieve REST API required by the
PostgreSQL node(s).

Browser Tree Node (PostgreSQL object) requires more than just CRUD.
i.e.
   - CRUD (Create, Read, Update & Delete)
    - Reversed Engineered SQL for the object
    - Modified Query in edit mode
      i.e. ALTER TABLE ...
    - Statistics
    - List of dependents
    - List of dependencies
    - Children node list

This class can be inherited to achieve the different routes for each of
the object types/collections.

    OPERATION      |              URL       | Method
    ---------------+------------------------+--------
    List           | /obj/[Parent URL]/     | GET
    Properties     | /obj/[Parent URL]/id   | GET
    Create         | /obj/[Parent URL]/     | POST
    Delete         | /obj/[Parent URL]/id   | DELETE
    Update         | /obj/[Parent URL]/id   | PUT

    SQL (Reversed  | /sql/[Parent URL]/id   | GET
    Engineering)   |
    SQL (Modified  | /sql/[Parent URL]/id   | POST
    Properties)    |

    Statistics     | /stats/[Parent URL]/id | GET
    Dependencies   | /deps/[Parent URL]/id  | GET
    Dependents     | /deps/[Parent URL]/id  | POST

    Children Nodes | /nodes/[Parent URL]/id | GET

    NOTE:
    Parent URL can be seen as the path to identify the particular node.

    i.e.
     In order to identify the TABLE object, we requires information
     about the server -> database -> schema objects.

     Hence, the Parent URL for the TABLE object will be something like
     this as below:
     <int:sid>/<str:database>/<str:schema>

Inherited a new classes ServerGroupView and ServerView, which are
inherited from the NodeView for the implementation of above operations.
2015-06-29 13:41:56 +05:30
Ronan Dunklau
b626eec0fd Inherited the test, about & help module from PgAdminModule class to load
them automatically by PgAdmin.
2015-06-29 13:26:43 +05:30
Ronan Dunklau
eb6580b43a Introduced a PgAdmin class inherited from the Flask, which looks for
submodules inherited from the PgAdminModule instead of regular
Blueprint. This allows us to load the module automatically from the
under the pgadmin directory, and will work to extend the pgAdmin
extension module.

PgAdminModule is inherited from the Blueprint, and bring several
methods:
-  get_own_stylesheets, which returns the stylesheets used by the module
   (excluding its submodules stylesheets)
- get_own_javascripts
- menu_items, which returns a dictionray mapping the old hook names
  (context_items etc) to a list of MenuItem instances

For more specialized modules (as for now, any module that should be part
of the browser tree construction), one can define an abstract base class
defining additional methods.

For example, the BrowserPluginModule abstract base class defines the
following methods:
- jssnippets
- csssnipeets
- node_type
- get_nodes
2015-06-29 12:28:41 +05:30
Ronan Dunklau
9e0b011ec8 Fixed the letter case of the javascript file names.
Also, JSON data should be returned to the client using an
application/json MIME-TYPE using flask's jsonify function.
2015-06-29 12:23:11 +05:30
Dave Page
751f8383fa Handle standard menu items defined by Nodes in the browser.
The File menu now includes a "Create" submenu, and Delete/Rename
options. Nodes can offer Delete/Rename functionality, and the
options on the menu are automatically enabled/disabled based on
the selected node. Each node can also offer Create functionality,
and specify a list of node types (including itself) from which the
option should be made available. The menu is dynamically generated
based on the selected node.

The Context menu on the treeview works in a similar way, except that
nodes can offer any context menu items (we don't allow this on the
top menu, as that should stay consistent to avoid user confusion).
2015-03-13 10:35:12 +00:00
Dave Page
af7dcd49b4 Prevent treeview items from wrapping. 2015-03-11 15:39:54 +00:00
Dave Page
e451ad5ddc Make the SQL Pane "just another tab". This allows the user to position it
as required, and by default makes the UI less cluttered.
2015-03-10 14:31:49 +00:00
Dave Page
fe834d1ed2 Re-organise node structure and loading to make things somewhat more
simple. This also adds the ability to display servers on the treeview.
2015-03-10 13:09:11 +00:00
Dave Page
7f68d6fced Update the setup script and config database to handle versioning.
This allows us to update the configuration database schema as needed,
and use the setup script to update it to the current version.

NOTE: Existing databases will need to be recreated once following
this commit. It doesn't seem worth handling the "upgrade from v0"
case when I'm probably the only active developer right now.
2015-03-09 15:06:10 +00:00
Dave Page
f040efb473 Make the jQuery-contextMenu control globally available as it's used by wcDocker. 2015-03-09 13:14:20 +00:00
Dave Page
c9b0273a14 Fix iFrame panels on Firefox. 2015-03-09 09:57:51 +00:00
Dave Page
dd78a2650c Use the minimised version of the wcDockerSkeleton theme. 2015-03-09 09:46:52 +00:00
Dave Page
caff78053b Update to use the new skeleton CSS from wcDocker, and restore a default
layout if the saved one fails for any reason.
2015-03-05 11:13:15 +00:00