mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where dynamic tab title has not applied the first time for debugger panel. Fixes #5978
This commit is contained in:
committed by
Akshay Joshi
parent
5839e7cda8
commit
17ce84dd0a
@@ -18,5 +18,6 @@ Bug fixes
|
|||||||
*********
|
*********
|
||||||
|
|
||||||
| `Issue #5974 <https://redmine.postgresql.org/issues/5974>`_ - Fixed an issue where the debugger's custom tab title not applied when opened in the new browser tab.
|
| `Issue #5974 <https://redmine.postgresql.org/issues/5974>`_ - Fixed an issue where the debugger's custom tab title not applied when opened in the new browser tab.
|
||||||
|
| `Issue #5978 <https://redmine.postgresql.org/issues/5978>`_ - Fixed an issue where dynamic tab title has not applied the first time for debugger panel.
|
||||||
| `Issue #5983 <https://redmine.postgresql.org/issues/5983>`_ - Added the appropriate server icon based on the server type in the new connection dialog.
|
| `Issue #5983 <https://redmine.postgresql.org/issues/5983>`_ - Added the appropriate server icon based on the server type in the new connection dialog.
|
||||||
| `Issue #5985 <https://redmine.postgresql.org/issues/5985>`_ - Fixed an issue where the process watcher dialog throws an error for the database server which is already removed.
|
| `Issue #5985 <https://redmine.postgresql.org/issues/5985>`_ - Fixed an issue where the process watcher dialog throws an error for the database server which is already removed.
|
||||||
|
|||||||
@@ -539,6 +539,7 @@ def check_debugger_enabled(conn, ret_status):
|
|||||||
:param ret_status:
|
:param ret_status:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
msg = ''
|
||||||
status_in, rid_tar = conn.execute_scalar(
|
status_in, rid_tar = conn.execute_scalar(
|
||||||
"SELECT count(*) FROM pg_proc WHERE "
|
"SELECT count(*) FROM pg_proc WHERE "
|
||||||
"proname = 'pldbg_get_target_info'"
|
"proname = 'pldbg_get_target_info'"
|
||||||
|
|||||||
@@ -11,11 +11,13 @@ define([
|
|||||||
'sources/gettext', 'sources/url_for', 'jquery', 'underscore',
|
'sources/gettext', 'sources/url_for', 'jquery', 'underscore',
|
||||||
'alertify', 'sources/pgadmin', 'pgadmin.browser',
|
'alertify', 'sources/pgadmin', 'pgadmin.browser',
|
||||||
'backbone', 'pgadmin.backgrid', 'codemirror', 'pgadmin.backform',
|
'backbone', 'pgadmin.backgrid', 'codemirror', 'pgadmin.backform',
|
||||||
'pgadmin.tools.debugger.ui', 'pgadmin.tools.debugger.utils', 'sources/utils',
|
'pgadmin.tools.debugger.ui', 'pgadmin.tools.debugger.utils',
|
||||||
|
'tools/datagrid/static/js/show_query_tool', 'sources/utils',
|
||||||
'wcdocker', 'pgadmin.browser.frame',
|
'wcdocker', 'pgadmin.browser.frame',
|
||||||
], function(
|
], function(
|
||||||
gettext, url_for, $, _, Alertify, pgAdmin, pgBrowser, Backbone, Backgrid,
|
gettext, url_for, $, _, Alertify, pgAdmin, pgBrowser, Backbone, Backgrid,
|
||||||
CodeMirror, Backform, get_function_arguments, debuggerUtils, pgadminUtils,
|
CodeMirror, Backform, get_function_arguments, debuggerUtils, showQueryTool,
|
||||||
|
pgadminUtils,
|
||||||
) {
|
) {
|
||||||
var pgTools = pgAdmin.Tools = pgAdmin.Tools || {},
|
var pgTools = pgAdmin.Tools = pgAdmin.Tools || {},
|
||||||
wcDocker = window.wcDocker;
|
wcDocker = window.wcDocker;
|
||||||
@@ -427,7 +429,8 @@ define([
|
|||||||
panel = pgBrowser.docker.addPanel(
|
panel = pgBrowser.docker.addPanel(
|
||||||
'frm_debugger', wcDocker.DOCK.STACKED, dashboardPanel[0]
|
'frm_debugger', wcDocker.DOCK.STACKED, dashboardPanel[0]
|
||||||
);
|
);
|
||||||
debuggerUtils.setDebuggerTitle(panel, browser_preferences, treeInfo.function.label, treeInfo.schema.label, treeInfo.database.label);
|
var label = treeInfo.function ? treeInfo.function.label : treeInfo.procedure.label;
|
||||||
|
debuggerUtils.setDebuggerTitle(panel, browser_preferences, label, treeInfo.schema.label, treeInfo.database.label, null, pgBrowser);
|
||||||
|
|
||||||
panel.focus();
|
panel.focus();
|
||||||
|
|
||||||
@@ -449,7 +452,8 @@ define([
|
|||||||
function(evt, value) {
|
function(evt, value) {
|
||||||
if(value) {
|
if(value) {
|
||||||
let browser_preferences = pgBrowser.get_preferences_for_module('browser');
|
let browser_preferences = pgBrowser.get_preferences_for_module('browser');
|
||||||
debuggerUtils.setDebuggerTitle(panel, browser_preferences, treeInfo.function.label, treeInfo.schema.label, treeInfo.database.label, value);
|
var label = treeInfo.function ? treeInfo.function.label : treeInfo.procedure.label;
|
||||||
|
debuggerUtils.setDebuggerTitle(panel, browser_preferences, label, treeInfo.schema.label, treeInfo.database.label, value, pgBrowser);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// We will execute this function when user clicks on the Cancel
|
// We will execute this function when user clicks on the Cancel
|
||||||
@@ -567,7 +571,8 @@ define([
|
|||||||
panel = pgBrowser.docker.addPanel(
|
panel = pgBrowser.docker.addPanel(
|
||||||
'frm_debugger', wcDocker.DOCK.STACKED, dashboardPanel[0]
|
'frm_debugger', wcDocker.DOCK.STACKED, dashboardPanel[0]
|
||||||
);
|
);
|
||||||
debuggerUtils.setDebuggerTitle(panel, browser_preferences, newTreeInfo.function.label, newTreeInfo.schema.label, newTreeInfo.database.label);
|
var label = newTreeInfo.function ? newTreeInfo.function.label : newTreeInfo.procedure.label;
|
||||||
|
debuggerUtils.setDebuggerTitle(panel, browser_preferences, label, newTreeInfo.schema.label, newTreeInfo.database.label, null, pgBrowser);
|
||||||
|
|
||||||
panel.focus();
|
panel.focus();
|
||||||
|
|
||||||
@@ -589,7 +594,8 @@ define([
|
|||||||
function(evt, value) {
|
function(evt, value) {
|
||||||
if(value) {
|
if(value) {
|
||||||
let browser_preferences = pgBrowser.get_preferences_for_module('browser');
|
let browser_preferences = pgBrowser.get_preferences_for_module('browser');
|
||||||
debuggerUtils.setDebuggerTitle(panel, browser_preferences, treeInfo.function.label, treeInfo.schema.label, treeInfo.database.label, value);
|
var label = treeInfo.function ? treeInfo.function.label : treeInfo.procedure.label;
|
||||||
|
debuggerUtils.setDebuggerTitle(panel, browser_preferences, label, treeInfo.schema.label, treeInfo.database.label, value, pgBrowser);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// We will execute this function when user clicks on the Cancel
|
// We will execute this function when user clicks on the Cancel
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ define([
|
|||||||
'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'backbone',
|
'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'backbone',
|
||||||
'pgadmin.alertifyjs', 'sources/pgadmin', 'pgadmin.browser',
|
'pgadmin.alertifyjs', 'sources/pgadmin', 'pgadmin.browser',
|
||||||
'pgadmin.backgrid', 'sources/window', 'pgadmin.tools.debugger.utils',
|
'pgadmin.backgrid', 'sources/window', 'pgadmin.tools.debugger.utils',
|
||||||
'tools/datagrid/static/js/show_query_tool', 'wcdocker',
|
'wcdocker',
|
||||||
], function(
|
], function(
|
||||||
gettext, url_for, $, _, Backbone, Alertify, pgAdmin, pgBrowser, Backgrid,
|
gettext, url_for, $, _, Backbone, Alertify, pgAdmin, pgBrowser, Backgrid,
|
||||||
pgWindow, debuggerUtils, showQueryTool
|
pgWindow, debuggerUtils,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
var wcDocker = window.wcDocker;
|
var wcDocker = window.wcDocker;
|
||||||
@@ -778,10 +778,8 @@ define([
|
|||||||
'frm_debugger', wcDocker.DOCK.STACKED, dashboardPanel[0]
|
'frm_debugger', wcDocker.DOCK.STACKED, dashboardPanel[0]
|
||||||
);
|
);
|
||||||
var browser_pref = pgBrowser.get_preferences_for_module('browser');
|
var browser_pref = pgBrowser.get_preferences_for_module('browser');
|
||||||
debuggerUtils.setDebuggerTitle(panel, browser_pref, treeInfo.function.label, treeInfo.schema.label, treeInfo.database.label);
|
var label = treeInfo.function ? treeInfo.function.label : treeInfo.procedure.label;
|
||||||
|
debuggerUtils.setDebuggerTitle(panel, browser_pref, label, treeInfo.schema.label, treeInfo.database.label, null, pgBrowser);
|
||||||
showQueryTool._set_dynamic_tab(pgBrowser, browser_pref['dynamic_tabs']);
|
|
||||||
|
|
||||||
panel.focus();
|
panel.focus();
|
||||||
|
|
||||||
// Panel Closed event
|
// Panel Closed event
|
||||||
@@ -801,7 +799,8 @@ define([
|
|||||||
// We will execute this function when user clicks on the OK button
|
// We will execute this function when user clicks on the OK button
|
||||||
function(evt, value) {
|
function(evt, value) {
|
||||||
if(value) {
|
if(value) {
|
||||||
debuggerUtils.setDebuggerTitle(panel, self.preferences, treeInfo.function.label, treeInfo.schema.label, treeInfo.database.label, value);
|
var label = treeInfo.function ? treeInfo.function.label : treeInfo.procedure.label;
|
||||||
|
debuggerUtils.setDebuggerTitle(panel, self.preferences, label, treeInfo.schema.label, treeInfo.database.label, value, pgBrowser);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// We will execute this function when user clicks on the Cancel
|
// We will execute this function when user clicks on the Cancel
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
import {generateTitle} from '../../../datagrid/static/js/datagrid_panel_title';
|
import {generateTitle} from '../../../datagrid/static/js/datagrid_panel_title';
|
||||||
|
import {_set_dynamic_tab} from '../../../datagrid/static/js/show_query_tool';
|
||||||
|
|
||||||
function setFocusToDebuggerEditor(editor, command) {
|
function setFocusToDebuggerEditor(editor, command) {
|
||||||
const TAB = 9;
|
const TAB = 9;
|
||||||
@@ -43,7 +44,7 @@ function getProcedureId(treeInfoObject) {
|
|||||||
return objectId;
|
return objectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDebuggerTitle(panel, preferences, function_name, schema_name, database_name, custom_title) {
|
function setDebuggerTitle(panel, preferences, function_name, schema_name, database_name, custom_title=null, pgBrowser=null) {
|
||||||
var debugger_title_placeholder = '';
|
var debugger_title_placeholder = '';
|
||||||
if(custom_title) {
|
if(custom_title) {
|
||||||
debugger_title_placeholder = custom_title;
|
debugger_title_placeholder = custom_title;
|
||||||
@@ -68,6 +69,7 @@ function setDebuggerTitle(panel, preferences, function_name, schema_name, databa
|
|||||||
'type': 'debugger',
|
'type': 'debugger',
|
||||||
};
|
};
|
||||||
var title = generateTitle(debugger_title_placeholder, title_data);
|
var title = generateTitle(debugger_title_placeholder, title_data);
|
||||||
|
_set_dynamic_tab(pgBrowser, preferences['dynamic_tabs']);
|
||||||
panel.title('<span>'+ title +'</span>');
|
panel.title('<span>'+ title +'</span>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user