Re: Tree view icon samples

2017-06-29 Thread Dave Page
On Wednesday, June 28, 2017, Chethana Kumar 
wrote:

> Hi Shirley,
>
> I tried installing the app from itunes but it seems like my account is
> expired and needs payment to be done for re-activation of it.  So can
> anybody please share your account credentials just to install this
> application for color blind testing.
>

Talk to IT please (don't forget this isn't an internal mailing list :-) )


>
> Or do I have any other way to install the app, please suggest.
>
> Thanks and Regards,
> Chethana kumar
>
> On Thu, Jun 29, 2017 at 6:05 AM, Dave Page  > wrote:
>
>>
>>
>> On Wed, Jun 28, 2017 at 3:48 PM, Shirley Wang > > wrote:
>>
>>> I recommend using Sim Daltonism to test colors!
>>>
>>> https://itunes.apple.com/us/app/sim-daltonism/id693112260?mt=12
>>>
>>
>> Excellent idea - Chethana, please grab a copy and verify that all icons
>> are distinct when tested for different types of colour blindness.
>>
>> Thanks!
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Chethana Kumar
> Principal UI/UX Designer
> EnterpriseDB Corporation
>
>
> The Postgres Database Company
>
> P: +91 86981 57146
> www.enterprisedb.com
>


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

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


[RM2522] Improve grid/column select all operation

2017-06-29 Thread Harshal Dhumal
Hi,

Please find attached patch for RM2522.

With this patch grid/column select all time is reduce to ~1 second from
8-10 seconds.

The solution was to use simple array concatenation instead of underscore
union while getting index of all selected complete rows.
Underscore union function is only useful when user selects different ranges
from grid and those ranges overlaps. In this case union function removes
duplicate (overlapped) rows.
However result grid in sqleditor do not support overlapped row selection so
we can simply cancat rows from different ranges without worrying about
overlapped row selection.



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

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/static/js/selection/range_selection_helper.js b/web/pgadmin/static/js/selection/range_selection_helper.js
index 25cd63c..4442f2c 100644
--- a/web/pgadmin/static/js/selection/range_selection_helper.js
+++ b/web/pgadmin/static/js/selection/range_selection_helper.js
@@ -94,7 +94,7 @@ define(['slickgrid'], function () {
 var indexArray = [];
 ranges.forEach(function (range) {
   if (rangeHasCompleteRows(grid, range))
-indexArray = _.union(indexArray, _.range(range.fromRow, range.toRow + 1));
+indexArray = indexArray.concat(_.range(range.fromRow, range.toRow + 1));
 });
 
 return indexArray;


Re: [RM2522] Improve grid/column select all operation

2017-06-29 Thread Harshal Dhumal
On Thu, Jun 29, 2017 at 4:33 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> Please find attached patch for RM2522.
>
> With this patch grid/column select all time is reduce to ~1 second from
> 8-10 seconds.
>
This benchmarking is performed with 100k rows and 2 columns (int, text).



>
> The solution was to use simple array concatenation instead of underscore
> union while getting index of all selected complete rows.
> Underscore union function is only useful when user selects different
> ranges from grid and those ranges overlaps. In this case union function
> removes duplicate (overlapped) rows.
> However result grid in sqleditor do not support overlapped row selection
> so we can simply cancat rows from different ranges without worrying about
> overlapped row selection.
>
>
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][Patch]: Feature #2506 - Allow the dashboard panel to be closed

2017-06-29 Thread Khushboo Vashi
Hi,

Please find the attached updated patch.

Thanks,
Khushboo

On Wed, Jun 28, 2017 at 7:08 PM, Dave Page  wrote:

> Hi
>
> On Tue, Jun 27, 2017 at 11:54 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> On Tue, Jun 27, 2017 at 8:08 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> I've had to revert this. Whilst it seems to work, after showing/hiding
>>> the dashboard, I later find that when I completely reload the app, it
>>> fails, leaving just the object menu present. I haven't come up with a
>>> concrete case to reproduce it. In the console, I see:
>>>
>>>
>>> wcDocker.min.js:38 Uncaught TypeError: Cannot read property '__save' of
>>> null at e.save (wcDocker.min.js:38) at Object.save_current_layout (
>>> browser.js:340) at e.handleVisibility (panel.js:156) at e.__trigger (
>>> wcDocker.min.js:34) at e.trigger (wcDocker.min.js:38) at e.clear (
>>> wcDocker.min.js:38) at Object.init (browser.js:386) at (index):278 at
>>> Object.execCb (require.min.js:29) at Z.check (require.min.js:18)
>>>
>>> I couldn't reproduce this issue. I have tried many things to reproduce
>> it but not succeeded. I also switched server_mode but no luck.
>> I think there should be any specific condition that fails this but have
>> no clue.
>>
>> I have rebased this patch and attached.
>>
>
> Thanks. I applied the patch, restarted my server, and did a hard-reload in
> my browser and immediately saw the problem - see the attached screenshot.
>
Fixed

>
>
Clearing the saved browser layout from the config DB solved the problem for
> me (once I refreshed the browser), so something is likely getting messed up
> in there. I've attached the value that was previously saved as inserting
> that into a test database will likely be easier than trying to reproduce
> the issue.
>
> Thanks!
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/web/pgadmin/browser/static/js/panel.js b/web/pgadmin/browser/static/js/panel.js
index 71d2c68..20f865d 100644
--- a/web/pgadmin/browser/static/js/panel.js
+++ b/web/pgadmin/browser/static/js/panel.js
@@ -7,7 +7,8 @@ function(_, pgAdmin) {
   pgAdmin.Browser.Panel = function(options) {
 var defaults = [
   'name', 'title', 'width', 'height', 'showTitle', 'isCloseable',
-  'isPrivate', 'content', 'icon', 'events', 'onCreate', 'elContainer'
+  'isPrivate', 'content', 'icon', 'events', 'onCreate', 'elContainer',
+  'canHide', 'limit'
 ];
 _.extend(this, _.pick(options, defaults));
   }
@@ -25,12 +26,14 @@ function(_, pgAdmin) {
 panel: null,
 onCreate: null,
 elContainer: false,
+limit: null,
 load: function(docker, title) {
   var that = this;
   if (!that.panel) {
 docker.registerPanelType(that.name, {
   title: that.title,
   isPrivate: that.isPrivate,
+  limit: that.limit,
   onCreate: function(myPanel) {
 $(myPanel).data('pgAdminName', that.name);
 myPanel.initSize(that.width, that.height);
@@ -85,6 +88,14 @@ function(_, pgAdmin) {
   });
   that.resizedContainer.apply(myPanel);
 }
+
+// Bind events only if they are configurable
+if (that.canHide) {
+  _.each([wcDocker.EVENT.CLOSED, wcDocker.EVENT.VISIBILITY_CHANGED],
+function(ev) {
+  myPanel.on(ev, that.handleVisibility.bind(myPanel, ev));
+});
+}
   }
 });
   }
@@ -134,7 +145,32 @@ function(_, pgAdmin) {
   100
 );
   }
+},
+handleVisibility: function(eventName) {
+  // Currently this function only works with dashboard panel but
+  // as per need it can be extended
+  if (this._type != 'dashboard' || _.isUndefined(pgAdmin.Dashboard))
+return;
+
+  if (eventName == 'panelClosed') {
+pgBrowser.save_current_layout(pgBrowser);
+pgAdmin.Dashboard.toggleVisibility(false);
+  }
+  else if (eventName == 'panelVisibilityChanged') {
+if (pgBrowser.tree) {
+  pgBrowser.save_current_layout(pgBrowser);
+  var selectedNode = pgBrowser.tree.selected();
+  // Discontinue this event after first time visible
+  this.off(wcDocker.EVENT.VISIBILITY_CHANGED);
+  if (!_.isUndefined(pgAdmin.Dashboard))
+pgAdmin.Dashboard.toggleVisibility(true);
+  // Explicitly trigger tree selected event when we add the tab.
+  pgBrowser.Events.trigger('pgadmin-browser:tree:selected', selectedNode,
+  pgBrowser.tree.itemData(selectedNode), pgBrowser.Node);
+}
+  }
 }
+
   });
 
   return pgAdmin.Browser.Panel;
diff --git a/web/pgadmin/browser/templates/browser/js/browser.js b/web/pgadmin/browser/templates/browser/js/browser.js
index e587348..8a3a3b9 100644
--- a/web/pgadmin/browser/templates/browser/js/browse

Re: [pgadmin-hackers][Patch] Change alert styling

2017-06-29 Thread Joao De Almeida Pereira
Hi!

Are you committing to migrating all the main CSS to SCSS? Whilst I can see
> the advantages of SCSS, I don't want to end up with a mix and match mess of
> the two (though, I'd be fine with keeping the smaller, module-specific CSS
> if it doesn't make sense to migrate it).


It makes more sense to switch the CSS over as we need it and change the
classes to be using the correct variables and nest them appropriately.


What is the advantage of this over simply overriding the existing styles?


We can't simply override the styles because we are adding an icon to the
alert. So since we have to add a wrapper anyway we decided to style it like
we normally would.

Thanks,
João & Sarah

On Wed, Jun 28, 2017 at 8:51 PM, Dave Page  wrote:

> Hi
>
> On Wed, Jun 28, 2017 at 4:40 PM, Joao Pedro De Almeida Pereira <
> jdealmeidapere...@pivotal.io> wrote:
>
>> Hi Hackers,
>>
>> In this patch we are introducing SCSS that we generated for the style
>> guide.
>> [image: Inline image 1]
>>
>> The patch is split into 2 files:
>> - 01-add-scss-building-to-webpack.diff
>> In this file we add the compilation of SCSS into CSS to webpack
>>
>
> Are you committing to migrating all the main CSS to SCSS? Whilst I can see
> the advantages of SCSS, I don't want to end up with a mix and match mess of
> the two (though, I'd be fine with keeping the smaller, module-specific CSS
> if it doesn't make sense to migrate it).
>
>
>>
>> - 02-change-alert-messages.diff
>> In this file we create a Wrapper for Alertify's success and error
>> function so we can introduce new styling on them. We change all the places
>> in the app where alertify.success, alertify.notify (with the type 'error'
>> or 'success') and alertify.error are called.
>>
>>
> What is the advantage of this over simply overriding the existing styles?
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


pgAdmin 4 commit: 1) Edit cellEditing function, in some cases grid obje

2017-06-29 Thread Akshay Joshi
1) Edit cellEditing function, in some cases grid object is undefined.
2) Modify SubNodeCollectionControl, so that user can pass custom backgrid row.
3) Handling of visible parameter in SubNodeCollectionControl.
4) Customise title and delete message for Delete Cell.
5) Added Backgrid.Extension.Select2DepCell and moved 
Backgrid.Extension.StringDepCell from user management to backgrid.pgadmin.js.

Branch
--
master

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

Modified Files
--
web/pgadmin/static/js/backform.pgadmin.js  | 28 ++---
web/pgadmin/static/js/backgrid.pgadmin.js  | 71 +++---
.../user_management/js/user_management.js  | 31 +-
3 files changed, 84 insertions(+), 46 deletions(-)



Jenkins build is back to normal : pgadmin4-master-python35 #206

2017-06-29 Thread pgAdmin 4 Jenkins
See 





Jenkins build is back to normal : pgadmin4-master-python27 #211

2017-06-29 Thread pgAdmin 4 Jenkins
See 





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

2017-06-29 Thread George Gelashvili
 Hey Surinder,


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

By under, do you mean every javascript file recursively under the browser
directory?


> ​4. Common.js and/or vendor.js - Common.js will contains all common js
> files/libraries shared by modules like backform, backbone, underscore etc.
>

We're okay with bundling vendorized code for a first pass to webpack
everything. The goal should be to pull code out of the shared javascript
bundle as we unvendor dependencies.
For naming: Common.js is an overloaded term (
http://requirejs.org/docs/commonjs.html). We prefer vendor.js. Will there
be non-vendor code put into this bundle?


> Entry points JS: main.js - It will load above modules ascynchronusly or it
> will be minified version of all.
> define('', ['common', 'tools', 'browser', 'grid'], function(...) {});
>
or these modules can also be loaded using dependency; For example, load
> grid.js on database node expand.
>

Could you go into some more detail on this decision? How would main.js be
used in the app? Is the idea to still use define from require.js in
javascript being webpacked?

​Currently I am working on converting 'requirejs config shim dependency
> into webpack' using imports-loader and exports-loader which is taking
> time and will look for alternative if it doesn't works. Once dependency is
> properly defined, the task to generate other module JS will become quite
> easy.
>

We used imports-loader and exports-loader for tests (see
web/webpack.test.config.js)


> I also found, the CSS imported using import 'slickgrid/slick.grid.css'; 
> statement
> is put into  tags
> ​ in html​
> , instead must be loaded separately as a file so overrides.css can work.
>

Those three css files from slickgrid need to be brought into the
application somehow because they won't be available after building the app,
since SlickGrid has been un-vendored. We opted to webpack the css together
with the required slickgrid js files. Can the overrides.css files be
modified to work with this bundle? Which overrides.css file is not working
now?

Cheers,
Matt and George


Re: [pgadmin-hackers] Invitation to a Community Developer Forum

2017-06-29 Thread Matthew Kleiman
Hi Hackers!

A friendly reminder of our upcoming Community Developer Forum in 15 hours.
We look forward to seeing you all there!

To join, https://pivotal.zoom.us/j/839358714

Details are in the thread.

See you soon!
Matt

open source software is great. timezones are hard.

On Fri, Jun 16, 2017 at 4:01 PM, Matthew Kleiman 
wrote:

> Hi Hackers!
>
> Due to a conflict for some folks, we are moving the Developer Forum by one
> day to June 30th. Please RSVP using this Google Form
> .
>
> -
>
> Hi Hackers!
>
> As a community of open-source developers, it is valuable to have a space
> to come together and discuss technical topics about the project. We would
> like to invite everyone in the community to a public developer forum on
> Friday, June 30 from 8-9am EDT (Meeting time in different timezones:
> https://www.timeanddate.com/worldclock/meetingdetails.
> html?year=2017&month=6&day=30&hour=12&min=0&sec=0&p1=179&p2=
> 136&p3=1038&p4=33&p5=137&p6=37).
>
> Please use this google doc (https://docs.google.com/document/d/17vneE2_
> 4ifpgQIWYuuTTd5YxRYyZLQTrOGI3rPhd9m8/edit?usp=sharing) to record items
> that you would like to discuss.
>
>
> Looking forward to seeing you all!
> RSVP at https://goo.gl/forms/fkR8AwRxTydsZ1Ip2
>
> - Pivotal pgAdmin Team
>
> Google Calendar invite
> 
> Updated Outlook .ics file attached
>
>
> -
> Meeting Info
>
> Topic: pgAdmin Hackers Community Forum
> Time: Jun 30, 2017 8:00 AM Eastern Time (US and Canada)
>
> Join from PC, Mac, Linux, iOS or Android: https://pivotal.zoom.us/j/
> 839358714
>
> Or iPhone one-tap (US Toll Free):  +18558801246 <(855)%20880-1246>,839358714#
>  or +18773690926 <(877)%20369-0926>,839358714#
>
> Or Telephone:
> Dial:
> +1 855 880 1246 <(855)%20880-1246> (US Toll Free)
> +1 877 369 0926 <(877)%20369-0926> (US Toll Free)
> +1 408 638 0968 <(408)%20638-0968> (US Toll)
> +1 646 558 8656 <(646)%20558-8656> (US Toll)
> 400 669 9381 (China Toll Free)
> 000 800 001 4002 (India Toll Free)
> +353 1800 817 388 <+353%201800%20817%20388> (Ireland Toll Free)
> +353 (0) 1 691 7488 <+353%201%20691%207488> (Ireland Toll)
> +44 (0) 80 8189 4088 <+44%20808%20189%204088> (United Kingdom Toll
> Free)
> +44 (0) 20 3695 0088 <+44%2020%203695%200088> (United Kingdom Toll)
> Meeting ID: 839 358 714
> International numbers available: https://pivotal.zoom.us/
> zoomconference?m=4pcajpUV6k2sHygp-3WRex09FHQ1lQ8k
>
> Or an H.323/SIP room system:
> H.323:
> 162.255.37.11 (US West)
> 162.255.36.11 (US East)
> 221.122.88.195 (China)
> 115.114.131.7 (India)
> 213.19.144.110 (EMEA)
> 202.177.207.158 (Australia)
> 209.9.211.110 (Hong Ko

Re: [RM2522] Improve grid/column select all operation

2017-06-29 Thread Dave Page
Hi

On Thursday, June 29, 2017, Harshal Dhumal 
wrote:

>
>
> On Thu, Jun 29, 2017 at 4:33 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com
> > wrote:
>
>> Hi,
>>
>> Please find attached patch for RM2522.
>>
>> With this patch grid/column select all time is reduce to ~1 second from
>> 8-10 seconds.
>>
> This benchmarking is performed with 100k rows and 2 columns (int, text).
>

I see very little improvement (~15s to 14s). My test case has  108786 rows
in it, and is generated from the query:

select * from pg_class c, pg_attribute a where c.oid = a.attrelid
union all
select * from pg_class c, pg_attribute a where c.oid = a.attrelid
union all
select * from pg_class c, pg_attribute a where c.oid = a.attrelid
union all
select * from pg_class c, pg_attribute a where c.oid = a.attrelid

Maybe the number of columns has something to do with it?

AND... I'm still left with nothing being copied to the clipboard (the main
issue by the way, which no patch for this so far seems to have tackled).

Thanks.


>
>
>>
>> The solution was to use simple array concatenation instead of underscore
>> union while getting index of all selected complete rows.
>> Underscore union function is only useful when user selects different
>> ranges from grid and those ranges overlaps. In this case union function
>> removes duplicate (overlapped) rows.
>> However result grid in sqleditor do not support overlapped row selection
>> so we can simply cancat rows from different ranges without worrying about
>> overlapped row selection.
>>
>>
>>
>> --
>> *Harshal Dhumal*
>> *Sr. Software Engineer*
>>
>> EnterpriseDB India: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>

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

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