Reference Guide

Table Of Contents
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.hp.util</groupId>
<artifactId>hp-util-skis</artifactId>
<version>${hp-util.version}</version>
</dependency>
The second parameter (“com/hp/hm/ui”) of the super(…) call in the constructor of the
UIExtension.java listing specifies the location of the two files the framework uses to integrate the
views: css.hml and js.html. These files act as links to the application’s cascading style sheets [41]
and the application’s JavaScript files respectively. Create the files hm-
ui/src/main/resources/com/hp/hm/ui/css.html and hm-
ui/src/main/resources/com/hp/hm/ui/js.html with the content from the following UIExtension
css.html listing and the following UIExtension js.html listing.
UIExtension css.html:
<link href="/sdn/ui/health/css/hm.css" rel="stylesheet">
UIExtension js.html :
<script src="/sdn/ui/health/js/hm-nav.js"></script>
<script src="/sdn/ui/health/js/hm.js"></script>
<script src="/sdn/ui/health/app/hmChart.js"></script>
The prefixsdn/ui/health used in the UIExtension css.html listing and the UIExtension js.html
listing must match the web.context.path property from the hm-ui/pom.xml to generate .war listing
under Module Configuration below. The rest of the path (“…/css/hm.css”, “…/js/hm-nav.js” and
…/js/hm.js”) is determined by the structure of the hm-ui/src/main/webapp directory.
Module Configuration
The SDN Controller GUI is based on the HP SKI framework which uses JavaScript [40] as the
underlying technology. Thus, similarly to the RESTful web services module (hm-rs), the user interface
module (hm-ui) is deployed as a web application; and thus the module’s output must be a web
application archive (.war file) [35].
This section describes the configuration changes needed to do to the sample application so the
hm-ui module is properly deployed.
Create a place holder hm-ui/src/main/webapp/WEB-INF/web.xml file with the content from the
following UI Module Web Application (web.xml) listing.
UI Module Web Application (web.xml):
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Health Monitor UI</display-name> . . .
</web-app>
201