Fixed SonarQube issues.

This commit is contained in:
Nikhil Mohite
2022-01-07 19:58:19 +05:30
committed by Akshay Joshi
parent ad862f4084
commit af6ff20020
7 changed files with 9 additions and 26 deletions

View File

@@ -46,26 +46,16 @@ export function getUtilityView(schema, treeNodeInfo, actionType, formType, conta
});
/* Callback for help button */
const onHelp = (isSqlHelp=false, isNew=false)=>{
const onHelp = (isSqlHelp=false)=>{
if(isSqlHelp) {
let server = treeNodeInfo.server;
let url = pgAdmin.Browser.utils.pg_help_path;
let help_url = pgAdmin.Browser.utils.pg_help_path;
let fullUrl = '';
if (server.server_type == 'ppas') {
fullUrl = getEPASHelpUrl(server.version);
} else {
if (sqlHelpUrl == '') {
fullUrl = getHelpUrl(url, sqlHelpUrl, server.version);
} else if (sqlHelpUrl != '') {
fullUrl = getHelpUrl(url, sqlHelpUrl, server.version);
} else {
if (isNew) {
fullUrl = getHelpUrl(url, sqlHelpUrl, server.version);
} else {
fullUrl = getHelpUrl(url, sqlHelpUrl, server.version);
}
}
fullUrl = getHelpUrl(help_url, sqlHelpUrl, server.version);
}
window.open(fullUrl, 'postgres_help');
@@ -97,8 +87,7 @@ export function getUtilityView(schema, treeNodeInfo, actionType, formType, conta
onSave={onSaveClick}
onClose={()=>containerPanel.close()}
onHelp={onHelp}
onDataChange={()=>{
}}
onDataChange={()=>{}}
confirmOnCloseReset={confirmOnReset}
hasSQL={false}
disableSqlHelp={sqlHelpUrl == undefined || sqlHelpUrl == ''}