This is an archive of the ONOS 1.0 wiki. For the current ONOS wiki, look here.

This page captures notes on the directory structure of the GUI client-side code.

Structure Overview

The following illustrates the directory structure:

webapp
 +-- app
 |    +-- fw
 |    |    +-- util
 |    |    +-- svg
 |    |    +-- layers
 |    |    +-- remote
 |    |    +-- mast
 |    |    +-- nav
 |    |     
 |    +-- view
 |         +-- sample
 |         +-- topo
 |         +-- device
 |
 +-- appext
 |
 +-- data
 |    +-- img
 |    +-- map
 |
 +-- mock
 |
 +-- tests
 |    +-- app
 |    |    +-- fw
 |    |    +...
 |    +-- e2e
 |
 +-- tp
 |
 +-- WEB-INF
 

app directory

The app directory contains subdirectories

  • fw for framework related code
    • That is, features/functions shared by all "views"
  • view for view related code
    • That is, a subdirectory for each "view" implemented

app / fw directory

The fw subdirectory contains the following subdirectories, providing a number of categories of functionality:

  • util 
    • General functions
    • Key Handler
    • Theme Service
    • Alert Service
  • svg
    • Glyph Service
    • Icon Service
    • GeoDataService
    • Map Service
    • Zoom Service
  • layers
    • Flash Service (transient messages)
    • Panel Service (floating panels)
    • Quick Help Service (key bindings, mouse gestures)
    • Death Mask Service (loss of server connection)
  • remote
    • Login Service
    • Web Socket Service
  • mast
    • Masthead functions
  • nav
    • Navigation Service

app / view directory

The view subdirectory contains a subdirectory for each implemented view.

For example, topo contains the code implementing the Topology View.

appext directory

The appext directory is simply a placeholder to be used as the root path for external application code.

It is expected that external applications (separate .jar/.war packaging) will contribute views and or topology overlays to the main GUI. This functionality will be injected server-side, with the source code file paths projected to be under this directory name. For example:

appext
 +--- foo
 |     +... (foo code and resources)
 +--- bar
 :     +... (bar code and resources)

data directory

The data directory contains subdirectories for static data files

  • img - images (.png etc.)
  • map - GeoJSON map data
  • ...

mock directory

The mock directory is for code which emulates the server-end of a websocket, and facilitates the manual injection of "events" (JSON structures) for development / debugging of client code.

tests directory

The tests directory contains karma / jasmine unit tests and end-to-end (scenario) tests for javascript modules.

tp directory

The tp directory contains third-party code, such as AngularJS, D3, jquery, topojson, etc. 

WEB-INF directory

The WEB-INF directory contains the web.xml file for configuring the web bundle.

 

  • No labels