Paul Greyson | 7a30082 | 2013-04-09 12:57:49 -0700 | [diff] [blame] | 1 | /*************************************************************************************************** |
| 2 | global variables |
| 3 | ***************************************************************************************************/ |
| 4 | |
| 5 | |
| 6 | /*************************************************************************************************** |
| 7 | the latest update to the model |
| 8 | ***************************************************************************************************/ |
| 9 | var model; |
| 10 | |
| 11 | /*************************************************************************************************** |
| 12 | cached JSON representation of the model. used to detect model changes and update the UI. |
| 13 | ***************************************************************************************************/ |
| 14 | var modelString; |
| 15 | |
Paul Greyson | 7a30082 | 2013-04-09 12:57:49 -0700 | [diff] [blame] | 16 | /*************************************************************************************************** |
Paul Greyson | c090d14 | 2013-04-09 16:59:03 -0700 | [diff] [blame] | 17 | the root element for the topology view |
Paul Greyson | 7a30082 | 2013-04-09 12:57:49 -0700 | [diff] [blame] | 18 | ***************************************************************************************************/ |
Paul Greyson | c090d14 | 2013-04-09 16:59:03 -0700 | [diff] [blame] | 19 | var topology; |
Paul Greyson | 7a30082 | 2013-04-09 12:57:49 -0700 | [diff] [blame] | 20 | |
| 21 | /*************************************************************************************************** |
| 22 | links that were created in the webui but which have not appeared in the links API response yet |
| 23 | these timeout after pendingTimeout |
| 24 | ***************************************************************************************************/ |
| 25 | var pendingLinks = {}; |
| 26 | |
| 27 | /*************************************************************************************************** |
Paul Greyson | e15c439 | 2013-04-09 15:05:31 -0700 | [diff] [blame] | 28 | current links including pending |
| 29 | ***************************************************************************************************/ |
| 30 | var links; |
| 31 | |
| 32 | /*************************************************************************************************** |
| 33 | a map from srcDPID => map of dstDPID=>link |
| 34 | ***************************************************************************************************/ |
| 35 | var linkMap; |
| 36 | |
| 37 | /*************************************************************************************************** |
Paul Greyson | 7a30082 | 2013-04-09 12:57:49 -0700 | [diff] [blame] | 38 | the flows that are displayed in the selected flow table |
| 39 | this may include pending flows which have not appeared in the flows API response yet |
| 40 | ***************************************************************************************************/ |
| 41 | var selectedFlows = []; |
| 42 | |
| 43 | /*************************************************************************************************** |
| 44 | a mapping from controller name to color used for color coding the topology and ONOS nodes views |
| 45 | ***************************************************************************************************/ |
Paul Greyson | bbd708b | 2013-04-09 22:37:31 -0700 | [diff] [blame] | 46 | var controllerColorMap = {}; |
| 47 | |
| 48 | /*************************************************************************************************** |
| 49 | defined by rings.js or map.js this is where the flows are drawn. |
| 50 | ***************************************************************************************************/ |
| 51 | var flowLayer; |
| 52 | |
| 53 | /*************************************************************************************************** |
| 54 | hack to make the old ring drawing code compatible with the shared flow drawing code |
| 55 | will be obsoleted once the ring drawing code is disposed of |
| 56 | ***************************************************************************************************/ |
| 57 | var drawingRings; |