mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-25 22:20:05 -05:00
Fixed code smell 'Update this function so that its implementation is not identical' reported by SonarQube.
This commit is contained in:
1 parent
094129e2be
commit
0ce3434631
33 files changed
+603
-1055
No files matched your search
@@ -632,6 +632,16 @@ export default class SchemaDiffUI {
|
||||
}
|
||||
}
|
||||
|
||||
transformFunc(data) {
|
||||
let group_template_options = [];
|
||||
for (let key in data) {
|
||||
if (data.hasOwnProperty(key)) {
|
||||
group_template_options.push({'group': key, 'optval': data[key]});
|
||||
}
|
||||
}
|
||||
return group_template_options;
|
||||
}
|
||||
|
||||
render() {
|
||||
let self = this;
|
||||
let panel = self.docker.findPanels('schema_diff_header_panel')[0];
|
||||
@@ -645,13 +655,7 @@ export default class SchemaDiffUI {
|
||||
name: 'source_sid', label: false,
|
||||
control: SchemaDiffSelect2Control,
|
||||
transform: function(data) {
|
||||
let group_template_options = [];
|
||||
for (let key in data) {
|
||||
if (data.hasOwnProperty(key)) {
|
||||
group_template_options.push({'group': key, 'optval': data[key]});
|
||||
}
|
||||
}
|
||||
return group_template_options;
|
||||
return self.transformFunc(data);
|
||||
},
|
||||
url: url_for('schema_diff.servers'),
|
||||
select2: {
|
||||
@@ -729,13 +733,7 @@ export default class SchemaDiffUI {
|
||||
name: 'target_sid', label: false,
|
||||
control: SchemaDiffSelect2Control,
|
||||
transform: function(data) {
|
||||
let group_template_options = [];
|
||||
for (let key in data) {
|
||||
if (data.hasOwnProperty(key)) {
|
||||
group_template_options.push({'group': key, 'optval': data[key]});
|
||||
}
|
||||
}
|
||||
return group_template_options;
|
||||
return self.transformFunc(data);
|
||||
},
|
||||
group: 'target',
|
||||
url: url_for('schema_diff.servers'),
|
||||
|
||||
Reference in new issue
Block a user