Commit Graph

212 Commits

Author SHA1 Message Date
Dave Page
970d3aafbf Help buttons for various dialogues. 2016-06-13 16:17:36 +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
Harshal Dhumal
e4f21568ad Fix styling of Alertify buttons 2016-06-07 09:23:58 +01:00
Harshal Dhumal
e3ab4501d5 User management. 2016-06-06 13:34:08 +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
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
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
f247153920 Updated the Alertify to use latest version 1.7.0 2016-05-27 14:54:29 +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
2c6ca7d82c Changed the Select2Control to work more consistently. 2016-05-21 15:41:38 +05:30
Ashesh Vashi
d1e3237e2e Fixed misc issues 2016-05-16 19:51:15 +05:30
Ashesh Vashi
735e9ba67b Show the error div only when it has some data within it.
Changed its colour for better attendtion.

Reduced the margin-bottom for the backform-tab, so that - we can see the
control well in the properties dialog.
2016-05-16 19:05:38 +05:30
Ashesh Vashi
63b951baee Adding initial version for showing statistics for the server, and
database nodes.
2016-05-16 01:58: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
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
Dave Page
81e59be1bd Fix menu width. 2016-05-11 16:34:25 +01:00
Harshal Dhumal
baae12dfcc Improve the password error message color on the 'Change Password' page. 2016-05-10 12:47:51 +05:30
Khushboo Vashi
86c4dd06b5 Fix dependents/dependency icons. 2016-05-06 14:50:17 +01:00
Dave Page
0628ee0425 Dashboards v1 2016-05-05 16:42:16 +01:00
Ashesh Vashi
1b5037afe7 Show the resize handle on the alertify dialog. 2016-04-29 16:19:29 +05:30
Surinder Kumar
c15b7c6cae Remove unnecessary extra classes set in the SqlFieldControl, and also
removed the unnecessary classes for the same in the overrides.css file.
2016-04-29 16:05:55 +05:30
Ashesh Vashi
32e0a0d4b6 Clear the node cache, when an node is created/updated to make sure - we
will always have latest data related to that type of node. Also, fixed
the cache_level for different node types.

This commit also contains fixes for the following issue:
* In extension module - use the 'node-list-by-name' instead of using a
  custom 'node-ajax-options' control, and removed redundant template
  schemas from it.
* When we tries to destroy the select2 object from
  Select2Cell/Select2Control while releasing the properties view,
  sometimes select2 can not find the instance related it for some
  unknown reason. Hence - before removing it we will check for manual
  instance existance using $.data('select2').
* When we traverse through the browser tree nodes very quickly, it tries
  to remove the object before it gets created completely, and results
  into an exception.
* Icon in the select2 drop down list was not visible due to some CSS
  issues.

Apart of that, we will generate two new browser events -
'pgadmin-node:created:<NODE-TYPE>', 'pgadmin-node:updated:<NODE-TYPE>'
whenever a new node is created, or an existing node will be updated.
2016-04-29 15:50:38 +05:30
Murtuza Zabuawala
dac514a4ae Added a new control for rendering the notes to be used by different
tools/utitilities dialog.

Modified a little bit by Ashesh Vashi.
2016-04-28 11:52:06 +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
52aa32a4d2 background-position-x and background-position-y are not supported on the
browser, using background-position instead which is supported in all the
supported browsers.
2016-04-25 13:45:54 +05:30
Murtuza Zabuawala
973e2b1b4a Match the border style of the inline-fieldset with the other control. 2016-04-25 13:34:51 +05:30
Ashesh Vashi
0e50f4b1f3 Fixed the issue - preferences were saved.
It was regression of the commit-id:
533aaa2fa3.
2016-04-25 11:54:02 +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
Ashesh Vashi
9aee9794c1 Fix the properties toolbar at the top of the panel so it's always
visible.

This patch also introduce a callback 'onCreate' for each panel, and
frame, which will be called whenever a panel/frame is being created.
2016-04-18 12:38:56 +05:30
Ashesh Vashi
7522d89890 We would not like to make the overflow hidden for the main panel class
''pg-panel-content'.

This reverts commit 8dd8fc57a4.
2016-04-18 12:12:47 +05:30
Ashesh Vashi
8dd8fc57a4 Revert "Revert "Fix the properties toolbar at the top of the panel so it's always visible.""
This reverts commit e210d2b580.
2016-04-18 12:10:19 +05:30
Dave Page
e210d2b580 Revert "Fix the properties toolbar at the top of the panel so it's always visible."
This reverts commit 6e42e48244.
2016-04-15 15:47:14 +01:00
Arun Kollan
533aaa2fa3 Restyle alertify dialogues so they look like the rest of the app. Still some tweaks needed, but we're 95% of the way there. 2016-04-15 15:30:50 +01:00
Ashesh Vashi
6e42e48244 Fix the properties toolbar at the top of the panel so it's always visible. 2016-04-15 14:44:09 +01:00
Dave Page
4d7d3bd5e1 Icon and toolbar cleanup/consistency. 2016-04-15 13:32:17 +01:00
Dave Page
cf80db66a6 Confine whitespace prewrap to the SQL Editor's output grid to prevent it breaking subnode forms. 2016-04-15 11:11:32 +01:00
Akshay Joshi
c6acbcb5ad Query tool/data editor initial version 2016-04-14 15:04:03 +01:00
Surinder Kumar
40c592a988 Grant wizard. 2016-04-13 16:11:43 +01:00
Arun Kollan
0fb0820c64 Fix CodeMirror borders on dialogues. 2016-04-13 12:24:46 +01:00
Seçkin Alan
de2e7bf8f1 Fix the mouse pointer on the top-level menus. 2016-04-13 09:58:38 +01:00
Dave Page
d53ab31eb8 Button bar styling:
- Left justify the top button bar and match the style of the query tool
- Allow buttons to have tooltips and optional labels
2016-04-08 11:58:47 +01:00
Ashesh Vashi
66441e673a The icons in the Select2Cell, and Select2Control were not visible due to
some CSS change.
2016-04-08 11:10:34 +05:30
Dave Page
4ec4b4f43e Improve dialog title bar colouring. 2016-04-07 22:05:55 +01:00
Arun Kollan
22841f8664 Cleanup styling of wcDocker tab control buttons. 2016-04-07 13:40:16 +01:00
Murtuza Zabuawala
3914f5095a Fix sub-node error display. 2016-04-07 11:51:16 +01:00
Dave Page
01d6b46838 Minor adjustment to the menu font sizing. 2016-04-05 17:10:12 +01:00
Dave Page
34ef5790ba Revert style change introduced in commit f7e4e8bea0 as it's removing padding from all grids. 2016-04-05 16:45:38 +01:00
Murtuza Zabuawala
f7e4e8bea0 Use separate editor for Select2Cell.
This allows us to use the Backgrid key navigation as expected.

This has also resulted into an issue - related unresponsive scrollbar
issue in the SubNodeControl.
2016-04-04 15:36:31 +05:30
Ashesh Vashi
0654bae816 Adding the font used by jQuery-contextmenu (v2.1.0) 2016-04-01 11:57:55 +05:30
Ashesh Vashi
d70535385b Upgraded the jQuery-contextMenu to v2.1.0 (latest stable version) in
order to fix the issue rendering the context menu for longer text.

Needs to do some modification in the existing pgAdmin4 CSS theme to make
it looks like/near the existing look and feel.
2016-03-30 19:08:27 +05:30
Harshal Dhumal
ddd4768937 Backform control for selecting multiple columns.
Usage:

{
  id: 'columns', label: '{{ _('Columns') }}',
  type: 'collection', group: '{{ _('Definition') }}', editable:true,
  canDelete: true, canAdd: true, control: Backform.MultiColumnSelectControl,
  deps: ['index'], node: 'column',
  model: pgBrowser.Node.Model.extend({
    keys: ['column'],
    defaults: {
      column: undefined
    }
  })
}

Note: When using this control model should have column attribute. And node property should be column.
2016-03-22 16:52:34 +00:00
Surinder Kumar
03349f4af6 Update the backform control to support sql-fields.
Following are the enhancements:
1. Added border to control which was missing earlier.
2. Allows user to provide height to sql-field control by specifying extraClasses field in model schema.
3. Defined new classes for sql-field control height in overrides.css
4. Added scrollbar to the control.

Usage:

{
  id: 'definition', label:'{{ _("Definition") }}', cell: 'string',
  type: 'text', mode: ['create', 'edit'], group: 'Definition',
  control: Backform.SqlFieldControl, extraClasses:['custom_height_css_class']
}
2016-03-22 16:36:54 +00:00
Arun Kollan
06c0cf607d Make tabsets look consistent, and square off the properties sections a little. 2016-03-22 13:31:48 +00:00
Murtuza Zabuawala
530f58e66b Add support for inline fieldsets. 2016-03-18 16:54:43 +00:00
Ashesh Vashi
0fcfaa4ff2 Updated the font-awesome to 4.5 (latest) version. 2016-03-18 01:34:45 +05:30
Ashesh Vashi
96b33d1aa8 Updated the jQuery-contextMenu to 1.9.2 (latest stable) version.
Also, added the missing license information about it in the libraries.txt.
2016-03-18 01:11:22 +05:30
Arun Kollan
05e527505d First pass at improving the dialogue borders. 2016-03-16 17:12:41 +00:00
Khushboo Vashi
3df180831f Support textareas in backgrid. 2016-03-16 14:48:09 +00:00
Dave Page
62bd1a21cc Improve message display. 2016-03-15 15:45:40 +00:00
Dave Page
2711d3492d Reduce column header letter spacing a touch. 2016-03-15 14:12:54 +00:00
Arun Kollan
cdd7a1f637 Subnode collection layout improvements, with additional tweaks from me. 2016-03-15 12:30:01 +00:00
Murtuza Zabuawala
9220dcaa97 Fix an issue with uneditable text fields containing large amounts of data, 2016-03-14 09:31:36 +00:00
Arun Kollan
17ed27fbcd Make the dialogue control sizing slightly more compact and properly control textarea resizing. 2016-03-10 15:31:43 +00:00
Arun Kollan
5d6c5bc74d Improve display of error messages on dialogues. 2016-03-09 16:03:24 +00:00
Ashesh Vashi
18d767b107 Updated the wcDocker to make use of wcSplitter (new functionalities),
which will be used by the debugger tool.

Updating the wcDocker from the repository -
'https://github.com/WebCabin/wcDocker' up to commit-id:
0f5690318ce0bf457fdd374dcec7418d22b72e22
2016-02-29 19:36:51 +05:30
Akshay Joshi
b3ff96d2db Add backgrid extensions for use in various tools: select-all, paginator and filter 2016-02-26 11:08:45 +00:00
Ashesh Vashi
6a071292aa Adding two new controls tab and fieldset for better layout management
used in some of the nodes.
2016-01-17 22:21:05 +05:30
Ashesh Vashi
65f70b46ce Remove the objects from the session while JSONify the objects, sent to
the server.

Also - set width of the select2 container to 100% under backgrid.
2016-01-09 21:55:21 +05:30
Ashesh Vashi
429f585a62 Resolved an issue found generating the URL for some other node from some
other.

i.e.
While fetching the database nodes from the role nodes, it was generating
the wrong URL.

Used the parent_type in each node to identify maximum node URL level
using the priority set in the tree node hearachy information, and
generate URL up to that level only.
2016-01-09 19:54:53 +05:30
Ashesh Vashi
1ba9067c60 Introduced the VariableControl, which will be used in role(s),
database(s), and tablespace(s).

Thanks Harshal Dhumal for sharing the original patch.

I've modified a lot to work by fetching the variables later by giving a
url.

Also,
- Introduced the template macros for SECURITY LABELS and VARIABLES.
- Improvised the Backform.Control with better syntactic approach.
- Introduced a jquery function pgMakeVisible(..) to make it visible
  under any obj which can be identified by unique class.
2016-01-09 18:00:02 +05:30
Ashesh Vashi
3a261b429a Added select2 as dependency 2016-01-04 23:23:16 +05:30
Harshal Dhumal
6057259bdc Create the status-bar in the properties dialog, and it will listen for
on-status event from the model.
2016-01-04 13:35:11 +05:30
Ashesh Vashi
c51ecc69e4 Resolved few intialization issue with Node model data, moved the
privileges functionality out of the backform.pgadmin.js to make it more
modular. Now - privileges will expect the privileges data in following
format:
<name_of_the_property> : [{
    "privileges": [{
        "privilege_type": <privilege_type>,
        "privilege": true,
        "with_grant": false
    },
    ...
    ],
    "grantee": <grantee>,
    "grantor": <grantor>
    },
   ...
]

Example:
acl": [{
    "privileges": [{
        "privilege_type": "CONNECT",
        "privilege": true,
        "with_grant": false
     	}],
    "grantee": '',
    "grantor": 'ashesh'
},{
    "privileges": [{
        "privilege_type": "CREATE",
        "privilege": true,
        "with_grant": false
    },{
        "privilege": true,
        "privilege_type": "TEMPORARY",
        "with_grant": false
    }],
    "grantee": test,
    "grantor": ashesh
}]
2015-12-23 12:10:23 +05:30
Ashesh Vashi
1391003e03 Added the backgrid cell for bootstrap switch for representing the
boolean properties.
2015-12-17 19:19:59 +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
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
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
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
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
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
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
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
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
f040efb473 Make the jQuery-contextMenu control globally available as it's used by wcDocker. 2015-03-09 13:14:20 +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
Dave Page
497164d741 Don't restyle scroll bars. 2015-03-03 16:22:28 +00:00
Dave Page
527620d34e Update wcDocker to enable properly translation of the context menu options. 2015-03-03 11:11:15 +00:00
Dave Page
06be3d39be Replace the browser layout code with a new system based on wcDocker.
This is far more powerful, giving us tearable tabsets, versatile docking
and various other features.
2015-02-27 13:47:48 +00:00
Dave Page
b050b871c0 Fix the positioning of the security forms and the colours of the dialogue buttons. 2015-02-26 10:06:22 +00:00
Dave Page
89cc11fb80 This is a big one campers; Add initial support for treeview nodes.
This commit adds the following:

- Storage of server groups in the configuration database
- Creation of a default server group on in the database
- A mechanism for plugging in treeview node types
- A node type for server groups with:
  - Treeview display
  - Custom per-node javascript implementing a menu option/dialogue to add new groups
  - Custom per-node CSS to style the treeview node
- JSON formatted data in response to AJAX requests, including:
  - Success/failure indication
  - Error message
  - Extra info (e.g. stack trace)
  - The original request data
  - Additional return data, e.g. node ID and label etc.
2015-02-15 17:10:53 -05:00
Dave Page
2f154bbed4 The previous commit inadvertently added parts of the browser treeview implementation.
This adds the rest (which still requires further work to make it do anything useful).
2015-02-13 13:24:13 +00:00
Dave Page
b09c1b6c68 Fix the gutter height of the editor when the parent is resized. 2015-02-13 13:13:36 +00:00
Dave Page
f4982efb19 Oh look, a syntax highlighting, line numbering, block folding, auto-complete-capable editor. 2015-02-13 11:57:23 +00:00
Thom Brown
506dd6437f Various HTML 5 fixes. 2015-02-06 13:15:36 +00:00
Dave Page
1b6d7edd01 Add the core of the main browser layout. 2015-02-05 14:06:20 +00:00
Dave Page
e4bec5ad1e Use the full screen width. 2015-01-28 18:02:13 +00:00
Dave Page
65dc4320f1 Replace bootstrap-dialog with Alertify.js, which is more configurable
and supports non-modal dialogs.
2015-01-28 15:57:03 +00:00
Dave Page
53d649de70 Add support for creating dialogs, and add an About dialog.
This adds bootstrap-dialog to help with creation of nice dialogs,
and adds the ability for modules to render Javascript into the
browser, and specify onclick handlers in the menu system.

Also add a basic About dialog, using the new infrastructure and
showing some useful info about the application.
2015-01-27 16:54:39 +00:00
Dave Page
10515431c7 Add authentication and the basis of the browser module.
A user authentication module based on flask-security is added, which
allows users to login and change/recover passwords etc. Custom templates
are included for the user/password UIs.

A new setup script will initialise the user (and later settings) DB,
adding the first user and granting them an Administrator role.

A redirects blueprint module is added to handle simple URL redirects.

A browser module is added and currently renders a skeleton page with
a menu bar, gravatar and jumbotron.

NOTE FOR LATER: Currently this code might make the nice basis for any
web app that needs user management and plugins. Hmmm....
2015-01-22 15:56:23 +00:00
Dave Page
5a485e7ab8 Add a base template with Bootstrap and jQuery ready to go. 2015-01-20 17:02:04 +00:00