mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed issues related to porting of dependent, dependencies, and statistics panel.
refs #7016
This commit is contained in:
committed by
Akshay Joshi
parent
64c419e6f8
commit
7a2716bf77
@@ -9,13 +9,13 @@
|
||||
|
||||
import _ from 'lodash';
|
||||
import React, { useEffect } from 'react';
|
||||
import { generateNodeUrl } from '../../../../browser/static/js/node_ajax';
|
||||
import PgTable from 'sources/components/PgTable';
|
||||
import gettext from 'sources/gettext';
|
||||
import PropTypes from 'prop-types';
|
||||
import Notify from '../../../../static/js/helpers/Notifier';
|
||||
import getApiInstance from 'sources/api_instance';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { getURL } from '../../../static/utils/utils';
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
emptyPanel: {
|
||||
@@ -68,7 +68,7 @@ function parseData(data, node) {
|
||||
return data;
|
||||
}
|
||||
|
||||
export default function Dependents({ nodeData, node, ...props }) {
|
||||
export default function Dependents({ nodeData, item, node, ...props }) {
|
||||
const classes = useStyles();
|
||||
const [tableData, setTableData] = React.useState([]);
|
||||
|
||||
@@ -102,13 +102,13 @@ export default function Dependents({ nodeData, node, ...props }) {
|
||||
useEffect(() => {
|
||||
let message = gettext('Please select an object in the tree view.');
|
||||
if (node) {
|
||||
let url = generateNodeUrl.call(
|
||||
node,
|
||||
props.treeNodeInfo,
|
||||
'dependent',
|
||||
let url = getURL(
|
||||
nodeData,
|
||||
true,
|
||||
node.url_jump_after_node
|
||||
props.treeNodeInfo,
|
||||
node,
|
||||
item,
|
||||
'dependent'
|
||||
);
|
||||
message = gettext(
|
||||
'No dependant information is available for the selected object.'
|
||||
@@ -173,4 +173,5 @@ Dependents.propTypes = {
|
||||
nodeData: PropTypes.object,
|
||||
treeNodeInfo: PropTypes.object,
|
||||
node: PropTypes.func,
|
||||
item: PropTypes.object,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user