From 6fa4065eeec0f0373b05cf3d0f52b82b0976eb0d Mon Sep 17 00:00:00 2001 From: Ashesh Vashi Date: Mon, 11 Jul 2016 16:31:50 +0530 Subject: [PATCH] Do not try to show the database dashboard, when clicked on one of the children node. This implementation will allow to add new nodes at server level without modifying the dashboard code. I found the issue during the pgAgent Jobs node implementation. --- web/pgadmin/dashboard/templates/dashboard/js/dashboard.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js b/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js index 9a470d9a5..c1e838c46 100644 --- a/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js +++ b/web/pgadmin/dashboard/templates/dashboard/js/dashboard.js @@ -76,7 +76,9 @@ function(r, $, pgAdmin, _, Backbone) { default: url = '{{ url_for('dashboard.index') }}' + treeHierarchy.server._id - + '/' + treeHierarchy.database._id; + if ('database' in treeHierarchy) { + url += '/' + treeHierarchy.database._id; + } break; } }