in ui/angular/src/app/measure/create-measure/ac/ac.component.ts [642:679]
ngOnInit() {
let getTableNames = this.serviceService.config.uri.dbtablenames;
this.http.get(getTableNames).subscribe((databases) => {
this.nodeList = new Array();
this.nodeListTarget = this.nodeList; // share same model instead of copying(?)
let i = 1;
for (let dbName in databases) {
if (!databases.hasOwnProperty(dbName)) {
continue;
}
let dbNode = new node();
dbNode.name = dbName;
dbNode.id = i++;
dbNode.isExpanded = false;
dbNode.children = new Array();
for (let tableName of databases[dbName]) {
let tableNode = new node();
tableNode.name = tableName;
dbNode.children.push(tableNode);
tableNode.isExpanded = true;
tableNode.location = null;
tableNode.parent = dbName;
tableNode.cols = null;
}
this.nodeList.push(dbNode);
}
if (i >= 10) {
this.options.animateExpand = false;
this.targetOptions.animateExpand = false;
}
this.updateTrees();
});
this.src_size = "1day";
this.tgt_size = "1day";
this.src_timezone = this.srcconfig.timezone;
this.tgt_timezone = this.tgtconfig.timezone;
}