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
FlashServiceAllows user 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 QuickHelpServiceAllows user to display a quick help panel.
VeilServiceManages an overlay masking layer that appears when the websocket web-socket connection fails.

Mast

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

ServiceDescription
MastServiceReturns the height of the mast in pixelsProvides functions relating to the masthead.

Nav

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

ServiceDescription
NavServiceManages the menu navigation pane.

Remote

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

ServiceDescription
RestServiceAbstracts rest calls using the $http service.
UrlFnServiceCreates URL strings for REST or Websocket web-socket calls.
WebSocketServiceHandles Websocket events (bind, unbind, listeners).WsEventServiceSend events with the Websocket (used by other services).
WSockWeb-socket wrapper to facilitate unit-testing with mock web-sockets.

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
FnServiceProvides general purpose functions that are 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
ButtonServiceProvides an API to create buttons, toggles, and radio button sets.
Table DirectivesDefines Angular directives for tabular viewsTableServiceAllows user to reset sort icons created by the directives written for tables.
TableBuilderServiceBuilds Provides 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.