Reference Guide
Table Of Contents
- 1 Introduction
- 2 Establishing Your Test and Development Environments
- 3 Developing Applications
- Introduction
- Authentication
- REST API
- Audit Logging
- Alert Logging
- Configuration
- High Availability
- OpenFlow
- Metrics Framework
- GUI
- SKI Framework - Overview
- SKI Framework - Navigation Tree
- SKI Framework - Hash Navigation
- SKI Framework - View Life-Cycle
- SKI Framework - Live Reference Application
- UI Extension
- Introduction
- Controller Teaming
- Distributed Coordination Service
- Persistence
- Backup and Restore
- Device Driver Framework
- 4 Application Security
- 5 Including Debian Packages with Applications
- 6 Sample Application
- Application Description
- Creating Application Development Workspace
- Application Generator (Automatic Workspace Creation)
- Creating Eclipse Projects
- Updating Project Dependencies
- Building the Application
- Installing the Application
- Application Code
- 7 Testing Applications
- 8 Built-In Applications
- Appendix A
- Appendix B
- Bibliography
def.addView('hmTab')
};
}(SKI));
Now create a script that adds a menu entry to the navigation panel so the hm view is accessible
from the SDN Controller’s GUI. Create the file hm-ui/src/main/webapp/js/hm-nav.js with the
content from the following hm-nav.js listing. Use hm-nav.js to add as many entries in the navigation
panel as the application needs; there is just one JavaScript file dealing with the navigation panel.
hm-nav.js:
// JSLint directive...
/*global $: false, SKI: false */
(function (api) {
'use strict';
var f = api.fn, // general functions API
nav = api.nav; // navigation model API
f.trace('including hm-nav.js');
// Adds a new category and a new item
nav.insertCategoryAfter('c-tasks', 'c-hm', [
nav.item('n-hm-task’, ‘hmTask', 'square')
]);
// Add a new item to an existing category
nav.insertItemsBefore('n-exportLogs', {
nav.item('n-hm-task', 'hmTask', 'square')
]);
}(SKI));
Plain text is not used in the previous two listing. In order to display text in the views define
properties files which contain text identified by keys. This allows for localizing the applications; see
GUI on page 59 for details on how the localization infrastructure works on the SKI framework.
Next, create the properties files to define the text that the previous two listing reference by their
key. Create one properties file for each view.
When adding the “Switches” view to the framework in hm.js, name it “hm” (Highlighted in the
hm.js listing), thus the associated properties file must have the same name. Create the file hm-
ui/src/main/resources/com/hp/hm/ui/lion/hm.properties with the content from the following
hm.properties listing. Title and icon keys are reserved keys automatically used by the framework to
set the view’s title and icon. For more information see GUI on page 59 for details about available
icons and how define custom icons.
hm.properties:
title = Health Monitor Title
199