Due to a ransomware attack, the wiki was reverted to a July 2022 version. . We apologize for the lack of a more recent valid backup.
...
A view registers with the framework via a call to the addView(...) function.
Code Block | ||
---|---|---|
| ||
onos.ui.addView('viewId', { preload: preload, reset: reset, load: load, unload: unload, resize: resize, theme: theme }); |
The first argument to the function is a short string identifier for the view.
The second argument to the function is an inline object block with the given keys, whose values are references to callback functions:
preload | This function is called only once, the first time the view is loaded. It is called after the view's <div> has been added to the DOM. |
reset | This function is called just before the view is shown. It can be used to clear stale data from the view. |
load | This function is called when the view is loaded. |
unload | This function is called when the view is unloaded. The view may use this to drop references to cached data, or stop background tasks. |
resize | This function is called when the view has been resized. |
theme | This function is called when the user has toggled the theme. |
.code to go here...
Topology View
<details of websocket communication with the server>
...