mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed issue related to extra semicolons and function naming convention reported by SonarQube.
This commit is contained in:
parent
db9d684524
commit
a1fd9ea3ce
@ -22,7 +22,7 @@ class GPDB(ServerType):
|
|||||||
def icon(self):
|
def icon(self):
|
||||||
return "gpdb.png"
|
return "gpdb.png"
|
||||||
|
|
||||||
def instanceOf(self, ver):
|
def instance_of(self, ver):
|
||||||
return "Greenplum Database" in ver
|
return "Greenplum Database" in ver
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ class PPAS(ServerType):
|
|||||||
" programs (pg_dump, pg_restore etc)."
|
" programs (pg_dump, pg_restore etc)."
|
||||||
)
|
)
|
||||||
|
|
||||||
def instanceOf(self, ver):
|
def instance_of(self, ver):
|
||||||
return "EnterpriseDB" in ver
|
return "EnterpriseDB" in ver
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ class ServerType(object):
|
|||||||
self.stype, self.desc, self.spriority
|
self.stype, self.desc, self.spriority
|
||||||
)
|
)
|
||||||
|
|
||||||
def instanceOf(self, version):
|
def instance_of(self, version):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -1032,7 +1032,7 @@ class Filemanager(object):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getNewName(dir, path, newName, count=1):
|
def get_new_name(dir, path, newName, count=1):
|
||||||
"""
|
"""
|
||||||
Utility to provide new name for folder if file
|
Utility to provide new name for folder if file
|
||||||
with same name already exists
|
with same name already exists
|
||||||
@ -1046,7 +1046,7 @@ class Filemanager(object):
|
|||||||
newPath = u"{}/{}{}_{}".format(dir, path, newName, last_char)
|
newPath = u"{}/{}{}_{}".format(dir, path, newName, last_char)
|
||||||
if path_exists(newPath):
|
if path_exists(newPath):
|
||||||
count += 1
|
count += 1
|
||||||
return Filemanager.getNewName(dir, path, newName, count)
|
return Filemanager.get_new_name(dir, path, newName, count)
|
||||||
else:
|
else:
|
||||||
return newPath, newName
|
return newPath, newName
|
||||||
|
|
||||||
@ -1160,7 +1160,7 @@ class Filemanager(object):
|
|||||||
code = 0
|
code = 0
|
||||||
err_msg = gettext(u"Error: {0}").format(e.strerror)
|
err_msg = gettext(u"Error: {0}").format(e.strerror)
|
||||||
else:
|
else:
|
||||||
newPath, newName = self.getNewName(dir, path, name)
|
newPath, newName = self.get_new_name(dir, path, name)
|
||||||
try:
|
try:
|
||||||
os.mkdir(newPath)
|
os.mkdir(newPath)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -185,7 +185,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.upload_file .file_upload_main {
|
.upload_file .file_upload_main {
|
||||||
height: 127px;;
|
height: 127px;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 15px 15px 0 !important;
|
margin: 0 15px 15px 0 !important;
|
||||||
@ -345,7 +345,7 @@ table.tablesorter {
|
|||||||
table.tablesorter {
|
table.tablesorter {
|
||||||
th:focus,
|
th:focus,
|
||||||
tr:focus {
|
tr:focus {
|
||||||
border: 2px solid $input-focus-border-color !important;;
|
border: 2px solid $input-focus-border-color !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
& .cm-link {color: $color-editor-fg;}
|
& .cm-link {color: $color-editor-fg;}
|
||||||
|
|
||||||
& :not(.cm-fat-cursor) .CodeMirror-cursor {
|
& :not(.cm-fat-cursor) .CodeMirror-cursor {
|
||||||
border-left: thin solid $color-editor-fg;;
|
border-left: thin solid $color-editor-fg;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
width: 0;
|
width: 0;
|
||||||
}
|
}
|
||||||
|
@ -772,7 +772,7 @@ table tr td {
|
|||||||
td.edit-cell:focus,
|
td.edit-cell:focus,
|
||||||
td.delete-cell:focus,
|
td.delete-cell:focus,
|
||||||
td.string-cell:focus {
|
td.string-cell:focus {
|
||||||
border: 2px solid $input-focus-border-color !important;;
|
border: 2px solid $input-focus-border-color !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ $color-success-light: #D9ECDA !default;
|
|||||||
|
|
||||||
$color-warning: #eea236 !default;
|
$color-warning: #eea236 !default;
|
||||||
$color-warning-fg: $black !default;
|
$color-warning-fg: $black !default;
|
||||||
$color-warning-light: #fce5c5 !default;;
|
$color-warning-light: #fce5c5 !default;
|
||||||
|
|
||||||
$color-gray-dark: #848ea0 !default;
|
$color-gray-dark: #848ea0 !default;
|
||||||
$color-gray: #bac1cd !default;
|
$color-gray: #bac1cd !default;
|
||||||
|
@ -509,7 +509,7 @@ WHERE
|
|||||||
server_types = ServerType.types()
|
server_types = ServerType.types()
|
||||||
|
|
||||||
for st in server_types:
|
for st in server_types:
|
||||||
if st.instanceOf(manager.ver):
|
if st.instance_of(manager.ver):
|
||||||
manager.server_type = st.stype
|
manager.server_type = st.stype
|
||||||
manager.server_cls = st
|
manager.server_cls = st
|
||||||
break
|
break
|
||||||
|
@ -264,7 +264,7 @@ WHERE db.oid = {0}""".format(did))
|
|||||||
|
|
||||||
if self.ver and not self.server_type:
|
if self.ver and not self.server_type:
|
||||||
for st in ServerType.types():
|
for st in ServerType.types():
|
||||||
if st.instanceOf(self.ver):
|
if st.instance_of(self.ver):
|
||||||
self.server_type = st.stype
|
self.server_type = st.stype
|
||||||
self.server_cls = st
|
self.server_cls = st
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user