mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-08 15:13:10 -06:00
Fixes SonarQube issues.
This commit is contained in:
parent
2d58f60a53
commit
a487a51135
@ -95,7 +95,7 @@ export function Search() {
|
||||
if(items.length > 0){
|
||||
let menuItemsHtmlElement = [];
|
||||
for(let i=0; i < items.length; i++){
|
||||
Object.keys(items[i]).map( (value) => {
|
||||
Object.keys(items[i]).forEach( (value) => {
|
||||
if(value != 'element' && value != 'No object selected'){
|
||||
menuItemsHtmlElement.push( <li key={ 'li-menu-' + i }><a tabIndex='0' id={ 'li-menu-' + i } href={'#'} className={ (items[i]['element'].classList.contains('disabled') == true ? 'dropdown-item menu-groups-a disabled':'dropdown-item menu-groups-a')} key={ 'menu-' + i } onClick={() => {items[i]['element'].click(); toggleDropdownMenu();}}>
|
||||
{value}
|
||||
|
@ -54,7 +54,6 @@ define('pgadmin.browser.utils',
|
||||
|
||||
/* GET PSQL Tool related config */
|
||||
pgAdmin['enable_psql'] = '{{ current_app.config.get('ENABLE_PSQL') }}' == 'True';
|
||||
pgAdmin['allow_psql_shell_commands'] = '{{ current_app.config.get('ALLOW_PSQL_SHELL_COMMANDS') }}' == 'True';
|
||||
|
||||
// Define list of nodes on which Query tool option doesn't appears
|
||||
var unsupported_nodes = pgAdmin.unsupported_nodes = [
|
||||
|
@ -64,7 +64,7 @@
|
||||
if (nextOpen < 0) nextOpen = text.length;
|
||||
if (nextClose < 0) nextClose = text.length;
|
||||
pos = Math.min(nextOpen, nextClose);
|
||||
if (pos == text.length) break;
|
||||
if (pos == text.length) { whileloopvar=1; break; }
|
||||
if (cm.getTokenAt(CodeMirror.Pos(i, pos + 1)).type == tokenType) {
|
||||
if (pos == nextOpen) ++count;
|
||||
else if (!--count) {
|
||||
|
@ -415,11 +415,7 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, Browser)
|
||||
});
|
||||
|
||||
term.onKey(function (ev) {
|
||||
if (pgAdmin['allow_psql_shell_commands']) {
|
||||
socket.emit('socket_input', {'input': ev.key, 'key_name': ev.domEvent.code});
|
||||
} else {
|
||||
socket.emit('socket_input', {'input': ev.key, 'key_name': ev.domEvent.code});
|
||||
}
|
||||
socket.emit('socket_input', {'input': ev.key, 'key_name': ev.domEvent.code});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -335,7 +335,7 @@ var getThemeWebpackConfig = function(theme_name) {
|
||||
};
|
||||
|
||||
var pgadminThemesWebpack = [];
|
||||
Object.keys(pgadminThemes).map((theme_name)=>{
|
||||
Object.keys(pgadminThemes).forEach((theme_name)=>{
|
||||
pgadminThemesWebpack.push(getThemeWebpackConfig(theme_name));
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user