I think it's a good idea to separate this into another JS file as I would also find it much cleaner to have as little code in the <script> tag as possible. 

This <div> is the markup for renders the window that opens when you double click a node. It creates the form with "Node ID", "Attributes", "Sent" and "Received". We are using Bootstrap's grid view layout system for a table-like appearance without actually using a table - so all these div classes like "col-sm-8" etc..More details here - http://getbootstrap.com/css/. The labels are simply the labels for the corresponding input field. Like, "Node ID" is for the node-attr-id text input right below it. Similarly other labels for attributes. The message "Sent" and "Received" part uses Bootstrap's nav-tabs class on an unordered list (ul)  [line 227]. 

Let me know if any piece needs more explanation. Will be happy to put it :)