diff --git a/web/pgadmin/browser/static/js/node_view.jsx b/web/pgadmin/browser/static/js/node_view.jsx index 7681024c0..fde229f0c 100644 --- a/web/pgadmin/browser/static/js/node_view.jsx +++ b/web/pgadmin/browser/static/js/node_view.jsx @@ -18,6 +18,7 @@ import { generateNodeUrl } from './node_ajax'; import Notify from '../../../static/js/helpers/Notifier'; import gettext from 'sources/gettext'; import 'wcdocker'; +import Theme from '../../../static/js/Theme'; /* The entry point for rendering React based view in properties, called in node.js */ export function getNodeView(nodeType, treeNodeInfo, actionType, itemNodeData, formType, container, containerPanel, onEdit, onSave) { @@ -204,24 +205,26 @@ export function getNodeView(nodeType, treeNodeInfo, actionType, itemNodeData, fo /* Fire at will, mount the DOM */ ReactDOM.render( - containerPanel.close()} - onHelp={onHelp} - onEdit={onEdit} - onDataChange={(dataChanged)=>{ - isDirty = dataChanged; - }} - confirmOnCloseReset={confirmOnCloseReset} - hasSQL={nodeObj.hasSQL && (actionType === 'create' || actionType === 'edit')} - getSQLValue={getSQLValue} - disableSqlHelp={nodeObj.sqlAlterHelp == '' && nodeObj.sqlCreateHelp == '' && !nodeObj.epasHelp} - disableDialogHelp={nodeObj.dialogHelp == undefined || nodeObj.dialogHelp == ''} - />, container); + + containerPanel.close()} + onHelp={onHelp} + onEdit={onEdit} + onDataChange={(dataChanged)=>{ + isDirty = dataChanged; + }} + confirmOnCloseReset={confirmOnCloseReset} + hasSQL={nodeObj.hasSQL && (actionType === 'create' || actionType === 'edit')} + getSQLValue={getSQLValue} + disableSqlHelp={nodeObj.sqlAlterHelp == '' && nodeObj.sqlCreateHelp == '' && !nodeObj.epasHelp} + disableDialogHelp={nodeObj.dialogHelp == undefined || nodeObj.dialogHelp == ''} + /> + , container); } /* When switching from normal node to collection node, clean up the React mounted DOM */ diff --git a/web/pgadmin/static/js/SchemaView/index.jsx b/web/pgadmin/static/js/SchemaView/index.jsx index 9a8919f2f..3221286b6 100644 --- a/web/pgadmin/static/js/SchemaView/index.jsx +++ b/web/pgadmin/static/js/SchemaView/index.jsx @@ -22,7 +22,6 @@ import diffArray from 'diff-arrays-of-objects'; import _ from 'lodash'; import {FormFooterMessage, MESSAGE_TYPE } from 'sources/components/FormComponents'; -import Theme from 'sources/Theme'; import { PrimaryButton, DefaultButton, PgIconButton } from 'sources/components/Buttons'; import Loader from 'sources/components/Loader'; import { minMaxValidator, numberValidator, integerValidator, emptyValidator, checkUniqueCol, isEmptyString} from '../validators'; @@ -979,19 +978,15 @@ export default function SchemaView({formType, ...props}) { /* Switch the view based on formType */ if(formType === 'tab') { return ( - - - - - + + + ); } return ( - - - - - + + + ); } diff --git a/web/pgadmin/static/js/helpers/ModalProvider.jsx b/web/pgadmin/static/js/helpers/ModalProvider.jsx index 0474f2fee..80523fe04 100644 --- a/web/pgadmin/static/js/helpers/ModalProvider.jsx +++ b/web/pgadmin/static/js/helpers/ModalProvider.jsx @@ -17,7 +17,6 @@ import CloseIcon from '@material-ui/icons/CloseRounded'; import CustomPropTypes from '../custom_prop_types'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; -import Theme from '../Theme'; import HTMLReactParser from 'html-react-parser'; import CheckRoundedIcon from '@material-ui/icons/CheckRounded'; import { Rnd } from 'react-rnd'; @@ -267,36 +266,35 @@ function ModalContainer({ id, title, content, dialogHeight, dialogWidth, onClose const [isfullScreen, setIsFullScreen] = useState(fullScreen); return ( - - - - - {title} - { - showFullScreen && !isfullScreen && - } size="xs" noBorder onClick={() => { setIsFullScreen(!isfullScreen); }} /> - } - { - showFullScreen && isfullScreen && - } size="xs" noBorder onClick={() => { setIsFullScreen(!isfullScreen); }} /> - } + + + + {title} + { + showFullScreen && !isfullScreen && + } size="xs" noBorder onClick={() => { setIsFullScreen(!isfullScreen); }} /> + } + { + showFullScreen && isfullScreen && + } size="xs" noBorder onClick={() => { setIsFullScreen(!isfullScreen); }} /> + } - } size="xs" noBorder onClick={closeModal} /> - - - - {content(closeModal)} - - - + } size="xs" noBorder onClick={closeModal} /> + + + + {content(closeModal)} + + ); } ModalContainer.propTypes = { diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/GraphVisualiser.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/GraphVisualiser.jsx index 18fa79e5f..db538e0c6 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/GraphVisualiser.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/GraphVisualiser.jsx @@ -10,7 +10,6 @@ import _ from 'lodash'; import React, { useContext, useState, useMemo, useEffect } from 'react'; import gettext from 'sources/gettext'; -import Theme from 'sources/Theme'; import PropTypes from 'prop-types'; import url_for from 'sources/url_for'; import Loader from 'sources/components/Loader'; @@ -324,54 +323,52 @@ export function GraphVisualiser({initColumns}) { }; return ( - - - - + + + + - - {gettext('X Axis')} - setXAxis(v)} value={xaxis} optionsReloadBasis={optionsReload}/> - - - {gettext('Graph Type')} - setGraphType(v)} value={graphType} /> - - } - disabled={ _.isEmpty(xaxis) || yaxis.length <= 0 }> - {gettext('Generate')} - + {gettext('X Axis')} + setXAxis(v)} value={xaxis} optionsReloadBasis={optionsReload}/> - - {gettext('Y Axis')} - setYAxis(v)} value={yaxis} optionsReloadBasis={optionsReload}/> + + {gettext('Graph Type')} + setGraphType(v)} value={graphType} /> + } + disabled={ _.isEmpty(xaxis) || yaxis.length <= 0 }> + {gettext('Generate')} + - - - } - onClick={()=>onResetZoom()} disabled={ graphData.datasets.length <= 0 }/> - } - onClick={onDownloadGraph} disabled={ graphData.datasets.length <= 0 }/> - - - - - {useMemo(()=> { - chartObjRef.current = chartObj; - }} plugins={plugin}/>, [graphDataKey])} - + + {gettext('Y Axis')} + setYAxis(v)} value={yaxis} optionsReloadBasis={optionsReload}/> - + + + } + onClick={()=>onResetZoom()} disabled={ graphData.datasets.length <= 0 }/> + } + onClick={onDownloadGraph} disabled={ graphData.datasets.length <= 0 }/> + + + + + {useMemo(()=> { + chartObjRef.current = chartObj; + }} plugins={plugin}/>, [graphDataKey])} + + + ); } GraphVisualiser.propTypes = {