Skip to content

Commit

Permalink
Fixed issue of opening query tool from new query tool icon beside con…
Browse files Browse the repository at this point in the history
…nection status. #5575
  • Loading branch information
yogeshmahajan-1903 authored Nov 30, 2022
1 parent c2637be commit 9e078c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/pgadmin/tools/sqleditor/static/js/show_query_tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export function generateUrl(trans_id, parentData, sqlId) {
if(parentData.database.label) {
url_endpoint += `&database_name=${parentData.database.label}`;
}
if(parentData.server.user.name){
url_endpoint += `&user=${parentData.server.user.name}`;
if(!parentData.server.user_name && 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 && parentData.server.user?.name) {
url_endpoint += `&user=${parentData.server.user?.name}`;
}

return url_endpoint;
}

Expand Down

0 comments on commit 9e078c0

Please sign in to comment.