Fixed an issue where the users are unable to load the databases behind an HTTP reverse proxy. Fixes #6905
parent
fa21e25cb2
commit
2aac87569b
|
@ -32,3 +32,4 @@ Bug fixes
|
|||
| `Issue #6882 <https://redmine.postgresql.org/issues/6882>`_ - Ensure that columns should be displayed in the order of creation instead of alphabetical order in the browser tree.
|
||||
| `Issue #6891 <https://redmine.postgresql.org/issues/6891>`_ - Added support for composite foreign keys in the ERD tool.
|
||||
| `Issue #6900 <https://redmine.postgresql.org/issues/6900>`_ - Fixed an issue where exclusion constraint cannot be created from table dialog if the access method name is changed once.
|
||||
| `Issue #6905 <https://redmine.postgresql.org/issues/6905>`_ - Fixed an issue where the users are unable to load the databases behind an HTTP reverse proxy.
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
"path-fx": "^2.0.0",
|
||||
"pathfinding": "^0.4.18",
|
||||
"paths-js": "^0.4.9",
|
||||
"pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#bc66dff13c17f256355d4f2bf79e3458007868bc",
|
||||
"pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#ccf3327caaaeaf06e5e683b07330ba2555d79867",
|
||||
"postcss": "^8.2.15",
|
||||
"raf": "^3.4.1",
|
||||
"react": "^17.0.1",
|
||||
|
|
|
@ -225,6 +225,10 @@ export class Tree {
|
|||
return this.tree.getItemFromDOM(domElem[0]);
|
||||
}
|
||||
|
||||
DOMFrom(item) {
|
||||
return this.tree.getDOMFromItem(item);
|
||||
}
|
||||
|
||||
path(item) {
|
||||
if (item) return item.path;
|
||||
}
|
||||
|
|
|
@ -89,10 +89,9 @@ var initBrowserTree = async (pgBrowser) => {
|
|||
|
||||
// Render Browser Tree
|
||||
await render(
|
||||
<div>
|
||||
<FileTreeX model={treeModelX}
|
||||
onReady={itemHandle} create={create} remove={remove} update={update}/>
|
||||
</div>, document.getElementById('tree'));
|
||||
, document.getElementById('tree'));
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
|
@ -72,39 +72,42 @@ export class ManageTreeNodes {
|
|||
})
|
||||
|
||||
public readNode = (_path: string) => new Promise<string[]>((res, rej) => {
|
||||
let temp_tree_path = _path;
|
||||
let node = this.findNode(_path);
|
||||
let temp_tree_path = _path,
|
||||
node = this.findNode(_path),
|
||||
base_url = pgAdmin.Browser.URL;
|
||||
|
||||
if (node && node.children.length > 0) {
|
||||
if (!node.type === FileType.File) {
|
||||
rej("It's a leaf node")
|
||||
if (node && node.children.length > 0) {
|
||||
if (!node.type === FileType.File) {
|
||||
rej("It's a leaf node")
|
||||
}
|
||||
else {
|
||||
if (node.children.length != 0) res(node.children)
|
||||
}
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
async function loadData() {
|
||||
let url = '';
|
||||
if (_path == '/browser') {
|
||||
url = url_for('browser.nodes');
|
||||
} else {
|
||||
let _parent_url = self.generate_url(_path);
|
||||
if (node.metadata.data._pid == null ) {
|
||||
url = node.metadata.data._type + '/children/' + node.metadata.data._id;
|
||||
}
|
||||
else {
|
||||
if (node.children.length != 0) res(node.children)
|
||||
}
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
async function loadData() {
|
||||
let url = '';
|
||||
if (_path == '/browser') {
|
||||
url = url_for('browser.nodes');
|
||||
} else {
|
||||
let _parent_url = self.generate_url(_path);
|
||||
if (node.metadata.data._pid == null ) {
|
||||
url = node.metadata.data._type + '/children/' + node.metadata.data._id;
|
||||
if (node.metadata.data._type.includes("coll-")) {
|
||||
let _type = node.metadata.data._type.replace("coll-", "")
|
||||
url = _type + '/nodes/' + _parent_url;
|
||||
}
|
||||
else {
|
||||
if (node.metadata.data._type.includes("coll-")) {
|
||||
let _type = node.metadata.data._type.replace("coll-", "")
|
||||
url = _type + '/nodes/' + _parent_url;
|
||||
}
|
||||
else {
|
||||
url = node.metadata.data._type + '/children/' + _parent_url + '/' + node.metadata.data._id;
|
||||
}
|
||||
url = node.metadata.data._type + '/children/' + _parent_url + '/' + node.metadata.data._id;
|
||||
}
|
||||
}
|
||||
|
||||
url = base_url + url;
|
||||
|
||||
temp_tree_path = node.path;
|
||||
|
||||
if (node.metadata.data._type == 'server' && !node.metadata.data.connected) {
|
||||
|
|
|
@ -7582,9 +7582,9 @@ performance-now@^2.1.0:
|
|||
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
||||
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
|
||||
|
||||
"pgadmin4-tree@git+https://github.com/EnterpriseDB/pgadmin4-treeview/#bc66dff13c17f256355d4f2bf79e3458007868bc":
|
||||
"pgadmin4-tree@git+https://github.com/EnterpriseDB/pgadmin4-treeview/#ccf3327caaaeaf06e5e683b07330ba2555d79867":
|
||||
version "1.0.0"
|
||||
resolved "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#bc66dff13c17f256355d4f2bf79e3458007868bc"
|
||||
resolved "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#ccf3327caaaeaf06e5e683b07330ba2555d79867"
|
||||
dependencies:
|
||||
"@types/classnames" "^2.2.6"
|
||||
"@types/react" "^16.7.18"
|
||||
|
|
Loading…
Reference in New Issue