private GraphNodeType[] CreateNodes() { GraphNodeType[] node = new GraphNodeType[GetConnections.Count]; int i = 0; foreach (Dictionary <string, string> pair in GetConnections) { // get neat splunk data DateTime time; string host; GetUsefulInfo(pair, out time, out host); float x; float y; GetPoints(i, out x, out y); GraphNodeType newNodeType = GraphNodeType.CreateInstance(Node_Prefab, time, host, new Vector3(x, y, 2), MiniNodePrefab); // make new nodes children of ParentObject (should be NodeManager game object) newNodeType.getObject().transform.parent = Parent_Object.transform; newNodeType.setPosition(new Vector3(x, y, 2)); node[i++] = newNodeType; } return(node); }
private GraphNodeType GenerateProc(Vector3 createPos, string user, string process_name, int pid) { GraphNodeType newProc = InstProc(createPos, DateTime.Today, user); newProc.setProcessName(process_name); newProc.setProcessId(pid); newProc.InitSubNodes(new string[] { "User: "******"Process Name: " + process_name, "PID: " + pid.ToString() }, subNodePrefab); newProc.getObject().name = "process_" + pid.ToString(); nodeCount++; return(newProc); }
public void NewProc(Vector3 createPos, string user, string process_name, int pid) { ///<summary>This function creates a new host on set coordinates, as well as a link between it and the root.</summary> /// // GraphNodeType newNode = GenerateProc(createPos, user, process_name, pid); GameObject nodeObj = newNode.getObject(); nodes.Add(newNode); nodeObj.transform.parent = this.transform; CreateLink(nodeObj, nodeObj.GetComponent <NodePhysX>().root); //print("Created new process named " + newNode.name); }
public void NewConn(Vector3 createPos, DateTime time, string process, string remoteAddress) { ///<summary>This function creates a new host on set coordinates, as well as a link between it and the root.</summary> /// // "Standard" overload GraphNodeType newNode = GenerateConn(createPos, time, process, remoteAddress); GameObject nodeObj = newNode.getObject(); nodes.Add(newNode); // Hierarchy maintenance - make this new node a child of the GraphController nodeObj.transform.parent = this.transform; CreateLink(nodeObj, nodeObj.GetComponent <NodePhysX>().root); //print("Created new host named " + newNode.name); }
public GraphNodeType GenerateConn(Vector3 createPos, DateTime time, string process, string remoteAddress) { GraphNodeType nodeCreated = null; nodeCreated = InstHost(createPos, time, process); nodeCreated.setRemoteAddress(remoteAddress); // @TODO make this more then just example flavor // @TODO: labels should come from dictionary keys nodeCreated.InitSubNodes(new string[] { "Connection Time: " + nodeCreated.getTime().ToString(), "User: "******"Dest IP: " + nodeCreated.getRemoteAddress() }, subNodePrefab); if (nodeCreated != null) { nodeCreated.getObject().name = "host" + process; nodeCount++; } return(nodeCreated); }