[pgAdmin4][PATCH] To fix the issue in Materialized View

2017-06-21 Thread Murtuza Zabuawala
Hi,

PFA minor patch to fix the issue where create dialog opens blank due to JS
error.
RM#2504

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
index 4fafcca..47ff649 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
@@ -173,7 +173,7 @@ define('pgadmin.node.mview', [
 },{
   id: 'fillfactor', label: gettext('Fill Factor'),
   group: gettext('Storage'), mode: ['edit', 'create'],
-  type: 'integer'
+  type: 'numeric'
 },{
   type: 'nested', control: 'tab', id: 'materialization',
   label: gettext('Parameter'), mode: ['edit', 'create'],


Build failed in Jenkins: pgadmin4-master-python27-feature #5

2017-06-21 Thread pgAdmin 4 Jenkins
See 


--
[...truncated 36.31 KB...]
runTest (pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest)
Tests the path through the query tool ... ok
runTest (pgadmin.feature_tests.table_ddl_feature_test.TableDdlFeatureTest)
Test table DDL generation ... ok
runTest (pgadmin.feature_tests.view_data_dml_queries.CheckForViewDataTest)
Validate Insert, Update operations in View data with given test data ... ok
runTest 
(pgadmin.feature_tests.xss_checks_panels_and_query_tool_test.CheckForXssFeatureTest)
Test XSS check for panels and query tool ... ok
runTest 
(pgadmin.feature_tests.xss_checks_pgadmin_debugger_test.CheckDebuggerForXssFeatureTest)
Tests to check if Debugger is vulnerable to XSS ... ok

--
Ran 8 tests in 192.992s

OK

=Running the test cases for 'EDB Postgres AS 9.4'=
runTest 
(pgadmin.feature_tests.connect_to_server_feature_test.ConnectsToServerFeatureTest)
Test database connection ... ok
runTest 
(pgadmin.feature_tests.copy_selected_query_results_feature_test.CopySelectedQueryResultsFeatureTest)
Copy rows, column using button and keyboard shortcut ... ok
runTest (pgadmin.feature_tests.pg_datatype_validation_test.PGDataypeFeatureTest)
Test checks for PG data-types output ... ok
runTest (pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest)
Tests the path through the query tool ... FAIL
runTest (pgadmin.feature_tests.table_ddl_feature_test.TableDdlFeatureTest)
Test table DDL generation ... ok
runTest (pgadmin.feature_tests.view_data_dml_queries.CheckForViewDataTest)
Validate Insert, Update operations in View data with given test data ... FAIL
runTest 
(pgadmin.feature_tests.xss_checks_panels_and_query_tool_test.CheckForXssFeatureTest)
Test XSS check for panels and query tool ... ok
runTest 
(pgadmin.feature_tests.xss_checks_pgadmin_debugger_test.CheckDebuggerForXssFeatureTest)
Tests to check if Debugger is vulnerable to XSS ... ok

==
FAIL: runTest 
(pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest)
Tests the path through the query tool
--
Traceback (most recent call last):
  File 
"
 line 44, in runTest
self._test_copies_columns()
  File 
"
 line 66, in _test_copies_columns
self.assertTrue("'Some-Name'" in pyperclip.paste())
AssertionError: False is not true

==
FAIL: runTest (pgadmin.feature_tests.view_data_dml_queries.CheckForViewDataTest)
Validate Insert, Update operations in View data with given test data
--
Traceback (most recent call last):
  File 
"
 line 108, in runTest
self._copy_paste_row()
  File 
"
 line 248, in _copy_paste_row
self._verify_row_data(False)
  File 
"
 line 280, in _verify_row_data
self.assertEquals(cells[idx], config_data[str(idx)][1])
AssertionError: u'[default]' != u'1'
- [default]
+ 1


--
Ran 8 tests in 191.240s

FAILED (failures=2)

=Running the test cases for 'EDB Postgres AS 9.5'=
runTest 
(pgadmin.feature_tests.connect_to_server_feature_test.ConnectsToServerFeatureTest)
Test database connection ... ERROR
ERROR
runTest 
(pgadmin.feature_tests.copy_selected_query_results_feature_test.CopySelectedQueryResultsFeatureTest)
Copy rows, column using button and keyboard shortcut ... ok
runTest (pgadmin.feature_tests.pg_datatype_validation_test.PGDataypeFeatureTest)
Test checks for PG data-types output ... ok
runTest (pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest)
Tests the path through the query tool ... ok
runTest (pgadmin.feature_tests.table_ddl_feature_test.TableDdlFeatureTest)
Test table DDL generation ... ok
runTest (pgadmin.feature_tests.view_data_dml_queries.CheckForViewDataTest)
Validate Insert, Update operations in View data with given test data ... ok
runTest 
(pgadmin.feature_tests.xss_checks_panels_and_query_tool_test.CheckForXssFeatureTest)
Test XSS check for panels and query tool ... ok
runTest 
(pga

Re: [pgAdmin4][PATCH] To fix the issue in Materialized View

2017-06-21 Thread Surinder Kumar
Hi Murtuza,

It seems like 'integer' control is replaced by 'numeric' control. Can you
find and replace type: 'integer' to 'numeric' wherever necessary ?



On Wed, Jun 21, 2017 at 1:54 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch to fix the issue where create dialog opens blank due to JS
> error.
> RM#2504
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Build failed in Jenkins: pgadmin4-master-python27-feature #6

2017-06-21 Thread pgAdmin 4 Jenkins
See 


--
[...truncated 82.62 KB...]
  File 
"
 line 80, in until
raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for spinner to disappear


==
ERROR: runTest 
(pgadmin.feature_tests.copy_selected_query_results_feature_test.CopySelectedQueryResultsFeatureTest)
Copy rows, column using button and keyboard shortcut
--
Traceback (most recent call last):
  File 
"
 line 37, in setUp
self.page.wait_for_spinner_to_disappear()
  File 
"
 line 225, in wait_for_spinner_to_disappear
self._wait_for("spinner to disappear", spinner_has_disappeared)
  File 
"
 line 241, in _wait_for
"Timed out waiting for " + waiting_for_message)
  File 
"
 line 80, in until
raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for spinner to disappear


==
ERROR: runTest 
(pgadmin.feature_tests.pg_datatype_validation_test.PGDataypeFeatureTest)
Test checks for PG data-types output
--
Traceback (most recent call last):
  File 
"
 line 37, in setUp
self.page.wait_for_spinner_to_disappear()
  File 
"
 line 225, in wait_for_spinner_to_disappear
self._wait_for("spinner to disappear", spinner_has_disappeared)
  File 
"
 line 241, in _wait_for
"Timed out waiting for " + waiting_for_message)
  File 
"
 line 80, in until
raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for spinner to disappear


==
ERROR: runTest 
(pgadmin.feature_tests.query_tool_journey_test.QueryToolJourneyTest)
Tests the path through the query tool
--
Traceback (most recent call last):
  File 
"
 line 37, in setUp
self.page.wait_for_spinner_to_disappear()
  File 
"
 line 225, in wait_for_spinner_to_disappear
self._wait_for("spinner to disappear", spinner_has_disappeared)
  File 
"
 line 241, in _wait_for
"Timed out waiting for " + waiting_for_message)
  File 
"
 line 80, in until
raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message: Timed out waiting for spinner to disappear


==
ERROR: runTest 
(pgadmin.feature_tests.table_ddl_feature_test.TableDdlFeatureTest)
Test table DDL generation
--
Traceback (most recent call last):
  File 
"
 line 37, in setUp
self.page.wait_for_spinner_to_disappear()
  File 
"
 line 225, in wait_for_spinner_to_disappear
self._wait_for("spinner to disappear", spinner_has_disappeared)
  File 
"

pgAdmin 4 commit: Increase the default size of the Grant Wizard to enab

2017-06-21 Thread Dave Page
Increase the default size of the Grant Wizard to enable it to properly display 
privileges at the default size on smaller displays. Fixes #2013

Branch
--
master

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

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



Re: [pgAdmin4][PATCH] To increase the size of Grant Wizard dialog

2017-06-21 Thread Dave Page
Thanks, applied.

On Tue, Jun 20, 2017 at 5:48 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA minor patch to make Grant Wizard dialog size larger so that it displays
> all the privileges properly when opened in smaller resolution screen.
> RM#2013
>
> Tested on 1024 x 768 screen resolution.
>
> --
> 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: Consolidate selection colors in the drop down menu an

2017-06-21 Thread Dave Page
Consolidate selection colors in the drop down menu and browser tree to match 
the light blue agreed upon in the styleguide.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=281b67952a94bc1599536c2b6c469252f233aa69
Author: Shruti B Iyer 

Modified Files
--
web/pgadmin/static/css/aci_tree.overrides.css | 17 +
web/pgadmin/static/css/select2.overrides.css  |  4 
web/pgadmin/templates/base.html   |  1 +
3 files changed, 22 insertions(+)



Re: [pgAdmin4][PATCH] Consolidating Selection Colors

2017-06-21 Thread Dave Page
Thanks, patch applied.

On Tue, Jun 20, 2017 at 9:39 PM, Shruti B Iyer  wrote:
> Hi Hackers!
>
> Attached is a patch that consolidates selection colors in the drop down menu
> and browser tree to match the light blue agreed upon in the styleguide.
>
> Thanks,
> Shirley and Shruti



-- 
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 issue in Materialized View

2017-06-21 Thread Murtuza Zabuawala
Hi,

Please ignore previous patch.

Attached is the updated patch which includes fixes for Materialized View &
pgAgent modules are also included.

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

On Wed, Jun 21, 2017 at 1:54 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA minor patch to fix the issue where create dialog opens blank due to JS
> error.
> RM#2504
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
index 4fafcca..7e1c835 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
@@ -173,7 +173,7 @@ define('pgadmin.node.mview', [
 },{
   id: 'fillfactor', label: gettext('Fill Factor'),
   group: gettext('Storage'), mode: ['edit', 'create'],
-  type: 'integer'
+  type: 'int'
 },{
   type: 'nested', control: 'tab', id: 'materialization',
   label: gettext('Parameter'), mode: ['edit', 'create'],
diff --git 
a/web/pgadmin/browser/server_groups/servers/pgagent/schedules/templates/pga_schedule/js/pga_schedule.js
 
b/web/pgadmin/browser/server_groups/servers/pgagent/schedules/templates/pga_schedule/js/pga_schedule.js
index f92c5b1..df6d98e 100644
--- 
a/web/pgadmin/browser/server_groups/servers/pgagent/schedules/templates/pga_schedule/js/pga_schedule.js
+++ 
b/web/pgadmin/browser/server_groups/servers/pgagent/schedules/templates/pga_schedule/js/pga_schedule.js
@@ -251,7 +251,7 @@ define('pgadmin.node.pga_schedule', [
   return pgBrowser.Node.Model.prototype.parse.apply(this, arguments);
 },
 schema: [{
-  id: 'jscid', label: gettext('ID'), type: 'integer',
+  id: 'jscid', label: gettext('ID'), type: 'int',
   cellHeaderClasses: 'width_percent_5', mode: ['properties']
 },{
   id: 'jscname', label: gettext('Name'), type: 'text',
diff --git 
a/web/pgadmin/browser/server_groups/servers/pgagent/steps/templates/pga_jobstep/js/pga_jobstep.js
 
b/web/pgadmin/browser/server_groups/servers/pgagent/steps/templates/pga_jobstep/js/pga_jobstep.js
index 7e676a3..baabda6 100644
--- 
a/web/pgadmin/browser/server_groups/servers/pgagent/steps/templates/pga_jobstep/js/pga_jobstep.js
+++ 
b/web/pgadmin/browser/server_groups/servers/pgagent/steps/templates/pga_jobstep/js/pga_jobstep.js
@@ -90,7 +90,7 @@ define('pgadmin.node.pga_jobstep', [
 },
 idAttribute: 'jstid',
 schema: [{
-  id: 'jstid', label: gettext('ID'), type: 'integer',
+  id: 'jstid', label: gettext('ID'), type: 'int',
   cellHeaderClasses: 'width_percent_5', mode: ['properties']
 },{
   id: 'jstname', label: gettext('Name'), type: 'text',


pgAdmin 4 commit: Vendorize React. This is required at this time becaus

2017-06-21 Thread Dave Page
Vendorize React. This is required at this time because we need to modify it to 
work with QtWebKit.

The patch to do that has been submitted upstream; if accepted, we can 
un-vendorize again.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=a45b87d9b711861d2b2dc623fd4786e69c35e527
Author: George Gelashvili 

Modified Files
--
web/package.json   | 4 +-
web/pgadmin/static/vendor/react-dom/LICENSE|31 +
web/pgadmin/static/vendor/react-dom/PATENTS|33 +
web/pgadmin/static/vendor/react-dom/README.md  |54 +
.../vendor/react-dom/dist/react-dom-server.js  | 16223 
.../vendor/react-dom/dist/react-dom-server.min.js  |15 +
.../static/vendor/react-dom/dist/react-dom.js  | 18265 +++
.../static/vendor/react-dom/dist/react-dom.min.js  |15 +
web/pgadmin/static/vendor/react-dom/index.js   | 3 +
.../vendor/react-dom/lib/ARIADOMPropertyConfig.js  |73 +
.../static/vendor/react-dom/lib/AutoFocusUtils.js  |23 +
.../vendor/react-dom/lib/BeforeInputEventPlugin.js |   384 +
.../static/vendor/react-dom/lib/CSSProperty.js |   147 +
.../vendor/react-dom/lib/CSSPropertyOperations.js  |   208 +
.../static/vendor/react-dom/lib/CallbackQueue.js   |   118 +
.../vendor/react-dom/lib/ChangeEventPlugin.js  |   320 +
.../vendor/react-dom/lib/DOMChildrenOperations.js  |   224 +
.../static/vendor/react-dom/lib/DOMLazyTree.js |   117 +
.../static/vendor/react-dom/lib/DOMNamespaces.js   |19 +
.../static/vendor/react-dom/lib/DOMProperty.js |   209 +
.../vendor/react-dom/lib/DOMPropertyOperations.js  |   236 +
web/pgadmin/static/vendor/react-dom/lib/Danger.js  |47 +
.../react-dom/lib/DefaultEventPluginOrder.js   |25 +
.../vendor/react-dom/lib/EnterLeaveEventPlugin.js  |99 +
.../static/vendor/react-dom/lib/EventConstants.js  |91 +
.../static/vendor/react-dom/lib/EventPluginHub.js  |   277 +
.../vendor/react-dom/lib/EventPluginRegistry.js|   254 +
.../vendor/react-dom/lib/EventPluginUtils.js   |   225 +
.../vendor/react-dom/lib/EventPropagators.js   |   133 +
.../react-dom/lib/FallbackCompositionState.js  |94 +
.../vendor/react-dom/lib/HTMLDOMPropertyConfig.js  |   211 +
.../static/vendor/react-dom/lib/KeyEscapeUtils.js  |58 +
.../vendor/react-dom/lib/LinkedValueUtils.js   |   134 +
.../vendor/react-dom/lib/PluginModuleType.js   |12 +
.../static/vendor/react-dom/lib/PooledClass.js |   111 +
.../react-dom/lib/ReactBrowserEventEmitter.js  |   327 +
.../static/vendor/react-dom/lib/ReactChildFiber.js |   243 +
.../vendor/react-dom/lib/ReactChildReconciler.js   |   153 +
.../lib/ReactComponentBrowserEnvironment.js|29 +
.../react-dom/lib/ReactComponentEnvironment.js |45 +
.../react-dom/lib/ReactComponentTreeTestUtils.js   |86 +
.../react-dom/lib/ReactCompositeComponent.js   |   901 +
.../static/vendor/react-dom/lib/ReactCoroutine.js  |80 +
.../static/vendor/react-dom/lib/ReactDOM.js|   110 +
.../vendor/react-dom/lib/ReactDOMComponent.js  |  1000 +
.../vendor/react-dom/lib/ReactDOMComponentFlags.js |17 +
.../vendor/react-dom/lib/ReactDOMComponentTree.js  |   194 +
.../vendor/react-dom/lib/ReactDOMContainerInfo.js  |32 +
.../vendor/react-dom/lib/ReactDOMEmptyComponent.js |59 +
.../vendor/react-dom/lib/ReactDOMFeatureFlags.js   |18 +
.../static/vendor/react-dom/lib/ReactDOMFiber.js   |97 +
.../vendor/react-dom/lib/ReactDOMIDOperations.js   |33 +
.../static/vendor/react-dom/lib/ReactDOMInput.js   |   277 +
.../react-dom/lib/ReactDOMInvalidARIAHook.js   |92 +
.../lib/ReactDOMNullInputValuePropHook.js  |42 +
.../static/vendor/react-dom/lib/ReactDOMOption.js  |   122 +
.../static/vendor/react-dom/lib/ReactDOMSelect.js  |   199 +
.../vendor/react-dom/lib/ReactDOMSelection.js  |   211 +
.../static/vendor/react-dom/lib/ReactDOMServer.js  |25 +
.../vendor/react-dom/lib/ReactDOMServerUMDEntry.js |15 +
.../vendor/react-dom/lib/ReactDOMTextComponent.js  |   163 +
.../vendor/react-dom/lib/ReactDOMTextarea.js   |   159 +
.../vendor/react-dom/lib/ReactDOMTreeTraversal.js  |   135 +
.../vendor/react-dom/lib/ReactDOMUMDEntry.js   |33 +
.../react-dom/lib/ReactDOMUnknownPropertyHook.js   |   111 +
.../static/vendor/react-dom/lib/ReactDebugTool.js  |   360 +
.../react-dom/lib/ReactDefaultBatchingStrategy.js  |67 +
.../vendor/react-dom/lib/ReactDefaultInjection.js  |85 +
.../vendor/react-dom/lib/ReactElementSymbol.js |19 +
.../vendor/react-dom/lib/ReactEmptyComponent.js|29 +
.../static/vendor/react-dom/lib/ReactErrorUtils.js |76 +
.../vendor/react-dom/lib/ReactEventEmitterMixin.js |32 +
.../vendor/react-dom/lib/ReactEventListener.js |   154 +
.../vendor/react-dom/lib/ReactFeatureFlags.js  |21 +
.../static/vendor/react-dom/lib/ReactFiber.js  |   19

pgAdmin 4 commit: Fix React to work with QtWebKit

2017-06-21 Thread Dave Page
Fix React to work with QtWebKit

We learned that the underlying issue was related to react-dom's 
SyntheticEvent.augmentClass function being undefined.

This seems to be caused by attempted property assignment after the 
SyntheticEvent had been replaced by a Proxy of itself. This works fine in 
Chromium et al, but QtWebKit doesn't deal with Proxy Event objects well.
Moving the augmentClass definition and assignment up above the Proxy stuff 
resolves the issue in a PR to React: 
https://github.com/facebook/react/pull/10011

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=5cfa22cf23d039c5487055248cf5df0fd9168fc2
Author: George Gelashvili 

Modified Files
--
.../vendor/react-dom/dist/react-dom-server.js  | 45 +++--
.../vendor/react-dom/dist/react-dom-server.min.js  | 16 +---
.../static/vendor/react-dom/dist/react-dom.js  | 45 +++--
.../static/vendor/react-dom/dist/react-dom.min.js  | 16 +---
.../static/vendor/react-dom/lib/SyntheticEvent.js  | 47 +++---
web/yarn.lock  | 14 ++-
6 files changed, 75 insertions(+), 108 deletions(-)



Re: [pgAdmin4][PATCH] To fix the issue in Materialized View

2017-06-21 Thread Murtuza Zabuawala
Apologies disregard my previous patch also,

I missed changes in "pga_job.js".

Thanks to Harshal pointing that out.



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

On Wed, Jun 21, 2017 at 3:44 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> Please ignore previous patch.
>
> Attached is the updated patch which includes fixes for Materialized View &
> pgAgent modules are also included.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Jun 21, 2017 at 1:54 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA minor patch to fix the issue where create dialog opens blank due to
>> JS error.
>> RM#2504
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
diff --git 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
index 4fafcca..7e1c835 100644
--- 
a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
+++ 
b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mview/js/mview.js
@@ -173,7 +173,7 @@ define('pgadmin.node.mview', [
 },{
   id: 'fillfactor', label: gettext('Fill Factor'),
   group: gettext('Storage'), mode: ['edit', 'create'],
-  type: 'integer'
+  type: 'int'
 },{
   type: 'nested', control: 'tab', id: 'materialization',
   label: gettext('Parameter'), mode: ['edit', 'create'],
diff --git 
a/web/pgadmin/browser/server_groups/servers/pgagent/schedules/templates/pga_schedule/js/pga_schedule.js
 
b/web/pgadmin/browser/server_groups/servers/pgagent/schedules/templates/pga_schedule/js/pga_schedule.js
index f92c5b1..df6d98e 100644
--- 
a/web/pgadmin/browser/server_groups/servers/pgagent/schedules/templates/pga_schedule/js/pga_schedule.js
+++ 
b/web/pgadmin/browser/server_groups/servers/pgagent/schedules/templates/pga_schedule/js/pga_schedule.js
@@ -251,7 +251,7 @@ define('pgadmin.node.pga_schedule', [
   return pgBrowser.Node.Model.prototype.parse.apply(this, arguments);
 },
 schema: [{
-  id: 'jscid', label: gettext('ID'), type: 'integer',
+  id: 'jscid', label: gettext('ID'), type: 'int',
   cellHeaderClasses: 'width_percent_5', mode: ['properties']
 },{
   id: 'jscname', label: gettext('Name'), type: 'text',
diff --git 
a/web/pgadmin/browser/server_groups/servers/pgagent/steps/templates/pga_jobstep/js/pga_jobstep.js
 
b/web/pgadmin/browser/server_groups/servers/pgagent/steps/templates/pga_jobstep/js/pga_jobstep.js
index 7e676a3..baabda6 100644
--- 
a/web/pgadmin/browser/server_groups/servers/pgagent/steps/templates/pga_jobstep/js/pga_jobstep.js
+++ 
b/web/pgadmin/browser/server_groups/servers/pgagent/steps/templates/pga_jobstep/js/pga_jobstep.js
@@ -90,7 +90,7 @@ define('pgadmin.node.pga_jobstep', [
 },
 idAttribute: 'jstid',
 schema: [{
-  id: 'jstid', label: gettext('ID'), type: 'integer',
+  id: 'jstid', label: gettext('ID'), type: 'int',
   cellHeaderClasses: 'width_percent_5', mode: ['properties']
 },{
   id: 'jstname', label: gettext('Name'), type: 'text',
diff --git 
a/web/pgadmin/browser/server_groups/servers/pgagent/templates/pga_job/js/pga_job.js
 
b/web/pgadmin/browser/server_groups/servers/pgagent/templates/pga_job/js/pga_job.js
index 9702bec..ea1f118 100644
--- 
a/web/pgadmin/browser/server_groups/servers/pgagent/templates/pga_job/js/pga_job.js
+++ 
b/web/pgadmin/browser/server_groups/servers/pgagent/templates/pga_job/js/pga_job.js
@@ -97,7 +97,7 @@ define('pgadmin.node.pga_job', [
   id: 'jobclass', label: gettext('Job class'), type: 'text',
   mode: ['properties']
 },{
-  id: 'jobjclid', label: gettext('Job class'), type: 'integer',
+  id: 'jobjclid', label: gettext('Job class'), type: 'int',
   control: 'node-ajax-options', url: 'classes', url_with_id: false,
   cache_node: 'server', mode: ['create', 'edit'],
   select2: {allowClear: false},


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

2017-06-21 Thread Dave Page
Hi George

On Tue, Jun 20, 2017 at 10:29 PM, George Gelashvili
 wrote:
> We learned that the underlying issue was related to react-dom's
> SyntheticEvent.augmentClass function being undefined.
>
> This seems to be caused by attempted property assignment after the
> SyntheticEvent had been replaced by a Proxy of itself. This works fine in
> Chromium et al, but QtWebKit doesn't deal with Proxy Event objects well.
> Moving the augmentClass definition and assignment up above the Proxy stuff
> resolves the issue in a PR to React:
> https://github.com/facebook/react/pull/10011
>
> This has a decent chance of being rejected, as QtWebKit appears to be losing
> support.
>
> While and if this is being sorted out, we vendorized React, as one does.
> Here are patches on the version we were using previously, and the fix from
> the above PR.

Thanks - committed.

> We started talking to some Pivotal folks about QtWebKit to see if we can fix
> the Proxy Event issue in the browser.
> We are also looking into replacements for QtWebKit.

Yeah, so here's the current state of play there:

- Some major Linuxes don't seem to have added QtWebEngine to their packages yet.

- QtWebEngine has multiple issues under Windows; it's *very* slow, and
doesn't play nicely with some graphics cards and Remote Desktop.

- QtWebKit (official) has rendering issues, and has been deprecated by Qt.

- QtWebKit (annulen) fixes the rendering issues, and generally works
well, but is very slow on Windows (though not as bad as QtWebEngine).

- QtWebKit (annulen) is a fork, which may or may not live for long.
It's also still quite far behind the latest WebKit code.

- ActiveQt is looking extremely promising on Windows, embedding IE as
the browser. It's speed is on par with QtWebKit on Mac. We're
currently working on handling multiple tabs/windows and sharing
cookies between them.

- Electron and Node-Webkit are performant options, but don't support
tabs, and may not even support multiple windows in the same session.

Neel is currently working on the ActiveQt option for Windows. I've
been very impressed by its speed, and of course, JS support is per the
installed version of IE. If that pans out, we could potentially move
back to QtWebEngine on Linux/Mac (where the latest versions may well
be improved), and use ActiveQt on Windows, thus dropping WebKit
altogether.

Another option would be to help get the annulen QtWebKit port up to
par; fix the performance issues on Windows, and get it up to the
latest WebKit code. That seems like it would take much more work, and
I don't think our team has the capacity for that. If yours does, then
it's certainly worth exploring.

Ashesh is also planning to spend a little more time looking more
deeply at Electron/Node-Webkit as well as other options, once he's
finished his current work.

Other thoughts/experiences are definitely welcome.

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

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



[pgAdmin4][Patch]: Fixed #2487: get_preference() uses a synchronous AJAX request

2017-06-21 Thread Khushboo Vashi
Hi,

Please find attached patch to fix RM #2487: get_preference() uses a
synchronous AJAX request.

Introduced the client side caching for preferences to get rid of
synchronous AJAX request.


Thanks,
Khushboo
diff --git a/web/pgadmin/browser/templates/browser/js/browser.js b/web/pgadmin/browser/templates/browser/js/browser.js
index e8ea93d..a89c6dd 100644
--- a/web/pgadmin/browser/templates/browser/js/browser.js
+++ b/web/pgadmin/browser/templates/browser/js/browser.js
@@ -325,6 +325,9 @@ define(
   }
   obj.initialized = true;
 
+  // Cache preferences
+  obj.cache_preferences();
+
   // Initialize the Docker
   obj.docker = new wcDocker(
 '#dockerContainer', {
@@ -597,7 +600,7 @@ define(
 
 // This will hold preference data (Works as a cache object)
 // Here node will be a key and it's preference data will be value
-node_preference_data: {},
+preferences_cache: {},
 
 // Add menus of module/extension at appropriate menu
 add_menus: function(menus) {
@@ -749,24 +752,42 @@ define(
   }
 },
 
-get_preference: function (module, preference_name) {
-  var preference = null;
+// Get preference value from cache
+get_preference: function(module, preference) {
+  var self = this;
+  // If cache is not yet loaded then keep checking
+  if(_.size(self.preferences_cache) == 0) {
+var preference_data = setInterval(check_preference, 1000);
+
+function check_preference() {
+  if(_.size(self.preferences_cache) > 0) {
+clearInterval(preference_data);
+return _.findWhere(self.preferences_cache, {'module': module, 'name': preference});
+  }
+}
+  }
+  else {
+return _.findWhere(self.preferences_cache, {'module': module, 'name': preference});
+  }
+},
+
+// Get and cache the preferences
+cache_preferences: function () {
+  var self = this;
   $.ajax({
-async: false,
-url: url_for(
-  'preferences.get_by_name', {
-'module': module,
-'preference': preference_name
-  }),
+url: url_for('preferences.get_all'),
 success: function(res) {
-  preference = res;
+  self.preferences_cache = res;
 },
 error: function(xhr, status, error) {
-
+  try {
+var err = $.parseJSON(xhr.responseText);
+Alertify.alert(gettext('Preferences loading failed.'),
+  err.errormsg
+);
+  } catch (e) {}
 }
   });
-
-  return preference;
 },
 
 _findTreeChildNode: function(_i, _d, _o) {
diff --git a/web/pgadmin/preferences/__init__.py b/web/pgadmin/preferences/__init__.py
index 52f3f56..a59e26d 100644
--- a/web/pgadmin/preferences/__init__.py
+++ b/web/pgadmin/preferences/__init__.py
@@ -60,7 +60,7 @@ class PreferencesModule(PgAdminModule):
 Returns:
 list: a list of url endpoints exposed to the client.
 """
-return ['preferences.index', 'preferences.get_by_name']
+return ['preferences.index', 'preferences.get_by_name', 'preferences.get_all']
 
 
 blueprint = PreferencesModule(MODULE_NAME, __name__)
@@ -142,6 +142,27 @@ def preferences(module=None, preference=None):
 )
 
 
+@blueprint.route("/get_all", methods=["GET"], endpoint='get_all')
+@login_required
+def preferences_s():
+"""Fetch all preferences for caching."""
+# Load Preferences
+pref = Preferences.preferences()
+res = []
+
+for m in pref:
+if len(m['categories']):
+for c in m['categories']:
+for p in c['preferences']:
+p['module'] = m['label']
+res.append(p)
+
+return ajax_response(
+response=res,
+status=200
+)
+
+
 @blueprint.route("/", methods=["PUT"], endpoint="update")
 @login_required
 def save(pid):
diff --git a/web/pgadmin/preferences/templates/preferences/preferences.js b/web/pgadmin/preferences/templates/preferences/preferences.js
index 080bc38..8fc3cd8 100644
--- a/web/pgadmin/preferences/templates/preferences/preferences.js
+++ b/web/pgadmin/preferences/templates/preferences/preferences.js
@@ -389,6 +389,8 @@ define([
 
   if (e.button.text == gettext('OK')){
 preferences.updateAll();
+// Refresh preferences cache
+pgBrowser.cache_preferences();
   }
 },
 build: function() {
diff --git a/web/pgadmin/static/js/check_node_visibility.js b/web/pgadmin/static/js/check_node_visibility.js
index 987a395..e50c2f5 100644
--- a/web/pgadmin/static/js/check_node_visibility.js
+++ b/web/pgadmin/static/js/check_node_visibility.js
@@ -30,21 +30,12 @@ define(['jquery', 'underscore', 'underscore.string'],
 return true;
   }
 
-  // If we have already fetched preference earlier then pick
-  // it from our cache object
-  if (_.has(pgBrowser.no

Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

2017-06-21 Thread Sarah McAlear
Hello!

Thank you for committing the patch!

We are currently looking into CEF (
https://bitbucket.org/chromiumembedded/cef) as an alternative to QTWebKit.
So far it looks promising. It works on all platforms. It is the base for
Google Chrome, so it should be maintained for some time to come. Version 60
is currently in development. At this point we are developing a prototype
for Mac as a proof of concept. We will keep you posted as we go.

We are able to launch the server in one terminal and launch our browser app
in another and use pgAdmin from that app.

It would be useful to have a framework to follow to decide what library
will be used to support pgAdmin in the future. What metrics are you
currently using? What data should we collect on prototypes in order to help
the selection process?

Thanks!
João & Sarah

On Wed, Jun 21, 2017 at 6:37 AM, Dave Page  wrote:

> Hi George
>
> On Tue, Jun 20, 2017 at 10:29 PM, George Gelashvili
>  wrote:
> > We learned that the underlying issue was related to react-dom's
> > SyntheticEvent.augmentClass function being undefined.
> >
> > This seems to be caused by attempted property assignment after the
> > SyntheticEvent had been replaced by a Proxy of itself. This works fine in
> > Chromium et al, but QtWebKit doesn't deal with Proxy Event objects well.
> > Moving the augmentClass definition and assignment up above the Proxy
> stuff
> > resolves the issue in a PR to React:
> > https://github.com/facebook/react/pull/10011
> >
> > This has a decent chance of being rejected, as QtWebKit appears to be
> losing
> > support.
> >
> > While and if this is being sorted out, we vendorized React, as one does.
> > Here are patches on the version we were using previously, and the fix
> from
> > the above PR.
>
> Thanks - committed.
>
> > We started talking to some Pivotal folks about QtWebKit to see if we can
> fix
> > the Proxy Event issue in the browser.
> > We are also looking into replacements for QtWebKit.
>
> Yeah, so here's the current state of play there:
>
> - Some major Linuxes don't seem to have added QtWebEngine to their
> packages yet.
>
> - QtWebEngine has multiple issues under Windows; it's *very* slow, and
> doesn't play nicely with some graphics cards and Remote Desktop.
>
> - QtWebKit (official) has rendering issues, and has been deprecated by Qt.
>
> - QtWebKit (annulen) fixes the rendering issues, and generally works
> well, but is very slow on Windows (though not as bad as QtWebEngine).
>
> - QtWebKit (annulen) is a fork, which may or may not live for long.
> It's also still quite far behind the latest WebKit code.
>
> - ActiveQt is looking extremely promising on Windows, embedding IE as
> the browser. It's speed is on par with QtWebKit on Mac. We're
> currently working on handling multiple tabs/windows and sharing
> cookies between them.
>
> - Electron and Node-Webkit are performant options, but don't support
> tabs, and may not even support multiple windows in the same session.
>
> Neel is currently working on the ActiveQt option for Windows. I've
> been very impressed by its speed, and of course, JS support is per the
> installed version of IE. If that pans out, we could potentially move
> back to QtWebEngine on Linux/Mac (where the latest versions may well
> be improved), and use ActiveQt on Windows, thus dropping WebKit
> altogether.
>
> Another option would be to help get the annulen QtWebKit port up to
> par; fix the performance issues on Windows, and get it up to the
> latest WebKit code. That seems like it would take much more work, and
> I don't think our team has the capacity for that. If yours does, then
> it's certainly worth exploring.
>
> Ashesh is also planning to spend a little more time looking more
> deeply at Electron/Node-Webkit as well as other options, once he's
> finished his current work.
>
> Other thoughts/experiences are definitely welcome.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

2017-06-21 Thread Dave Page
Hi

On Wed, Jun 21, 2017 at 3:23 PM, Sarah McAlear  wrote:
> Hello!
>
> Thank you for committing the patch!
>
> We are currently looking into CEF
> (https://bitbucket.org/chromiumembedded/cef) as an alternative to QTWebKit.
> So far it looks promising. It works on all platforms. It is the base for
> Google Chrome, so it should be maintained for some time to come. Version 60
> is currently in development. At this point we are developing a prototype for
> Mac as a proof of concept. We will keep you posted as we go.

Cool - we looked at CEF before, but...

> We are able to launch the server in one terminal and launch our browser app
> in another and use pgAdmin from that app.

... if memory serves, the problem we found was that on Windows it's
built using VC++ 2015, which doesn't play nicely with Python which
uses 2013 (as do the PostgreSQL utilities). Moving everything to 2015
would be non-trivial to say the least.

> It would be useful to have a framework to follow to decide what library will
> be used to support pgAdmin in the future. What metrics are you currently
> using? What data should we collect on prototypes in order to help the
> selection process?

Oh, it's highly scientific :-p. As the biggest issue between the
options is finding one which will work with our set of dependencies,
and supports new windows/tearable tabs (if it were no longer to be
embedded in our runtime), it's really down to:

- Getting a startup time of ~20 seconds or less in my test VM and on
my 16GB i7 SSD based desktop under Windows 10
- Ensuring that node expansion/load times are basically instant with a
local database server.

> Thanks!
> João & Sarah
>
> On Wed, Jun 21, 2017 at 6:37 AM, Dave Page  wrote:
>>
>> Hi George
>>
>> On Tue, Jun 20, 2017 at 10:29 PM, George Gelashvili
>>  wrote:
>> > We learned that the underlying issue was related to react-dom's
>> > SyntheticEvent.augmentClass function being undefined.
>> >
>> > This seems to be caused by attempted property assignment after the
>> > SyntheticEvent had been replaced by a Proxy of itself. This works fine
>> > in
>> > Chromium et al, but QtWebKit doesn't deal with Proxy Event objects well.
>> > Moving the augmentClass definition and assignment up above the Proxy
>> > stuff
>> > resolves the issue in a PR to React:
>> > https://github.com/facebook/react/pull/10011
>> >
>> > This has a decent chance of being rejected, as QtWebKit appears to be
>> > losing
>> > support.
>> >
>> > While and if this is being sorted out, we vendorized React, as one does.
>> > Here are patches on the version we were using previously, and the fix
>> > from
>> > the above PR.
>>
>> Thanks - committed.
>>
>> > We started talking to some Pivotal folks about QtWebKit to see if we can
>> > fix
>> > the Proxy Event issue in the browser.
>> > We are also looking into replacements for QtWebKit.
>>
>> Yeah, so here's the current state of play there:
>>
>> - Some major Linuxes don't seem to have added QtWebEngine to their
>> packages yet.
>>
>> - QtWebEngine has multiple issues under Windows; it's *very* slow, and
>> doesn't play nicely with some graphics cards and Remote Desktop.
>>
>> - QtWebKit (official) has rendering issues, and has been deprecated by Qt.
>>
>> - QtWebKit (annulen) fixes the rendering issues, and generally works
>> well, but is very slow on Windows (though not as bad as QtWebEngine).
>>
>> - QtWebKit (annulen) is a fork, which may or may not live for long.
>> It's also still quite far behind the latest WebKit code.
>>
>> - ActiveQt is looking extremely promising on Windows, embedding IE as
>> the browser. It's speed is on par with QtWebKit on Mac. We're
>> currently working on handling multiple tabs/windows and sharing
>> cookies between them.
>>
>> - Electron and Node-Webkit are performant options, but don't support
>> tabs, and may not even support multiple windows in the same session.
>>
>> Neel is currently working on the ActiveQt option for Windows. I've
>> been very impressed by its speed, and of course, JS support is per the
>> installed version of IE. If that pans out, we could potentially move
>> back to QtWebEngine on Linux/Mac (where the latest versions may well
>> be improved), and use ActiveQt on Windows, thus dropping WebKit
>> altogether.
>>
>> Another option would be to help get the annulen QtWebKit port up to
>> par; fix the performance issues on Windows, and get it up to the
>> latest WebKit code. That seems like it would take much more work, and
>> I don't think our team has the capacity for that. If yours does, then
>> it's certainly worth exploring.
>>
>> Ashesh is also planning to spend a little more time looking more
>> deeply at Electron/Node-Webkit as well as other options, once he's
>> finished his current work.
>>
>> Other thoughts/experiences are definitely welcome.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



-- 
Dave Page

pgAdmin 4 commit: Handle missing/dropped synonyms gracefully. Fixes #25

2017-06-21 Thread Dave Page
Handle missing/dropped synonyms gracefully. Fixes #2503

Branch
--
master

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

Modified Files
--
.../servers/databases/schemas/synonyms/__init__.py | 60 ++
1 file changed, 26 insertions(+), 34 deletions(-)



Re: [pgAdmin4][PATCH] To fix the issue in Synonym node

2017-06-21 Thread Dave Page
Thanks, applied.

On Wed, Jun 21, 2017 at 6:45 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to handle the deleted Synonym node gracefully when user clicks SQL
> or Properties Panel.
> RM#2503
>
> --
> 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: Update MatView and pgAgent modules to work with recen

2017-06-21 Thread Dave Page
Update MatView and pgAgent modules to work with recent integer/numeric changes. 
Fixes #2504

Branch
--
master

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

Modified Files
--
.../servers/databases/schemas/views/templates/mview/js/mview.js | 2 +-
.../servers/pgagent/schedules/templates/pga_schedule/js/pga_schedule.js | 2 +-
.../servers/pgagent/steps/templates/pga_jobstep/js/pga_jobstep.js   | 2 +-
.../server_groups/servers/pgagent/templates/pga_job/js/pga_job.js   | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)



Re: [pgAdmin4][PATCH] To fix the issue in Materialized View

2017-06-21 Thread Dave Page
Thanks, applied.

On Wed, Jun 21, 2017 at 11:25 AM, Murtuza Zabuawala
 wrote:
> Apologies disregard my previous patch also,
>
> I missed changes in "pga_job.js".
>
> Thanks to Harshal pointing that out.
>
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Jun 21, 2017 at 3:44 PM, Murtuza Zabuawala
>  wrote:
>>
>> Hi,
>>
>> Please ignore previous patch.
>>
>> Attached is the updated patch which includes fixes for Materialized View &
>> pgAgent modules are also included.
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Jun 21, 2017 at 1:54 PM, Murtuza Zabuawala
>>  wrote:
>>>
>>> Hi,
>>>
>>> PFA minor patch to fix the issue where create dialog opens blank due to
>>> JS error.
>>> RM#2504
>>>
>>> --
>>> 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



Re: [pgAdmin4][Patch]: Fixed #2487: get_preference() uses a synchronous AJAX request

2017-06-21 Thread Dave Page
Thanks, patch applied!

On Wed, Jun 21, 2017 at 12:44 PM, Khushboo Vashi
 wrote:
> Hi,
>
> Please find attached patch to fix RM #2487: get_preference() uses a
> synchronous AJAX request.
>
> Introduced the client side caching for preferences to get rid of synchronous
> AJAX request.
>
>
> Thanks,
> Khushboo



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

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



pgAdmin 4 commit: Maintain a client-side cache of preference values, po

2017-06-21 Thread Dave Page
Maintain a client-side cache of preference values, populated using an async 
call. Fixes #2487

Branch
--
master

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

Modified Files
--
.../browser/templates/browser/js/browser.js| 47 --
web/pgadmin/preferences/__init__.py| 23 ++-
.../templates/preferences/preferences.js   |  2 +
web/pgadmin/static/js/check_node_visibility.js | 19 +++--
4 files changed, 63 insertions(+), 28 deletions(-)



Re: [pgadmin-hackers][patch] History Detail Pane

2017-06-21 Thread Dave Page
Hi

Looking good. The only issue I found so far occurs if you open the
query tool, then immediately click on the history tab:

TypeError: Cannot read property 'CodeMirror' of undefined
at Object. (sqleditor.js:882)
at triggerEvents (backbone.js:208)
at Object.trigger (backbone.js:148)
at i.eventFunc (panel.js:101)
at i.__trigger (wcDocker.js:1941)
at i.__update (wcDocker.js:1818)
at i.__onTabChange (wcDocker.js:3970)
at i.__update (wcDocker.js:3482)
at i.__update (wcDocker.js:2787)
at wcDocker.js:20117

On Wed, Jun 21, 2017 at 4:45 PM, George Gelashvili
 wrote:
> Hi
>
> We rebased this on top of latest master.
>
> Cheers,
> Matt and George
>
> On Thu, Jun 15, 2017 at 10:43 AM, Dave Page  wrote:
>>
>> Hi
>>
>> We use Qt 5.8 at the moment, with the updated QtWebKit TP5 release
>> from https://github.com/annulen/webkit/releases. The issue occurs on
>> Windows and Mac, and probably Linux as well.
>>
>> Test builds can be found here: https://developer.pgadmin.org/~dpage/debug/
>>
>> On Thu, Jun 15, 2017 at 2:33 PM, Sarah McAlear 
>> wrote:
>> > Hi Dave!
>> >
>> > Just to verify, which version of QT are you using? The Readme calls for
>> > 5.5
>> > at the newest. Could you send us the compiled version of the app? Are
>> > you
>> > only seeing this on Windows?
>> >
>> > Thanks,
>> > Sarah & Shruti & João
>> >
>> > On Wed, Jun 14, 2017 at 3:46 PM, Sarah McAlear 
>> > wrote:
>> >>
>> >> Sounds good! We're looking into it.
>> >>
>> >> On Wed, Jun 14, 2017 at 12:15 PM, Robert Eckhardt
>> >> 
>> >> wrote:
>> >>>
>> >>> Absolutely makes sense.
>> >>>
>> >>> Matt, Sarah,
>> >>>
>> >>> Do we understand the issues Dave is mentioning well enough to look
>> >>> into
>> >>> it and tackle it?
>> >>>
>> >>> -- Rob
>> >>>
>> >>> On Wed, Jun 14, 2017 at 8:12 AM, Dave Page  wrote:
>> 
>>  Hi,
>> 
>>  Before I commit anything else for this patch, we need to fix the
>>  existing changes so they work in the desktop runtime (see the
>>  previous
>>  thread with the patches for the history pane changes). Have any of
>>  your team been able to look at that yet?
>> 
>>  On Wed, Jun 14, 2017 at 4:07 PM, Sarah McAlear 
>>  wrote:
>>  > Hi Hackers!
>>  >
>>  > This patch includes a new pane in the history tab that displays the
>>  > full
>>  > formatted query and meta data about the query.
>>  >
>>  > Thanks!
>>  > Shruti & Sarah
>>  >
>>  >
>>  >
>>  >
>>  >
>>  >
>>  > --
>>  > Sent via pgadmin-hackers mailing list
>>  > (pgadmin-hack...@postgresql.org)
>>  > To make changes to your subscription:
>>  > http://www.postgresql.org/mailpref/pgadmin-hackers
>>  >
>> 
>> 
>> 
>>  --
>>  Dave Page
>>  Blog: http://pgsnake.blogspot.com
>>  Twitter: @pgsnake
>> 
>>  EnterpriseDB UK: http://www.enterprisedb.com
>>  The Enterprise PostgreSQL Company
>> 
>> 
>>  --
>>  Sent via pgadmin-hackers mailing list
>>  (pgadmin-hack...@postgresql.org)
>>  To make changes to your subscription:
>>  http://www.postgresql.org/mailpref/pgadmin-hackers
>> >>>
>> >>>
>> >>
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hack...@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>



-- 
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-python35 #186

2017-06-21 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Maintain a client-side cache of preference values, populated using 
an

--
[...truncated 289.08 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.157s

OK

==
Test Result Summary
==

PostgreSQL 9.6:

151 tests passed
0 tests failed
12 tests skipped:
SynonymDeleteT

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

2017-06-21 Thread Shirley Wang
Hi all,

We've updated the borders around alerts so that they are more prominent.

[image: error alert (1).png]
[image: success alert (2).png]
[image: Neutral alert.png]
Everything else stays the same. Let me know your thoughts if any.

Shirley & Shruti

On Wed, May 31, 2017 at 3:02 PM Shirley Wang  wrote:

> On Wed, May 31, 2017 at 11:55 AM Dave Page  wrote:
>
>> On Wed, May 31, 2017 at 2:27 PM, Shirley Wang  wrote:
>>
>>>
 When you say "icon" here, are you talking about the combo box arrow, or
 icons on the items themselves? The latter are often useful if you have
 items of different types in the same list.

 I think we should have the combo box arrow, to show the user they don't
 have to type if they don't want to.

>>>
>>> I'm talking about the combo box arrow. I think that's fine, but in that
>>> case users shouldn't be able type, they should only be able to select from
>>> a group of options, like this:
>>>
>>> [image: options.png]
>>> From what I understand, the text field where a user can type in is for
>>> searching through options available to them. If we know that people tend to
>>> search by typing more than scrolling, we should use the precedent for type
>>> ahead dropdowns .
>>>
>>
>> We are using a much older precedent - one used in Windows for 20+ years
>> (possibly other OSs too).
>>
>> Remember that some of these combo boxes contain values that are specific
>> to the database object - the user may not know what to start typing, so the
>> arrow gives them a hint that they can get a list by clicking - or they can
>> type.
>>
>> The real difference here is that we also include the x to allow the box
>> to be cleared, where Windows would add a blank option as the first thing in
>> the list typically.
>>
>>
> I see. It feels like we're at a standstill as to which precedent to use
> and neither of us is wrong. This might be a good candidate for user
> testing. We can see how people are using the x as well as learn more about
> typing / selecting an option behavior.
>
> I believe there are some dropdowns in the partition design we can use to
> test. If it doesn't make sense there, I'm fine putting this in the back
> burner until there is a good workflow to test it.
>