mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where the debugger's custom tab title not applied when opened in the new browser tab. Fixes #5974
This commit is contained in:
parent
5370bb4515
commit
ebf5e871e0
@ -17,5 +17,6 @@ Housekeeping
|
|||||||
Bug fixes
|
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 #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.
|
||||||
|
@ -47,7 +47,7 @@ export function getPanelTitle(pgBrowser, selected_item=null, custom_title=null)
|
|||||||
};
|
};
|
||||||
var title = generateTitle(qt_title_placeholder, title_data);
|
var title = generateTitle(qt_title_placeholder, title_data);
|
||||||
|
|
||||||
return _.escape(title);
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setQueryToolDockerTitle(panel, is_query_tool, panel_title, is_file) {
|
export function setQueryToolDockerTitle(panel, is_query_tool, panel_title, is_file) {
|
||||||
|
@ -308,5 +308,5 @@ export function generateDatagridTitle(pgBrowser, aciTreeIdentifier, custom_title
|
|||||||
};
|
};
|
||||||
var title = generateTitle(dtg_title_placeholder, title_data);
|
var title = generateTitle(dtg_title_placeholder, title_data);
|
||||||
|
|
||||||
return _.escape(title);
|
return title;
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@ from pgadmin.browser.server_groups.servers.databases.extensions.utils \
|
|||||||
import get_extension_details
|
import get_extension_details
|
||||||
from pgadmin.utils.constants import PREF_LABEL_DISPLAY, \
|
from pgadmin.utils.constants import PREF_LABEL_DISPLAY, \
|
||||||
PREF_LABEL_KEYBOARD_SHORTCUTS, MIMETYPE_APP_JS, SERVER_CONNECTION_CLOSED
|
PREF_LABEL_KEYBOARD_SHORTCUTS, MIMETYPE_APP_JS, SERVER_CONNECTION_CLOSED
|
||||||
|
from pgadmin.preferences import preferences
|
||||||
|
|
||||||
MODULE_NAME = 'debugger'
|
MODULE_NAME = 'debugger'
|
||||||
|
|
||||||
@ -664,10 +665,19 @@ def direct_new(trans_id):
|
|||||||
function_name_with_arguments = \
|
function_name_with_arguments = \
|
||||||
de_inst.debugger_data['function_name'] + function_arguments
|
de_inst.debugger_data['function_name'] + function_arguments
|
||||||
|
|
||||||
|
manager = get_driver(PG_DEFAULT_DRIVER).get_connection(
|
||||||
|
de_inst.debugger_data['server_id'],
|
||||||
|
database=de_inst.debugger_data['database_id'],
|
||||||
|
conn_id=de_inst.debugger_data['conn_id'])
|
||||||
|
title = get_debugger_title(de_inst.debugger_data['function_name'],
|
||||||
|
function_arguments,
|
||||||
|
de_inst.function_data['schema'], manager.db)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"debugger/direct.html",
|
"debugger/direct.html",
|
||||||
_=gettext,
|
_=gettext,
|
||||||
function_name=de_inst.debugger_data['function_name'],
|
function_name=de_inst.debugger_data['function_name'],
|
||||||
|
title=title,
|
||||||
uniqueId=trans_id,
|
uniqueId=trans_id,
|
||||||
debug_type=debug_type,
|
debug_type=debug_type,
|
||||||
is_desktop_mode=current_app.PGADMIN_RUNTIME,
|
is_desktop_mode=current_app.PGADMIN_RUNTIME,
|
||||||
@ -678,6 +688,19 @@ def direct_new(trans_id):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def get_debugger_title(function_name, args, schema, database):
|
||||||
|
browser_pref = preferences('browser', 'debugger_tab_title_placeholder')
|
||||||
|
placeholders = browser_pref.json['value']
|
||||||
|
title = placeholders.replace('%FUNCTION%', function_name)
|
||||||
|
if title.find('%ARGS%') != -1:
|
||||||
|
args = args.split('(')[-1][:-1]
|
||||||
|
title = title.replace('%ARGS%', args)
|
||||||
|
title = title.replace('%SCHEMA%', schema)
|
||||||
|
title = title.replace('%DATABASE%', database)
|
||||||
|
|
||||||
|
return title
|
||||||
|
|
||||||
|
|
||||||
def get_debugger_version(conn, search_path):
|
def get_debugger_version(conn, search_path):
|
||||||
"""
|
"""
|
||||||
Function returns the debugger version.
|
Function returns the debugger version.
|
||||||
|
@ -68,7 +68,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);
|
||||||
panel.title('<span>'+ _.escape(title) +'</span>');
|
panel.title('<span>'+ title +'</span>');
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_function_name(function_name) {
|
function get_function_name(function_name) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}{{ _('Debugger - ') + function_name }}{% endblock %}
|
{% block title %}{{ _('Debugger - ') + title }}{% endblock %}
|
||||||
{% block init_script %}
|
{% block init_script %}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user