Structure of an Add-On

A valid Operations Monitor add-on consists of a manifest.json file and a set of files that will be exposed to the client. The manifest.json file must be a valid JSON file and include the fields found in Table 12-1:

Table 12-1 manifest.json File Required Fields

Field Description

name

Name of the extension. This name will be used as the extension files path in the server script.

description

Describes the functions of the add-on.

api_version

The current supported API version is "0.1.0".

css

(Optional) List of CSS stylesheets that are included.

js

(Optional) List of Javascript files included.

images

(Optional) List of image files included.

Example:

{
  "name": "customextension',
  "description": "A simple example extension.\n Additional comments can be added here",
  "api_version": "0.1.0",
  "css": ["css1.css", "custom_css.css"],
  "js": ["custom.js", "extension.js"],
  "images": ["logo.png", "image.jpeg", "icon.ico"],
}

Note:

The CSS and JS files will be loaded in the same order as declared in the manifest.json file. They will be loaded after all Operations Monitor libraries. The image files order is not meaningful as they are not pre-loaded.