mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed the following issues:
RM-4232: 1. If the user adds a percentage (other than for placeholders) then it is stripped off. 2. Backslash is getting removed in the connection string if we provide the backslash(\) in placeholders or the database name contains it. 3. If the user added only spaces( )in placeholders it is not getting reset to default values. RM-4230: 1. Rename panel option is not working in the debugger. 2. Added Rename panel for schema diff. Fixes #4232 #4230
This commit is contained in:
committed by
Akshay Joshi
parent
892fb83907
commit
b5f9fffadd
@@ -50,33 +50,21 @@ function setDebuggerTitle(panel, preferences, function_name, schema_name, databa
|
||||
debugger_title_placeholder = preferences['debugger_tab_title_placeholder'];
|
||||
}
|
||||
|
||||
var placeholders = debugger_title_placeholder.split('%');
|
||||
var function_data = function_name.split('(');
|
||||
function_name = get_function_name(function_name);
|
||||
|
||||
var title = '';
|
||||
placeholders.forEach(function(placeholder) {
|
||||
if(placeholder == 'FUNCTION'){
|
||||
var func_name = '';
|
||||
func_name = get_function_name(function_name);
|
||||
var args_list = function_data[function_data.length - 1].split(')');
|
||||
var args = '';
|
||||
if(args_list.length > 0) {
|
||||
args = args.concat(args_list[0]);
|
||||
}
|
||||
|
||||
title = title.concat(func_name);
|
||||
} else if(placeholder == 'ARGS') {
|
||||
var args = '';
|
||||
var function_data = function_name.split('(');
|
||||
var args_list = function_data[function_data.length - 1].split(')');
|
||||
if(args_list.length > 0) {
|
||||
args = args.concat(args_list[0]);
|
||||
}
|
||||
function_name = get_function_name(function_name);
|
||||
title = title.concat(args);
|
||||
} else if(placeholder == 'SCHEMA'){
|
||||
title = title.concat(schema_name);
|
||||
} else if(placeholder == 'DATABASE'){
|
||||
title = title.concat(database_name);
|
||||
} else if (placeholder != 'ARGS' ){
|
||||
title = title.concat(placeholder);
|
||||
}
|
||||
});
|
||||
panel.title('<span>'+ _.escape(title) +'</span>');
|
||||
debugger_title_placeholder = debugger_title_placeholder.replace(new RegExp('%FUNCTION%'), function_name);
|
||||
debugger_title_placeholder = debugger_title_placeholder.replace(new RegExp('%ARGS%'), args);
|
||||
debugger_title_placeholder = debugger_title_placeholder.replace(new RegExp('%SCHEMA%'), schema_name);
|
||||
debugger_title_placeholder = debugger_title_placeholder.replace(new RegExp('%DATABASE%'), database_name);
|
||||
|
||||
panel.title('<span>'+ _.escape(debugger_title_placeholder) +'</span>');
|
||||
}
|
||||
|
||||
function get_function_name(function_name) {
|
||||
|
||||
Reference in New Issue
Block a user