[pgadmin-hackers] pgAdmin 4 commit: Refresh the SQL control, whenever necessary.

2016-04-22 Thread Ashesh Vashi
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 comes in active position, we will refresh the control.

Branch
--
dashboards

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f9a06d5e01318b2c6f73da4b8856ef480d5c44ec

Modified Files
--
.../browser/templates/browser/js/browser.js|  1 +
web/pgadmin/misc/sql/static/js/sql.js  |  3 ++
web/pgadmin/static/js/backform.pgadmin.js  | 53 --
.../tools/debugger/templates/debugger/js/direct.js |  3 +-
4 files changed, 45 insertions(+), 15 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Refresh the SQL control, whenever necessary.

2016-04-22 Thread Ashesh Vashi
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.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=085ce50545e06c94087f1979e45673b136726fb5

Modified Files
--
.../browser/templates/browser/js/browser.js|  1 +
web/pgadmin/misc/sql/static/js/sql.js  |  3 ++
web/pgadmin/static/js/backform.pgadmin.js  | 53 --
.../tools/debugger/templates/debugger/js/direct.js |  3 +-
4 files changed, 45 insertions(+), 15 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Updated the CodeMirror to the latest stable version (

2016-04-22 Thread Ashesh Vashi
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.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=a5aa6d159a0e57b1ab725bbe74ce98518fa30541

Modified Files
--
libraries.txt  |2 +-
.../browser/templates/browser/js/browser.js|4 +-
web/pgadmin/static/css/codemirror/codemirror.css   |  109 +-
web/pgadmin/static/js/backform.pgadmin.js  |4 +-
.../static/js/codemirror/addon/comment/comment.js  |   38 +-
.../static/js/codemirror/addon/dialog/dialog.css   |4 +-
.../static/js/codemirror/addon/dialog/dialog.js|8 +-
.../js/codemirror/addon/display/autorefresh.js |   47 +
.../static/js/codemirror/addon/display/panel.js|   26 +-
.../js/codemirror/addon/display/placeholder.js |6 +-
.../static/js/codemirror/addon/display/rulers.js   |3 +-
.../js/codemirror/addon/edit/closebrackets.js  |  274 ++-
.../static/js/codemirror/addon/edit/closetag.js|   11 +-
.../js/codemirror/addon/edit/continuelist.js   |   18 +-
.../js/codemirror/addon/edit/matchbrackets.js  |2 +-
.../js/codemirror/addon/fold/comment-fold.js   |4 +-
.../static/js/codemirror/addon/fold/foldgutter.js  |   26 +-
.../js/codemirror/addon/hint/anyword-hint.js   |2 +-
.../static/js/codemirror/addon/hint/css-hint.js|4 +
.../static/js/codemirror/addon/hint/show-hint.js   |  235 +-
.../static/js/codemirror/addon/hint/sql-hint.js|  206 +-
.../static/js/codemirror/addon/lint/html-lint.js   |   46 +
.../js/codemirror/addon/lint/javascript-lint.js|2 +-
.../static/js/codemirror/addon/lint/lint.js|   59 +-
.../static/js/codemirror/addon/merge/merge.css |1 +
.../static/js/codemirror/addon/merge/merge.js  |  378 ++--
.../static/js/codemirror/addon/mode/multiplex.js   |   29 +-
.../js/codemirror/addon/mode/multiplex_test.js |2 +-
.../static/js/codemirror/addon/mode/simple.js  |2 +-
.../static/js/codemirror/addon/runmode/runmode.js  |2 +-
.../js/codemirror/addon/runmode/runmode.node.js|   81 +-
.../codemirror/addon/scroll/annotatescrollbar.js   |   76 +-
.../js/codemirror/addon/scroll/simplescrollbars.js |   28 +-
.../js/codemirror/addon/search/jump-to-line.js |   49 +
.../codemirror/addon/search/match-highlighter.js   |   82 +-
.../codemirror/addon/search/matchesonscrollbar.js  |   17 +-
.../static/js/codemirror/addon/search/search.js|  133 +-
.../js/codemirror/addon/search/searchcursor.js |8 +-
.../js/codemirror/addon/selection/active-line.js   |3 +
.../addon/selection/selection-pointer.js   |3 +
.../static/js/codemirror/addon/tern/tern.css   |1 +
.../static/js/codemirror/addon/tern/tern.js|   59 +-
.../static/js/codemirror/addon/tern/worker.js  |2 +-
.../static/js/codemirror/addon/wrap/hardwrap.js|   15 +-
web/pgadmin/static/js/codemirror/lib/codemirror.js | 2307 ++--
web/pgadmin/static/js/codemirror/mode/sql.js   |  391 
web/pgadmin/static/js/codemirror/mode/sql/sql.js   |  413 
.../datagrid/templates/datagrid/js/datagrid.js |4 +-
.../tools/debugger/templates/debugger/js/direct.js |2 +-
.../sqleditor/templates/sqleditor/js/sqleditor.js  |4 +-
50 files changed, 3457 insertions(+), 1775 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Patch for pgAdmin4 RPM package

2016-04-22 Thread Sandeep Thakkar
Hi Team, Dave,

Attached herewith are two patches.

*pgadmin4-rpm.patch* - This is the main patch that includes scripts,
makefiles and spec to create RPMs for RHEL6/RHEL7/F-22/F-23/F-24.

It will create two RPMs i.e pgadmin4 and pgadmin4-web. The  pgadmin4 tpm
depends on web and the web rpm depends on the python packages. I have
commented the list of packages which are not available on some systems so
that Devrim can build them.

The installation path for pgadmin4 is "/usr/pgadmin4-." and
pgadmin4-web is the site-packages/pgadmin4-web

*pgadmin4-server-ini.patch* - This is the patch for runtime/Server.cpp. As
said pgadmin4-web and runtime installation directories are different and
that means web does not exists in parallel to runtime like in sources.

I observed that the location of application settings was not defined in
Server.cpp. As per QSettings doc, the default location on Unix is the
$HOME/.config//.conf. Here, $HOME depends on the user
that runs the application. So, I thought why not to define the application
settings in application directory itself. RPM then knows where to define
the ApplicationPath. I tested it and it worked fine with me. I haven't done
this change for platform dependent.

Another change that I did in this file is that, I observed that canonicalPath()
was not giving the absolute path (by removing the sym link and the
redundant ".." as per doc). Hence, I used absolutePath() for the paths[i]
that are relative (../web, etc) and not for the already absolute path (ex.
ApplicationPath like /usr/lib/python2.7/site-packages/pgadmin4-web).

Well, I'm not a developer and the patch is just an attempt to resolve the
issue related to packaging. Please feel free to change it as required for
better.

Thanks.

-- 
Sandeep Thakkar
Lead Software Engineer


Phone: +91.20.30589505

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the
individual or entity to whom it is addressed. This message contains
information from EnterpriseDB Corporation that may be privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient or authorized to receive this for the intended
recipient, any use, dissemination, distribution, retention, archiving, or
copying of this communication is strictly prohibited. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete this message.


pgadmin4-rpm.patch
Description: Binary data


pgadmin4-server-ini.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] PATCH: resolving issue in casts as functions are not being fetched due to change in node.ui.js

2016-04-22 Thread Sanket Mehta
Hi,

Due to commit id 944bdbb96c3b360c856d7586144b835e44afac43 in node.ui.js,
functions were not being fetched after selecting source and target types as
I have overridden the options property for functions select control.

I have resolved that issue and patch is attached with this mail.

Please do review it.

Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/js/casts.js b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/js/casts.js
index 690a6d5..0010222 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/js/casts.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/js/casts.js
@@ -177,20 +177,19 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
 type: 'text', disabled: function(m) { return !m.isNew(); },
 group: 'Definition', mode: ['create'],
 control: 'node-ajax-options',
-options: function() {
-
-  var srcTyp = this.model.get('srctyp');
-  var trgtyp = this.model.get('trgtyp');
+options: function(control) {
+  var srcTyp = control.model.get('srctyp');
+  var trgtyp = control.model.get('trgtyp');
   var res = [];
 
   if(srcTyp != undefined && srcTyp != '' &&
  trgtyp != undefined && trgtyp != '')
   {
- var node = this.field.get('schema_node'),
+ var node = control.field.get('schema_node'),
  _url = node.generate_url.apply(
  node, [
-   null, 'get_functions', this.field.get('node_data'), false,
-   this.field.get('node_info')
+   null, 'get_functions', control.field.get('node_data'), false,
+   control.field.get('node_info')
  ]);
  $.ajax({
  type: 'POST',

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Resolved an issue - fetching the source, and target t

2016-04-22 Thread Ashesh Vashi
Resolved an issue - fetching the source, and target type functions in
the CAST module. Make the changes in the CAST module too for the
changes done in the NodeAjaxOptionsControl in the commit-id:
944bdbb96c3b360c856d7586144b835e44afac43.

We've changed the signature (arguments) of the 'options' & 'transform'
functions.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=244f5d59d2462a3e886cb60268e97fe1bb27b8e2
Author: Sanket Mehta 

Modified Files
--
.../servers/databases/casts/templates/cast/js/casts.js  | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: resolving issue in casts as functions are not being fetched due to change in node.ui.js

2016-04-22 Thread Ashesh Vashi
Committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


On Fri, Apr 22, 2016 at 4:34 PM, Sanket Mehta  wrote:

> Hi,
>
> Due to commit id 944bdbb96c3b360c856d7586144b835e44afac43 in node.ui.js,
> functions were not being fetched after selecting source and target types
> as I have overridden the options property for functions select control.
>
> I have resolved that issue and patch is attached with this mail.
>
> Please do review it.
>
> Regards,
> Sanket Mehta
> Sr Software engineer
> Enterprisedb
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


[pgadmin-hackers] pgAdmin 4 commit: Resolved an issue - rendering the SQL control referin

2016-04-22 Thread Ashesh Vashi
Resolved an issue - rendering the SQL control refering to the undefined
variable.

It was regression of the commit-id:
085ce50545e06c94087f1979e45673b136726fb5.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1b44aed456d97de093d6e33114957123f749e190

Modified Files
--
web/pgadmin/static/js/backform.pgadmin.js | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers