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
ad862f4084
commit
af6ff20020
@ -34,7 +34,7 @@ export class DefaultWithSchema extends BaseUISchema {
|
|||||||
id: 'evnt_truncate', label: gettext('TRUNCATE'),
|
id: 'evnt_truncate', label: gettext('TRUNCATE'),
|
||||||
type: 'switch', group: gettext('With'),
|
type: 'switch', group: gettext('With'),
|
||||||
visible: function() {
|
visible: function() {
|
||||||
if(!_.isUndefined(this.node_info['node_info']) && !_.isUndefined(this.node_info['node_info'])
|
if(!_.isUndefined(this.node_info['node_info'])
|
||||||
&& !_.isUndefined(this.node_info['node_info'].version) &&
|
&& !_.isUndefined(this.node_info['node_info'].version) &&
|
||||||
this.node_info['node_info'].version >= 110000)
|
this.node_info['node_info'].version >= 110000)
|
||||||
return true;
|
return true;
|
||||||
@ -45,7 +45,7 @@ export class DefaultWithSchema extends BaseUISchema {
|
|||||||
id: 'publish_via_partition_root', label: gettext('Publish via root?'),
|
id: 'publish_via_partition_root', label: gettext('Publish via root?'),
|
||||||
type: 'switch', group: gettext('With'),
|
type: 'switch', group: gettext('With'),
|
||||||
visible: function() {
|
visible: function() {
|
||||||
if(!_.isUndefined(this.node_info['node_info']) && !_.isUndefined(this.node_info['node_info'])
|
if(!_.isUndefined(this.node_info['node_info'])
|
||||||
&& !_.isUndefined(this.node_info['node_info'].version) &&
|
&& !_.isUndefined(this.node_info['node_info'].version) &&
|
||||||
this.node_info['node_info'].version >= 130000)
|
this.node_info['node_info'].version >= 130000)
|
||||||
return true;
|
return true;
|
||||||
|
@ -46,26 +46,16 @@ export function getUtilityView(schema, treeNodeInfo, actionType, formType, conta
|
|||||||
});
|
});
|
||||||
|
|
||||||
/* Callback for help button */
|
/* Callback for help button */
|
||||||
const onHelp = (isSqlHelp=false, isNew=false)=>{
|
const onHelp = (isSqlHelp=false)=>{
|
||||||
if(isSqlHelp) {
|
if(isSqlHelp) {
|
||||||
let server = treeNodeInfo.server;
|
let server = treeNodeInfo.server;
|
||||||
let url = pgAdmin.Browser.utils.pg_help_path;
|
let help_url = pgAdmin.Browser.utils.pg_help_path;
|
||||||
let fullUrl = '';
|
let fullUrl = '';
|
||||||
|
|
||||||
if (server.server_type == 'ppas') {
|
if (server.server_type == 'ppas') {
|
||||||
fullUrl = getEPASHelpUrl(server.version);
|
fullUrl = getEPASHelpUrl(server.version);
|
||||||
} else {
|
} else {
|
||||||
if (sqlHelpUrl == '') {
|
fullUrl = getHelpUrl(help_url, sqlHelpUrl, server.version);
|
||||||
fullUrl = getHelpUrl(url, sqlHelpUrl, server.version);
|
|
||||||
} else if (sqlHelpUrl != '') {
|
|
||||||
fullUrl = getHelpUrl(url, sqlHelpUrl, server.version);
|
|
||||||
} else {
|
|
||||||
if (isNew) {
|
|
||||||
fullUrl = getHelpUrl(url, sqlHelpUrl, server.version);
|
|
||||||
} else {
|
|
||||||
fullUrl = getHelpUrl(url, sqlHelpUrl, server.version);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.open(fullUrl, 'postgres_help');
|
window.open(fullUrl, 'postgres_help');
|
||||||
@ -97,8 +87,7 @@ export function getUtilityView(schema, treeNodeInfo, actionType, formType, conta
|
|||||||
onSave={onSaveClick}
|
onSave={onSaveClick}
|
||||||
onClose={()=>containerPanel.close()}
|
onClose={()=>containerPanel.close()}
|
||||||
onHelp={onHelp}
|
onHelp={onHelp}
|
||||||
onDataChange={()=>{
|
onDataChange={()=>{}}
|
||||||
}}
|
|
||||||
confirmOnCloseReset={confirmOnReset}
|
confirmOnCloseReset={confirmOnReset}
|
||||||
hasSQL={false}
|
hasSQL={false}
|
||||||
disableSqlHelp={sqlHelpUrl == undefined || sqlHelpUrl == ''}
|
disableSqlHelp={sqlHelpUrl == undefined || sqlHelpUrl == ''}
|
||||||
|
@ -505,7 +505,7 @@ function SchemaDialogView({
|
|||||||
if(!getInitData) {
|
if(!getInitData) {
|
||||||
throw new Error('getInitData must be passed for edit');
|
throw new Error('getInitData must be passed for edit');
|
||||||
}
|
}
|
||||||
getInitData && getInitData().then((data)=>{firstEleRef.current;
|
getInitData && getInitData().then((data)=>{
|
||||||
data = data || {};
|
data = data || {};
|
||||||
/* Set the origData to incoming data, useful for comparing and reset */
|
/* Set the origData to incoming data, useful for comparing and reset */
|
||||||
schema.origData = prepareData(data || {});
|
schema.origData = prepareData(data || {});
|
||||||
|
@ -132,7 +132,6 @@ export class ManageTreeNodes {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new Error("Node Load Error...");
|
throw new Error("Node Load Error...");
|
||||||
return [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let treeData = null;
|
let treeData = null;
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
font-size: $navbar-font-size !important;
|
font-size: $navbar-font-size !important;
|
||||||
line-height: $line-height-base !important;
|
line-height: $line-height-base !important;
|
||||||
background-image:none !important;
|
background-image:none !important;
|
||||||
font-weight: 600 !important;
|
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
border-color:$color-gray;
|
border-color:$color-gray;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@ -100,7 +99,6 @@
|
|||||||
font-size: $font-size-base !important;
|
font-size: $font-size-base !important;
|
||||||
line-height: $line-height-base !important;
|
line-height: $line-height-base !important;
|
||||||
background-image:none !important;
|
background-image:none !important;
|
||||||
font-weight: 600 !important;
|
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
border-color:$color-gray;
|
border-color:$color-gray;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -1107,7 +1107,6 @@ textarea {
|
|||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
border: 0.25rem solid transparent;
|
border: 0.25rem solid transparent;
|
||||||
border-radius: $border-radius*2;
|
border-radius: $border-radius*2;
|
||||||
background-color: rgba($scrollbar-base-color, 0.7);
|
|
||||||
background: rgba($scrollbar-base-color, 0.7) !important;
|
background: rgba($scrollbar-base-color, 0.7) !important;
|
||||||
background-clip: content-box !important;
|
background-clip: content-box !important;
|
||||||
}
|
}
|
||||||
@ -1115,7 +1114,7 @@ textarea {
|
|||||||
::-webkit-scrollbar-thumb:hover {
|
::-webkit-scrollbar-thumb:hover {
|
||||||
border: 0.25rem solid transparent;
|
border: 0.25rem solid transparent;
|
||||||
background-color: $scrollbar-base-color !important;
|
background-color: $scrollbar-base-color !important;
|
||||||
ackground-clip: content-box !important;
|
background-clip: content-box !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
i {
|
i {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font: normal normal normal 18px/1 "default-icons";
|
font: normal 18px/1 "default-icons";
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 21px !important;
|
height: 21px !important;
|
||||||
@ -104,7 +104,6 @@
|
|||||||
transform: none !important;
|
transform: none !important;
|
||||||
}
|
}
|
||||||
&.loading:before {
|
&.loading:before {
|
||||||
background-position: 6px center !important;
|
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
font-size: 0.6rem;
|
font-size: 0.6rem;
|
||||||
line-height: 2;
|
line-height: 2;
|
||||||
@ -136,7 +135,6 @@
|
|||||||
font: inherit;
|
font: inherit;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
cursor: default;
|
|
||||||
color: $tree-text-fg !important;
|
color: $tree-text-fg !important;
|
||||||
margin-left: 3px;
|
margin-left: 3px;
|
||||||
cursor: pointer !important;
|
cursor: pointer !important;
|
||||||
|
Loading…
Reference in New Issue
Block a user