mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Fixed some issues reported by SonarQube.
This commit is contained in:
parent
f5cc1d1c7e
commit
24dc7f4a91
@ -367,7 +367,6 @@ define('pgadmin.node.fts_configuration', [
|
||||
self.$grid.find('.new').removeClass('new');
|
||||
var newRow = self.grid.body.rows[idx].$el;
|
||||
newRow.addClass('new');
|
||||
//$(newRow).pgMakeVisible('table-bordered');
|
||||
$(newRow).pgMakeVisible('backform-tab');
|
||||
}
|
||||
|
||||
|
@ -48,13 +48,7 @@ define('pgadmin.node.function', [
|
||||
id: 'argtype', label: gettext('Data type'), cell:
|
||||
'node-ajax-options', cellHeaderClasses: 'width_percent_30',
|
||||
control: 'node-ajax-options', type: 'text', url: 'get_types',
|
||||
editable: function(m) {
|
||||
var node_info = this.get('node_info');
|
||||
if(node_info && 'catalog' in node_info) {
|
||||
return false;
|
||||
}
|
||||
return _.isUndefined(m.isNew) ? true : m.isNew();
|
||||
}, first_empty: true,
|
||||
editable: 'isEditable', first_empty: true,
|
||||
},{
|
||||
id: 'argmode', label: gettext('Mode'), type: 'options',
|
||||
control: 'node-ajax-options', cellHeaderClasses:'width_percent_20',
|
||||
@ -66,13 +60,7 @@ define('pgadmin.node.function', [
|
||||
{'label': 'OUT', 'value': 'OUT'},
|
||||
{'label': 'INOUT', 'value': 'INOUT'},
|
||||
{'label': 'VARIADIC', 'value': 'VARIADIC'},
|
||||
], editable: function(m) {
|
||||
var node_info = this.get('node_info');
|
||||
if(node_info && 'catalog' in node_info) {
|
||||
return false;
|
||||
}
|
||||
return _.isUndefined(m.isNew) ? true : m.isNew();
|
||||
},
|
||||
], editable: 'isEditable',
|
||||
},{
|
||||
id: 'argname', label: gettext('Argument name'), type: 'text',
|
||||
cell: 'string', editable: 'isInCatalog', cellHeaderClasses:'width_percent_30',
|
||||
@ -82,6 +70,13 @@ define('pgadmin.node.function', [
|
||||
},
|
||||
],
|
||||
toJSON: Backbone.Model.prototype.toJSON,
|
||||
isEditable: function(m) {
|
||||
var node_info = this.get('node_info');
|
||||
if(node_info && 'catalog' in node_info) {
|
||||
return false;
|
||||
}
|
||||
return _.isUndefined(m.isNew) ? true : m.isNew();
|
||||
},
|
||||
isInCatalog: function(m){
|
||||
var node_info = this.get('node_info');
|
||||
if(node_info && 'catalog' in node_info) {
|
||||
|
@ -48,12 +48,7 @@ define('pgadmin.node.trigger_function', [
|
||||
},
|
||||
hasSQL: true,
|
||||
showMenu: function(itemData, item) {
|
||||
let node = pgBrowser.treeMenu.findNodeByDomElement(item);
|
||||
|
||||
if (!node || node.parentNode.getData()._type === 'trigger')
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return this.canEdit(itemData, item);
|
||||
},
|
||||
hasDepends: true,
|
||||
hasStatistics: true,
|
||||
|
@ -608,7 +608,7 @@ class Filemanager(object):
|
||||
created = time.ctime(os.path.getctime(system_path))
|
||||
modified = time.ctime(os.path.getmtime(system_path))
|
||||
file_extension = str(splitext(system_path))
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
# set protected to 1 if no write or read permission
|
||||
|
Loading…
Reference in New Issue
Block a user