Fix multiple Query Tool, ERD title related issues.

This commit is contained in:
Aditya Toshniwal
2023-07-13 20:06:24 +05:30
parent de7eb73867
commit 4676961fc4
6 changed files with 13 additions and 11 deletions

View File

@@ -331,7 +331,7 @@ export default class SQLEditor {
queryToolForm +=`
</form>
<script>
document.getElementById("title").value = "${_.escape(panel_title.replace('\\', '\\\\'))}";
document.getElementById("title").value = "${_.escape(panel_title)}";
document.getElementById("queryToolForm").submit();
</script>
`;

View File

@@ -95,6 +95,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
connection_status_msg: '',
params: {
...params,
title: _.unescape(params.title),
is_query_tool: params.is_query_tool == 'true' ? true : false,
node_name: retrieveNodeName(selectedNodeInfo),
},
@@ -684,6 +685,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
database: {
_id: selectedConn.did,
label: selectedConn.database_name,
_label: selectedConn.database_name,
},
};

View File

@@ -15,7 +15,7 @@ import Notify from '../../../../static/js/helpers/Notifier';
const pgAdmin = pgWindow.pgAdmin;
export function getDatabaseLabel(parentData) {
return parentData.database ? parentData.database.label
return parentData.database ? parentData.database._label
: parentData.server?.db;
}