void doCustomGraphs(Map<String, GraphDesc> graphs, Map<Integer, GraphNode> graphMap, Map<String, GraphTree> treeMap, Set<Tab> tabs) { log(Level.DEBUG, "Parsing graphs configuration"); // Let's build the tab with all the custom graphs if(!graphs.isEmpty()) { Tab customGraphsTab = new Tab.DynamicTree("Custom graphs", PropertiesManager.CUSTOMGRAPHTAB); customGraphsTab.setHostlist(this); for(GraphDesc gd: graphs.values()) { AutonomousGraphNode gn = new AutonomousGraphNode(gd); gn.configure(this); graphMap.put(gn.getQualifiedName().hashCode(), gn); customGraphsTab.add(gn.getQualifiedName(), Arrays.asList(new String[] { gd.getName() })); } GraphTree tree = customGraphsTab.getGraphTree(); treeMap.put(tree.getName(), tree); tabs.add(customGraphsTab); } }
void doSums(Map<String, Sum> sums, Map<Integer, GraphNode> graphMap, Map<String, GraphTree> treeMap, Set<Tab> tabs) { // Let's build the tab with all the sums if(sums.size() > 0) { Tab sumGraphsTab = new Tab.DynamicTree("Sums", PropertiesManager.SUMSTAB); sumGraphsTab.setHostlist(this); for(Sum s: sums.values()) { try { s.configure(this); graphMap.put(s.getQualifiedName().hashCode(), s); sumGraphsTab.add(s.getQualifiedName(), "Sums", s.getName()); } catch (Exception e1) { log(Level.ERROR, e1, "failed sum: %s", e1); } } GraphTree tree = sumGraphsTab.getGraphTree(); treeMap.put(tree.getName(), tree); tabs.add(sumGraphsTab); } }
private String sub(ParamsBean params, JrdsJSONWriter w, GraphTree gt, String type, Filter f, String path, int base) throws IOException { String id = null; String subpath = path + "/" + gt.getName(); boolean hasChild = false; Map<String, GraphTree> childs = gt.getChildsMap(); doTree(w, gt.getName(), id, type, childsref);
logger.debug(hl.getTrees()); for(GraphTree graphTree: hl.getTrees()) { logger.trace("Tree found: " + graphTree.getName()); for(GraphNode gn: graphTree.enumerateChildsGraph(null)) { if(!done.contains(gn.hashCode())) {