Skip to content

Commit

Permalink
pgadmin-org#5575 - Fixed issue of opening query tool from new query t…
Browse files Browse the repository at this point in the history
…ool icon beside connection status.
  • Loading branch information
yogeshmahajan-1903 committed Nov 30, 2022
1 parent 2098a33 commit 938b77f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/pgadmin/tools/sqleditor/static/js/show_query_tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function generateUrl(trans_id, parentData, sqlId) {
if(parentData.database.label) {
url_endpoint += `&database_name=${parentData.database.label}`;
}
if(parentData.server.user.name){
if(parentData.server.user?.name){
url_endpoint += `&user=${parentData.server.user.name}`;
}
}
Expand Down
5 changes: 4 additions & 1 deletion web/pgadmin/tools/sqleditor/static/js/show_view_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,12 @@ function generateUrl(trans_id, connectionData, nodeData, parentData) {
+`&sgid=${parentData.server_group._id}`
+`&sid=${parentData.server._id}`
+`&did=${parentData.database._id}`
+`&user=${parentData.server.user.name}`
+`&server_type=${parentData.server.server_type}`;

if(parentData.server.user?.name){
url_endpoint += `&user=${parentData.server.user.name}`;
}

return url_endpoint;
}

Expand Down

0 comments on commit 938b77f

Please sign in to comment.