mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed following SonarQube issues:
1. Boolean checks should not be inverted. 2. The comma operator should not be used. 3. Arguments to built-in functions should match documented types. 4. Redundant pairs of parentheses should be removed. 5. A conditionally executed single line should be denoted by indentation, 6. A while loop should be used instead of a 'for' loop.
This commit is contained in:
committed by
Akshay Joshi
parent
6a63279396
commit
707ff450b5
@@ -210,7 +210,7 @@ define([
|
||||
type: 'int',
|
||||
deps: ['format'],
|
||||
disabled: function(m) {
|
||||
return !(m.get('format') === 'directory');
|
||||
return (m.get('format') !== 'directory');
|
||||
},
|
||||
visible: function(m) {
|
||||
if (!_.isUndefined(m.get('type')) && m.get('type') === 'server')
|
||||
|
||||
@@ -1590,8 +1590,9 @@ define([
|
||||
);
|
||||
}
|
||||
});
|
||||
} else
|
||||
} else {
|
||||
this.intializePanels();
|
||||
}
|
||||
},
|
||||
|
||||
// Read the messages of the database server and get the port ID and attach
|
||||
|
||||
@@ -3536,8 +3536,9 @@ define('tools.querytool', [
|
||||
return 2000;
|
||||
} else if (seconds >= 90) {
|
||||
return 5000;
|
||||
} else
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
@@ -3857,8 +3858,9 @@ define('tools.querytool', [
|
||||
if (res.data.status) {
|
||||
// Refresh the sql grid
|
||||
queryToolActions.executeQuery(self);
|
||||
} else
|
||||
} else {
|
||||
alertify.alert(gettext('Change limit Error'), res.data.result);
|
||||
}
|
||||
}, 10
|
||||
);
|
||||
})
|
||||
|
||||
@@ -535,8 +535,8 @@ define([
|
||||
} else {
|
||||
if ((_.isUndefined(this.get('newPassword')) || _.isNull(this.get('newPassword')) ||
|
||||
this.get('newPassword') == '') &&
|
||||
((_.isUndefined(this.get('confirmPassword')) || _.isNull(this.get('confirmPassword')) ||
|
||||
this.get('confirmPassword') == ''))) {
|
||||
(_.isUndefined(this.get('confirmPassword')) || _.isNull(this.get('confirmPassword')) ||
|
||||
this.get('confirmPassword') == '')) {
|
||||
|
||||
this.errorModel.unset('newPassword');
|
||||
if (this.get('newPassword') == '') {
|
||||
|
||||
Reference in New Issue
Block a user