Re: [pgAdmin4][Patch]: Fixed the issue related to Domain Constraint module

2017-07-03 Thread Khushboo Vashi
Hi,

Please find the attached updated patch which includes following fixes:

1. The plus button to add a constraint with the domain dialogue doesn't
work.
2. The Domain Constraint node doesn't load.
3. On update, the domain constraint node name doesn't change.

Thanks,
Khushboo


On Mon, Jul 3, 2017 at 7:52 PM, Dave Page  wrote:

> Hi
>
> On Mon, Jul 3, 2017 at 6:10 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Mon, Jul 3, 2017 at 1:10 PM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> The Domain Constraint module doesn't load as it can not find the
>>> domain_constraints.js file.
>>> To fix this issue, renamed the domain_constraint.js to
>>> domain_constraints.js.
>>>
>>> RM #2529  created for the
>> same.
>>
>>> Please find the attached fix.
>>>
>>>
>>
> I think this is still broken. If I try to create a new domain called abc,
> with a basetype of text, then hit the + button to add a constraint, I get:
>
>
> domain.js:24 Uncaught TypeError: Cannot read property 'server' of
> undefined at s.initialize (domain.js:24) at s.e.Model (backbone-min.js:1)
> at s [as constructor] (backbone-min.js:1) at new s (backbone-min.js:1) at
> s._prepareModel (backbone-min.js:1) at set (backbone-min.js:1) at s.add (
> backbone-min.js:1) at s.insertRow (backgrid.min.js:8) at s.insertRow (
> backgrid.min.js:8) at HTMLButtonElement. (
> backform.pgadmin.js:1347)
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/__init__.py
index 85cd1c0..b20cb38 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/__init__.py
@@ -410,7 +410,7 @@ class DomainConstraintView(PGChildNodeView):
 """
 data = self.request
 try:
-status, SQL = self.get_sql(gid, sid, data, scid, doid)
+status, SQL, name = self.get_sql(gid, sid, data, scid, doid)
 if not status:
 return SQL
 
@@ -517,7 +517,7 @@ class DomainConstraintView(PGChildNodeView):
 coid: Domain Constraint Id
 """
 data = self.request
-status, SQL = self.get_sql(gid, sid, data, scid, doid, coid)
+status, SQL, name = self.get_sql(gid, sid, data, scid, doid, coid)
 if not status:
 return SQL
 
@@ -534,18 +534,13 @@ class DomainConstraintView(PGChildNodeView):
 else:
 icon = ''
 
-return make_json_response(
-success=1,
-info="Domain Constraint updated",
-data={
-'id': coid,
-'doid': doid,
-'scid': scid,
-'sid': sid,
-'gid': gid,
-'did': did,
-'icon': icon
-}
+return jsonify(
+node=self.blueprint.generate_browser_node(
+coid,
+doid,
+name,
+icon=icon
+)
 )
 else:
 return make_json_response(
@@ -629,7 +624,7 @@ class DomainConstraintView(PGChildNodeView):
 """
 data = self.request
 
-status, SQL = self.get_sql(gid, sid, data, scid, doid, coid)
+status, SQL, name = self.get_sql(gid, sid, data, scid, doid, coid)
 if status and SQL:
 return make_json_response(
 data=SQL,
@@ -677,9 +672,9 @@ class DomainConstraintView(PGChildNodeView):
 SQL = render_template("/".join([self.template_path,
 'create.sql']),
   data=data, domain=domain, schema=schema)
-return True, SQL.strip('\n')
+return True, SQL.strip('\n'), data['name'] if 'name' in data else old_data['name']
 except Exception as e:
-return False, internal_server_error(errormsg=str(e))
+return False, internal_server_error(errormsg=str(e)), None
 
 def _get_domain(self, doid):
 """
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/static/js/domain_constraint.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/static/js/domain_constraint.js
deleted file mode 100644
index 61d0553..000
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas

Jenkins build is back to normal : pgadmin4-master-python33 #212

2017-07-03 Thread pgAdmin 4 Jenkins
See 





pgAdmin 4 commit: Remove unnecessary whitespace from stored procedure S

2017-07-03 Thread Dave Page
Remove unnecessary whitespace from stored procedure SQL. Fixes #2146

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=0aa763b70680707136036ed1b7d3f994e70161de
Author: Murtuza Zabuawala 

Modified Files
--
.../schemas/functions/templates/procedure/ppas/sql/9.2_plus/create.sql | 3 +--
.../schemas/functions/templates/procedure/ppas/sql/9.5_plus/create.sql | 3 +--
.../schemas/functions/templates/procedure/ppas/sql/9.6_plus/create.sql | 3 +--
.../schemas/functions/templates/procedure/ppas/sql/default/create.sql  | 3 +--
4 files changed, 4 insertions(+), 8 deletions(-)



Re: [pgAdmin4][Patch] To fix the issue in Debugger & Procedure module for EPAS server

2017-07-03 Thread Dave Page
Thanks, applied.

On Mon, Jul 3, 2017 at 9:01 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch to fix the issue where 'Debug' option was not displaying on
> Package -> Function if the user if non-super user.
> RM#1948
>
> Another minor issue where there was a whitespace on SQL panel while
> displaying reversed engineering sql for Procedure.
> RM#2146
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAdmin 4 commit: Allow debugging of functions in packages. Fixes #1948

2017-07-03 Thread Dave Page
Allow debugging of functions in packages. Fixes #1948

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=5c7dcaba81c55846f5d9a85f1226abdee8cc1856
Author: Murtuza Zabuawala 

Modified Files
--
.../servers/databases/schemas/packages/edbfuncs/__init__.py   | 6 --
.../packages/edbfuncs/templates/edbfunc/ppas/9.1_plus/node.sql| 3 ++-
.../packages/edbfuncs/templates/edbfunc/ppas/9.2_plus/node.sql| 3 ++-
.../packages/edbfuncs/templates/edbproc/ppas/9.1_plus/node.sql| 3 ++-
.../packages/edbfuncs/templates/edbproc/ppas/9.2_plus/node.sql| 3 ++-
web/pgadmin/tools/debugger/templates/debugger/js/debugger.js  | 8 +++-
6 files changed, 19 insertions(+), 7 deletions(-)



Build failed in Jenkins: pgadmin4-master-python33 #211

2017-07-03 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Fix deletion of table rows with the column definition having NOT 
NULL

[Dave Page] Allow breakpoints to be set on triggers on views. Fixes #2528

--
[...truncated 288.98 KB...]
Update materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
Check Databases Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_add.ResourceGroupsAddTestCase)
Add resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_delete.ResourceGroupsDeleteTestCase)
Delete resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_put.ResourceGroupsPutTestCase)
Put resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.tests_resource_groups_get.ResourceGroupsGetTestCase)
Get resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_check_recovery.TestCheckRecovery)
Test for check recovery ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependencies_sql.TestDependenciesSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependents_sql.TestDependentsSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_role_dependencies_sql.TestRoleDependenciesSql)
Test Role Dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_add.ServersAddTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_delete.ServerDeleteTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_get.ServersGetTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase)
Default Server Node url ... ok
runTest (pgadmin.browser.server_groups.tests.test_sg_get.SgNodeTestCase)
Check Server Group Node ... ok
runTest 
(pgadmin.utils.javascript.tests.test_javascript_bundler.JavascriptBundlerTestCase)
scenario name: JavascriptBundlerTestCase ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a template when called ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.1 template when it is present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.2 template when request for a higher version ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render default version when version 9.0 was requested and only 9.1 and 9.2 are 
present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Raise error when version is smaller than available templates ... ok
runTest 
(regression.python_test_utils.sql_template_test_base.SQLTemplateTestBase)
parent test class ... ok

--
Ran 163 tests in 24.408s

OK

==
Test Result Summary
==

EDB Postgres AS 9.5:

163 tests passed

pgAdmin 4 commit: Allow breakpoints to be set on triggers on views. Fix

2017-07-03 Thread Dave Page
Allow breakpoints to be set on triggers on views. Fixes #2528

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=070a9c077ecd0794d66ed625215c9eca5866e0e5
Author: Khushboo Vashi 

Modified Files
--
web/pgadmin/tools/debugger/templates/debugger/js/debugger.js | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)



Re: [pgAdmin4][Patch]: Fixed couple of minor issues

2017-07-03 Thread Dave Page
Thanks, both applied.

On Mon, Jul 3, 2017 at 6:09 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Jul 3, 2017 at 11:57 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> 1. When we try to delete the table row with the column definition having
>> NOT NULL TRUE and HAS NO DEFAULT VALUE then it fails.
>> Please find the attached patch for the same. (delete_row.patch)
>>
>> Created RM #2527  
>
> 2. The debugger can not be opened from the View trigger.
>> Please find the attached patch for the same. (view_debugger.patch)
>>
>> Created RM #2528  
>
>> Thanks,
>> Khushboo
>>
>>
>>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgAdmin4]: Webpacking of static JS/CSS

2017-07-03 Thread Surinder Kumar
Hi All,

*​Things to discuss:*

How to differentiate between a static and template JS
​​
.

​In Webpack we have to resolve paths to the modules same as in
requirejs.config(base.html). but previously we were using
'current_app.javascripts' which holds the the path references for modules
registered. Now in webpack.config.js we don't have such variable. so the
path to module js has to give manually.

However, there are ​t
wo ways:

​1. ​
The convention should be that static files should go in ‘static/‘ dir and
templates in ‘templates/‘ dir.
​ If this convention is followed, we can search through directories and
pull out static and template file paths.​

​2. ​
As per Ashesh,
​'​
static/
'​
 dir may also have templates file
​ or vice versa​
​.​

​I​
n this case, the convention to identify template file
​can be
,
​templates ​
file must ends with ‘.template.js’ extension
​.
​
The flag ‘is_template’ added in every module’s __init__.py doesn’t help
here because webpack works on files and directories.
​ so there is no way to use this flag.​

*For debug/release mode:*

We’ll get rid of snippets in
​'​
get_own_javascripts
​'​
 and
​'​
get_own_stylesheets
​'​
 defined in modules __init__.py as they are
​ of​
 no use for now as CSS and JS are
​ going to​
 bundl
​e​
. They
​were
 used to load specified CSS and JS files
​ at runtime.​

Introduce a flag ‘-p’ in
​'​
yarn run bundle
​ -p'
 command to tell webpack config to run in development or production mode.
-p is for production.

Few
​W​
ebpack plugins such as UglifyPlugin or other plugins will run only in
production mode to minify JS otherwise load the generated bundle
JS(unminified) in debug mode to help with debugging code.

*Taks remaining:*

​1. ​
Fix local variables which are declared without using var, have to check in
each file
​ by​
 running eslint (For now, i will fix only errors which are giving error in
browser).

​2. ​
Move non-template files from ’templates’ to ’static’ directory. List of
​ pending​
 modules is here:

   - Tools (mostly all modules - 9 modules)
   - Browser nodes - 3 modules(resource group, roles, tablespace)
   - ​About
   ​​

Also can we move
​'​
dashboard, statistic
​s​
, preferences and help
​'​
 modules inside misc to preserve modularity as pgAdmin is modular
​ ?​

​3. Client side implementation of 'url_for' for several modules.

​4. ​
Integrating CSS bundling patch, also pull out inline CSS
​ and unvendor the CSS.​
​Today i worked on it but it is not completed yet, has some effect on UI, i
am looking into it.​

​5. ​
FileManager module is not working
​
as it is loaded via html file
​ and the modules it calls are unavailable at that time.
​I will​
 look into it
​.​
​​

​There are other minor issues that has to take care.​

​6. ​
Caching:

I haven’t read much in detail on caching, but it can used to help browser
know when to cache static resources and when to not. Basically, it give
names to generated bundled files with unique hash and that hash is changed
when a new change in file is detected on running ‘yarn run bundle’.
Also we have to use HTML Webpack plugin to regenerate
​'​
base.html
​'
again with new hash in bundled files
​.


​Thanks,
Surinder​

On Fri, Jun 30, 2017 at 4:40 PM, Dave Page  wrote:

> Awesome work. Do you have an ETA for a feature complete test patch?
>
> On Fri, Jun 30, 2017 at 11:41 AM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi
>>
>> So far, I have been able to generate bundled
>> 'sources/generated/browser.js' which contains only three browser modules
>> (Server-group, Server, Database) and load it from
>> 'browser/index.html'(entry point) and it works(except few JS error present
>> in file). so will fix them.
>>
>> Then I will add one by one dashboard module, nodes(cast, schema etc.),
>> tools which i earlier removed(because their JS had conflicts with vendor
>> JS) and make changes accordingly to webpack config and make other modules
>> to load properly.
>>
>> So far the JS files that won't be the part of  bundled JS and will load
>> separately according to dependency defined in externals in webpack config:
>>
>> 1. browser/utils.js - This file is extracted from browser.js which
>> contains Jinja syntax related code for menus, panels and preference related
>> settings from browser.js
>> 2. endpoints.js
>> 3. messages.js
>> 4. supported_servers.js
>> 5. current_user.js
>> 6. gettext.js
>> 7. translations.js
>>
>> All other JS files will go into bundled JS.
>>
>> Currently replacing '{{ url_for }}' in dashboard JS with client side
>> 'url_for' and load with bundled JS.
>>
>> Thanks,
>> Surinder
>>
>> On Fri, Jun 30, 2017 at 3:34 PM, Surinder Kumar <
>> surinder.ku...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> On Fri, Jun 30, 2017 at 2:29 AM, George Gelashvili <
>>> ggelashv...@pivotal.io> wrote:
>>>
  Hey Surinder,


 ​1. ​
> Tools
> ​(tools.js)​ - It will contain all JS modules under tools directory
>
>
> ​2. ​
> Browser
> ​(browser.js)​ - It 

pgAdmin 4 commit: Fix deletion of table rows with the column definition

2017-07-03 Thread Dave Page
Fix deletion of table rows with the column definition having NOT NULL TRUE and 
HAS NO DEFAULT VALUE. Fixes #2527

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f6b879233c1c9f554a43094e1d82d3e16cff23fa
Author: Khushboo Vashi 

Modified Files
--
web/pgadmin/tools/sqleditor/command.py | 1 +
1 file changed, 1 insertion(+)



Jenkins build is back to normal : pgadmin4-master-python34 #201

2017-07-03 Thread pgAdmin 4 Jenkins
See 





Re: Tree view icon samples

2017-07-03 Thread Dave Page
Hi

On Mon, Jul 3, 2017 at 10:25 AM, Chethana Kumar <
chethana.ku...@enterprisedb.com> wrote:

> Hi Dave,
>
> I have updated the icons "Conversions, Function and Function Trigger" as
> per you suggestions.
>

Nice.


>
> I feel the curved shapes won't look clear in 16px measurement which is
> happening with 'Conversions' icons'.
>
> We might have to rework on 'Conversions', what do you say ?
>

Hmm, we could use a square and triangle if it works better.


>
>
> Regards,
> Chethana kumar
>
> On Mon, Jul 3, 2017 at 6:35 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Mon, Jul 3, 2017 at 8:53 AM, Chethana Kumar <
>> chethana.ku...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> I am attaching the updated icons along with new icons added.
>>>
>>> Also I have tried to address the issues raised in our previous review -
>>>
>>> 1. Cast and Conversion: Eliminated the texty feel as you commented.
>>>
>>> Thought process: Basically cast means "Conversion between Data types"
>>> and Conversion means "Conversion between character" so I have come up with
>>> box shape concept where box means any "conversion of any data type or any
>>> character type". Ultimately "Box" plays role of a variable.
>>>
>>
>> For Conversion, how about we make it a triangle and circle instead of two
>> squares?
>>
>>
>>>
>>>
>>> 2. Primary and Foreign key: Updated as per the feedback and have come up
>>> with one more concept with slight changes in it.
>>>
>>
>> Cool. I like the double-key for Foreign Key.
>>
>>
>>>
>>> Supporting content for the concept:
>>> As Primary key cannot be more than one but where as Foreign key can be
>>> more than one so taking this as base point I have presented the icon so.
>>>
>>>
>>> 3. Index, Function and Function Trigger : As of now I have kept it as
>>> existing one only, I cannot be more innovative here where it mis-matches
>>> with the user's mental model.  I am still brainstorming on these icons.
>>>
>>
>> For index, how about a tree, like the bottom one at
>> https://upload.wikimedia.org/wikipedia/commons/3/33/B_tre
>> e_insertion_example.png. Leave out the numbers of course.
>>
>> For function, something with { } in there?
>>
>> And for Trigger Function, a mashup of function and trigger?
>>
>>
>>>
>>> Note: I have listed out the list of icons which will be used in pgAdmin
>>> 4 and will be working on those icons only
>>>
>>> Regards,
>>> Chethana kumar
>>>
>>> On Mon, Jul 3, 2017 at 3:01 PM, Dave Page  wrote:
>>>
 Hi

 On Friday, June 30, 2017, Strauch, Sheldon  wrote:

> Dave et al,
>
> Might I suggest flipping the foreign key icon left for right? That
> way, the key "points" to the left, back toward something pre-existing
> whilst the primary key "points" to the right, forward towards something 
> new?
>

 I like that idea.


>
> Also, for me, the updated index icon loses its intuitiveness as it
> suggests an ordinal list or an enumeration. I think the clue in the old
> icon was the index tab at the top of the illustration.
>

 Yeah. Maybe something that looks like a diagram of a btree?


>
> Finally, the new trigger icon suggests, to me, that one is trying to
> do something with a document, maybe copying it. Whereas the old icon
> suggests an action to be taken.
>

 I see what you mean. I don't think the old one is any better though.
 Chethana; do you have any alternative ideas?


>
> Just my two cents...
>
> On Fri, Jun 30, 2017 at 9:57 AM, Dave Page  wrote:
>
>> Hi
>>
>> - The Primary Key and Foreign Key icons should have more
>> differentiation than just colour. Maybe add a 1 to Primary Key?
>>
>> - Did you get a list of the other icons that aren't on that sheet yet?
>>
>> - I'm not sure I like the Casts and Conversions icons (mis-spelt as
>> Converts by the previous owner). The text on the makes them seem textual
>> than graphical.
>>
>> Thanks!
>>
>> On Fri, Jun 30, 2017 at 12:56 PM, Chethana Kumar <
>> chethana.ku...@enterprisedb.com> wrote:
>>
>>> Hi Team,  Attachment was missing.
>>>
>>>
>>>
>>> On Fri, Jun 30, 2017 at 5:24 PM, Chethana Kumar <
>>> chethana.ku...@enterprisedb.com> wrote:
>>>
 Hello Team,

 Below are the updates for TreeView Icons -

 1. Fine tuned the icons - Database, Language, Primary and Foreign
 key, Unique Constraint
 2. Designed new concept for - Casts and Converts, Trigger
 3. Attached the color blind test result for "Primary and Foreign
 key", now I feel it is pretty evident to differentiate for blind user
 4. Attached "thought_process.png" where I have explained the
 thought process for newly proposed icons (referred:
 www.postgresql.org)
 5. Added little depth to all icons to provide the Afforance of Click


>>>

Re: [pgAdmin4][Patch]: Fixed the issue related to Domain Constraint module

2017-07-03 Thread Dave Page
Hi

On Mon, Jul 3, 2017 at 6:10 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, Jul 3, 2017 at 1:10 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> The Domain Constraint module doesn't load as it can not find the
>> domain_constraints.js file.
>> To fix this issue, renamed the domain_constraint.js to
>> domain_constraints.js.
>>
>> RM #2529  created for the
> same.
>
>> Please find the attached fix.
>>
>>
>
I think this is still broken. If I try to create a new domain called abc,
with a basetype of text, then hit the + button to add a constraint, I get:


domain.js:24 Uncaught TypeError: Cannot read property 'server' of undefined
at s.initialize (domain.js:24) at s.e.Model (backbone-min.js:1) at s [as
constructor] (backbone-min.js:1) at new s (backbone-min.js:1) at
s._prepareModel (backbone-min.js:1) at set (backbone-min.js:1) at s.add (
backbone-min.js:1) at s.insertRow (backgrid.min.js:8) at s.insertRow (
backgrid.min.js:8) at HTMLButtonElement. (
backform.pgadmin.js:1347)

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgAdmin4][Patch] To fix the issues in Debugger module

2017-07-03 Thread Dave Page
Hi

On Fri, Jun 30, 2017 at 10:15 AM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> Please find patch to fix the below issues,
>
> 1) Debugger page layout
> RM#2512
>
> 2) To fix the issue when you user clicks on Stop button and gets
> connection lost error.
> RM#2511
>

Thanks, applied.

>
> @Dave,
> When we stop the debugger using pldbg_abort_target() function and try to
> start it again in the same connection, we are not able to do so because we
> do not get response from plugin(async query results shows busy status
> only), I think that is the reason why in pgAdmin3 we have disable all the
> buttons and release the connection if user clicks on stop button, For time
> being I have done the same in pgAdmin4 until we find the solution for this
> issue.
>

OK - please log an RM for the db server team.

Thanks.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAdmin 4 commit: Improve the debugger's default page layout, and preve

2017-07-03 Thread Dave Page
Improve the debugger's default page layout, and prevent attempts to continue 
debugging after the user has stopped. Fixes #2512, Fixes #2511

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=2d5e55964ad811690ac1b52efdc632e8b485e943
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/tools/debugger/__init__.py | 94 ++
.../tools/debugger/templates/debugger/direct.html  |  2 +-
.../debugger/templates/debugger/js/debugger.js |  4 +-
.../tools/debugger/templates/debugger/js/direct.js | 39 ++---
4 files changed, 92 insertions(+), 47 deletions(-)



Re: [pgadmin-hackers] [Design update] Style guide for pgAdmin4

2017-07-03 Thread Robert Eckhardt
On Mon, Jul 3, 2017 at 5:36 AM, Dave Page  wrote:

>
>
> On Fri, Jun 30, 2017 at 12:19 PM, Shirley Wang  wrote:
>
>> Hello!
>>
>> Currently the app uses 'monospace' to define the font family for SQL
>> queries and messages, which looks a little squished when in uppercase. PT
>> mono is another monospaced font (available on Google fonts) that looks
>> similar to 'monospace' but is more legible for uppercase.
>>
>> *PT Mono:*
>> [image: Screen Shot 2017-06-30 at 12.09.15 PM.png]
>>
>> *Monospace*
>> *[image: Screen Shot 2017-06-30 at 12.09.20 PM.png]*
>> Thoughts?
>>
>
> I'm not sure I like it. It looks a little like the old-school "digital"
> font; the sort of thing they used in the movie War Games.
>

As an aside, font used in the movie War Games actually kinda seels it to me
in my book.

Looking at the two the other day, it seemed like the lower case fonts are
pretty much the same but the Capital letters of PT Mono are spaced out a
bit more making it easier to read.

-- Rob


>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][Patch]: Refactor of the History Tab

2017-07-03 Thread George Gelashvili
Hi

> 2) Can 1px top border be added above first entry in left panel to
> differentiate from above panels ?
>
> It sounds like you're describing the distinction between the query history
entries and the Messages, History, etc. tab bar (screenshot attached).
If so, the gray/blue contrast should be sufficient to differentiate.

Thanks,
Shirley and George


Re: Tree view icon samples

2017-07-03 Thread Dave Page
Hi

On Mon, Jul 3, 2017 at 8:53 AM, Chethana Kumar <
chethana.ku...@enterprisedb.com> wrote:

> Hi Dave,
>
> I am attaching the updated icons along with new icons added.
>
> Also I have tried to address the issues raised in our previous review -
>
> 1. Cast and Conversion: Eliminated the texty feel as you commented.
>
> Thought process: Basically cast means "Conversion between Data types" and
> Conversion means "Conversion between character" so I have come up with box
> shape concept where box means any "conversion of any data type or any
> character type". Ultimately "Box" plays role of a variable.
>

For Conversion, how about we make it a triangle and circle instead of two
squares?


>
>
> 2. Primary and Foreign key: Updated as per the feedback and have come up
> with one more concept with slight changes in it.
>

Cool. I like the double-key for Foreign Key.


>
> Supporting content for the concept:
> As Primary key cannot be more than one but where as Foreign key can be
> more than one so taking this as base point I have presented the icon so.
>
>
> 3. Index, Function and Function Trigger : As of now I have kept it as
> existing one only, I cannot be more innovative here where it mis-matches
> with the user's mental model.  I am still brainstorming on these icons.
>

For index, how about a tree, like the bottom one at
https://upload.wikimedia.org/wikipedia/commons/3/33/B_tree_insertion_example.png.
Leave out the numbers of course.

For function, something with { } in there?

And for Trigger Function, a mashup of function and trigger?


>
> Note: I have listed out the list of icons which will be used in pgAdmin 4
> and will be working on those icons only
>
> Regards,
> Chethana kumar
>
> On Mon, Jul 3, 2017 at 3:01 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Friday, June 30, 2017, Strauch, Sheldon  wrote:
>>
>>> Dave et al,
>>>
>>> Might I suggest flipping the foreign key icon left for right? That way,
>>> the key "points" to the left, back toward something pre-existing whilst the
>>> primary key "points" to the right, forward towards something new?
>>>
>>
>> I like that idea.
>>
>>
>>>
>>> Also, for me, the updated index icon loses its intuitiveness as it
>>> suggests an ordinal list or an enumeration. I think the clue in the old
>>> icon was the index tab at the top of the illustration.
>>>
>>
>> Yeah. Maybe something that looks like a diagram of a btree?
>>
>>
>>>
>>> Finally, the new trigger icon suggests, to me, that one is trying to do
>>> something with a document, maybe copying it. Whereas the old icon suggests
>>> an action to be taken.
>>>
>>
>> I see what you mean. I don't think the old one is any better though.
>> Chethana; do you have any alternative ideas?
>>
>>
>>>
>>> Just my two cents...
>>>
>>> On Fri, Jun 30, 2017 at 9:57 AM, Dave Page  wrote:
>>>
 Hi

 - The Primary Key and Foreign Key icons should have more
 differentiation than just colour. Maybe add a 1 to Primary Key?

 - Did you get a list of the other icons that aren't on that sheet yet?

 - I'm not sure I like the Casts and Conversions icons (mis-spelt as
 Converts by the previous owner). The text on the makes them seem textual
 than graphical.

 Thanks!

 On Fri, Jun 30, 2017 at 12:56 PM, Chethana Kumar <
 chethana.ku...@enterprisedb.com> wrote:

> Hi Team,  Attachment was missing.
>
>
>
> On Fri, Jun 30, 2017 at 5:24 PM, Chethana Kumar <
> chethana.ku...@enterprisedb.com> wrote:
>
>> Hello Team,
>>
>> Below are the updates for TreeView Icons -
>>
>> 1. Fine tuned the icons - Database, Language, Primary and Foreign
>> key, Unique Constraint
>> 2. Designed new concept for - Casts and Converts, Trigger
>> 3. Attached the color blind test result for "Primary and Foreign
>> key", now I feel it is pretty evident to differentiate for blind user
>> 4. Attached "thought_process.png" where I have explained the thought
>> process for newly proposed icons (referred:www.postgresql.org)
>> 5. Added little depth to all icons to provide the Afforance of Click
>>
>>
>>
>>
>>
>>
>> On Thu, Jun 29, 2017 at 10:21 AM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>>
>>> On Thu, Jun 29, 2017 at 9:09 AM, Chethana Kumar <
>>> chethana.ku...@enterprisedb.com> wrote:
>>>
 Hi Ashesh,

 I tried to eliminate the colour blind issue which might occur with
 the primary & foregin key icons.
 But still I will use the app to test the colors, just let me know
 your opinion now.

>>> Please do.
>>>
>>> One more point: :-)
>>> Icons for some nodes are missing here.
>>> i.e. Partition table (introduced in 'Declarative Partition' patch),
>>> Materialized View, etc.
>>>
>>> -- Thanks, Ashesh
>>>

 Regards,
 Chethana kumar

 On Wed, Jun 28,

[pgAdmin4][Patch] To fix the issue in Debugger & Procedure module for EPAS server

2017-07-03 Thread Murtuza Zabuawala
Hi,

PFA patch to fix the issue where 'Debug' option was not displaying on
Package -> Function if the user if non-super user.
RM#1948

Another minor issue where there was a whitespace on SQL panel while
displaying reversed engineering sql for Procedure.
RM#2146

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py
index c16d48a..4d34f13 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/__init__.py
@@ -291,7 +291,8 @@ class EdbFuncView(PGChildNodeView, DataTypeReader):
 row['oid'],
 pkgid,
 row['name'],
-icon="icon-" + self.node_type
+icon="icon-" + self.node_type,
+funcowner=row['funcowner']
 ),
 status=200
 )
@@ -302,7 +303,8 @@ class EdbFuncView(PGChildNodeView, DataTypeReader):
 row['oid'],
 pkgid,
 row['name'],
-icon="icon-" + self.node_type
+icon="icon-" + self.node_type,
+funcowner=row['funcowner']
 ))
 
 return make_json_response(
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfunc/ppas/9.1_plus/node.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfunc/ppas/9.1_plus/node.sql
index 55e3bf4..44e3456 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfunc/ppas/9.1_plus/node.sql
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfunc/ppas/9.1_plus/node.sql
@@ -1,5 +1,6 @@
 SELECT  pg_proc.oid,
-pg_proc.proname || '(' || 
COALESCE(pg_catalog.pg_get_function_identity_arguments(pg_proc.oid), '') || ')' 
AS name
+pg_proc.proname || '(' || 
COALESCE(pg_catalog.pg_get_function_identity_arguments(pg_proc.oid), '') || ')' 
AS name,
+pg_get_userbyid(proowner) AS funcowner
 FROM pg_proc, pg_namespace
 WHERE format_type(prorettype, NULL) != 'void'
 {% if fnid %}
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfunc/ppas/9.2_plus/node.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfunc/ppas/9.2_plus/node.sql
index 77966e3..9a58068 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfunc/ppas/9.2_plus/node.sql
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfunc/ppas/9.2_plus/node.sql
@@ -1,5 +1,6 @@
 SELECT  pg_proc.oid,
-pg_proc.proname || '(' || 
COALESCE(pg_catalog.pg_get_function_identity_arguments(pg_proc.oid), '') || ')' 
AS name
+pg_proc.proname || '(' || 
COALESCE(pg_catalog.pg_get_function_identity_arguments(pg_proc.oid), '') || ')' 
AS name,
+pg_get_userbyid(proowner) AS funcowner
 FROM pg_proc, pg_namespace
 WHERE format_type(prorettype, NULL) != 'void'
 {% if fnid %}
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbproc/ppas/9.1_plus/node.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbproc/ppas/9.1_plus/node.sql
index c2df4c9..4d2a0df 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbproc/ppas/9.1_plus/node.sql
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbproc/ppas/9.1_plus/node.sql
@@ -1,5 +1,6 @@
 SELECT  pg_proc.oid,
-pg_proc.proname || '(' || 
COALESCE(pg_catalog.pg_get_function_identity_arguments(pg_proc.oid), '') || ')' 
AS name
+pg_proc.proname || '(' || 
COALESCE(pg_catalog.pg_get_function_identity_arguments(pg_proc.oid), '') || ')' 
AS name,
+pg_get_userbyid(proowner) AS funcowner
 FROM pg_proc, pg_namespace
 WHERE format_type(prorettype, NULL) = 'void'
 {% if fnid %}
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbproc/ppas/9.2_plus/node.sql
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbproc/ppas/9.2_plus/node.sql
index c2df4c9..4d2a0df 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbproc/ppas/9.2_plus/node.sql
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbproc/ppas/9.2_plus/node.sql
@@ -1,5 +1,6 @@
 SE

Build failed in Jenkins: pgadmin4-master-python34 #200

2017-07-03 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Fix clipboard handling with large datasets. Fixes #2489

--
[...truncated 289.04 KB...]
Update materialized view under schema node ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
Check Databases Node URL ... ok
runTest 
(pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
Check Databases Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_add.ResourceGroupsAddTestCase)
Add resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_delete.ResourceGroupsDeleteTestCase)
Delete resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.test_resource_groups_put.ResourceGroupsPutTestCase)
Put resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.resource_groups.tests.tests_resource_groups_get.ResourceGroupsGetTestCase)
Get resource groups ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
Check Role Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase)
Check Tablespace Node ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_check_recovery.TestCheckRecovery)
Test for check recovery ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependencies_sql.TestDependenciesSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_dependents_sql.TestDependentsSql)
Test dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_role_dependencies_sql.TestRoleDependenciesSql)
Test Role Dependencies SQL file ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_add.ServersAddTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_delete.ServerDeleteTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_get.ServersGetTestCase)
Default Server Node url ... ok
runTest 
(pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase)
Default Server Node url ... ok
runTest (pgadmin.browser.server_groups.tests.test_sg_get.SgNodeTestCase)
Check Server Group Node ... ok
runTest 
(pgadmin.utils.javascript.tests.test_javascript_bundler.JavascriptBundlerTestCase)
scenario name: JavascriptBundlerTestCase ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a template when called ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.1 template when it is present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render a version 9.2 template when request for a higher version ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Render default version when version 9.0 was requested and only 9.1 and 9.2 are 
present ... ok
runTest 
(pgadmin.utils.tests.test_versioned_template_loader.TestVersionedTemplateLoader)
Raise error when version is smaller than available templates ... ok
runTest 
(regression.python_test_utils.sql_template_test_base.SQLTemplateTestBase)
parent test class ... ok

--
Ran 163 tests in 24.409s

OK

==
Test Result Summary
==

EDB Postgres AS 9.5:

162 tests passed
1 test failed:
FTSConfDeleteTestCase (Fetch FTS configuration Nod

pgAdmin 4 commit: Fix clipboard handling with large datasets. Fixes #24

2017-07-03 Thread Dave Page
Fix clipboard handling with large datasets. Fixes #2489

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1977a5fcda44b78b00d6eaac2e6a99df355d5105
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/static/js/selection/clipboard.js | 23 ---
1 file changed, 20 insertions(+), 3 deletions(-)



Re: [pgAdmin4][Patch]: Fixed the issue related to Domain Constraint module

2017-07-03 Thread Khushboo Vashi
On Mon, Jul 3, 2017 at 1:10 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> The Domain Constraint module doesn't load as it can not find the
> domain_constraints.js file.
> To fix this issue, renamed the domain_constraint.js to
> domain_constraints.js.
>
> RM #2529  created for the
same.

> Please find the attached fix.
>
>


Re: [pgAdmin4][Patch]: Fixed couple of minor issues

2017-07-03 Thread Khushboo Vashi
On Mon, Jul 3, 2017 at 11:57 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> 1. When we try to delete the table row with the column definition having
> NOT NULL TRUE and HAS NO DEFAULT VALUE then it fails.
> Please find the attached patch for the same. (delete_row.patch)
>
> Created RM #2527  

2. The debugger can not be opened from the View trigger.
> Please find the attached patch for the same. (view_debugger.patch)
>
> Created RM #2528  

> Thanks,
> Khushboo
>
>
>


Re: [pgAdmin4][Patch]: Fixed couple of minor issues

2017-07-03 Thread Dave Page
Can you create some then please? As they're user-visible issues, they
should be tracked.

On Mon, Jul 3, 2017 at 6:00 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Nope. I found these issues when I tried to reproduce another issue :).
>
> On Mon, Jul 3, 2017 at 3:29 PM, Dave Page  wrote:
>
>> Are there RMs for these?
>>
>> On Mon, Jul 3, 2017 at 2:27 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> 1. When we try to delete the table row with the column definition having
>>> NOT NULL TRUE and HAS NO DEFAULT VALUE then it fails.
>>> Please find the attached patch for the same. (delete_row.patch)
>>>
>>> 2. The debugger can not be opened from the View trigger.
>>> Please find the attached patch for the same. (view_debugger.patch)
>>>
>>> Thanks,
>>> Khushboo
>>>
>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAdmin 4 commit: Fix a syntax error in the SQL Editor.

2017-07-03 Thread Dave Page
Fix a syntax error in the SQL Editor.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=4e21cdb64bc68c20d195a63c17b2f926e75a
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Re: Patch for sqleditor js syntax issue

2017-07-03 Thread Dave Page
Thanks, patch applied.

On Fri, Jun 30, 2017 at 3:27 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached minor patch which fixes js syntax issue in
> sqleditor.js
>
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgAdmin4][Patch] To fix the duplicate entry in History panel

2017-07-03 Thread Dave Page
Thanks, patch applied.

On Fri, Jun 30, 2017 at 2:26 PM, George Gelashvili 
wrote:

> Nice! Looks good. We were investigating this bug before you sent this and
> it looks like your patch resolves the duplicate calls to
> update_msg_history
>
> Cheers,
> Sarah and George
>
> On Fri, Jun 30, 2017 at 1:14 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA minor patch to fix the issue where duplicate entry is made of
>> successful executed query one with status message and one without status
>> message.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAdmin 4 commit: Fix an issue where duplicate entry is made of success

2017-07-03 Thread Dave Page
Fix an issue where duplicate entry is made of successful executed query, one 
with status message and one without status message.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1e427890de93f83d2b1ffb0e25b1c6f6d8bd8389
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js | 1 -
1 file changed, 1 deletion(-)



Re: [pgAdmin4][Patch]: Fixed couple of minor issues

2017-07-03 Thread Khushboo Vashi
Nope. I found these issues when I tried to reproduce another issue :).

On Mon, Jul 3, 2017 at 3:29 PM, Dave Page  wrote:

> Are there RMs for these?
>
> On Mon, Jul 3, 2017 at 2:27 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> 1. When we try to delete the table row with the column definition having
>> NOT NULL TRUE and HAS NO DEFAULT VALUE then it fails.
>> Please find the attached patch for the same. (delete_row.patch)
>>
>> 2. The debugger can not be opened from the View trigger.
>> Please find the attached patch for the same. (view_debugger.patch)
>>
>> Thanks,
>> Khushboo
>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][Patch]: Fixed couple of minor issues

2017-07-03 Thread Dave Page
Are there RMs for these?

On Mon, Jul 3, 2017 at 2:27 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> 1. When we try to delete the table row with the column definition having
> NOT NULL TRUE and HAS NO DEFAULT VALUE then it fails.
> Please find the attached patch for the same. (delete_row.patch)
>
> 2. The debugger can not be opened from the View trigger.
> Please find the attached patch for the same. (view_debugger.patch)
>
> Thanks,
> Khushboo
>
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] [Design update] Style guide for pgAdmin4

2017-07-03 Thread Dave Page
On Fri, Jun 30, 2017 at 12:19 PM, Shirley Wang  wrote:

> Hello!
>
> Currently the app uses 'monospace' to define the font family for SQL
> queries and messages, which looks a little squished when in uppercase. PT
> mono is another monospaced font (available on Google fonts) that looks
> similar to 'monospace' but is more legible for uppercase.
>
> *PT Mono:*
> [image: Screen Shot 2017-06-30 at 12.09.15 PM.png]
>
> *Monospace*
> *[image: Screen Shot 2017-06-30 at 12.09.20 PM.png]*
> Thoughts?
>

I'm not sure I like it. It looks a little like the old-school "digital"
font; the sort of thing they used in the movie War Games.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Tree view icon samples

2017-07-03 Thread Dave Page
Hi

On Friday, June 30, 2017, Strauch, Sheldon  wrote:

> Dave et al,
>
> Might I suggest flipping the foreign key icon left for right? That way,
> the key "points" to the left, back toward something pre-existing whilst the
> primary key "points" to the right, forward towards something new?
>

I like that idea.


>
> Also, for me, the updated index icon loses its intuitiveness as it
> suggests an ordinal list or an enumeration. I think the clue in the old
> icon was the index tab at the top of the illustration.
>

Yeah. Maybe something that looks like a diagram of a btree?


>
> Finally, the new trigger icon suggests, to me, that one is trying to do
> something with a document, maybe copying it. Whereas the old icon suggests
> an action to be taken.
>

I see what you mean. I don't think the old one is any better though.
Chethana; do you have any alternative ideas?


>
> Just my two cents...
>
> On Fri, Jun 30, 2017 at 9:57 AM, Dave Page  > wrote:
>
>> Hi
>>
>> - The Primary Key and Foreign Key icons should have more differentiation
>> than just colour. Maybe add a 1 to Primary Key?
>>
>> - Did you get a list of the other icons that aren't on that sheet yet?
>>
>> - I'm not sure I like the Casts and Conversions icons (mis-spelt as
>> Converts by the previous owner). The text on the makes them seem textual
>> than graphical.
>>
>> Thanks!
>>
>> On Fri, Jun 30, 2017 at 12:56 PM, Chethana Kumar <
>> chethana.ku...@enterprisedb.com
>> > wrote:
>>
>>> Hi Team,  Attachment was missing.
>>>
>>>
>>>
>>> On Fri, Jun 30, 2017 at 5:24 PM, Chethana Kumar <
>>> chethana.ku...@enterprisedb.com
>>> >
>>> wrote:
>>>
 Hello Team,

 Below are the updates for TreeView Icons -

 1. Fine tuned the icons - Database, Language, Primary and Foreign key,
 Unique Constraint
 2. Designed new concept for - Casts and Converts, Trigger
 3. Attached the color blind test result for "Primary and Foreign key",
 now I feel it is pretty evident to differentiate for blind user
 4. Attached "thought_process.png" where I have explained the thought
 process for newly proposed icons (referred:www.postgresql.org)
 5. Added little depth to all icons to provide the Afforance of Click






 On Thu, Jun 29, 2017 at 10:21 AM, Ashesh Vashi <
 ashesh.va...@enterprisedb.com
 > wrote:

>
> On Thu, Jun 29, 2017 at 9:09 AM, Chethana Kumar <
> chethana.ku...@enterprisedb.com
> >
> wrote:
>
>> Hi Ashesh,
>>
>> I tried to eliminate the colour blind issue which might occur with
>> the primary & foregin key icons.
>> But still I will use the app to test the colors, just let me know
>> your opinion now.
>>
> Please do.
>
> One more point: :-)
> Icons for some nodes are missing here.
> i.e. Partition table (introduced in 'Declarative Partition' patch),
> Materialized View, etc.
>
> -- Thanks, Ashesh
>
>>
>> Regards,
>> Chethana kumar
>>
>> On Wed, Jun 28, 2017 at 11:13 PM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com
>> >
>> wrote:
>>
>>>
>>>
>>> On Jun 28, 2017 22:32, "Robert Eckhardt" >> > wrote:
>>>
>>> I like them as well. The only comment I have is that the red icon on
>>> disconnected DB and corrupted DB are difficult to make out. They are
>>> clearly differentiable but the icon itself is unclear.
>>>
>>> A colour blind person may not be able to differentiate the primary &
>>> foreign key icons.
>>>
>>> -- Ashesh
>>>
>>>
>>> -- Rob
>>>
>>> On Wed, Jun 28, 2017 at 12:49 PM, Dave Page >> > wrote:
>>>
 Hi

 > On 28 Jun 2017, at 12:41, Chethana Kumar <
 chethana.ku...@enterprisedb.com
 >
 wrote:
 >
 > Hi Team,
 >
 > I am coming up with some sample icons for Tree View Control.
 >
 > Thought process behind the concept -
 >
 > 1. Included EDB color brand feel (gray and blue colors)

 You mean pgAdmin colour brand :-). EDB is orange & black.

 > 2. Eliminated the distraction of too many colors and provided
 consistency through the icons
 > 3. User will recognize the icon shapes rather than recalling it
 by their colors (like in existing icons) so focused more on shapes
 > 4. It also adds value to the brand since it has EDB color tones
 in it
 >
 >
 > So please feel free to share your views on the same

 I like them - they look much more modern and stylish, but still fit
 with what they represent.

 Other opinions please?

 Good work!

>>>
>>>
>>>
>>
>>
>> --
>> Chethana Kumar
>> Principal UI/UX Designer
>> EnterpriseDB Corporation
>>
>>
>> The Postgres Database Com

[pgAdmin4][Patch]: Fixed the issue related to Domain Constraint module

2017-07-03 Thread Khushboo Vashi
Hi,

The Domain Constraint module doesn't load as it can not find the
domain_constraints.js file.
To fix this issue, renamed the domain_constraint.js to
domain_constraints.js.

Please find the attached fix.
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/static/js/domain_constraint.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/static/js/domain_constraint.js
deleted file mode 100644
index 61d0553..000
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/static/js/domain_constraint.js
+++ /dev/null
@@ -1,146 +0,0 @@
-// Domain Constraint Module: Collection and Node
-define('pgadmin.node.domain_constraints', [
-  'sources/gettext', 'sources/url_for', 'jquery', 'underscore',
-  'underscore.string', 'pgadmin', 'pgadmin.browser', 'alertify',
-  'pgadmin.browser.collection'
-], function(gettext, url_for, $, _, S, pgAdmin, pgBrowser, alertify) {
-
-  // Define Domain Constraint Collection Node
-  if (!pgBrowser.Nodes['coll-domain_constraints']) {
-var domain_constraints = pgAdmin.Browser.Nodes['coll-domain_constraints'] =
-  pgAdmin.Browser.Collection.extend({
-node: 'domain_constraints',
-label: gettext('Domain Constraints'),
-type: 'coll-domain_constraints',
-columns: ['name', 'description']
-  });
-  };
-
-  // Domain Constraint Node
-  if (!pgBrowser.Nodes['domain_constraints']) {
-pgAdmin.Browser.Nodes['domain_constraints'] = pgBrowser.Node.extend({
-  type: 'domain_constraints',
-  sqlAlterHelp: 'sql-alterdomain.html',
-  sqlCreateHelp: 'sql-alterdomain.html',
-  dialogHelp: url_for('help.static', {'filename': 'domain_constraint_dialog.html'}),
-  label: gettext('Domain Constraints'),
-  collection_type: 'coll-domain_constraints',
-  hasSQL: true,
-  hasDepends: true,
-  parent_type: ['domain'],
-  Init: function() {
-// Avoid mulitple registration of menus
-if (this.initialized)
-return;
-
-this.initialized = true;
-
-pgBrowser.add_menus([{
-  name: 'create_domain_on_coll', node: 'coll-domain_constraints', module: this,
-  applies: ['object', 'context'], callback: 'show_obj_properties',
-  category: 'create', priority: 5, label: gettext('Domain Constraint...'),
-  icon: 'wcTabIcon icon-domain_constraints', data: {action: 'create', check: true},
-  enable: 'canCreate'
-},{
-  name: 'create_domain_constraints', node: 'domain_constraints', module: this,
-  applies: ['object', 'context'], callback: 'show_obj_properties',
-  category: 'create', priority: 5, label: gettext('Domain Constraint...'),
-  icon: 'wcTabIcon icon-domain_constraints', data: {action: 'create', check: true},
-  enable: 'canCreate'
-},{
-  name: 'create_domain_constraints', node: 'domain', module: this,
-  applies: ['object', 'context'], callback: 'show_obj_properties',
-  category: 'create', priority: 5, label: gettext('Domain Constraint...'),
-  icon: 'wcTabIcon icon-domain_constraints', data: {action: 'create', check: false},
-  enable: 'canCreate'
-}
-]);
-
-  },
-  canDrop: pgBrowser.Nodes['schema'].canChildDrop,
-  model: pgAdmin.Browser.Node.Model.extend({
-defaults: {
-  name: undefined,
-  oid: undefined,
-  description: undefined,
-  consrc: undefined,
-  connoinherit: undefined,
-  convalidated: true
-},
-// Domain Constraint Schema
-schema: [{
-  id: 'name', label: gettext('Name'), type:'text', cell:'string',
-  disabled: 'isDisabled'
-},{
-  id: 'oid', label: gettext('OID'), cell: 'string',
-  type: 'text' , mode: ['properties']
-},{
-  id: 'description', label: gettext('Comment'), type: 'multiline', cell:
-  'string', mode: ['properties', 'create', 'edit'], min_version: 90500,
-},{
-  id: 'consrc', label: gettext('Check'), type: 'multiline', cel:
-  'string', group: gettext('Definition'), mode: ['properties',
-  'create', 'edit'], disabled: function(m) { return !m.isNew(); }
-},{
-  id: 'connoinherit', label: gettext('No inherit'), type:
-  'switch', cell: 'boolean', group: gettext('Definition'), mode:
-  ['properties', 'create', 'edit'], disabled: 'isDisabled',
-  visible: false
-},{
-  id: 'convalidated', label: gettext("Validate?"), type: 'switch', cell:
-  'boolean', group: gettext('Definition'), min_version: 90200,
-  disabled: function(m) {
-  if (!m.isNew()) {
-var server = this.node_info.server;
-if (server.version < 90200) { return true;
-}
-else if(m.get('convalidated')) {
-