Commit Graph

868 Commits

Author SHA1 Message Date
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
1b44aed456 Resolved an issue - rendering the SQL control refering to the undefined
variable.

It was regression of the commit-id:
085ce50545.
2016-04-22 22:55:54 +05:30
Ashesh Vashi
085ce50545 Refresh the SQL control, whenever necessary.
Also, remove the CodeMirror object for better clean up process.

When a SQL control/tab is rendered in a hidden element, it does not
render really well. Because - it rely on the height, and width of the
container to count the gutten position, and margin, and other elements.

Hence - whenever the tab, panel becomes visible, we will refresh the
control.
2016-04-22 15:29:23 +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
Ashesh Vashi
58fcbd943a Deleting the object (model & nested model/collection) during showing
the node properties.
2016-04-15 16:14:22 +05:30
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
Ashesh Vashi
af680b724d Improvise the Select2Cell
Select2 does not allow to scroll any of the parent container once it was
opened, and if it was not properly closed.

Also, resolved an issue - existing selection was not working, while
re-rendering the Select2Cell.
2016-04-15 11:01:14 +05:30
Neel Patel
12ae40fe62 Procedural language debugger. 2016-04-14 21:36:04 +01:00
Akshay Joshi
c6acbcb5ad Query tool/data editor initial version 2016-04-14 15:04:03 +01:00
Ashesh Vashi
30d189f499 Load the codemirror as package in the require.js, which will allow us to
load the codemirror addons without any modification.
2016-04-14 12:34:17 +05:30
Surinder Kumar
40c592a988 Grant wizard. 2016-04-13 16:11:43 +01:00
Murtuza Zabuawala
6e237d16ca Add canAddRow/canEditRow/canDeleteRow functionality for Backgrid.
This will allow user to check condition on individual opration(add/edit/delete row) rather than only while rendering the control.
2016-04-13 15:54:17 +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
edf9f25691 Fix general category default. 2016-04-12 17:00:12 +01:00
Ashesh Vashi
9b9126da15 Improvised Select2Cell, and SwitchCell.
Removed the use of separate editor for both of these cell types. There
were two instance of select2 were getting created in the Select2Cell,
one in the Select2Cell itself, and another in Select2CellEditor. And,
loosing the focus mysteriously, and making the scrollbar in the property
dialog non-responsive.

Also, modified the NodeAjaxOptionsCell to use the above logic, and
removed its own version of render function to make it consitent across
the system.

This patch [changes sent by Murtuza] also includes improvisation in the
DeleteCell, and ObjectCell, which will honour now 'canRemoveRow', and
''canEditRow' respective properties of Column.
2016-04-12 16:53:21 +05:30
Ashesh Vashi
e07ebdc049 Moving the messages used in common utilities in a separate javascript. 2016-04-11 17:07:58 +05:30
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
Ashesh Vashi
944bdbb96c Improvised the 'transform/options' function usage with the Select2Cell.
The current implementaton binds the cell/control object, and the ajax
data in the asychronous Cells/Controls with the 'options' functions
extended from the Select2Cell.

The problem starts when we try to fetch the current model from that
options/transform/filter function to do some operation, which does not
require in most of the cases. Except the privileges control - where we
needed the current model for omitting the existing selected object
during transformation, and filtering.

In order resolved the issue, we need a common object, which is shared
among the Cell. In backgrid, the 'Column' object is mong the cell,
hence - implementation logic has been changed to bid the 'Column' object
with the 'options' function and, passed the 'Cell' object as an
arguments.

Because - we do use the common function 'transform' between 'Control'
and 'Cell', we needed make changes in the Select2Control to pass the
Control object as an arguments.

And, make the changes in the privileges control to use the new
implementation. The same logic is also required in some of the
operations, we will be/are working on the table/column nodes.
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
Khushboo Vashi
35a1390251 Resolved few issues in the collection controls. UniqueCollectionControl
was not honouring the change events after execution of the function -
'render' more than one time. Change the label of the Add button to make
it consistent with the Unique Collection Control.
2016-04-01 15:26:15 +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
Ashesh Vashi
a28df1e0a2 Allow to show help string in each of the contorl. 2016-03-24 13:00:15 +05:30
Dave Page
a6e96c5576 Set appropriate default values for the boolean switch control. 2016-03-23 10:24:19 +00:00
Harshal Dhumal
219f208317 Evaluate the disabled option in SwitchControl.
Also - for consistency reason use the same evaluation logic in each of
the control.
2016-03-23 12:51:29 +05:30
Harshal Dhumal
709311b77c Fix issues with multiple subnode forms being open at once when adding rows to a grid. 2016-03-22 17:04:46 +00:00
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
Harshal Dhumal
8189b39b1e Configuration options for switch control from different places should be merged together and not overridden. 2016-03-22 14:28:13 +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
Neel Patel
3969e91563 Add support for Foreign data wrappers, servers and user mappings. 2016-03-17 11:39:38 +00:00
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
Ashesh Vashi
b52a5736ff Improvements in the form/properties dialog control generation, and data
change events.

- In input & textarea control, call the change event on key up (but -
  not on every key up events, wait for sometime before trigger that
  event, so that - we do not overdo that).
- In unique/subnode control, whenever we create new model object, set
  all the required static fields used by pgAdmin form generation logic.
- In NodeAjaxListCell, we don't need to call the list generation
  operation (ajax operation) for each and every cell. They use the same
  shared column object.
2016-03-15 18:58:22 +05:30
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
Khushboo Vashi
2f334673a3 Fix a couple of issues with the unique-collection control:
- Pass the data to evaluation functions like canEdit, canAdd
- Properly honour the canAdd option.
2016-03-11 09:36:26 +00:00
Dave Page
d21e60cc60 Fix default height for text areas. 2016-03-11 09:24:05 +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
Khushboo Vashi
3b03c17f2b Allow enabling/disabling of the Edit button of a sub-node collection grid. 2016-03-10 12:03:33 +00:00
Arun Kollan
5d6c5bc74d Improve display of error messages on dialogues. 2016-03-09 16:03:24 +00:00
Dave Page
5ea822f33e Preferences dialogue. Patch by Ashesh and Khushboo Vashi. 2016-03-07 11:48:53 +00:00
Ashesh Vashi
43116750b4 Honor the visible property of the model schema, and show/hide different
custom contorls based on it.
i.e.
UniqueCollectionControl, TabControl, FieldsetControl, etc.
2016-03-07 16:06:18 +05:30
Ashesh Vashi
cc08708f23 Allow to specify special type - 'group' in schema for the browser node,
which allows to determine certain group to hide/show the whole
tab/fieldset control in the properties, and create dialog.

Using this functionality in the database for the
'default privileges - types', which is not allowed before PG < 9.2 using
the version check.
2016-03-06 18:50:10 +05:30
Ashesh Vashi
ee71cab51e Removed the wrong copyright information in the javascript file, which is
owned by pgAdmin IV.
2016-03-04 17:39:51 +05:30
Murtuza Zabuawala
fa97b5635e Enable/disable edit button functionality conditionally in backgrid. 2016-03-04 11:55:50 +00:00
Murtuza Zabuawala
6ed5e7183e Backform control enhancements:
1) Unique collection control: we have added 'Edit' button in grid, earlier it was only delete button.
2) Sql field control: We have added control to disabled & visible functionality which were not available.
2016-03-04 11:00:17 +00:00
Khushboo Vashi
789ece89fb In the current Backgrid implementation, a cell can be made editable through "editable: true/false" settings. It takes only a boolean value.
Add support for a function that can be set as an editable option value.

For Example:

editable: function(m) { return false; }
2016-03-03 14:03:59 +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
Dave Page
f0e7bd91cb Improve warning message 2016-02-25 11:58:02 +00:00
Akshay Joshi
8186e45844 Adding Numeric control support for Backform.
This patch also includes an issue related to IntegerControl, which does
not emit any error message, when it has some issues.

In order to fix the issue, it will trigger 'pgadmin-session:invalid'
event, when the input value is not an valid integer.
2016-02-22 17:18:08 +05:30
Ashesh Vashi
db9b5f0e0c Resolved the issue related showing errors in the radio control. 2016-02-22 17:00:17 +05:30
Khushboo Vashi
637a5838a8 Resolved a typo in variable name 'version_compatible' 2016-02-10 12:12:06 +05:30
Harshal Dhumal
a0648ed54b Using different strategy to render different type of data based on the
type for the Variable control, instead of using the complex DynamicCell.
2016-02-05 14:35:52 +05:30
Ashesh Vashi
7df9e752bb Adding new control to show SQL query in a control.
It will be used by the nodes like view, which require to show the code
inside as one parameter.

Also, override the events for the Backform.TextareaControl in order
handle some cases, which were not handling the change in textarea
properly in all situations.

Also, we need to show the error message around the input control with
name attribute only.

Author: Surinder Kumar (small twicks by me).
Reviewed by: Ashesh Vashi
2016-02-05 13:37:01 +05:30
Khushboo Vashi
e90fef7b5b Fixes an issue in the backform schema generation logic to allow to use
the NodeAjaxOptionsControl in the subnode grid.
2016-02-03 16:27:15 +05:30
Murtuza Zabuawala
14583e68b2 Allow to run the transform to be evaluated as function in the NodeAjaxOptionsControl 2016-02-01 16:37:05 +05:30
Harshal Dhumal
8f18ff04ae Fix border display issue in unique column collection 2016-01-21 09:11:14 +00:00
Ashesh Vashi
0cea682e88 Initialize and parse the neseted schema too.
Renamed the type of the nested schema type to 'nested' from 'uiLayout'
to be more relatevant.
2016-01-19 17:54:39 +05:30
Ashesh Vashi
7e621c9d7f Using the new logic after using generateViewSchema(...) function for
generating schema properly for the collection for rendering the grid.
2016-01-17 22:31:54 +05:30
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
Murtuza Zabuawala
45240f3850 Use the same schema parameter 'visible' instead of separate one (i.e.
show) for both control and cell, while generating the columns and field
Schema. And, it was resulting into wrong behaviour because of that.

Also - includes the server changes, which was using 'show' parameter
earlier for showing version, when server was connected.
2016-01-15 19:26:03 +05:30
Harshal Dhumal
4e5e7755b5 Make the privilege control to work as expected. Using the
NodeListByNameCell for selecting the grantee.

This patch includes:
- Change the RolePrivilegesModel schema to allow to use the
  NodeListByNameCell for showing grantee, and granter information.
- When setting some value - do not use the silent flag in Select2Cell, which
  will allow the session manager to take the value in account, which is
  used by the NodeListByNameCell.
- Set the top object in the children of the UniqueControl collections.
  [Ashesh Vashi]
- Pass on the node information to the actual data model, so that - we can use
  node information by the control itself. [Ashesh Vashi]
- While adding the new privilege, set the granter to the current user.
  [Ashesh Vashi]
2016-01-15 19:10:49 +05:30
Ashesh Vashi
3a06758b94 Integrate the new mechanism for the data session management in the
variable control, privilege control, which specifies the keys - which
helps identify the data from the collection. Also, resolved an version
compatibility issue with the variable control.
2016-01-15 16:47:22 +05:30
Ashesh Vashi
185ac442fc Fixes few UI issue with the backform controls.
1. NodeAjaxOtions needs to check 'version_compability' in field, and not
   'ver_in_limit' variable. (Thanks Murtuza for pointing that out.)
2. Override the input control to catch the change properly in it.
3. Updated the UniqueCollectionControl and Variable Control to render
   proper template in the header.
2016-01-12 13:40:36 +05:30
Ashesh Vashi
5b9b55ee8e Passing the version_compability information in the controls, and use
them in the custom controls.

This commit also includes the patch from Harshal regarding the broken
updateInvalidate(..) function.
2016-01-12 12:01:47 +05:30
Ashesh Vashi
fc926d7200 Resolved an issue of selection in the Select2Cell, when the value is of
type string and not an array.
2016-01-12 00:09:00 +05:30
Ashesh Vashi
c90c673900 Override the updateInvalid function for uniquer-cotrols. 2016-01-11 21:32:09 +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
8f733aabd0 Added support for select2 control for using select2 instead of simple
select input.
2016-01-09 18:08:48 +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
Murtuza Zabuawala
6062343bf5 Set the value in the model when the value is valid in the
IntegerControl.
2016-01-07 18:50:15 +05:30
Ashesh Vashi
a611f84aad data stringification was not done, when object was not modified, and
passed as it is and that leads to error during fetching the modified
SQL.

Thanks Neel for the point out.
2016-01-07 18:31:13 +05:30
Harshal Dhumal
fe05f2d0c6 Resolved an issue setting proper optionsValues for the Select2Cell. 2016-01-07 13:30:46 +05:30
Harshal Dhumal
df594d56e5 Resolving issue setting proper value for options in Select2Cell 2016-01-07 10:55:22 +05:30
Ashesh Vashi
ee3efc369d Stringify the data only during GET mode. 2016-01-07 08:37:14 +05:30
Harshal Dhumal
67a80ce8dd Adding Select2Cell, which uses select2. 2016-01-07 08:35:20 +05:30
Ashesh Vashi
753793820b Resolved an issue in the sesion tracking, and generating the data
properly.

Also, takes care of setting options to empty array, when it couldn't
fetch the options for the NodeAjaxOptionsControl.

And, generating proper url for 'msql' url in the SQL tab, when creating
new node from the same type of node.
2016-01-06 19:20:55 +05:30
Murtuza Zabuawala
675e79daab Adding the IntegerControl for the backform.
(With few cosmetic changes by Ashesh.)
2016-01-05 16:50:00 +05:30
Ashesh Vashi
bd3492afdf Pass the model properly, while checking enable/disable for Select control. 2016-01-05 15:02:45 +05:30
Ashesh Vashi
9f8a46c820 Passing the control, and field information along with the model while
rendering the Select control.
2016-01-05 13:18:49 +05:30
Ashesh Vashi
1945872e3f Send ajax request as 'application/json', while fetching the modified sql
from the dialog properties.
2016-01-05 02:17:40 +05:30
Ashesh Vashi
3a261b429a Added select2 as dependency 2016-01-04 23:23:16 +05:30
Ashesh Vashi
cd40a07ac3 Resolved a typo in the backform.pgadmin.js, while extending the
Backform.Control.prototype.render(..) function.
2016-01-04 19:27:54 +05:30
Ashesh Vashi
ec7e98e6a7 Allow a node to have two types of parents, modified the code to handle
such situation. This has been modified specifically for the children
under the schema, and catalog nodes.

Also, override the Backform.Control.prototype.render function to allow
to provide the control data to the evaluable functions (i.e. disabled,
visible, required).
2016-01-04 17:52:34 +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
109b367fc3 Allow to specify the options as a function, which returns array in form
of (label, value) tuple in the SelectControl.

We will apply the transform function, while rendering the control, and
not during intialization. This will allow us to generate different
options data based on the dependent values.
2016-01-04 11:34:43 +05:30
Ashesh Vashi
eb83d57c5a Introduced new controls to show the list of a node type (by name and id) as properties of other node.
Resolved a typo in privileges control.
Removed duplicate lines in backform.pgadmin.js
2015-12-28 01:00:20 +05:30
Murtuza Zabuawala
d56ddb9fa4 Adding the SQL tab for the nodes, with 'hasSQL' property set to true, in
create/edit mode. It will fetch the modified sql using the 'msql' url
specific to that node.

Also, modified by Ashesh before committing it.
i.e. Added code comments, cleanup code for the control, etc.
2015-12-26 16:15:40 +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
Ashesh Vashi
cd34ee6dd7 Switch Control was not honouring the user's options for bootstrap switch 2015-12-17 18:41:36 +05:30
Ashesh Vashi
0273c29283 Introduction of the privilege support for database object (Patch:
Murtuza Zabuawala), and Unique column control for backform (Harshal
Dhumal).

Also, includes some fixes for the model, & collection handling.
2015-12-17 18:30:42 +05:30
Ashesh Vashi
c796eee2a7 Do not show the properties in property windows, when they're not
applicable. i.e. not supported by that version.
2015-12-16 16:02:17 +05:30
Ashesh Vashi
54d4cdcd51 Fixed few issues with the backform custom controls.
- Fixed the server backend version check for any schema object.
- Fixed the switch control, it was not enable to toggle the values properly.
- Fixed the editableCell to work properly in the collection properties.
2015-12-16 13:43:04 +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
Ashesh Vashi
57d6c3b406 Do validation before enabling the Save button. 2015-12-04 15:33:16 +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
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
ed8600ef89 Adding support for collection browser node. 2015-11-17 11:53:14 +05:30
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
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
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
146e901327 Show the disabled control in view only mode of properties 2015-07-22 22:27:32 +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
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
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
cd059aaea3 Fix i18n for the docking system. 2015-03-03 10:51:29 +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
b5abf2c640 Cleanup the way stylesheets and scripts are injected into pages by modules. 2015-02-13 14:48:31 +00:00
Dave Page
45d536f524 Remove "vendor" from the global JS path. 2015-02-13 13:36:00 +00:00
Dave Page
567c567351 Add the CodeMirror addons. I can see us needing the majority of these. 2015-02-13 13:29:24 +00: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
Dave Page
bb6a3f9b5b Use minified output when not in debug mode, and non-minified when debugging.
Update jQuery while we're at it.
2015-02-12 10:28:15 +00:00
Dave Page
afb029e284 Factor out client side settings functions into their own JS file,
and add additional variations for getting ints, floats and bools.
2015-02-11 15:50:36 +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
Dave Page
0df7225561 Put the favicon in the right place. 2015-01-20 12:32:44 +00:00