mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed SonarQube issues
This commit is contained in:
parent
44cc7a308a
commit
3fc0cc3e92
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>pgAdmin 4</title>
|
||||
<style>
|
||||
|
@ -286,7 +286,7 @@ splashWindow.on('loaded', function() {
|
||||
startDesktopMode();
|
||||
})
|
||||
.catch((errCode) => {
|
||||
if (fixedPortCheck && errCode == 'EADDRINUSE') {
|
||||
if (errCode == 'EADDRINUSE') {
|
||||
alert('The specified fixed port is already in use. Please provide any other valid port.');
|
||||
} else {
|
||||
alert(errCode);
|
||||
|
@ -111,8 +111,7 @@ else:
|
||||
# Flask default.
|
||||
app.PGADMIN_RUNTIME = False
|
||||
app.logger.debug(
|
||||
'Server mode: %s, config server mode: %s',
|
||||
SERVER_MODE, config.SERVER_MODE
|
||||
'Config server mode: %s', config.SERVER_MODE
|
||||
)
|
||||
config.EFFECTIVE_SERVER_PORT = None
|
||||
if 'PGADMIN_INT_PORT' in os.environ:
|
||||
|
@ -129,7 +129,7 @@ class AuthSourceManager():
|
||||
self.current_source = source
|
||||
|
||||
@property
|
||||
def get_current_source(self, source):
|
||||
def get_current_source(self):
|
||||
return self.current_source
|
||||
|
||||
def set_source(self, source):
|
||||
@ -174,11 +174,9 @@ class AuthSourceManager():
|
||||
# OR When kerberos authentication failed while accessing pgadmin,
|
||||
# we need to break the loop as no need to authenticate further
|
||||
# even if the authentication sources set to multiple
|
||||
if not status:
|
||||
if (hasattr(msg, 'status') and
|
||||
if not status and (hasattr(msg, 'status') and
|
||||
msg.status == '401 UNAUTHORIZED') or \
|
||||
(source.get_source_name() ==
|
||||
KERBEROS and
|
||||
(source.get_source_name() == KERBEROS and
|
||||
request.method == 'GET'):
|
||||
break
|
||||
|
||||
|
@ -290,8 +290,7 @@ class SchemaView(PGChildNodeView):
|
||||
|
||||
# Privileges
|
||||
for aclcol in acls:
|
||||
if specific is not None:
|
||||
if aclcol not in specific:
|
||||
if specific is not None and aclcol not in specific:
|
||||
continue
|
||||
if aclcol in data:
|
||||
allowedacl = acls[aclcol]
|
||||
|
@ -77,9 +77,8 @@
|
||||
.menu-groups-a{
|
||||
display:flex !important;
|
||||
flex-direction:column;
|
||||
padding: 6px;
|
||||
color: $dropdown-link-color;
|
||||
padding: 6px 16px;
|
||||
color: $dropdown-link-color;
|
||||
}
|
||||
|
||||
.menu-groups-a span{
|
||||
|
@ -561,7 +561,6 @@ def sql(trans_id, sgid, sid, did):
|
||||
@login_required
|
||||
def tables(trans_id, sgid, sid, did):
|
||||
helper = ERDHelper(trans_id, sid, did)
|
||||
conn = _get_connection(sid, did, trans_id)
|
||||
status, tables = helper.get_all_tables()
|
||||
|
||||
if not status:
|
||||
|
@ -11,7 +11,6 @@ import React, { useEffect, useState } from 'react';
|
||||
import Tippy from '@tippyjs/react';
|
||||
import gettext from 'sources/gettext';
|
||||
import PropTypes from 'prop-types';
|
||||
import { TableNodeModel } from '../nodes/TableNode';
|
||||
import CustomPropTypes from 'sources/custom_prop_types';
|
||||
|
||||
/* The note component of ERD. It uses tippy to create the floating note */
|
||||
|
@ -8,7 +8,7 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
/* This is used to change publicPath of webpack at runtime for loading chunks */
|
||||
/* eslint-disable */
|
||||
__webpack_public_path__ = window.resourceBasePath;
|
||||
let __webpack_public_path__ = window.resourceBasePath;
|
||||
/* eslint-enable */
|
||||
|
||||
import {launchDataGrid} from 'tools/datagrid/static/js/show_query_tool';
|
||||
|
@ -438,8 +438,9 @@ def change_owner():
|
||||
data={}
|
||||
)
|
||||
except Exception as e:
|
||||
msg = 'Unable to update shared server owner' + _(str(e))
|
||||
return internal_server_error(
|
||||
errormsg='Unable to update shared server owner')
|
||||
errormsg=msg)
|
||||
|
||||
|
||||
@blueprint.route(
|
||||
|
Loading…
Reference in New Issue
Block a user