Versions Compared

Key

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

Table of Contents

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 All of these services can be found in 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.
QuickHelpServiceAllows user to display a quick help Renders the 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).
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
GeoDataServiceFetches and caches TopoJSON data, provides a way of providing an API for creating a path generator for that data.
GlyphServiceAdd, load, and register SVG symbols (glyphs).
IconServiceAdd, load, and register SVG icons via a service (abstraction of GlyphService) or a directive.
MapServiceLoads graphical maps into the SVG layer.
SvgUtilServiceGeneral SVG utility functions.
ZoomServiceCreates a "zoomer" to manage zoom functions in on an SVG mapslayer.

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.
KeyServiceBind keys to view functionsProvides key-bindings to function callbacks.
PrefsServiceStores Persists user settings in the browser's cookies.

RandomService

Encapsulated randomness.
ThemeServiceManages theme add, remove, and toggleUI 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 DirectivesHolds Defines Angular directives for tabular views.
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.