Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

This page is a work in progress.

Overview

There are a number of Angular-based services that the ONOS GUI comes with ready made. All of our services are actually factories. Below you will find short summaries of what each service provides and links to pages with more information.

Most of the ONOS Web UI framework code is implemented as Angular services (factories, in fact). This page provides a brief summary of these factories, with links to pages giving more detail.

The source code can be found in All of these services are in the directory web/gui/src/main/webapp/app/fw/.

Layer

The module holding these services is onosLayer and is defined in layer/layer.js.

ServiceDescription
FlashService 
PanelService 
QuickHelpService 
Allows application code to flash transient messages on the screen.
LoadingServiceProvides the ONOS-branded "Loading..." animation.
PanelServiceProvides an API to create and destroy "fly-in" panels.
DialogServiceBuilds on the panel service to create a dialog panel.
QuickHelpServiceRenders the Quick Help panel.
VeilServiceManages an masking layer that appears when the web-socket connection fails.VeilService 

Mast

The module holding these services is onosMast and is  defined in mast/mast.js.

ServiceDescription
MastService Provides functions relating to the masthead.

Nav

The module holding these services is onosNav and is  defined in nav/nav.js.

ServiceDescription
NavService Manages the menu navigation pane.

Remote

The module holding these services is onosRemote and is  defined in remote/remote.js.

ServiceDescription
RestService Abstracts rest calls using the $http service.
UrlFnService Creates URL strings for REST or web-socket calls.
WebSocketService 
WsEventService 
Handles Websocket events (bind, unbind, listeners).
WSockWeb-socket wrapper to facilitate unit-testing with mock web-sockets.WSock 

SVG

The module holding these services is onosSvg and is  defined in svg/svg.js.

ServiceDescription
GeoDataService Fetches and caches TopoJSON data, providing an API for creating a path generator for that data.
GlyphService Add, load, and register SVG symbols (glyphs).
IconService Add, load, and register SVG icons via a service (abstraction of GlyphService) or a directive.
MapService Loads graphical maps into the SVG layer.
SvgUtilService General SVG utility functions.
ZoomService Creates a "zoomer" to manage zoom functions in an SVG layer.

Util

The module holding these services is onosUtil and is  defined in util/util.js.

ServiceDescription
FnService Provides general purpose functions useful throughout the application.
KeyService Provides key-bindings to function callbacks.
PrefsService Persists user settings in the browser's cookies.

RandomService

 
Encapsulated randomness.
ThemeService Manages UI themes (light and dark).

Widget

The module holding these services is onosWidget and is  defined in widget/widget.js.

ServiceDescription
ButtonService 
TableService 
TableBuilderService 
ToolbarService 
Provides an API to create buttons, toggles, and radio button sets.
Table DirectivesDefines Angular directives for tabular views.
TableBuilderServiceProvides an API to create a generic table view client model.
ToolbarServiceProvides an API to create a toolbar.
TooltipServiceProvides an API and a directive to install tooltips.TooltipService