diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.js b/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.js index 697ddf265..9af351d31 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.js +++ b/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.js @@ -23,7 +23,7 @@ define('pgadmin.node.publication', [ node: 'publication', label: gettext('Publications'), type: 'coll-publication', - columns: ['name', 'pubowner', 'proptable', 'all_table'], + columns: ['name', 'pubowner', 'pubtable', 'all_table'], }); } diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.ui.js b/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.ui.js index 55736d4b0..d338f1339 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.ui.js +++ b/web/pgadmin/browser/server_groups/servers/databases/publications/static/js/publication.ui.js @@ -144,11 +144,8 @@ export default class PublicationSchema extends BaseUISchema { id: 'pubtable', label: gettext('Tables'), type: 'select', controlProps: { allowClear: true, multiple: true, creatable: true }, options: this.fieldOptions.publicationTable, - group: gettext('Definition'), mode: ['edit', 'create'], + group: gettext('Definition'), mode: ['edit', 'create', 'properties'], deps: ['all_table'], disabled: obj.isAllTable, - },{ - id: 'proptable', label: gettext('Tables'), type: 'text', group: gettext('Definition'), - mode: ['properties'], },{ type: 'nested-fieldset', mode: ['create','edit', 'properties'], label: gettext('With'), group: gettext('Definition'), diff --git a/web/pgadmin/browser/static/js/panel.js b/web/pgadmin/browser/static/js/panel.js index b76a90c1c..ce59e5650 100644 --- a/web/pgadmin/browser/static/js/panel.js +++ b/web/pgadmin/browser/static/js/panel.js @@ -147,7 +147,7 @@ define( }); pgBrowser.Events.on('pgadmin-browser:tree:selected', () => { - + if(myPanel.isVisible() && myPanel._type !== 'properties') { getPanelView( pgBrowser.tree, @@ -158,6 +158,18 @@ define( } }); + pgBrowser.Events.on('pgadmin:database:connected', () => { + + if(myPanel.isVisible() && myPanel._type == 'dashboard' && myPanel._type !== 'properties') { + getPanelView( + pgBrowser.tree, + $container[0], + pgBrowser, + myPanel._type + ); + } + }); + pgBrowser.Events.on('pgadmin-browser:tree:refreshing', () => { if(myPanel.isVisible() && myPanel._type !== 'properties') { diff --git a/web/pgadmin/browser/static/js/panel_view.jsx b/web/pgadmin/browser/static/js/panel_view.jsx index f212debbf..e10b2d738 100644 --- a/web/pgadmin/browser/static/js/panel_view.jsx +++ b/web/pgadmin/browser/static/js/panel_view.jsx @@ -48,6 +48,7 @@ export function getPanelView( did={((!_.isUndefined(treeNodeInfo)) && (!_.isUndefined(treeNodeInfo['database']))) ? treeNodeInfo['database']._id: 0} sid={!_.isUndefined(treeNodeInfo) && !_.isUndefined(treeNodeInfo['server']) ? treeNodeInfo['server']._id : ''} serverConnected={!_.isUndefined(treeNodeInfo) && !_.isUndefined(treeNodeInfo['server']) ? treeNodeInfo.server.connected: false} + dbConnected={!_.isUndefined(treeNodeInfo) && !_.isUndefined(treeNodeInfo['database']) ? treeNodeInfo.database.connected: false} /> , container diff --git a/web/pgadmin/dashboard/static/js/Dashboard.jsx b/web/pgadmin/dashboard/static/js/Dashboard.jsx index d2340f63a..4c0d91874 100644 --- a/web/pgadmin/dashboard/static/js/Dashboard.jsx +++ b/web/pgadmin/dashboard/static/js/Dashboard.jsx @@ -741,6 +741,7 @@ export default function Dashboard({ } message = gettext('Loading dashboard...'); + if (did && !props.dbConnected) return; if (did) url += sid + '/' + did; else url += sid; @@ -771,7 +772,7 @@ export default function Dashboard({ return () => { setRefresh(); }; - }, [nodeData, val, did, preferences, infoMsg, refresh]); + }, [nodeData, val, did, preferences, infoMsg, refresh, props.dbConnected]); const RefreshButton = () =>{ return( @@ -874,6 +875,7 @@ Dashboard.propTypes = { did: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]), row: PropTypes.object, serverConnected: PropTypes.bool, + dbConnected: PropTypes.bool, }; export function ChartContainer(props) { diff --git a/web/pgadmin/dashboard/static/js/WelcomeDashboard.jsx b/web/pgadmin/dashboard/static/js/WelcomeDashboard.jsx index ea4b58003..8a75a63f4 100644 --- a/web/pgadmin/dashboard/static/js/WelcomeDashboard.jsx +++ b/web/pgadmin/dashboard/static/js/WelcomeDashboard.jsx @@ -72,7 +72,7 @@ const useStyles = makeStyles((theme) => ({ cursor: 'pointer' }, link: { - color: theme.otherVars.colorFg + '!important', + color: theme.otherVars.stepFg + '!important', }, cardColumn: { flex: '0 0 100%', diff --git a/web/pgadmin/misc/properties/CollectionNodeProperties.jsx b/web/pgadmin/misc/properties/CollectionNodeProperties.jsx index 1b8f56730..05aeef26d 100644 --- a/web/pgadmin/misc/properties/CollectionNodeProperties.jsx +++ b/web/pgadmin/misc/properties/CollectionNodeProperties.jsx @@ -86,7 +86,7 @@ export function CollectionNodeView({ const [data, setData] = React.useState([]); const [infoMsg, setInfoMsg] = React.useState('Please select an object in the tree view.'); const [selectedObject, setSelectedObject] = React.useState([]); - const [reload, setReload] = React.useState(); + const [reload, setReload] = React.useState(false); const [pgTableColumns, setPgTableColumns] = React.useState([ { @@ -162,7 +162,7 @@ export function CollectionNodeView({ if (res.success == 0) { pgBrowser.report_error(res.errormsg, res.info); } - setReload(true); + setReload(!reload); }) .catch(function (error) { Notify.alert( diff --git a/web/pgadmin/misc/statistics/static/js/Statistics.jsx b/web/pgadmin/misc/statistics/static/js/Statistics.jsx index 50fa4965a..7ed0dc198 100644 --- a/web/pgadmin/misc/statistics/static/js/Statistics.jsx +++ b/web/pgadmin/misc/statistics/static/js/Statistics.jsx @@ -221,7 +221,6 @@ export default function Statistics({ nodeData, item, node, ...props }) { } if (message != '') { setMsg(message); - setLoaderText(''); } return () => { setTableData([]); diff --git a/web/pgadmin/static/js/Theme/dark.js b/web/pgadmin/static/js/Theme/dark.js index 8808262ac..617af6753 100644 --- a/web/pgadmin/static/js/Theme/dark.js +++ b/web/pgadmin/static/js/Theme/dark.js @@ -93,7 +93,6 @@ export default function(basicSettings) { stepBg: '#FFFFFF', stepFg: '#000', toggleBtnBg: '#000', - colorFg: '#FFFFFF', emptySpaceBg: '#212121', } }); diff --git a/web/pgadmin/static/js/Theme/high_contrast.js b/web/pgadmin/static/js/Theme/high_contrast.js index 0fb330ae3..c9d0af429 100644 --- a/web/pgadmin/static/js/Theme/high_contrast.js +++ b/web/pgadmin/static/js/Theme/high_contrast.js @@ -91,7 +91,6 @@ export default function(basicSettings) { stepBg: '#FFFFFF', stepFg: '#000', toggleBtnBg: '#6B6B6B', - colorFg: '#FFFFFF', emptySpaceBg: '#010B15', } }); diff --git a/web/pgadmin/static/js/Theme/standard.js b/web/pgadmin/static/js/Theme/standard.js index b4e2b88b1..998429f00 100644 --- a/web/pgadmin/static/js/Theme/standard.js +++ b/web/pgadmin/static/js/Theme/standard.js @@ -85,7 +85,6 @@ export default function(basicSettings) { padding: '5px 8px', }, borderColor: '#dde0e6', - colorFg: '#222222', loader: { backgroundColor: fade('#000', 0.65), color: '#fff', diff --git a/web/pgadmin/static/js/components/PgTable.jsx b/web/pgadmin/static/js/components/PgTable.jsx index 5ea0c0c7e..35ed86488 100644 --- a/web/pgadmin/static/js/components/PgTable.jsx +++ b/web/pgadmin/static/js/components/PgTable.jsx @@ -381,23 +381,17 @@ export default function PgTable({ columns, data, isSelectRow, caveTable=true, .. const RenderRow = React.useCallback( ({ index, style }) => { const row = rows[index]; - const [expandComplete, setExpandComplete] = React.useState(null); + const [expandComplete, setExpandComplete] = React.useState(false); const rowRef = React.useRef() ; prepareRow(row); - React.useEffect(()=>{ - if(expandComplete && !row.isExpanded) { - setExpandComplete(false); - } - }, [row.isExpanded]); - React.useEffect(()=>{ if(rowRef.current) { - if(expandComplete == null) { + if(!expandComplete && rowRef.current.style.height == `${ROW_HEIGHT}px`) { return; } let rowHeight; - rowRef.current.style.height='unset'; + rowRef.current.style.height = 'unset'; if(expandComplete) { rowHeight = rowRef.current.offsetHeight; } else {