mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Sonarqube fixes.
This commit is contained in:
parent
92741680b5
commit
37082a955b
@ -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,
|
||||
|
@ -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
|
||||
},
|
||||
]
|
||||
)
|
||||
|
@ -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(
|
||||
|
@ -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;
|
||||
});
|
||||
|
@ -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(
|
||||
|
@ -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';
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user