Hi,

In dashboard.js, some of the DOM elements are in the global context, so,
changed those elements to be used only for the Dashboard context.

Please find the attached patch for the same.

Thanks,
Khushboo
diff --git a/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js b/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js
index d12e175..2f97138 100644
--- a/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js
+++ b/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js
@@ -354,15 +354,15 @@ function(r, $, pgAdmin, _, Backbone) {
 
         // Rock n' roll on the server dashboard
         init_server_dashboard: function(sid, version, session_stats_refresh, tps_stats_refresh, ti_stats_refresh, to_stats_refresh, bio_stats_refresh) {
-            var div_sessions = document.getElementById('graph-sessions');
-            var div_tps = document.getElementById('graph-tps');
-            var div_ti = document.getElementById('graph-ti');
-            var div_to = document.getElementById('graph-to');
-            var div_bio = document.getElementById('graph-bio');
-            var div_server_activity = document.getElementById('server_activity');
-            var div_server_locks = document.getElementById('server_locks');
-            var div_server_prepared = document.getElementById('server_prepared');
-            var div_server_config = document.getElementById('server_config');
+            var div_sessions = $('.dashboard-container').find('#graph-sessions')[0];
+            var div_tps = $('.dashboard-container').find('#graph-tps')[0];
+            var div_ti = $('.dashboard-container').find('#graph-ti')[0];
+            var div_to = $('.dashboard-container').find('#graph-to')[0];
+            var div_bio = $('.dashboard-container').find('#graph-bio')[0];
+            var div_server_activity = $('.dashboard-container').find('#server_activity');
+            var div_server_locks = $('.dashboard-container').find('#server_locks');
+            var div_server_prepared = $('.dashboard-container').find('#server_prepared');
+            var div_server_config = $('.dashboard-container').find('#server_config');
             var dataset_sessions = [];
             var data_sessions = [];
             var dataset_tps = [];
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to