mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed some SonarQube issues.
This commit is contained in:
committed by
Akshay Joshi
parent
af1e9210b9
commit
71a4b20d90
@@ -66,7 +66,7 @@ PolyLine.propTypes = {
|
||||
function Multitext({currentXpos, currentYpos, label, maxWidth}) {
|
||||
const theme = useTheme();
|
||||
let abc = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
var xmlns = 'https://www.w3.org/2000/svg';
|
||||
var xmlns = 'http://www.w3.org/2000/svg';
|
||||
var svgElem = document.createElementNS(xmlns, 'svg');
|
||||
svgElem.setAttributeNS(xmlns, 'height', '100%');
|
||||
svgElem.setAttributeNS(xmlns, 'width', '100%');
|
||||
@@ -387,7 +387,7 @@ export default function Graphical({planData, ctx}) {
|
||||
|
||||
const onDownloadClick = ()=>{
|
||||
downloadSvg(ReactDOMServer.renderToStaticMarkup(
|
||||
<PlanSVG planData={planData} download={true} ctx={ctx} zoomFactor={INIT_ZOOM_FACTOR} onNodeClick={()=>{}}/>
|
||||
<PlanSVG planData={planData} download={true} ctx={ctx} zoomFactor={INIT_ZOOM_FACTOR} onNodeClick={()=>{/*This is intentional (SonarQube)*/}}/>
|
||||
), 'explain_plan_' + (new Date()).getTime() + '.svg');
|
||||
};
|
||||
|
||||
|
||||
@@ -442,27 +442,25 @@ function parsePlanData(data, ctx) {
|
||||
'Triggers': [],
|
||||
'Summary': {},
|
||||
};
|
||||
if (data && 'JIT' in data) {
|
||||
if ('JIT' in data) {
|
||||
retPlan['Statistics']['JIT'] = retPlan['JIT'];
|
||||
}
|
||||
if (data && 'Triggers' in data) {
|
||||
if ('Triggers' in data) {
|
||||
retPlan['Statistics']['Triggers'] = retPlan['JITriggersT'];
|
||||
}
|
||||
if(data) {
|
||||
let summKeys = ['Planning Time', 'Execution Time'],
|
||||
summary = {};
|
||||
|
||||
summKeys.forEach((key)=>{
|
||||
if (key in data) {
|
||||
summary[key] = data[key];
|
||||
}
|
||||
});
|
||||
|
||||
retPlan['Statistics']['Summary'] = summary;
|
||||
}
|
||||
if (data && 'Settings' in data) {
|
||||
if ('Settings' in data) {
|
||||
retPlan['Statistics']['Settings'] = data['Settings'];
|
||||
}
|
||||
let summKeys = ['Planning Time', 'Execution Time'],
|
||||
summary = {};
|
||||
|
||||
summKeys.forEach((key)=>{
|
||||
if (key in data) {
|
||||
summary[key] = data[key];
|
||||
}
|
||||
});
|
||||
|
||||
retPlan['Statistics']['Summary'] = summary;
|
||||
|
||||
parseExplainTableData(retPlan['Plan'], ctx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user