public inbox for [email protected]help / color / mirror / Atom feed
[pgAdmin4][Patch]: Render data grid only if Dashboard Panel is active 3+ messages / 2 participants [nested] [flat]
* [pgAdmin4][Patch]: Render data grid only if Dashboard Panel is active @ 2016-07-13 06:47 Surinder Kumar <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Surinder Kumar @ 2016-07-13 06:47 UTC (permalink / raw) To: pgadmin-hackers Hi In Dashboard, the ajax calls to *render data grid* should only made, if dashboard panel is active. Currently it make ajax calls even if other panels like properties, sql are active. Please find attached patch and review. Thanks, Surinder Kumar -- Sent via pgadmin-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers Attachments: [application/octet-stream] dashboard_render_if_panel_is_opened.patch (665B, 3-dashboard_render_if_panel_is_opened.patch) download | inline diff: diff --git a/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js b/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js index 9a470d9..a67ceee 100644 --- a/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js +++ b/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js @@ -309,6 +309,11 @@ function(r, $, pgAdmin, _, Backbone) { return null; } + var dashboardPanel = pgBrowser.panels['dashboard'].panel; + if (dashboardPanel && !dashboardPanel.isVisible()) { + return; + } + data.fetch({ reset: true, success: function() { ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [pgAdmin4][Patch]: Render data grid only if Dashboard Panel is active @ 2016-07-13 07:02 Dave Page <[email protected]> parent: Surinder Kumar <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Dave Page @ 2016-07-13 07:02 UTC (permalink / raw) To: Surinder Kumar <[email protected]>; +Cc: pgadmin-hackers Won't this result in incorrect graphs? I.e. chunks of data being missing (but not obviously so)? -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK:http://www.enterprisedb.com The Enterprise PostgreSQL Company > On 13 Jul 2016, at 07:47, Surinder Kumar <[email protected]> wrote: > > Hi > > In Dashboard, the ajax calls to render data grid should only made, if dashboard panel is active. > Currently it make ajax calls even if other panels like properties, sql are active. > > Please find attached patch and review. > > Thanks, > Surinder Kumar > <dashboard_render_if_panel_is_opened.patch> > > -- > Sent via pgadmin-hackers mailing list ([email protected]) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [pgAdmin4][Patch]: Render data grid only if Dashboard Panel is active @ 2016-07-13 07:11 Surinder Kumar <[email protected]> parent: Dave Page <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Surinder Kumar @ 2016-07-13 07:11 UTC (permalink / raw) To: Dave Page <[email protected]>; +Cc: pgadmin-hackers On Wed, Jul 13, 2016 at 12:32 PM, Dave Page <[email protected]> wrote: > Won't this result in incorrect graphs? I.e. chunks of data being missing > (but not obviously so)? > Oh I see.. It might result in incorrect graphs.. Please ignore the patch. > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK:http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > On 13 Jul 2016, at 07:47, Surinder Kumar <[email protected]> > wrote: > > Hi > > In Dashboard, the ajax calls to *render data grid* should only made, if > dashboard panel is active. > Currently it make ajax calls even if other panels like properties, sql are > active. > > Please find attached patch and review. > > Thanks, > Surinder Kumar > > <dashboard_render_if_panel_is_opened.patch> > > > -- > Sent via pgadmin-hackers mailing list ([email protected]) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers > > ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2016-07-13 07:11 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-07-13 06:47 [pgAdmin4][Patch]: Render data grid only if Dashboard Panel is active Surinder Kumar <[email protected]> 2016-07-13 07:02 ` Dave Page <[email protected]> 2016-07-13 07:11 ` Surinder Kumar <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox