Commit Graph

3371 Commits

Author SHA1 Message Date
Ashesh Vashi
3887c84446 Update the server-information, when connected, and added. 2016-01-11 22:52:13 +05:30
Ashesh Vashi
932ed358e8 Adding the current user information in the server information (when
connected).
2016-01-11 22:11:10 +05:30
Ashesh Vashi
c90c673900 Override the updateInvalid function for uniquer-cotrols. 2016-01-11 21:32:09 +05:30
Ashesh Vashi
2bdd449bd0 Changed the way - we saw the title in the panel to allow the node to
decide, what to saw.
2016-01-11 21:30:46 +05:30
Ashesh Vashi
ca2c693ce4 Renamed the macro DROP to RESET for variables (configuration
parameters).
2016-01-11 13:06:45 +05:30
Ashesh Vashi
97cf27c6b0 Added new custom template hasAny to check if the request has one of the
given key in it or not.
2016-01-11 13:05:35 +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
d2897a334f Using simplejson for jsonify the data of type Decimal, which will used
for numeric type of PostgreSQL, in python using psycopg2.
2016-01-09 18:05:18 +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
b1dbcd0932 [Python 3 compatibility] 'qtLiteral' functions needs to return data in
unicode.
2016-01-07 19:33:51 +05:30
Murtuza Zabuawala
30a316ad09 Use the new functionality to add 'Drop' node in server node, and set
minimum, maximum value for the port.
2016-01-07 18:52:12 +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
5e67ca959d JSONinfy all data in new mode for the Backbone.Model.
Also, takes care about not quoting the identifier, when found any digit
in the name (except it starts with a digit).
2016-01-07 09:40:45 +05:30
Ashesh Vashi
a086820288 Allow to pass array as an input to the qtIdent. 2016-01-07 08:38:55 +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
Ashesh Vashi
456f5bc5b7 Making minor changes:
* Start tracking changes immediatedly depends on the handler.
* Attaching control with the filter in the NodeListByNameControl.
* Generating proper data for the NodeListByNameControl.
2016-01-06 02:25:13 +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
d498b473c7 Changing the caching mechanism to allow it to store at particular level.
Some data will be applicable to parent level, even though - it has
been fetched it from a particular node.

i.e.
roles will be applicable to server level (not particular role level).
2016-01-05 14:36:33 +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
aec96b4933 Adding the node at correct place in the browser tree after creating new object. 2016-01-05 13:02:00 +05:30
Ashesh Vashi
7beaefd1c6 Resolving few issues with the drop/drop cascade object function at front-end.
Also, modified the translation messages as per Dave (Thanks Akshay Joshi for the patch).

Modified the way, we show the error message dialog.
2016-01-05 12:36:33 +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
faa984debc Append the new node under the collection, when it should be. 2016-01-05 02:15:22 +05:30
Ashesh Vashi
8cd0fda406 Pass the data of the parent, not type, while checking in the isParent(..) function 2016-01-04 23:25:21 +05:30
Ashesh Vashi
3a261b429a Added select2 as dependency 2016-01-04 23:23:16 +05:30
Ashesh Vashi
fc9f94c1d0 Return the tuple (status, message) from the psycopg2 driver instead of
returning the response itself.
2016-01-04 21:59:24 +05:30
Ashesh Vashi
6b0f4790da Show the menus "Delete/Drop", and "Drop Cascade", when defined respective functions canDrop(..), and canDropCascade(..) for the node. 2016-01-04 21:57:18 +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
Ashesh Vashi
84843f8c37 Pass the tree item object to the menu objects, which could be used by
the disabled function to make it enable/disable based on the current
selected item.
2016-01-04 17:22:06 +05:30
Murtuza Zabuawala
b309b1ffb8 [Python 3 compability] decode function used in 'needsQuoting' function
is not available on Python 3.
2016-01-04 17:09:15 +05:30
Harshal Dhumal
eed1590a51 Do not close the privilege cell editor, when clicked one of its own
children.

Also, resolved an issue related showing 'unknown' instead of privileges,
when loading existing privileges.
2016-01-04 16:59:47 +05:30
Harshal Dhumal
9d9f17c163 Clear the status-bar on the 'on-status-clear' event of the model 2016-01-04 16:54:06 +05:30
Ashesh Vashi
7358549524 Allow to specify the number of arguments in the qtTypeIdent to make it work
with schema specified object name.

You can use the qtTypeIdent template filter as:
conn|qtTypeIdent(name)
or,
conn|qtTypeIdent(schema_name, name)
2016-01-04 13:41:57 +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
1ba5d79978 Allow to specify the number of arguments in the qtIdent to make it work
with schema specified object name. This will also works with
EntepriseDB's package too.

Also, added dependency on the current connection object, it will allow
us to use the keywords list specific to the database server in futuer.

You can use the qtIdent template filter as:
conn|qtIdent(name)
or,
conn|qtIdent(schema_name, name)
2016-01-04 13:13:46 +05:30
Ashesh Vashi
613be3b6fe Resolved a typo introduced in the previous commit. 2016-01-04 12:58:29 +05:30
Ashesh Vashi
aedf970748 Allow to use the url with/without the node id in the node ajax options
control, also - allow to specify the filter function in the nodes-by-id,
and nodes-by-name control.
2016-01-04 12:43:27 +05:30
Surinder Kumar
f451bd0a83 Set options fetched from the server as it is only when transform function is not provided. 2016-01-04 12:19:00 +05:30
Ashesh Vashi
49373df02d Resolved issues regarding the rows, and column description not return by
the given query in the execute_dict and execute_2darray function in the
psycopg2 driver.
2016-01-04 12:11:52 +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
Murtuza Zabuawala
574105ce5e Resolved an issue related to logging the error message.
Also, fetch the datlastsysoid when making the connection.
2016-01-04 11:18:04 +05:30