Fixed issues reported by SonarQube.

This commit is contained in:
Nikhil Mohite
2021-01-18 13:02:19 +05:30
committed by Akshay Joshi
parent 5afa4f1995
commit d4a3e4d92c
9 changed files with 56 additions and 51 deletions
@@ -453,9 +453,9 @@ define([
if(value) {
// Remove the leading and trailing white spaces.
value = value.trim();
let browser_preferences = pgBrowser.get_preferences_for_module('browser');
var label = treeInfo.function ? treeInfo.function.label : treeInfo.trigger_function ? treeInfo.trigger_function.label : treeInfo.trigger ? treeInfo.trigger.label : treeInfo.procedure.label;
debuggerUtils.setDebuggerTitle(panel, browser_preferences, label, treeInfo.schema.label, treeInfo.database.label, value, pgBrowser);
let preferences = pgBrowser.get_preferences_for_module('browser');
var name = treeInfo.function ? treeInfo.function.label : treeInfo.trigger_function ? treeInfo.trigger_function.label : treeInfo.trigger ? treeInfo.trigger.label : treeInfo.procedure.label;
debuggerUtils.setDebuggerTitle(panel, preferences, name, treeInfo.schema.label, treeInfo.database.label, value, pgBrowser);
}
},
// We will execute this function when user clicks on the Cancel
@@ -597,9 +597,9 @@ define([
if(value) {
// Remove the leading and trailing white spaces.
value = value.trim();
let browser_preferences = pgBrowser.get_preferences_for_module('browser');
var label = treeInfo.function ? treeInfo.function.label : treeInfo.trigger_function ? treeInfo.trigger_function.label : treeInfo.trigger ? treeInfo.trigger.label : treeInfo.procedure.label;
debuggerUtils.setDebuggerTitle(panel, browser_preferences, label, treeInfo.schema.label, treeInfo.database.label, value, pgBrowser);
let preferences = pgBrowser.get_preferences_for_module('browser');
var name = treeInfo.function ? treeInfo.function.label : treeInfo.trigger_function ? treeInfo.trigger_function.label : treeInfo.trigger ? treeInfo.trigger.label : treeInfo.procedure.label;
debuggerUtils.setDebuggerTitle(panel, preferences, name, treeInfo.schema.label, treeInfo.database.label, value, pgBrowser);
}
},
// We will execute this function when user clicks on the Cancel
@@ -801,8 +801,8 @@ define([
if(value) {
// Remove the leading and trailing white spaces.
value = value.trim();
var label = treeInfo.function ? treeInfo.function.label : treeInfo.trigger_function ? treeInfo.trigger_function.label : treeInfo.trigger ? treeInfo.trigger.label : treeInfo.procedure.label;
debuggerUtils.setDebuggerTitle(panel, self.preferences, label, treeInfo.schema.label, treeInfo.database.label, value, pgBrowser);
var name = treeInfo.function ? treeInfo.function.label : treeInfo.trigger_function ? treeInfo.trigger_function.label : treeInfo.trigger ? treeInfo.trigger.label : treeInfo.procedure.label;
debuggerUtils.setDebuggerTitle(panel, self.preferences, name, treeInfo.schema.label, treeInfo.database.label, value, pgBrowser);
}
},
// We will execute this function when user clicks on the Cancel
@@ -76,7 +76,7 @@ function setDebuggerTitle(panel, preferences, function_name, schema_name, databa
function get_function_name(function_name) {
var function_data = function_name.split('(');
function_data.splice(-1, 1);
var index = 0;
var index = null;
var func_name = '';
for(index=0; index < function_data.length; index++) {
func_name = func_name.concat(function_data[index]);