Fixed loading issue of Partitions collection node. Fixes #6844
parent
7d5668141d
commit
8faec3e0e9
|
@ -155,15 +155,23 @@ export class ManageTreeNodes {
|
||||||
public generate_url = (path: string) => {
|
public generate_url = (path: string) => {
|
||||||
let _path = path;
|
let _path = path;
|
||||||
let _parent_path = [];
|
let _parent_path = [];
|
||||||
|
let _partitions = [];
|
||||||
while(_path != '/') {
|
while(_path != '/') {
|
||||||
let node = this.findNode(_path);
|
let node = this.findNode(_path);
|
||||||
let _parent = unix.dirname(_path);
|
let _parent = unix.dirname(_path);
|
||||||
if(node.parentNode && node.parentNode.path == _parent) {
|
if(node.parentNode && node.parentNode.path == _parent) {
|
||||||
if (node.parentNode.metadata.data !== null && !node.parentNode.metadata.data._type.includes('coll-'))
|
if (node.parentNode.metadata.data !== null && !node.parentNode.metadata.data._type.includes('coll-'))
|
||||||
|
if(node.parentNode.metadata.data._type.includes('partition')) {
|
||||||
|
_partitions.push(node.parentNode.metadata.data._id);
|
||||||
|
} else {
|
||||||
_parent_path.push(node.parentNode.metadata.data._id);
|
_parent_path.push(node.parentNode.metadata.data._id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
_path = _parent;
|
_path = _parent;
|
||||||
}
|
}
|
||||||
|
// Replace the table with the last partition as in reality partition node is not child of the table
|
||||||
|
if(_partitions.length > 0) _parent_path[0] = _partitions[_partitions.length-1];
|
||||||
|
|
||||||
let _rev_arr = _parent_path.reverse();
|
let _rev_arr = _parent_path.reverse();
|
||||||
return _rev_arr.join("/");
|
return _rev_arr.join("/");
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,6 @@
|
||||||
right:0px;
|
right:0px;
|
||||||
bottom:0px;
|
bottom:0px;
|
||||||
height: 100%!important;
|
height: 100%!important;
|
||||||
overflow: scroll;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pg-prop-footer {
|
.pg-prop-footer {
|
||||||
|
|
Loading…
Reference in New Issue