in source/frontend/src/app/pages/sftp-main/sftp-main.component.ts [366:420]
onFolderPathSelect(event) {
this.loading_table = true;
if (event.node) {
this.items = [];
this.selectedFile = null;
this.currentFolderPath = event.node.data;
var bread = this.currentFolderPath.substring(2).split("/");
var path = "/"
var bc_nodes = [];
bread.forEach(element => {
path = path + "/" + element;
this.items.push({ 'label': element, 'id': path });
});
this.current_folder = this.items[this.items.length - 1];
const input = {
node_name: event.node.data,
node_type: 'file'
};
this.progressValue = 0;
this.progressContinue = true;
const self = this;
this.selectedTreeNode = event.node as TreeNode;
this.sftpService.getChildNodes(input).subscribe(nodes => {
this.filesForPath = nodes['data'];
// if we have child nodes we disable delete
this.childFileDetected = nodes['data'].length > 0;
this.disableDeleteFolderButton();
this.progressContinue = false;
this.progressValue = 0;
this.loading_table = false;
this.onFolderPathExpand(event);
});
}
}