Sonarqube fixes.

This commit is contained in:
Dave Page 2022-08-26 10:07:59 +01:00
parent 92741680b5
commit 37082a955b
6 changed files with 8 additions and 11 deletions

View File

@ -83,11 +83,11 @@ class BigAnimalProvider(AbsProvider):
try:
private_network = True if args.private_network == '1' else False
ip = args.public_ip if args.public_ip else '0.0.0.0/0'
IpRanges = []
ip_ranges = []
ip = ip.split(',')
for i in ip:
IpRanges.append([i, 'pgcloud client {}'.format(i)])
ip_ranges.append([i, 'pgcloud client {}'.format(i)])
debug('Creating BigAnimal cluster: {}...'.format(args.name))
@ -114,7 +114,7 @@ class BigAnimalProvider(AbsProvider):
}
if not private_network:
_data['allowIpRangeMap'] = IpRanges
_data['allowIpRangeMap'] = ip_ranges
cluster_resp = requests.post(_url,
headers=_headers,

View File

@ -162,11 +162,11 @@ class RdsProvider(AbsProvider):
ip = args.public_ip if args.public_ip else\
'{}/32'.format(get_my_ip())
port = args.db_port or 5432
IpRanges = []
ip_ranges = []
ip = ip.split(',')
for i in ip:
IpRanges.append({
ip_ranges.append({
'CidrIp': i,
'Description': 'pgcloud client {}'.format(i)
})
@ -180,7 +180,7 @@ class RdsProvider(AbsProvider):
'FromPort': port,
'ToPort': port,
'IpProtocol': 'tcp',
'IpRanges': IpRanges
'IpRanges': ip_ranges
},
]
)

View File

@ -104,7 +104,7 @@ class BaseTableView(PGChildNodeView, BasePartitionTable, VacuumSettings):
# Here args[0] will hold self & kwargs will hold gid,sid,did
self = args[0]
driver = get_driver(PG_DEFAULT_DRIVER)
did = kwargs['did']
self.manager = driver.connection_manager(kwargs['sid'])
if "conn_id" in kwargs:
self.conn = self.manager.connection(

View File

@ -653,7 +653,6 @@ define('pgadmin.node.server', [
else if (res.cloud_status == -1) {
pgAdmin.Browser.BgProcessManager.recheckCloudServer(data._id);
}
return;
}).always(function(){
data.is_connecting = false;
});

View File

@ -503,7 +503,6 @@ class BatchProcess(object):
"""
Parse the output to get the cloud instance details
"""
_server = {}
_pid = self.id
_process = Process.query.filter_by(

View File

@ -7,7 +7,7 @@
//
//////////////////////////////////////////////////////////////
import React, { useEffect } from 'react';
import React, { useEffect, useMemo } from 'react';
import PgTable from 'sources/components/PgTable';
import gettext from 'sources/gettext';
import PropTypes from 'prop-types';
@ -21,7 +21,6 @@ import DeleteIcon from '@material-ui/icons/Delete';
import HelpIcon from '@material-ui/icons/HelpRounded';
import url_for from 'sources/url_for';
import { Box } from '@material-ui/core';
import { useMemo } from 'react';
import Notifier from '../../../../static/js/helpers/Notifier';