[pgAdmin4][Patch]: Fix the Domain Create dialog issue

2017-07-31 Thread Murtuza Zabuawala
Hi,

PFA minor patch to fix two issues,

1) Domain's Create/Properties dialog do not open due to JS error.
- Global variable issue.

2) Security label control's label font size issue.
- Backgrid adds backbone model id(which is 'label' in our case) in as a
class in  tag causing font size class collision with Bootstrap's label
class.

RM#2616


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/static/js/domain.js
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/static/js/domain.js
index af24900..b3b092a 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/static/js/domain.js
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/static/js/domain.js
@@ -123,7 +123,7 @@ define('pgadmin.node.domain', [
   var isNew = (_.size(attrs) === 0);
   if (isNew) {
 // Set Selected Schema
-schema = args.node_info.schema.label
+var schema = args.node_info.schema.label
 this.set({'basensp': schema}, {silent: true});
 
 // Set Current User
diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.js 
b/web/pgadmin/browser/server_groups/servers/static/js/server.js
index ab753f6..3dfdfb0 100644
--- a/web/pgadmin/browser/server_groups/servers/static/js/server.js
+++ b/web/pgadmin/browser/server_groups/servers/static/js/server.js
@@ -23,6 +23,7 @@ define('pgadmin.node.server', [
   },{
 id: 'label', label: gettext('Security Label'),
 type: 'text', editable: true,
+cellHeaderClasses:'override_label_class_font_size'
   }],
   validate: function() {
 var err = {},
diff --git a/web/pgadmin/static/css/bootstrap.overrides.css 
b/web/pgadmin/static/css/bootstrap.overrides.css
index 6274c74..f4d21b3 100755
--- a/web/pgadmin/static/css/bootstrap.overrides.css
+++ b/web/pgadmin/static/css/bootstrap.overrides.css
@@ -1335,3 +1335,8 @@ body {
   font-size: 14px;
   font-weight: normal;
 }
+
+/* Security label's label column font size */
+.override_label_class_font_size {
+  font-size: inherit !important;
+}


Re: Discussion on improving alertify notifications logic

2017-07-31 Thread Akshay Joshi
Hi All

On Fri, Jul 28, 2017 at 1:51 PM, Dave Page  wrote:

>
>
> On Thu, Jul 27, 2017 at 2:41 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi All
>>
>> As in commit "Update alertify alerts to use the styling defined in
>> the style guide":
>>
>> https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=commitdiff
>> ;h=2a30a86e7d5e562040500f448fbb0d143ff2cff9
>>
>> https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=commitdiff
>> ;h=f2d2075d81718ec02550fb592851aa330d327b24
>>
>> We have introduce new wrapper class "AlertifyWrapper" and replace calls
>> to alertify.success and alertify.error with following two lines in most
>> of the files
>>
>> var alertifyWrapper = new AlertifyWrapper();
>>
>> alertifyWrapper.success(message);  or  alertifyWrapper.error(message);
>>
>> For each call we are creating dynamic object of AlertifyWrapper and call
>> the appropriate function. For example there are 20 such calls in a single
>> js file every time are are creating object and call appropriate
>> function.
>>
>> I have tried to improve the logic here and implemented it as below:
>>
>>- Extend alertify and move success, error and info functions from "
>>alertify_wrapper.js" file to "alertify.pgadmin.defaults.js", there
>>will be no use of "alertify_wrapper.js"
>>- Modify only "server.js" as POC, remove 'alertify' and replace
>>'sources/alerts/alertify_wrapper' with 'pgadmin.alertifyjs' which is
>>nothing but mapping of "alertify.pgadmin.defaults.js" from defines
>>and named the reference object to 'alertify' so no need to change any
>>function call like "alertify.success, alertify.error".
>>
>> One more benefit of the above approach is if in future we want to use the
>> same style for alertify.warning, alertify.info, alertify.message etc..,
>> we will just have to extend that method in "alertify.pgadmin.defaults.js"
>> and no need to change the rest of the function call with AlertifyWrapper.
>>
>>
>> Attached is the POC patch, if it looks good then I'll start working on
>> replacing AlertifyWrapper with the above mentioned approach.
>>
>
> I like the approach - it's definitely cleaner, and saves instantiating a
> new object every time.
>

   I have modified the logic to improve the usage of alrtify notification.
Attached is the patch file which contains following:

   - Replace 'alertify' with 'pgadmin.alertifyjs' in define[].
   - Remove 'sources/alerts/alertify_wrapper' from define[].
   - Replace calls var alertifyWrapper = new AlertifyWrapper();
   alertifyWrapper.success(message);  or
alertifyWrapper*.error(message); *with
   appropriate (alertify.success/alertify.error..)
   - Modified test case written for alertify wrapper.


  Please review it and if it looks good then I'll commit the code.

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



-- 
*Akshay Joshi*
*Principal Software Engineer *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*


Improved_Alertify_Notification.patch
Description: Binary data


pgAgent commit: Added support two digits version for PostgreSQL/EDB Pos

2017-07-31 Thread Ashesh Vashi
Added support two digits version for PostgreSQL/EDB Postgres Advanced Server >= 
10

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgagent.git;a=commitdiff;h=a7b82fb3d3bd3de3ce624d9e4b0da53cb9835c2d

Modified Files
--
CMakeLists.txt | 6 +-
cmake/FindPG.cmake | 6 +++---
2 files changed, 8 insertions(+), 4 deletions(-)



Re: Discussion on improving alertify notifications logic

2017-07-31 Thread Ashesh Vashi
On Mon, Jul 31, 2017 at 2:54 PM, Akshay Joshi  wrote:

> Hi All
>

> On Fri, Jul 28, 2017 at 1:51 PM, Dave Page  wrote:
>
>>
>>
>> On Thu, Jul 27, 2017 at 2:41 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi All
>>>
>>> As in commit "Update alertify alerts to use the styling defined in
>>> the style guide":
>>>
>>> https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=commitdiff
>>> ;h=2a30a86e7d5e562040500f448fbb0d143ff2cff9
>>>
>>> https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=commitdiff
>>> ;h=f2d2075d81718ec02550fb592851aa330d327b24
>>>
>>> We have introduce new wrapper class "AlertifyWrapper" and replace calls
>>> to alertify.success and alertify.error with following two lines in most
>>> of the files
>>>
>>> var alertifyWrapper = new AlertifyWrapper();
>>>
>>> alertifyWrapper.success(message);  or  alertifyWrapper.error(message);
>>>
>>> For each call we are creating dynamic object of AlertifyWrapper and
>>> call the appropriate function. For example there are 20 such calls in a
>>> single js file every time are are creating object and call appropriate
>>> function.
>>>
>>> I have tried to improve the logic here and implemented it as below:
>>>
>>>- Extend alertify and move success, error and info functions from "
>>>alertify_wrapper.js" file to "alertify.pgadmin.defaults.js", there
>>>will be no use of "alertify_wrapper.js"
>>>- Modify only "server.js" as POC, remove 'alertify' and replace
>>>'sources/alerts/alertify_wrapper' with 'pgadmin.alertifyjs' which is
>>>nothing but mapping of "alertify.pgadmin.defaults.js" from defines
>>>and named the reference object to 'alertify' so no need to change any
>>>function call like "alertify.success, alertify.error".
>>>
>>> One more benefit of the above approach is if in future we want to use
>>> the same style for alertify.warning, alertify.info, alertify.message
>>> etc.., we will just have to extend that method in "alertify.pgadmin
>>> .defaults.js" and no need to change the rest of the function call with
>>> AlertifyWrapper.
>>>
>>> Attached is the POC patch, if it looks good then I'll start working on
>>> replacing AlertifyWrapper with the above mentioned approach.
>>>
>>
>> I like the approach - it's definitely cleaner, and saves instantiating a
>> new object every time.
>>
>
>I have modified the logic to improve the usage of alrtify notification.
> Attached is the patch file which contains following:
>
>- Replace 'alertify' with 'pgadmin.alertifyjs' in define[].
>- Remove 'sources/alerts/alertify_wrapper' from define[].
>- Replace calls var alertifyWrapper = new AlertifyWrapper();
>alertifyWrapper.success(message);  or  alertifyWrapper*.error(message);
>*with appropriate (alertify.success/alertify.error..)
>- Modified test case written for alertify wrapper.
>
>
>   Please review it and if it looks good then I'll commit the code.
>
Murtuza,

Please review it.

-- Thanks, Ashesh

>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>


Re: [pgAdmin4][Patch]: RM_2596 - Query tool not working in Desktop Runtime on Mac OS X

2017-07-31 Thread Ashesh Vashi
On Fri, Jul 28, 2017 at 12:42 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Hi,
>
> I inspect the react code and in call stacks, found `process.env.NODE_ENV`
> is undefined due to which 'SyntheticEvent.call' is not callable.
>
> So, to fix this, i add 'definePlugin' to plugins for `dev` environment in
> `webpack.config.js`. Initially it was added only for `production`
> environment. but it is needed for both, because React code is conditional
> based on environment variables set.
>

> Please find attached patch and review.
>
As discussed, you're setting 'production', even in the 'development' mode.

Please understand the code, and share the updated patch.
Also - share the references next time, so that - committer can understand
the reason for these changes.

-- Thanks, Ashesh

>
> Thanks,
> Surinder
>


Re-open Dashboard

2017-07-31 Thread Rahul Peddapalli
Hi,

Unexpectedly I deleted dashboard tab from my account. So, I can't create a
new server.

Even I can't create from the object. There is no link for object drop-down.

If it's not possible without the dashboard. Please delete my account
permanently

Thanks for your help

-- 
Thanks & Regards,
Rahul.


Re: pgAdmin 4 commit: Fix test assertion.

2017-07-31 Thread Murtuza Zabuawala
Hi All,

When I run the feature tests, the gives test always fails (
'query_tool_journey_test.py'),

Python: 3.6 (64-bit)
Platform: OS X (10.10.5)

Am I the only one who gets this error?


==
ERROR: runTest
(pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest)
Tests the path through the query tool
--
Traceback (most recent call last):
  File
"/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
line 46, in runTest
self._test_history_tab()
  File
"/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
line 104, in _test_history_tab
query_we_need_to_scroll_to
  File
"/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_tests/query_tool_journey_test.py",
line 141, in _assert_not_clickable_because_out_of_view
self.assertRaises(self.page.click_element(element))
  File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
line 728, in assertRaises
return context.handle('assertRaises', args, kwargs)
  File
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
line 158, in handle
(name, self._base_type_str))
TypeError: assertRaises() arg 1 must be an exception type or tuple of
exception types

--
Ran 10 tests in 359.301s

FAILED (errors=1, skipped=1)

==
Test Result Summary
==

PG_95:

8 tests passed
1 test failed:
QueryToolJourneyTest (Tests the path through the query tool)
1 test skipped:
CheckDebuggerForXssFeatureTest (Tests to check if Debugger is vulnerable to
XSS)


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Fri, Jul 21, 2017 at 8:46 PM, Dave Page  wrote:

> Fix test assertion.
>
> Branch
> --
> master
>
> Details
> ---
> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=
> 2ebb40819534d79376a577a149a8a5db124b
> Author: Sarah McAlear 
>
> Modified Files
> --
> web/pgadmin/feature_tests/query_tool_journey_test.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>


pgAdmin 4 commit: Requests for statistics were not stopped even when Da

2017-07-31 Thread Ashesh Vashi
Requests for statistics were not stopped even when Dashboard panel is
closed. It is a regression of webpack.

Branch
--
master

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

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



Re: [pgAdmin4][Patch]: Dashboard requests don't stop even after closing the panel

2017-07-31 Thread Ashesh Vashi
On Fri, Jul 28, 2017 at 4:00 PM, Dave Page  wrote:

> Ashesh, can you deal with this please? Thanks.
>
Hi Khushboo,

I've committed the code.
But - I am not able to reopen the dashboard panel once it is closed, even
not from the docker context menu -> Add Panel > Dashboard.

I have asked Murtuza to look into it.


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



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


>
> On Thu, Jul 27, 2017 at 6:20 AM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> If we close the Dashboard tab even then the requests don't stop. This is
>> the regression of web-packing of browser.js file.
>> Please find the attached patch for the same.
>>
>> Thanks,
>> Khushboo
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: pgAdmin 4 commit: Fix test assertion.

2017-07-31 Thread Robert Eckhardt
This was broken when the clear button and the edit button were changed to
drop downs.  Happened a few weeks ago.

Rob

On Jul 31, 2017 6:51 PM, "Murtuza Zabuawala" <
murtuza.zabuaw...@enterprisedb.com> wrote:

Hi All,

When I run the feature tests, the gives test always fails (
'query_tool_journey_test.py'),

Python: 3.6 (64-bit)
Platform: OS X (10.10.5)

Am I the only one who gets this error?


==
ERROR: runTest (pgadmin.feature_tests.query_tool_journey_test.
QueryToolJourneyTest)
Tests the path through the query tool
--
Traceback (most recent call last):
  File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/
feature_tests/query_tool_journey_test.py", line 46, in runTest
self._test_history_tab()
  File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/
feature_tests/query_tool_journey_test.py", line 104, in _test_history_tab
query_we_need_to_scroll_to
  File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/
feature_tests/query_tool_journey_test.py", line 141, in
_assert_not_clickable_because_out_of_view
self.assertRaises(self.page.click_element(element))
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
line 728, in assertRaises
return context.handle('assertRaises', args, kwargs)
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
line 158, in handle
(name, self._base_type_str))
TypeError: assertRaises() arg 1 must be an exception type or tuple of
exception types

--
Ran 10 tests in 359.301s

FAILED (errors=1, skipped=1)

==
Test Result Summary
==

PG_95:

8 tests passed
1 test failed:
QueryToolJourneyTest (Tests the path through the query tool)
1 test skipped:
CheckDebuggerForXssFeatureTest (Tests to check if Debugger is vulnerable to
XSS)


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Fri, Jul 21, 2017 at 8:46 PM, Dave Page  wrote:

> Fix test assertion.
>
> Branch
> --
> master
>
> Details
> ---
> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdif
> f;h=2ebb40819534d79376a577a149a8a5db124b
> Author: Sarah McAlear 
>
> Modified Files
> --
> web/pgadmin/feature_tests/query_tool_journey_test.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>


Re: Discussion on improving alertify notifications logic

2017-07-31 Thread Murtuza Zabuawala
Hi,

Looks good to me.

Regards,
Murtuza
On Mon, Jul 31, 2017 at 2:59 PM, Ashesh Vashi  wrote:

> On Mon, Jul 31, 2017 at 2:54 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi All
>>
>
>> On Fri, Jul 28, 2017 at 1:51 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Thu, Jul 27, 2017 at 2:41 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi All

 As in commit "Update alertify alerts to use the styling defined in
 the style guide":

 https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=commitdiff
 ;h=2a30a86e7d5e562040500f448fbb0d143ff2cff9

 https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=commitdiff
 ;h=f2d2075d81718ec02550fb592851aa330d327b24

 We have introduce new wrapper class "AlertifyWrapper" and replace
 calls to alertify.success and alertify.error with following two lines
 in most of the files

 var alertifyWrapper = new AlertifyWrapper();

 alertifyWrapper.success(message);  or  alertifyWrapper.error(message);

 For each call we are creating dynamic object of AlertifyWrapper and
 call the appropriate function. For example there are 20 such calls in a
 single js file every time are are creating object and call appropriate
 function.

 I have tried to improve the logic here and implemented it as below:

- Extend alertify and move success, error and info functions from "
alertify_wrapper.js" file to "alertify.pgadmin.defaults.js", there
will be no use of "alertify_wrapper.js"
- Modify only "server.js" as POC, remove 'alertify' and replace
'sources/alerts/alertify_wrapper' with 'pgadmin.alertifyjs' which
is nothing but mapping of "alertify.pgadmin.defaults.js" from
defines and named the reference object to 'alertify' so no need to 
 change
any function call like "alertify.success, alertify.error".

 One more benefit of the above approach is if in future we want to use
 the same style for alertify.warning, alertify.info, alertify.message
 etc.., we will just have to extend that method in "alertify.pgadmin
 .defaults.js" and no need to change the rest of the function call with
 AlertifyWrapper.

 Attached is the POC patch, if it looks good then I'll start working on
 replacing AlertifyWrapper with the above mentioned approach.

>>>
>>> I like the approach - it's definitely cleaner, and saves instantiating a
>>> new object every time.
>>>
>>
>>I have modified the logic to improve the usage of alrtify
>> notification. Attached is the patch file which contains following:
>>
>>- Replace 'alertify' with 'pgadmin.alertifyjs' in define[].
>>- Remove 'sources/alerts/alertify_wrapper' from define[].
>>- Replace calls var alertifyWrapper = new AlertifyWrapper();
>>alertifyWrapper.success(message);  or  alertifyWrapper*.error(message);
>>*with appropriate (alertify.success/alertify.error..)
>>- Modified test case written for alertify wrapper.
>>
>>
>>   Please review it and if it looks good then I'll commit the code.
>>
> Murtuza,
>
> Please review it.
>
> -- Thanks, Ashesh
>
>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>> *Principal Software Engineer *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>
>


Re: pgAdmin 4 commit: Fix test assertion.

2017-07-31 Thread Murtuza Zabuawala
Hi Robert,

I have the latest pull and still this test is fails every time on my
machine, not sure if it is because of Python3.6.

On Mon, Jul 31, 2017 at 5:27 PM, Robert Eckhardt 
wrote:

> This was broken when the clear button and the edit button were changed to
> drop downs.  Happened a few weeks ago.
>
> Rob
>
> On Jul 31, 2017 6:51 PM, "Murtuza Zabuawala"  enterprisedb.com> wrote:
>
> Hi All,
>
> When I run the feature tests, the gives test always fails (
> 'query_tool_journey_test.py'),
>
> Python: 3.6 (64-bit)
> Platform: OS X (10.10.5)
>
> Am I the only one who gets this error?
>
>
> ==
> ERROR: runTest (pgadmin.feature_tests.query_t
> ool_journey_test.QueryToolJourneyTest)
> Tests the path through the query tool
> --
> Traceback (most recent call last):
>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
> tests/query_tool_journey_test.py", line 46, in runTest
> self._test_history_tab()
>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
> tests/query_tool_journey_test.py", line 104, in _test_history_tab
> query_we_need_to_scroll_to
>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
> tests/query_tool_journey_test.py", line 141, in
> _assert_not_clickable_because_out_of_view
> self.assertRaises(self.page.click_element(element))
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
> line 728, in assertRaises
> return context.handle('assertRaises', args, kwargs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
> line 158, in handle
> (name, self._base_type_str))
> TypeError: assertRaises() arg 1 must be an exception type or tuple of
> exception types
>
> --
> Ran 10 tests in 359.301s
>
> FAILED (errors=1, skipped=1)
>
> ==
> Test Result Summary
> ==
>
> PG_95:
>
> 8 tests passed
> 1 test failed:
> QueryToolJourneyTest (Tests the path through the query tool)
> 1 test skipped:
> CheckDebuggerForXssFeatureTest (Tests to check if Debugger is vulnerable
> to XSS)
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Fri, Jul 21, 2017 at 8:46 PM, Dave Page  wrote:
>
>> Fix test assertion.
>>
>> Branch
>> --
>> master
>>
>> Details
>> ---
>> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdif
>> f;h=2ebb40819534d79376a577a149a8a5db124b
>> Author: Sarah McAlear 
>>
>> Modified Files
>> --
>> web/pgadmin/feature_tests/query_tool_journey_test.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
>
>


Re: pgAdmin 4 commit: Fix test assertion.

2017-07-31 Thread Robert Eckhardt
It fails because the test was broken and has never been fixed.

Rob

On Jul 31, 2017 8:03 PM, "Murtuza Zabuawala" <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Robert,
>
> I have the latest pull and still this test is fails every time on my
> machine, not sure if it is because of Python3.6.
>
> On Mon, Jul 31, 2017 at 5:27 PM, Robert Eckhardt 
> wrote:
>
>> This was broken when the clear button and the edit button were changed to
>> drop downs.  Happened a few weeks ago.
>>
>> Rob
>>
>> On Jul 31, 2017 6:51 PM, "Murtuza Zabuawala" <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>> Hi All,
>>
>> When I run the feature tests, the gives test always fails (
>> 'query_tool_journey_test.py'),
>>
>> Python: 3.6 (64-bit)
>> Platform: OS X (10.10.5)
>>
>> Am I the only one who gets this error?
>>
>>
>> ==
>> ERROR: runTest (pgadmin.feature_tests.query_t
>> ool_journey_test.QueryToolJourneyTest)
>> Tests the path through the query tool
>> --
>> Traceback (most recent call last):
>>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
>> tests/query_tool_journey_test.py", line 46, in runTest
>> self._test_history_tab()
>>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
>> tests/query_tool_journey_test.py", line 104, in _test_history_tab
>> query_we_need_to_scroll_to
>>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
>> tests/query_tool_journey_test.py", line 141, in
>> _assert_not_clickable_because_out_of_view
>> self.assertRaises(self.page.click_element(element))
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
>> line 728, in assertRaises
>> return context.handle('assertRaises', args, kwargs)
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
>> line 158, in handle
>> (name, self._base_type_str))
>> TypeError: assertRaises() arg 1 must be an exception type or tuple of
>> exception types
>>
>> --
>> Ran 10 tests in 359.301s
>>
>> FAILED (errors=1, skipped=1)
>>
>> ==
>> Test Result Summary
>> ==
>>
>> PG_95:
>>
>> 8 tests passed
>> 1 test failed:
>> QueryToolJourneyTest (Tests the path through the query tool)
>> 1 test skipped:
>> CheckDebuggerForXssFeatureTest (Tests to check if Debugger is vulnerable
>> to XSS)
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Fri, Jul 21, 2017 at 8:46 PM, Dave Page  wrote:
>>
>>> Fix test assertion.
>>>
>>> Branch
>>> --
>>> master
>>>
>>> Details
>>> ---
>>> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdif
>>> f;h=2ebb40819534d79376a577a149a8a5db124b
>>> Author: Sarah McAlear 
>>>
>>> Modified Files
>>> --
>>> web/pgadmin/feature_tests/query_tool_journey_test.py | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>>
>>
>>
>


Re: pgAdmin 4 commit: Fix test assertion.

2017-07-31 Thread Harshal Dhumal
Well I'm able run all feature test cases on python 2.7 with latest pull.


-- 
*Harshal Dhumal*
*Sr. Software Engineer*

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

On Mon, Jul 31, 2017 at 5:43 PM, Robert Eckhardt 
wrote:

> It fails because the test was broken and has never been fixed.
>
> Rob
>
> On Jul 31, 2017 8:03 PM, "Murtuza Zabuawala"  enterprisedb.com> wrote:
>
>> Hi Robert,
>>
>> I have the latest pull and still this test is fails every time on my
>> machine, not sure if it is because of Python3.6.
>>
>> On Mon, Jul 31, 2017 at 5:27 PM, Robert Eckhardt 
>> wrote:
>>
>>> This was broken when the clear button and the edit button were changed
>>> to drop downs.  Happened a few weeks ago.
>>>
>>> Rob
>>>
>>> On Jul 31, 2017 6:51 PM, "Murtuza Zabuawala" <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
>>> Hi All,
>>>
>>> When I run the feature tests, the gives test always fails (
>>> 'query_tool_journey_test.py'),
>>>
>>> Python: 3.6 (64-bit)
>>> Platform: OS X (10.10.5)
>>>
>>> Am I the only one who gets this error?
>>>
>>>
>>> ==
>>> ERROR: runTest (pgadmin.feature_tests.query_t
>>> ool_journey_test.QueryToolJourneyTest)
>>> Tests the path through the query tool
>>> --
>>> Traceback (most recent call last):
>>>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
>>> tests/query_tool_journey_test.py", line 46, in runTest
>>> self._test_history_tab()
>>>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
>>> tests/query_tool_journey_test.py", line 104, in _test_history_tab
>>> query_we_need_to_scroll_to
>>>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
>>> tests/query_tool_journey_test.py", line 141, in
>>> _assert_not_clickable_because_out_of_view
>>> self.assertRaises(self.page.click_element(element))
>>>   File 
>>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
>>> line 728, in assertRaises
>>> return context.handle('assertRaises', args, kwargs)
>>>   File 
>>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
>>> line 158, in handle
>>> (name, self._base_type_str))
>>> TypeError: assertRaises() arg 1 must be an exception type or tuple of
>>> exception types
>>>
>>> --
>>> Ran 10 tests in 359.301s
>>>
>>> FAILED (errors=1, skipped=1)
>>>
>>> ==
>>> Test Result Summary
>>> ==
>>>
>>> PG_95:
>>>
>>> 8 tests passed
>>> 1 test failed:
>>> QueryToolJourneyTest (Tests the path through the query tool)
>>> 1 test skipped:
>>> CheckDebuggerForXssFeatureTest (Tests to check if Debugger is vulnerable
>>> to XSS)
>>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Fri, Jul 21, 2017 at 8:46 PM, Dave Page  wrote:
>>>
 Fix test assertion.

 Branch
 --
 master

 Details
 ---
 https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdif
 f;h=2ebb40819534d79376a577a149a8a5db124b
 Author: Sarah McAlear 

 Modified Files
 --
 web/pgadmin/feature_tests/query_tool_journey_test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


>>>
>>>
>>


Re: pgAdmin 4 commit: Fix test assertion.

2017-07-31 Thread Robert Eckhardt
There has been local passing and failing on our CI.

Rob

On Jul 31, 2017 8:47 PM, "Harshal Dhumal" 
wrote:

Well I'm able run all feature test cases on python 2.7 with latest pull.


-- 
*Harshal Dhumal*
*Sr. Software Engineer*

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

On Mon, Jul 31, 2017 at 5:43 PM, Robert Eckhardt 
wrote:

> It fails because the test was broken and has never been fixed.
>
> Rob
>
> On Jul 31, 2017 8:03 PM, "Murtuza Zabuawala" <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Robert,
>>
>> I have the latest pull and still this test is fails every time on my
>> machine, not sure if it is because of Python3.6.
>>
>> On Mon, Jul 31, 2017 at 5:27 PM, Robert Eckhardt 
>> wrote:
>>
>>> This was broken when the clear button and the edit button were changed
>>> to drop downs.  Happened a few weeks ago.
>>>
>>> Rob
>>>
>>> On Jul 31, 2017 6:51 PM, "Murtuza Zabuawala" <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
>>> Hi All,
>>>
>>> When I run the feature tests, the gives test always fails (
>>> 'query_tool_journey_test.py'),
>>>
>>> Python: 3.6 (64-bit)
>>> Platform: OS X (10.10.5)
>>>
>>> Am I the only one who gets this error?
>>>
>>>
>>> ==
>>> ERROR: runTest (pgadmin.feature_tests.query_t
>>> ool_journey_test.QueryToolJourneyTest)
>>> Tests the path through the query tool
>>> --
>>> Traceback (most recent call last):
>>>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
>>> tests/query_tool_journey_test.py", line 46, in runTest
>>> self._test_history_tab()
>>>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
>>> tests/query_tool_journey_test.py", line 104, in _test_history_tab
>>> query_we_need_to_scroll_to
>>>   File "/Users/edb/Documents/projects/pgadmin4/web/pgadmin/feature_
>>> tests/query_tool_journey_test.py", line 141, in
>>> _assert_not_clickable_because_out_of_view
>>> self.assertRaises(self.page.click_element(element))
>>>   File 
>>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
>>> line 728, in assertRaises
>>> return context.handle('assertRaises', args, kwargs)
>>>   File 
>>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py",
>>> line 158, in handle
>>> (name, self._base_type_str))
>>> TypeError: assertRaises() arg 1 must be an exception type or tuple of
>>> exception types
>>>
>>> --
>>> Ran 10 tests in 359.301s
>>>
>>> FAILED (errors=1, skipped=1)
>>>
>>> ==
>>> Test Result Summary
>>> ==
>>>
>>> PG_95:
>>>
>>> 8 tests passed
>>> 1 test failed:
>>> QueryToolJourneyTest (Tests the path through the query tool)
>>> 1 test skipped:
>>> CheckDebuggerForXssFeatureTest (Tests to check if Debugger is vulnerable
>>> to XSS)
>>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Fri, Jul 21, 2017 at 8:46 PM, Dave Page  wrote:
>>>
 Fix test assertion.

 Branch
 --
 master

 Details
 ---
 https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdif
 f;h=2ebb40819534d79376a577a149a8a5db124b
 Author: Sarah McAlear 

 Modified Files
 --
 web/pgadmin/feature_tests/query_tool_journey_test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


>>>
>>>
>>


pgAdmin 4 commit: 1) Added partition module in webpack config.

2017-07-31 Thread Akshay Joshi
1) Added partition module in webpack config.
2) Fixed missing logic of partition from primary_key.js and 
unique_constraint.js as this two files are newly created for webpack.
3) Changed the node name from 'check_constraint' to 'check_constraints'. Also 
changed the same in test case url.

Branch
--
master

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

Modified Files
--
.../constraints/check_constraint/__init__.py   |  2 +-
.../tests/test_check_constraint_add.py |  2 +-
.../tests/test_check_constraint_delete.py  |  2 +-
.../tests/test_check_constraint_get.py |  2 +-
.../tests/test_check_constraint_put.py |  2 +-
.../index_constraint/static/js/primary_key.js  | 22 --
.../static/js/unique_constraint.js | 20 ++---
.../tables/partitions/static/js/partition.js   | 34 +++---
web/webpack.config.js  |  3 +-
9 files changed, 59 insertions(+), 30 deletions(-)



pgAdmin 4 commit: Improved alertify notification logic. Remove Alertify

2017-07-31 Thread Akshay Joshi
Improved alertify notification logic. Remove AlertifyWrapper class and extend 
notification methods in alertify itself.

Branch
--
master

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

Modified Files
--
.../servers/databases/casts/static/js/cast.js  | 10 ++--
.../schemas/synonyms/static/js/synonym.js  |  9 ++--
.../check_constraint/static/js/check_constraint.js | 12 ++---
.../foreign_key/static/js/foreign_key.js   | 12 ++---
.../tables/partitions/static/js/partition.js   | 29 ---
.../databases/schemas/tables/static/js/table.js| 24 +++--
.../schemas/tables/triggers/static/js/trigger.js   | 17 +++
.../databases/schemas/views/static/js/mview.js |  9 ++--
.../servers/databases/static/js/database.js| 22 +++-
.../servers/pgagent/static/js/pga_job.js   | 13 ++---
.../server_groups/servers/static/js/server.js  | 58 --
.../servers/tablespaces/static/js/tablespace.js| 15 ++
web/pgadmin/browser/static/js/browser.js   |  7 ++-
web/pgadmin/browser/static/js/node.js  | 10 ++--
web/pgadmin/dashboard/static/js/dashboard.js   | 24 -
.../misc/file_manager/static/js/file_manager.js| 12 ++---
web/pgadmin/misc/file_manager/static/js/utility.js | 37 +-
web/pgadmin/static/js/alertify.pgadmin.defaults.js | 56 +++--
web/pgadmin/static/js/alerts/alertify_wrapper.js   | 55 
web/pgadmin/tools/backup/static/js/backup.js   | 13 ++---
web/pgadmin/tools/debugger/static/js/direct.js | 29 ---
.../tools/import_export/static/js/import_export.js |  9 ++--
.../tools/maintenance/static/js/maintenance.js | 12 ++---
web/pgadmin/tools/restore/static/js/restore.js | 10 ++--
web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 29 ---
.../user_management/static/js/user_management.js   | 18 +++
.../javascript/alerts/alertify_wrapper_spec.js | 18 +++
web/webpack.shim.js|  2 +-
web/webpack.test.config.js |  1 +
29 files changed, 220 insertions(+), 352 deletions(-)



Re: [pgAdmin4][Patch]: Dashboard requests don't stop even after closing the panel

2017-07-31 Thread Murtuza Zabuawala
Hi Ashesh,
On Mon, Jul 31, 2017 at 4:50 PM, Ashesh Vashi  wrote:

>
>
> On Fri, Jul 28, 2017 at 4:00 PM, Dave Page  wrote:
>
>> Ashesh, can you deal with this please? Thanks.
>>
> Hi Khushboo,
>
> I've committed the code.
> But - I am not able to reopen the dashboard panel once it is closed, even
> not from the docker context menu -> Add Panel > Dashboard.
>
> I have asked Murtuza to look into it.
>
I am able to open Dashboard panel with given steps, I also observed that
I'm allowed to open more than one Dashboard panels with same steps.

>
>
--
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>
>>
>> On Thu, Jul 27, 2017 at 6:20 AM, Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> If we close the Dashboard tab even then the requests don't stop. This is
>>> the regression of web-packing of browser.js file.
>>> Please find the attached patch for the same.
>>>
>>> Thanks,
>>> Khushboo
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


Build failed in Jenkins: pgadmin4-master-python36 #267

2017-07-31 Thread pgAdmin 4 Jenkins
See 


Changes:

[akshay.joshi] Improved alertify notification logic. Remove AlertifyWrapper 
class and

--
[...truncated 336.17 KB...]
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
TableUpdateTestCase (Create partitions of existing range 
partitioned table,
Create partitions of existing list 
partitioned table,
Detach partition from existing range 
partitioned table,
Detach partition from existing list 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table)
ViewsAddTestCase (Add materialized view under schema node)
ViewsDeleteTestCase (Delete materialized view under schema node)
ViewsGetTestCase (Get materialized view under schema node)
ViewsUpdateTestCase (Update materialized view under schema node)
ResourceGroupsAddTestCase (Add resource groups)
ResourceGroupsDeleteTestCase (Delete resource groups)
ResourceGroupsPutTestCase (Put resource groups)
ResourceGroupsGetTestCase (Get resource groups)
TestSSLConnection (Test for SSL connection)

PostgreSQL 9.3:

157 tests passed
0 tests failed
15 tests skipped:
PackageAddTestCase (Fetch Package Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)
PackagePutTestCase (Fetch Package Node URL)
SynonymAddTestCase (Default Node URL)
SynonymDeleteTestCase (Fetch synonym Node URL)
SynonymGetTestCase (Fetch synonym Node URL)
SynonymPutTestCase (Fetch synonym Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
TableUpdateTestCase (Create partitions of existing range 
partitioned table,
Create partitions of existing list 
partitioned table,
Detach partition from existing range 
partitioned table,
Detach partition from existing list 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table)
ResourceGroupsAddTestCase (Add resource groups)
ResourceGroupsDeleteTestCase (Delete resource groups)
ResourceGroupsPutTestCase (Put resource groups)
ResourceGroupsGetTestCase (Get resource groups)
TestSSLConnection (Test for SSL connection)

PostgreSQL 9.4:

157 tests passed
0 tests failed
15 tests skipped:
PackageAddTestCase (Fetch Package Node URL)
PackageDeleteTestCase (Fetch Package Node URL)
PackageGetTestCase (Fetch Package Node URL)
PackagePutTestCase (Fetch Package Node URL)
SynonymAddTestCase (Default Node URL)
SynonymDeleteTestCase (Fetch synonym Node URL)
SynonymGetTestCase (Fetch synonym Node URL)
SynonymPutTestCase (Fetch synonym Node URL)
TableAddTestCase (Create Range partitioned table with 2 
partitions,
Create List partitioned table with 2 
partitions)
TableUpdateTestCase (Create partitions of existing range 
partitioned table,
Create partitions of existing list 
partitioned table,
Detach partition from existing range 
partitioned table,
Detach partition from existing list 
partitioned table,
Attach partition to existing range 
partitioned table,
Attach partition to existing list 
partitioned table)
ResourceGroupsAddTestCase (Add resource groups)
ResourceGroupsDeleteTestCase (Delete resource groups)
ResourceGroupsPutTestCase (Put resource groups)
ResourceGroupsGetTestCase (Get resource groups)
TestSSLConnection (Test for SSL connection)

PostgreSQL 9.5:

157 tests passed
0 tests failed

Re: [pgAdmin4][Patch]: RM_2596 - Query tool not working in Desktop Runtime on Mac OS X

2017-07-31 Thread Surinder Kumar
Hi Ashesh,

1. Now we are using `envType` variable in definePlugin which sets
environment variable NODE_ENV globally which is used by React to create
development or production build.
where:
 envType - determine build type is either `production` or
`development`​ depending on the environment set in package.json > scripts.

2. In `UglifyJSPlugin`, i am setting compress > `warnings to false`,
because here warning flag is meant to display warnings on terminal while
creating build in production mode. so it is set to false.

I didn't created an RM for #2 as it is minor change, if needed, i will
create.

​Reference to webpack definePlugin:
https://webpack.js.org/guides/production/#node-environment-variable​

Please find updated patch with fixed review comments and review.

Thanks,
Surinder

On Mon, Jul 31, 2017 at 3:31 PM, Ashesh Vashi  wrote:

> On Fri, Jul 28, 2017 at 12:42 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> I inspect the react code and in call stacks, found `process.env.NODE_ENV`
>> is undefined due to which 'SyntheticEvent.call' is not callable.
>>
>> So, to fix this, i add 'definePlugin' to plugins for `dev` environment in
>> `webpack.config.js`. Initially it was added only for `production`
>> environment. but it is needed for both, because React code is conditional
>> based on environment variables set.
>>
>
>> Please find attached patch and review.
>>
> As discussed, you're setting 'production', even in the 'development' mode.
>
> Please understand the code, and share the updated patch.
> Also - share the references next time, so that - committer can understand
> the reason for these changes.
>
> -- Thanks, Ashesh
>
>>
>> Thanks,
>> Surinder
>>
>
>


RM_2596_v1.patch
Description: Binary data


[Patch][pgAdmin4]: RM_2617 - pgAgent module is not loading after webpacking

2017-07-31 Thread Surinder Kumar
Hi,

Added an entry for pgAgent JS module to imports-loader to fix the issue.

Please find attached patch and let me know for review comments.

Thanks,
Surinder


RM_2617.patch
Description: Binary data